From 837c6ec620fdddd24af34556e29d2e43866c4b2e Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 27 Mar 2009 15:13:25 +0000 Subject: [PATCH] -Fix problem where gatewayed networks were processed by default -Fix problem where noderanges in dhcpinterfaces would not be effective git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3016 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 5e031ad15..df4c85317 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -356,23 +356,27 @@ sub process_request INTF: foreach $dhcpif (split /;/,$dhcpinterfaces) { my $host; my $savehost; + my $foundself; if ($dhcpif =~ /\|/) { (my $ngroup,$dhcpif) = split /\|/,$dhcpif; foreach $host (noderange($ngroup)) { $savehost=$host; - if (xCAT::Utils->thishostisnot($host)) { - - next INTF; + unless (xCAT::Utils->thishostisnot($host)) { + $foundself=1; + last; } } if (!defined($savehost)) { # host not defined in db, # probably management node - if (xCAT::Utils->thishostisnot($ngroup)) { - next INTF; + unless (xCAT::Utils->thishostisnot($ngroup)) { + $foundself=1; } } } + unless ($foundself) { + next INTF; + } foreach (split /[,\s]+/, $dhcpif) { $activenics{$_} = 1; @@ -474,7 +478,7 @@ sub process_request splice @nsrnoutput, 0, 2; foreach (@nsrnoutput) { #scan netstat my @parts = split /\s+/; - push @nrn,$parts[0].":".$parts[7].":".$parts[2],":",$parts[3]; + push @nrn,$parts[0].":".$parts[7].":".$parts[2].":".$parts[3]; } foreach(@vnets){