From: Alexander Marx Date: Thu, 5 Apr 2018 06:34:36 +0000 (+0200) Subject: BUG:11312 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2FBUG11312;p=people%2Famarx%2Fipfire-2.x.git BUG:11312 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. fixes: #11312 --- diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index a2ade8a20..c342d46a1 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1278,7 +1278,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname') } &General::writehasharray("$configgeoipgrp", \%customgeoipgrp ); #change name in FW Rules - &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6); + &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip"); } } &addgeoipgrp; @@ -3052,6 +3052,12 @@ sub changenameinfw my $old=shift; my $new=shift; my $fld=shift; + my $type=shift; + + if ($type eq 'geoip'){ + $old="group:$old"; + $new="group:$new"; + } &General::readhasharray("$fwconfigfwd", \%fwfwd); &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout);