From 6bbe345c419ed296362020145c99967bd3614323 Mon Sep 17 00:00:00 2001 From: Maarten Vanraes Date: Mon, 9 Jun 2014 18:52:17 +0200 Subject: drakgw no local interfaces if shorewall local zone is unconfigured (has no interfaces), set it to all interfaces (except the chosen net zone one). --- bin/drakgw | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin') diff --git a/bin/drakgw b/bin/drakgw index f0fd106..76532bd 100755 --- a/bin/drakgw +++ b/bin/drakgw @@ -125,6 +125,8 @@ What would you like to do?"); #- FIXME : not used for now data => [ { label => N("Net Device"), val => \$shorewall->{masq}{net_interface}, list => [ sort keys %{$net->{ifcfg}} ], format => sub { network::tools::get_interface_description($net, $_[0]) } } ], post => sub { network::shorewall::add_interface_to_net_zone($shorewall, $shorewall->{masq}{net_interface}); + # if loc_zone is unconfigured and has no interfaces, have all interfaces be local (except the chosen net interface) + $shorewall->{loc_zone} = [ sort grep {!/^$shorewall->{masq}{net_interface}$/} keys %{$net->{ifcfg}} ] if scalar(@{$shorewall->{loc_zone}}) == 0; my $locals = @{$shorewall->{loc_zone}}; if ($locals == 0) { return "end_no_lan_interface"; -- cgit v1.2.1