mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
BUG11825: firewall: Renaming a network/host group doesn't update rules
Code only changed field 6 of hash (target group) and not field 4 (source group). 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 firewallrules immediately. fixes: #11825 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
aec1925bea
commit
2754623fa9
@@ -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,"geoip");
|
||||
&changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6,"geoip");
|
||||
}
|
||||
}
|
||||
&addgeoipgrp;
|
||||
|
||||
Reference in New Issue
Block a user