From 1c68c2a98cafa0d3195ce948133ae8a49162515b Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 27 May 2010 07:40:10 +0000 Subject: [PATCH] fix for IPv6 link local address subroutine git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6254 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/NetworkUtils.pm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 4393d06e0..e2126c1f0 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -261,12 +261,15 @@ sub linklocaladdr { } my ($m4, $m5) = ("ff","fe"); - my $bit = (int $m1) & 2; - if ($bit) { - $m1 = $m1 - 2; - } else { - $m1 = $m1 + 2; - } + #my $bit = (int $m1) & 2; + #if ($bit) { + # $m1 = $m1 - 2; + #} else { + # $m1 = $m1 + 2; + #} + $m1 = hex($m1); + $m1 = $m1 ^ 2; + $m1 = sprintf("%x", $m1); $m1 = $m1 . $m2; $m3 = $m3 . $m4;