mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-08 05:56:11 +02:00
Firewall: fix rules.pl when using custom hosts/networks and services no rule was applied because no protokoll could be found
Also extended JS code to correctly show ICMP Types only, if NO Targetport is selcted
This commit is contained in:
@@ -252,7 +252,7 @@ sub buildrules
|
||||
foreach my $DPROT (@DPROT){
|
||||
$DPORT = &get_port($hash,$key,$DPROT);
|
||||
$PROT=$DPROT;
|
||||
$PROT="-p $PROT" if ($PROT ne '');
|
||||
$PROT="-p $PROT" if ($PROT ne '' && $PROT ne ' ');
|
||||
foreach my $a (sort keys %sourcehash){
|
||||
foreach my $b (sort keys %targethash){
|
||||
if ($sourcehash{$a}[0] ne $targethash{$b}[0] && $targethash{$b}[0] ne 'none' || $sourcehash{$a}[0] eq '0.0.0.0/0.0.0.0'){
|
||||
@@ -311,7 +311,7 @@ sub buildrules
|
||||
foreach my $DPROT (@DPROT){
|
||||
$DPORT = &get_port($hash,$key,$DPROT);
|
||||
$PROT=$DPROT;
|
||||
$PROT="-p $PROT" if ($PROT ne '');
|
||||
$PROT="-p $PROT" if ($PROT ne '' && $PROT ne ' ');
|
||||
foreach my $a (sort keys %sourcehash){
|
||||
foreach my $b (sort keys %targethash){
|
||||
if ($sourcehash{$a}[0] ne $targethash{$b}[0] && $targethash{$b}[0] ne 'none' || $sourcehash{$a}[0] eq '0.0.0.0/0.0.0.0'){
|
||||
|
||||
Reference in New Issue
Block a user