From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Marx To: development@lists.ipfire.org Subject: [PATCH] BUG11825: firewall: Renaming a network/host group doesn't update rules Date: Fri, 24 Aug 2018 10:06:30 +0200 Message-ID: <20180824080630.9612-1-alexander.marx@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7141283149391507815==" List-Id: --===============7141283149391507815== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Code only changed field 6 of hash (target group) and not field 4 (source grou= p). Also if using geoip it was only field 4 of hash (source group) and not field = 6 of hash (target group) Added new code that changes both fields to reflect the change in the firewall= rules immediately. fixes: #11825 Signed-off-by: Alexander Marx --- html/cgi-bin/fwhosts.cgi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index 576701ac6..7315e79b6 100644 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1258,6 +1258,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegrpname') } &General::writehasharray("$configgrp", \%customgrp ); #change name in FW Rules + &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4); &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6); } } @@ -1282,6 +1283,7 @@ if ($fwhostsettings{'ACTION'} eq 'changegeoipgrpname') &General::writehasharray("$configgeoipgrp", \%customgeoipgrp ); #change name in FW Rules &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"g= eoip"); + &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6,"g= eoip"); } } &addgeoipgrp; --=20 2.17.1 --===============7141283149391507815==--