diff options
author | Claudio Matsuoka <claudio@mandriva.com> | 2010-01-14 18:16:45 +0000 |
---|---|---|
committer | Claudio Matsuoka <claudio@mandriva.com> | 2010-01-14 18:16:45 +0000 |
commit | 4b58b8da1ce55139e1997e8121cd38f92d82aa1f (patch) | |
tree | e31cfb479a5b04b924b963be2fb5bc5e5cfcef80 /lib/network/connection | |
parent | 7f017cf0b73dd029f0aa84a0a22829506e01de2a (diff) | |
download | drakx-net-4b58b8da1ce55139e1997e8121cd38f92d82aa1f.tar drakx-net-4b58b8da1ce55139e1997e8121cd38f92d82aa1f.tar.gz drakx-net-4b58b8da1ce55139e1997e8121cd38f92d82aa1f.tar.bz2 drakx-net-4b58b8da1ce55139e1997e8121cd38f92d82aa1f.tar.xz drakx-net-4b58b8da1ce55139e1997e8121cd38f92d82aa1f.zip |
Don't guess gateway and nameserver if not specified (bug #28033)
Sometimes we don't want a default route to be set when configuring a
network interface with static address. The typical case is when we have
an external interface with dhcp and default route to the internet and a
static interface connected to the local network. See bug 28033 for
details.
Diffstat (limited to 'lib/network/connection')
-rw-r--r-- | lib/network/connection/ethernet.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 61e5ca6..4be7a88 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -121,8 +121,11 @@ sub supplement_address_settings { if ($self->{protocol} eq 'static' && network::network::is_ip($self->{address}{ip_address})) { require network::network; $self->{address}{netmask} ||= network::network::netmask($self->{address}{ip_address}); - $self->{address}{gateway} ||= network::network::gateway($self->{address}{ip_address}); - $self->{address}{dns1} ||= network::network::dns($self->{address}{ip_address}); + # Bug #28033: don't guess default gateway and ns in static interfaces if + # user doesn't set one (otherwise we'll mess multi-interface systems) + # + #$self->{address}{gateway} ||= network::network::gateway($self->{address}{ip_address}); + #$self->{address}{dns1} ||= network::network::dns($self->{address}{ip_address}); } } |