summaryrefslogtreecommitdiffstats
path: root/bin/drakgw
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2014-06-09 18:52:17 +0200
committerMaarten Vanraes <alien@mageia.org>2014-06-09 18:52:17 +0200
commit6bbe345c419ed296362020145c99967bd3614323 (patch)
tree9a41bb84c871f5536bccfcd61a7b6970669740a8 /bin/drakgw
parent98a551827a17480d75ac97f589edd5747c5b8569 (diff)
downloaddrakx-net-6bbe345c419ed296362020145c99967bd3614323.tar
drakx-net-6bbe345c419ed296362020145c99967bd3614323.tar.gz
drakx-net-6bbe345c419ed296362020145c99967bd3614323.tar.bz2
drakx-net-6bbe345c419ed296362020145c99967bd3614323.tar.xz
drakx-net-6bbe345c419ed296362020145c99967bd3614323.zip
drakgw no local interfaces
if shorewall local zone is unconfigured (has no interfaces), set it to all interfaces (except the chosen net zone one).
Diffstat (limited to 'bin/drakgw')
-rwxr-xr-xbin/drakgw2
1 files changed, 2 insertions, 0 deletions
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";