mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-19 07:23:03 +02:00
Merge branch 'master' into next
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -310,6 +310,11 @@ if ($outfwsettings{'ACTION'} eq $Lang::tr{'delete'})
|
||||
if ($outfwsettings{'ACTION'} eq $Lang::tr{'add'})
|
||||
{
|
||||
if ( $outfwsettings{'VALID'} eq 'yes' ) {
|
||||
|
||||
if ( $outfwsettings{'SNET'} eq "all" ) {
|
||||
$outfwsettings{'SIP'} ="";
|
||||
$outfwsettings{'SMAC'}="";
|
||||
}
|
||||
open( FILE, ">> $configfile" ) or die "Unable to write $configfile";
|
||||
print FILE <<END
|
||||
$outfwsettings{'STATE'};$outfwsettings{'ENABLED'};$outfwsettings{'SNET'};$outfwsettings{'PROT'};$outfwsettings{'NAME'};$outfwsettings{'SIP'};$outfwsettings{'SMAC'};$outfwsettings{'DIP'};$outfwsettings{'DPORT'};$outfwsettings{'LOG'};$outfwsettings{'TIME_MON'};$outfwsettings{'TIME_TUE'};$outfwsettings{'TIME_WED'};$outfwsettings{'TIME_THU'};$outfwsettings{'TIME_FRI'};$outfwsettings{'TIME_SAT'};$outfwsettings{'TIME_SUN'};$outfwsettings{'TIME_FROM'};$outfwsettings{'TIME_TO'};
|
||||
|
||||
Reference in New Issue
Block a user