]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fixed OutgoingFW Parser, all option removed
authorChristian Schmidt <maniacikarus@ipfire.org>
Sat, 23 Jan 2010 16:48:01 +0000 (17:48 +0100)
committerChristian Schmidt <maniacikarus@ipfire.org>
Sat, 23 Jan 2010 16:48:01 +0000 (17:48 +0100)
To be compatible with old rules all will be translated to tcp and udp
like in earlier versions of outgoingfw. So all is not doing what you
expect, but if we change this all old rules using all and ports need to
be translated to udp or tcp.
When using GRE and ESP ports will be ignored.

config/outgoingfw/outgoingfw.pl
html/cgi-bin/outgoingfw.cgi

index 4b86a8a2a2fa3e3edb41963c7fb5f0ed55ced8c2..ac27a58fe57b3681a0cb0238bbcec4c7fd32d33d 100644 (file)
@@ -152,19 +152,18 @@ foreach $configentry (sort @configs)
                        @proto = ("esp");
                } elsif ($configline[3] eq 'gre') {
                        @proto = ("gre");
-               } elsif ($configline[3] eq 'tcp&udp') {
-                       @proto = ("tcp","udp");
                } else {
-                       @proto = ("all");
+                       @proto = ("tcp","udp");
                }
+                 
                
                foreach $PROTO (@proto) {
                        $CMD = "/sbin/iptables -A OUTGOINGFW -s $SOURCE -d $DESTINATION -p $PROTO";
        
-                       if ($configline[8]) {
+                        if ($configline[8] && $configline[3] ne 'esp' && $configline[3] ne 'gre') {
                                $DPORT = "$configline[8]";
                                $CMD = "$CMD --dport $DPORT";
-                       }
+                        }
                        
                        if ($DEV) {
                                $CMD = "$CMD -i $DEV";
index ed87e0d8a3ff813787d220b69350b69056ff731e..f112f6efc24e2112570b240c6ad3417b8fbf242b 100644 (file)
@@ -634,7 +634,6 @@ sub addrule
                                <option value='udp' $selected{'PROT'}{'udp'}>UDP</option>
                                <option value='gre' $selected{'PROT'}{'gre'}>GRE</option>
                                <option value='esp' $selected{'PROT'}{'esp'}>ESP</option>
-                               <option value='tcp&udp' $selected{'PROT'}{'tcp&udp'}>TCP & UDP</option>
                        </select>
                    <td width='20%' align='right' colspan='2'>$Lang::tr{'policy'}:
                    <td width='30%' align='left' colspan='2'>