firewall: Fix creation of automatic rules for the firewall.

If the firewall is part of a local network (e.g. GREEN),
we automatically add rules that grant/forbid access for the firewall,
too.

This has been broken for various default policies other than ALLOWED.
This commit is contained in:
Michael Tremer
2014-04-12 15:16:08 +02:00
parent dd73ef846e
commit aa5f4b6568
2 changed files with 70 additions and 13 deletions

View File

@@ -520,6 +520,9 @@ sub get_internal_firewall_ip_address
return 0;
}
# Convert net mask into correct format for &General::IpInSubnet().
$net_mask = &General::iporsubtodec($net_mask);
my @addresses = &get_internal_firewall_ip_addresses($use_orange);
foreach my $zone_address (@addresses) {
if (&General::IpInSubnet($zone_address, $net_address, $net_mask)) {