From 40a930bda59180d3d88affd8bec028ebb375c05d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20M=C3=BCller?= Date: Thu, 26 Apr 2018 17:31:46 +0200 Subject: [PATCH] BUG:11312 Fix renaming GeoIP groups MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexander Marx Signed-off-by: Michael Tremer --- html/cgi-bin/fwhosts.cgi | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index a2ade8a202..10217425d9 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); -- 2.39.5