From: "Peter Müller" <git@ipfire.org>
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. abf148cebd8a8ed30c1a4f2807bb0608eec5b026
Date: Wed, 23 Mar 2022 17:12:57 +0000 [thread overview]
Message-ID: <4KNw0V0xKvz2xgZ@people01.haj.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2795 bytes --]
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, next has been updated
via abf148cebd8a8ed30c1a4f2807bb0608eec5b026 (commit)
from 77e3829dc1ba7d98516c552e5c1b7c87677dee90 (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 abf148cebd8a8ed30c1a4f2807bb0608eec5b026
Author: Stefan Schantl <stefan.schantl(a)ipfire.org>
Date: Wed Mar 23 18:08:52 2022 +0100
rules.pl: Fix creating rules for location based groups.
The former used hash value only contains the country code when
a rule for a single country should be created.
In case a location group is used the hash value refers to the group name,
which does not work here.
The required country code is part of the processed string and can be omitted
from here. This works well for single codes and location groups, because those
are processed in a loop.
Fixes #12809.
Signed-off-by: Stefan Schantl <stefan.schantl(a)ipfire.org>
Acked-by: Peter Müller <peter.mueller(a)ipfire.org>
-----------------------------------------------------------------------
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 =~ /mac/) {
push(@source_options, $source);
} elsif ($source =~ /-m set/) {
- # Grab location code from hash.
- my $loc_src = $$hash{$key}[4];
+ # Split given arguments into single chunks to
+ # obtain the set name.
+ my ($a, $b, $c, $loc_src, $e) = split(/ /, $source);
# 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 = ();
if ($destination =~ /-m set/) {
- # Grab location code from hash.
- my $loc_dst = $$hash{$key}[6];
+ # Split given arguments into single chunks to
+ # obtain the set name.
+ my ($a, $b, $c, $loc_dst, $e) = split(/ /, $destination);
# Call function to load the networks list for this country.
&ipset_restore($loc_dst);
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2022-03-23 17:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4KNw0V0xKvz2xgZ@people01.haj.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox