]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Be a little more robust.
authorChristian Schmidt <christian.schmidt@ipfire.org>
Sun, 5 Sep 2010 15:18:43 +0000 (17:18 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 6 Sep 2010 08:46:21 +0000 (10:46 +0200)
config/outgoingfw/outgoingfw.pl

index e2f9093f0d7c091585024f15e61392de21eba85f..8d4d27d313136ab2ae486a50dece740d4f54b9ab 100644 (file)
@@ -153,12 +153,12 @@ foreach $configentry (sort @configs)
                } elsif ($configline[2] eq 'ip') {
                        @SOURCE = ("$configline[5]");
                        $DEV = "";
-               } elsif ($configline[2] eq 'all') {
-                       @SOURCE = ("0/0");
-                       $DEV = "";
                } elsif ($configline[2] eq 'mac') {
                        @SOURCE = ("$configline[6]");
                        $DEV = "";
+               } elsif ($configline[2] eq 'all') {
+                       @SOURCE = ("0/0");
+                       $DEV = "";
                } else {
                        if ( -e "/var/ipfire/outgoing/groups/ipgroups/$configline[2]" ) {
                                @SOURCE = `cat /var/ipfire/outgoing/groups/ipgroups/$configline[2]`;
@@ -189,7 +189,7 @@ foreach $configentry (sort @configs)
 
                                if ( $SOURCE eq "" ){next;}
 
-                               if ( $configline[6] ne "" || $configline[2] eq 'mac' ){
+                               if ( ( $configline[6] ne "" || $configline[2] eq 'mac' ) && $configline[2] ne 'all'){
                                        $SOURCE =~ s/[^a-zA-Z0-9]/:/gi;
                                        $CMD = "/sbin/iptables -A OUTGOINGFWMAC -m mac --mac-source $SOURCE -d $DESTINATION -p $PROTO";
                                } else {