diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-06-07 07:15:14 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-06-07 07:15:14 +0000 |
commit | 191df3977046a9ae332bc302ce6080824110c852 (patch) | |
tree | 22d6abf68625e2ca982aa86306d3c4f119dd9019 | |
parent | 5a17de566fd2b45e08a61843eb7baa6a6e5c8015 (diff) | |
download | drakx-191df3977046a9ae332bc302ce6080824110c852.tar drakx-191df3977046a9ae332bc302ce6080824110c852.tar.gz drakx-191df3977046a9ae332bc302ce6080824110c852.tar.bz2 drakx-191df3977046a9ae332bc302ce6080824110c852.tar.xz drakx-191df3977046a9ae332bc302ce6080824110c852.zip |
don't be fooled by if_ not short-circuiting and auto-vivification, use $conf->{masq_subnet} instead of $conf->{masquerade}{subnet} (i.e. do not write buggy shorewall masqfile when connection sharing is disabled)
-rw-r--r-- | perl-install/network/shorewall.pm | 4 | ||||
-rwxr-xr-x | perl-install/standalone/drakgw | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm index d42772b94..2d6ec55d2 100644 --- a/perl-install/network/shorewall.pm +++ b/perl-install/network/shorewall.pm @@ -101,7 +101,7 @@ sub read { $conf{redirects}{$_->[3]}{$_->[2]} = $_->[4] foreach grep { $_->[0] eq 'REDIRECT' } @rules; if (my ($e) = get_config_file('masq')) { - $conf{masquerade}{subnet} = $e->[1] if $e->[1]; + $conf{masq_subnet} = $e->[1]; } read_default_interfaces(\%conf, $o_in); $conf{net_interface} && \%conf; @@ -142,7 +142,7 @@ sub write { map_each { [ 'REDIRECT', 'loc', $::a, $_, $::b, '-' ] } %{$conf->{redirects}{$_}}; } keys %{$conf->{redirects}}), ); - set_config_file('masq', if_($conf->{masquerade}, [ $conf->{net_interface}, $conf->{masquerade}{subnet} ])); + set_config_file('masq', if_($conf->{masq_subnet}, [ $conf->{net_interface}, $conf->{masq_subnet} ])); services::set_status('shorewall', !$conf->{disabled}, $::isInstall); } diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 4fd7c2490..319e3c457 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -398,7 +398,7 @@ sub gw_configure() { $in->exit(-1); } - $shorewall->{masquerade} = { subnet => "$lan_intf->{NETWORK}/$lan_intf->{NETMASK}" }; + $shorewall->{masq_subnet} = "$lan_intf->{NETWORK}/$lan_intf->{NETMASK}"; network::shorewall::write($shorewall); #- be sure that FORWARD_IPV4 is enabled in /etc/sysconfig/network |