From f851be0c26f665598a821432cead098d901fed84 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 14 Apr 2020 10:04:50 -0400 Subject: [PATCH] Add a workaround for wrong hwaddr Sometimes the client sends 20: before the address, adapt to cope --- xCAT-server/lib/xcat/plugins/dhcp.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index b294fb309..773a79b2f 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -821,7 +821,7 @@ sub addnode } my @hwtypes; if ($hardwaretype == 1) { - @hwtypes = (1, 132); + @hwtypes = (1, 132, 133); } else { @hwtypes = ($hardwaretype); } @@ -834,6 +834,11 @@ sub addnode $localname .= "-infinibandcompatname"; $localmac = substr($mac, 0, 8) . ":03:00" . substr($mac, 8); } + if ($hwtype == 133) { + $hwtype = 32; + $localname .= "-infinibandcompatname20"; + $localmac = "20:" . substr($mac, 0, 8) . ":03:00" . substr($mac, 8); + } print $omshell "new host\n"; print $omshell "set name = \"$localname\"\n"; print $omshell "set hardware-address = " . $localmac . "\n";