From ae5715849f5a97be6a625a52ddf88af2c495c61d Mon Sep 17 00:00:00 2001 From: jjohnson2 Date: Wed, 29 Apr 2015 15:01:25 -0400 Subject: [PATCH] Restore backwards compatibility to !remote! A change was made to allow '!remote!' to force indicate a NIC to be relevant in case it wouldn't naturally occur. This broke existing configurations where the NIC would naturally be 'active'. Attempt to address by restoring the old match and enabling the new code when an interface name is detected after '!remote!', but otherwise act like pre-2.9.1 dhcp.pm --- xCAT-server/lib/xcat/plugins/dhcp.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index a59ebdd09..31c488d68 100755 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -1450,7 +1450,7 @@ sub process_request my $n = $_->{net}; my $if = $_->{mgtifname}; my $nm = $_->{mask}; - if ($if =~ /!remote!\S+/ and $n !~ /:/) { #only take in networks with special interface, but only v4 for now + if ($if =~ /!remote!/ and $n !~ /:/) { #only take in networks with special interface, but only v4 for now push @nrn, "$n:$if:$nm"; } } @@ -1468,7 +1468,7 @@ sub process_request next; } my $netif = $ent[1]; - if ($netif =~ /!remote!/) { + if ($netif =~ /!remote!\S+/) { $netif =~ s/!remote!\s*(.*)$/$1/; } # Bridge nics @@ -1708,7 +1708,7 @@ sub process_request next; } my $netif = $line[1]; - if ($netif =~ /!remote!/) { + if ($netif =~ /!remote!\S+/) { $netif =~ s/!remote!\s*(.*)$/$1/; if (!defined($activenics{"!remote!"})) { next; @@ -2141,7 +2141,7 @@ sub addnet if ($ent[0] eq $net and $ent[2] eq $mask) { $nic = $ent[1]; - if ($nic =~ /!remote!/) { + if ($nic =~ /!remote!\S+/) { $nic =~ s/!remote!\s*(.*)$/$1/; } # The first nic that matches the network,