mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Forward Firewall: fixed rules.pl error when using manual target address
Signed-off-by: Alexander Marx <amarx@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
2a81ab0d77
commit
14f7cb87b9
@@ -111,7 +111,9 @@ sub preparerules
|
||||
}
|
||||
sub buildrules
|
||||
{
|
||||
|
||||
my $hash=shift;
|
||||
|
||||
foreach my $key (sort keys %$hash){
|
||||
if($$hash{$key}[2] eq 'ON'){
|
||||
#get source ip's
|
||||
@@ -147,7 +149,6 @@ sub buildrules
|
||||
}else{
|
||||
&get_address($$hash{$key}[5],$$hash{$key}[6],"tgt");
|
||||
}
|
||||
|
||||
##get source prot and port
|
||||
$SRC_TGT='SRC';
|
||||
$SPROT = &get_prot($hash,$key);
|
||||
@@ -245,7 +246,7 @@ sub get_address
|
||||
}
|
||||
my $key = &General::findhasharraykey($hash);
|
||||
if($base eq 'src_addr' || $base eq 'tgt_addr' ){
|
||||
$$hash{$key}[0] = $configfwdfw{$key}[4];
|
||||
$$hash{$key}[0] = $base2;
|
||||
}elsif($base eq 'std_net_src' || $base eq 'std_net_tgt' || $base eq 'Standard Network'){
|
||||
$$hash{$key}[0]=&fwlib::get_std_net_ip($base2);
|
||||
}elsif($base eq 'cust_net_src' || $base eq 'cust_net_tgt' || $base eq 'Custom Network'){
|
||||
|
||||
Reference in New Issue
Block a user