From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: ipfire-scm@lists.ipfire.org Subject: [git.ipfire.org] IPFire 2.x development tree branch, master, updated. c55f5c8eaaa5b91a63765b1ac5fec4da8ce028fb Date: Wed, 23 Mar 2022 17:15:44 +0000 Message-ID: <4KNw3h2jBTz2xgZ@people01.haj.ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1662046032895204270==" List-Id: --===============1662046032895204270== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree". The branch, master has been updated via c55f5c8eaaa5b91a63765b1ac5fec4da8ce028fb (commit) from 26926c4d12793331cdf51d54a44ea3dfe4780dbf (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c55f5c8eaaa5b91a63765b1ac5fec4da8ce028fb Author: Stefan Schantl Date: Wed Mar 23 18:08:52 2022 +0100 rules.pl: Fix creating rules for location based groups. =20 The former used hash value only contains the country code when a rule for a single country should be created. =20 In case a location group is used the hash value refers to the group name, which does not work here. =20 The required country code is part of the processed string and can be omit= ted from here. This works well for single codes and location groups, because = those are processed in a loop. =20 Fixes #12809. =20 Signed-off-by: Stefan Schantl Acked-by: Peter M=C3=BCller Signed-off-by: Michael Tremer ----------------------------------------------------------------------- Summary of changes: config/firewall/rules.pl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) Difference in files: diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index d71304986..19dc7a6d1 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -411,8 +411,9 @@ sub buildrules { if ($source =3D~ /mac/) { push(@source_options, $source); } elsif ($source =3D~ /-m set/) { - # Grab location code from hash. - my $loc_src =3D $$hash{$key}[4]; + # Split given arguments into single chunks to + # obtain the set name. + my ($a, $b, $c, $loc_src, $e) =3D split(/ /, $source); =20 # Call function to load the networks list for this country. &ipset_restore($loc_src); @@ -425,8 +426,9 @@ sub buildrules { # Prepare destination options. my @destination_options =3D (); if ($destination =3D~ /-m set/) { - # Grab location code from hash. - my $loc_dst =3D $$hash{$key}[6]; + # Split given arguments into single chunks to + # obtain the set name. + my ($a, $b, $c, $loc_dst, $e) =3D split(/ /, $destination); =20 # Call function to load the networks list for this country. &ipset_restore($loc_dst); hooks/post-receive -- IPFire 2.x development tree --===============1662046032895204270==--