/[smecontribs]/rpms/smeserver-coova-chilli/contribs7/smeserver-coova-chilli-0.2-fixe_allow_uamallowed.patch
ViewVC logotype

Contents of /rpms/smeserver-coova-chilli/contribs7/smeserver-coova-chilli-0.2-fixe_allow_uamallowed.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jun 11 09:16:08 2009 UTC (14 years, 10 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-coova-chilli-0_2-17_el4_sme, smeserver-coova-chilli-0_2-16_el4_sme, smeserver-coova-chilli-0_2-19_el4_sme, smeserver-coova-chilli-0_2-18_el4_sme, smeserver-coova-chilli-0_2-20_el4_sme, smeserver-coova-chilli-0_2-15_el4_sme, HEAD
Fixe a bug in masq template

1 --- smeserver-coova-chilli-0.2/root/etc/e-smith/templates/etc/rc.d/init.d/masq/00Functions01Chilli40forwardFrom.fixe_allow_uamallowed 2009-06-11 02:39:29.000000000 +0200
2 +++ smeserver-coova-chilli-0.2/root/etc/e-smith/templates/etc/rc.d/init.d/masq/00Functions01Chilli40forwardFrom 2009-06-11 02:40:59.000000000 +0200
3 @@ -36,13 +36,14 @@
4 }
5
6 foreach (split(/[;,]/, ${'chilli'}{'uamallowed'} || '')){
7 - # Check the rules has the form proto:remote_host:remote_port
8 - # Or host:port or protocol:host
9 - next unless /^((tcp|TCP|udp|UDP):)?((${ReIpAddr})|((\w+\.)?\w+\.\w{2,3}))(:${RePort})?$/;
10 - my $proto = $1;
11 - my $host = $2;
12 - my $dport = $3;
13 - $OUT .= " # $_ is allowed:\n";
14 + # Check the rules has the form proto:remote_host:remote_port
15 + # Or host:port or protocol:host
16 + next unless /^((tcp|TCP|udp|UDP):)?(${ReIpAddr})(:${RePort})?$/;
17 + my @param = split(/:/, $_);
18 + my $proto = $param[0];
19 + my $host = $param[1];
20 + my $dport = $param[2];
21 + $OUT .= " # $_ is allowed:\n";
22 $OUT .= " /sbin/iptables -A FORWARD_FROM_CHILLI ";
23 $OUT .= "-p $proto " if (($proto) && ($proto ne ''));
24 $OUT .= "-d $host ";
25 @@ -51,6 +52,7 @@
26 $OUT .= "-j ACCEPT\n"
27 }
28
29 +
30 # Allow the two dns servers specified
31 $OUT .= " # Allow dns requests to ${'chilli'}{'dns1'}\n" .
32 " /sbin/iptables -A FORWARD_FROM_CHILLI -p udp --dport 53 -d ${'chilli'}{'dns1'} -j ACCEPT\n"

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed