public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] firewall: Avoid creating a rule that permits all traffic on invalid source
Date: Wed, 18 Jan 2023 23:26:42 +0000	[thread overview]
Message-ID: <bce5b6f4-08f5-0e0d-acb0-cfd34cf27418@ipfire.org> (raw)
In-Reply-To: <20230117134144.2763140-1-michael.tremer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 753 bytes --]

Acked-by: Peter Müller <peter.mueller(a)ipfire.org>

> The firewall engine generated rules that did not have any traffic
> selectors due to an improperly initialized variable in the source.
> 
> Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
> ---
>  config/firewall/rules.pl | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl
> index 30ad20df1..1b628df16 100644
> --- a/config/firewall/rules.pl
> +++ b/config/firewall/rules.pl
> @@ -401,6 +401,9 @@ sub buildrules {
>  					$source = "";
>  				}
>  
> +				# Make sure that $source is properly defined
> +				next unless (defined $source);
> +
>  				my $source_intf = @$src[1];
>  
>  				foreach my $dst (@destinations) {

      reply	other threads:[~2023-01-18 23:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-17 13:41 Michael Tremer
2023-01-18 23:26 ` Peter Müller [this message]

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=bce5b6f4-08f5-0e0d-acb0-cfd34cf27418@ipfire.org \
    --to=peter.mueller@ipfire.org \
    --cc=development@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