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>
}
&General::writehasharray("$configgeoipgrp", \%customgeoipgrp );
#change name in FW Rules
- &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},6);
+ &changenameinfw($fwhostsettings{'oldgrpname'},$fwhostsettings{'grp'},4,"geoip");
}
}
&addgeoipgrp;
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);