From 4b58b8da1ce55139e1997e8121cd38f92d82aa1f Mon Sep 17 00:00:00 2001 From: Claudio Matsuoka Date: Thu, 14 Jan 2010 18:16:45 +0000 Subject: 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. --- lib/network/connection/ethernet.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/network/connection') 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}); } } -- cgit v1.2.1