mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
BUG:11312 Fix renaming GeoIP groups
When renaming a GeoIP Group, the corresponding names in firewallrules (if any) are not changed accordingly. Now when changing a GeoIP Group the firewallrules are renamed correctly. Slightly improved first version of this patch (contained a blank line with trailing whitespace). No functionality changed, patch has been confirmed as working correctly. Fixes: #11312 Signed-off-by: Peter Müller <peter.mueller@link38.eu> Signed-off-by: Alexander Marx <alexander.marx@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
86fd194766
commit
40a930bda5
@@ -1278,7 +1278,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname')
|
|||||||
}
|
}
|
||||||
&General::writehasharray("$configgeoipgrp", \%customgeoipgrp );
|
&General::writehasharray("$configgeoipgrp", \%customgeoipgrp );
|
||||||
#change name in FW Rules
|
#change name in FW Rules
|
||||||
&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6);
|
&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&addgeoipgrp;
|
&addgeoipgrp;
|
||||||
@@ -3052,6 +3052,12 @@ sub changenameinfw
|
|||||||
my $old=shift;
|
my $old=shift;
|
||||||
my $new=shift;
|
my $new=shift;
|
||||||
my $fld=shift;
|
my $fld=shift;
|
||||||
|
my $type=shift;
|
||||||
|
|
||||||
|
if ($type eq 'geoip'){
|
||||||
|
$old="group:$old";
|
||||||
|
$new="group:$new";
|
||||||
|
}
|
||||||
&General::readhasharray("$fwconfigfwd", \%fwfwd);
|
&General::readhasharray("$fwconfigfwd", \%fwfwd);
|
||||||
&General::readhasharray("$fwconfiginp", \%fwinp);
|
&General::readhasharray("$fwconfiginp", \%fwinp);
|
||||||
&General::readhasharray("$fwconfigout", \%fwout);
|
&General::readhasharray("$fwconfigout", \%fwout);
|
||||||
|
|||||||
Reference in New Issue
Block a user