summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2010-01-14 18:16:45 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2010-01-14 18:16:45 +0000
commit4b58b8da1ce55139e1997e8121cd38f92d82aa1f (patch)
treee31cfb479a5b04b924b963be2fb5bc5e5cfcef80
parent7f017cf0b73dd029f0aa84a0a22829506e01de2a (diff)
downloaddrakx-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.
-rw-r--r--NEWS1
-rw-r--r--lib/network/connection/ethernet.pm7
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 7933379..3b30e01 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@
- avoid multiple instances of draknetcenter for the
same user (if it's already running)
- Change prism54 wifi driver to p54pci/p54usb (#52018)
+- Don't guess gateway and nameserver if not specified (#28033)
0.86.1:
- ignore non-fatal wpa_supplicant messages (#54002)
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});
}
}