From: Michael Tremer Date: Tue, 17 Jan 2023 13:23:58 +0000 (+0100) Subject: firewall: Avoid creating a rule that permits all traffic on invalid source X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fheads%2Ffirewall-uninitialized;p=people%2Fms%2Fipfire-2.x.git firewall: Avoid creating a rule that permits all traffic on invalid source 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 --- diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 30ad20df1d..1b628df169 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) {