From: Stefan Schantl Date: Wed, 9 Mar 2022 14:12:31 +0000 (+0100) Subject: rules.pl: Do not create HOSTILE rules if no red dev is available. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=74659290e938e2fa3a006b6e8181042bedd5f76a;p=people%2Fms%2Fipfire-2.x.git rules.pl: Do not create HOSTILE rules if no red dev is available. Signed-off-by: Stefan Schantl Signed-off-by: Michael Tremer --- diff --git a/config/firewall/rules.pl b/config/firewall/rules.pl index 83216e78a2..57f4809b4e 100644 --- a/config/firewall/rules.pl +++ b/config/firewall/rules.pl @@ -695,6 +695,9 @@ sub drop_hostile_networks () { return; } + # Exit if there is no red interface. + return unless($RED_DEV); + # Call function to load the network list of hostile networks. &ipset_restore($HOSTILE_CCODE);