From 84a9c3fe981c58239ccb8aecc5861f6b9df6f01d Mon Sep 17 00:00:00 2001 From: vallard Date: Mon, 18 Jan 2010 20:36:08 +0000 Subject: [PATCH] updated to support remote/distributed networks for DHCP relays or remote flags in networks table git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4968 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 24a42684f..5a05ddeca 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -2203,6 +2203,21 @@ sub my_nets $textnet.="/$maskbits"; $rethash->{$textnet} = $curnet; } + + + my $nettab = xCAT::Table->new("networks"); + my @vnets = $nettab->getAllAttribs('net','mgtifname','mask'); + foreach(@vnets){ + my $n = $_->{net}; + my $if = $_->{mgtifname}; + my $nm = $_->{mask}; + if ($if =~ /!remote!/) { #only take in networks with special interface + $nm = formatNetmask($nm, 0 , 1); + $n .="/$nm"; + $rethash->{$n} = $if; + } + } + return $rethash; } #-------------------------------------------------------------------------------