diff options
author | Claudio Matsuoka <claudio@mandriva.com> | 2010-01-14 18:13:43 +0000 |
---|---|---|
committer | Claudio Matsuoka <claudio@mandriva.com> | 2010-01-14 18:13:43 +0000 |
commit | 4fb412ff4af778ef26de12c80ab7059aa293e4e9 (patch) | |
tree | d86c2541ba9698e60616fbc4146421a081be338c /lib | |
parent | 770e2d02c2e02d57d0ac82a2ceb5befb0235997e (diff) | |
download | drakx-net-4fb412ff4af778ef26de12c80ab7059aa293e4e9.tar drakx-net-4fb412ff4af778ef26de12c80ab7059aa293e4e9.tar.gz drakx-net-4fb412ff4af778ef26de12c80ab7059aa293e4e9.tar.bz2 drakx-net-4fb412ff4af778ef26de12c80ab7059aa293e4e9.tar.xz drakx-net-4fb412ff4af778ef26de12c80ab7059aa293e4e9.zip |
Don't guess gateway and nameserver if not specified (closes: #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')
-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}); } } |