platform: fix recognition of InfiniBand devices

This commit is contained in:
Dan Winship
2013-06-11 10:27:42 -03:00
parent c347ac2123
commit bc1a764e1a

View File

@@ -437,6 +437,8 @@ link_extract_type (NMPlatform *platform, struct rtnl_link *rtnllink, const char
if (arptype == ARPHRD_LOOPBACK) if (arptype == ARPHRD_LOOPBACK)
return_type (NM_LINK_TYPE_LOOPBACK, "loopback"); return_type (NM_LINK_TYPE_LOOPBACK, "loopback");
else if (arptype == ARPHRD_INFINIBAND)
return_type (NM_LINK_TYPE_INFINIBAND, "infiniband");
else if (arptype == 256) { else if (arptype == 256) {
/* Some s390 CTC-type devices report 256 for the encapsulation type /* Some s390 CTC-type devices report 256 for the encapsulation type
* for some reason, but we need to call them Ethernet. FIXME: use * for some reason, but we need to call them Ethernet. FIXME: use
@@ -448,9 +450,7 @@ link_extract_type (NMPlatform *platform, struct rtnl_link *rtnllink, const char
return link_type_from_udev (platform, rtnllink, out_name); return link_type_from_udev (platform, rtnllink, out_name);
else else
return_type (NM_LINK_TYPE_UNKNOWN, "unknown"); return_type (NM_LINK_TYPE_UNKNOWN, "unknown");
} else if (!strcmp (type, "ipoib")) } else if (!strcmp (type, "dummy"))
return_type (NM_LINK_TYPE_INFINIBAND, "infiniband");
else if (!strcmp (type, "dummy"))
return_type (NM_LINK_TYPE_DUMMY, "dummy"); return_type (NM_LINK_TYPE_DUMMY, "dummy");
else if (!strcmp (type, "gre")) else if (!strcmp (type, "gre"))
return_type (NM_LINK_TYPE_GRE, "gre"); return_type (NM_LINK_TYPE_GRE, "gre");