2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-04 20:17:55 +00:00

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.
This commit is contained in:
Vinícius Ferrão
2026-08-27 01:53:42 -03:00
parent 7b9fef4df3
commit f7afab4bc2
+1 -1
View File
@@ -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