From b5692523a12d5be4e6e6f76c045b3bcedd0035a2 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 3 Mar 2005 10:42:24 +0000 Subject: delete gateway settings if gateway device is invalid too (#11761) --- perl-install/network/netconnect.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/network') diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 9dc723fdf..74f04ccef 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -1071,8 +1071,8 @@ notation (for example, 1.2.3.4).")), $netc->{$_} = $ethntf->{DEVICE} foreach qw(NET_DEVICE NET_INTERFACE); if ($auto_ip) { $in->do_pkgs->install($netc->{dhcp_client}); - #- delete gateway settings if reconfiguring the gateway interface to dhcp - if ($netc->{GATEWAYDEV} eq $ntf_name || @all_cards > 1) { + #- delete gateway settings if gateway device is invalid or if reconfiguring the gateway interface to dhcp + if (!$netc->{GATEWAYDEV} || !exists $eth_intf{$netc->{GATEWAYDEV}} || $netc->{GATEWAYDEV} eq $ntf_name) { delete $netc->{GATEWAY}; delete $netc->{GATEWAYDEV}; } -- cgit v1.2.1