From 08eadca8f7b9a4c8768d59ec2552f4d4c65d72fc Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 1 Nov 2011 13:38:46 +0000 Subject: [PATCH] Duplicate prefix length into 'netmask' field for makenetworks to satisfy odd DB restrictions. Hope strongly no IPv6 code really cares or v4/v6 detection code uses absence of netmask as a cue... git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10953 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/networks.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/networks.pm b/xCAT-server/lib/xcat/plugins/networks.pm index e5d228101..ab3914e17 100644 --- a/xCAT-server/lib/xcat/plugins/networks.pm +++ b/xCAT-server/lib/xcat/plugins/networks.pm @@ -426,7 +426,9 @@ sub donets push @{$rsp->{data}}, " mgtifname=$dev"; } else { unless ($netexiss) { - $nettab->setAttribs({'net' => $net, 'mask' => ''}, {'netname' => $net, 'mgtifname' => $dev}); + my $tmpmask = $net; + $tmpmask =~ s!^.*/!/!; + $nettab->setAttribs({'net' => $net, 'mask' => $tmpmask}, {'netname' => $net, 'mgtifname' => $dev}); } }