diff options
author | Jiří Klimeš <jklimes@redhat.com> | 2015-04-20 14:14:36 +0200 |
---|---|---|
committer | Jiří Klimeš <jklimes@redhat.com> | 2015-04-29 13:28:58 +0200 |
commit | a658561be90e174d99dff3c33eadab935c781f4c (patch) | |
tree | cdc738f33b1e516e40a19272561071af650befb9 | |
parent | 7028c8a53f535f1e6642e22529fff8ceb32facbd (diff) | |
download | NetworkManager-a658561be90e174d99dff3c33eadab935c781f4c.tar.gz |
platform: use driver name to detect IBM z-System CTC devices (rh #1212118)
We used to detect CTC devices according to the interface name. But that does
not work anymore due to systemd renaming the devices.
Let's use driver name for the detection instead. The driver is called 'ctcm'.
http://www-01.ibm.com/support/knowledgecenter/linuxonibm/com.ibm.linux.z.lgdd/lgdd_r_mpc_setup.html
https://bugzilla.redhat.com/show_bug.cgi?id=1212118
(cherry picked from commit 02c6a9334335d3ef32c6cc8fafc6cea235c80ffc)
-rw-r--r-- | src/platform/nm-linux-platform.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 88afb39851..a3158c7501 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -872,16 +872,15 @@ link_extract_type (NMPlatform *platform, struct rtnl_link *rtnllink, const char if (!ifname) return_type (NM_LINK_TYPE_UNKNOWN, type); + driver = ethtool_get_driver (ifname); if (arptype == 256) { /* Some s390 CTC-type devices report 256 for the encapsulation type - * for some reason, but we need to call them Ethernet. FIXME: use - * something other than interface name to detect CTC here. + * for some reason, but we need to call them Ethernet. */ - if (g_str_has_prefix (ifname, "ctc")) + if (!g_strcmp0 (driver, "ctcm")) return_type (NM_LINK_TYPE_ETHERNET, "ethernet"); } - driver = ethtool_get_driver (ifname); if (!g_strcmp0 (driver, "openvswitch")) return_type (NM_LINK_TYPE_OPENVSWITCH, "openvswitch"); |