From 63d0473b9b82344701225f3e5071b65a6213d9ae Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 17 Jun 2010 11:31:52 +0000 Subject: [PATCH] IPv6 fix git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6499 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index e94402aad..229dd4fc6 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -1725,9 +1725,18 @@ sub mknimimage } #get the link local address for the primary nim interface my $linklocaladdr; + $nimcmd = qq~ifconfig $pif~; + $nimout = + xCAT::InstUtils->xcmd($callback, $subreq, "xdsh", $nimprime, $nimcmd, + 0); foreach my $line (split(/\n/,$nimout)) { - if ($line =~ /$pif\s+\d+\s+(fe80.*?)\s+/) + #ignore the address fe80::1%2/64 + if ($line =~ /%/) + { + next; + } + if ($line =~ /inet6\s+(fe80.*?)\//) { $linklocaladdr = $1; last; @@ -1844,7 +1853,7 @@ sub mknimimage xCAT::MsgUtils->message("E", $rsp, $callback); return 1; } - my $mask = xCAT::NetworkUtils->prefixtonetmask($prefixlength); + my $mask = xCAT::NetworkUtils->prefixtomask($prefixlength); $nimcmd = qq~nim -o define -t ent6 -a net_addr=$net -a snm=$mask -a routing1="default $gw" $netname~; if ($::VERBOSE) {