From 8bb890df8018a35f33fbcc385b0344033a03a887 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 26 Mar 2009 18:13:25 +0000 Subject: [PATCH] -Go to not using the table except for '!remote!' interfaces git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3001 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 302c05f6f..b399f9563 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -453,12 +453,21 @@ sub process_request } my $nettab = xCAT::Table->new("networks"); my @vnets = $nettab->getAllAttribs('net','mgtifname','mask'); + my @nsrnoutput = split /\n/,`/bin/netstat -rn`; + splice @nsrnoutput, 0, 2; + foreach (@nsrnoutput) { #scan netstat + my @parts = split /\s+/; + push @nrn,$parts[0].":".$parts[7].":".$parts[2]; + } + foreach(@vnets){ my $n = $_->{net}; my $if = $_->{mgtifname}; my $nm = $_->{mask}; #$callback->({data => ["array of nets $n : $if : $nm"]}); - push @nrn, "$n:$if:$nm"; + if ($if =~ /!remote!/) { #only take in networks with special interface + push @nrn, "$n:$if:$nm"; + } } if ($querynics) { #Use netstat to determine activenics only when no site ent.