]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/outgoingfw/outgoingfw.pl
Fixing the weekday parsing at outgoingfw.pl
[ipfire-2.x.git] / config / outgoingfw / outgoingfw.pl
index 6709ee603fb997c96e695d685aedc56eae240f65..1d7dd93aa00b04abe9a27f92c8da065abb6c55f6 100644 (file)
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2005-2010  IPFire Team                                        #
+# Copyright (C) 2007-2011  IPFire Team                                        #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -25,6 +25,7 @@ use strict;
 #use warnings;
 
 require '/var/ipfire/general-functions.pl';
+require "${General::swroot}/lang.pl";
 
 my %outfwsettings = ();
 my %checked = ();
@@ -206,6 +207,7 @@ foreach $configentry (sort @configs)
                                }
 
                                if ($configline[17] && $configline[18]) {
+                                       $DAY = "";
                                        if ($configline[10]){$DAY = "Mon,"}
                                        if ($configline[11]){$DAY .= "Tue,"}
                                        if ($configline[12]){$DAY .= "Wed,"}
@@ -218,7 +220,13 @@ foreach $configentry (sort @configs)
 
                                $CMD = "$CMD -o $netsettings{'RED_DEV'}";
 
-                               if ($configline[9] eq "aktiv") {
+                               if ( $configline[9] eq $Lang::tr{'aktiv'} && $outfwsettings{'POLICY'} eq 'MODE1' ) {
+                                       if ($DEBUG) {
+                                               print "$CMD -m limit --limit 10/minute -j LOG --log-prefix 'LOG_OUTGOINGFW '\n";
+                                       } else {
+                                               system("$CMD -m limit --limit 10/minute -j LOG --log-prefix 'LOG_OUTGOINGFW '");
+                                       }
+                               } elsif ( $configline[9] eq $Lang::tr{'aktiv'} && $outfwsettings{'POLICY'} eq 'MODE2' ) {
                                        if ($DEBUG) {
                                                print "$CMD -m limit --limit 10/minute -j LOG --log-prefix 'DROP_OUTGOINGFW '\n";
                                        } else {