]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
rules.pl: Do not create HOSTILE rules if no red dev is available.
authorStefan Schantl <stefan.schantl@ipfire.org>
Wed, 9 Mar 2022 14:12:31 +0000 (15:12 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 9 Mar 2022 15:45:59 +0000 (15:45 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/firewall/rules.pl

index 83216e78a25ee030f372b9bedec1a2fbd13fe6a8..57f4809b4e22cfe621cba27c0c05a9dae46ada37 100644 (file)
@@ -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);