From f7afab4bc2665c2d6406955f6a959eaff880f784 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 27 Aug 2026 01:53:42 -0300 Subject: [PATCH] fix(dhcp): recognise an InfiniBand interface in any position The mgtifname of a network can name more than one interface, separated by !. The test for an InfiniBand interface ends at the end of the value, thus it recognises eth0!ib0 but not ib0!eth0, and a node on such a network receives no second host entry and no address over IPoIB. Accept the name in any position. --- xCAT-server/lib/xcat/plugins/dhcp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 32c5b914a..bac6f933b 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -729,7 +729,7 @@ sub _hardware_type_for sub _is_infiniband_interface { my $mgtifname = shift; - return defined($mgtifname) && $mgtifname =~ /(?:^|!)ib[^!]*$/; + return defined($mgtifname) && $mgtifname =~ /(?:^|!)ib[^!]*(?:!|$)/; } sub _infiniband_twin_identity