diff --git a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm index f17ffed61..00e813993 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/dhcp.pm @@ -379,7 +379,9 @@ sub process_request foreach (@nrn) { my @ent = split /\s+/; - if ($ent[0] eq "169.254.0.0") + my $firstoctet = $ent[0]; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($ent[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { next; } @@ -463,7 +465,9 @@ sub process_request foreach (@nrn) { my @line = split /\s+/; - if ($ent[0] eq "169.254.0.0") + my $firstoctet = $line[0]; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($line[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { next; } @@ -484,7 +488,9 @@ sub addnet my $net = shift; my $mask = shift; my $nic; - if ($net eq "169.254.0.0") { + my $firstoctet = $net; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($net eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { return; } unless (grep /\} # $net\/$mask subnet_end/, @dhcpconf) @@ -493,7 +499,9 @@ sub addnet foreach (@nrn) { # search for relevant NIC my @ent = split /\s+/; - if ($ent[0] eq "169.254.0.0") + $firstoctet = $ent[0]; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($ent[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { next; } diff --git a/xCAT-server-2.0/lib/xcat/plugins/networks.pm b/xCAT-server-2.0/lib/xcat/plugins/networks.pm index d60125a19..e359c5547 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/networks.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/networks.pm @@ -58,7 +58,9 @@ sub process_request my $mgtifname; my $gw; my @ent = split /\s+/, $_; - if ($ent[0] eq "169.254.0.0") + my $firstoctet = $ent[0]; + $firstoctet =~ s/^(\d+)\..*/$1/; + if ($ent[0] eq "169.254.0.0" or ($firstoctet >= 224 and $firstoctet <= 239)) { next; }