58 lines
2.0 KiB
Diff
58 lines
2.0 KiB
Diff
From 2a8c93e940c3fdc5bb710f9fd1ec037e51524ed9 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Haller <thaller@redhat.com>
|
|
Date: Fri, 16 Oct 2015 11:52:30 +0200
|
|
Subject: [PATCH] platform: fix link-detection for s390 CTC-type devices
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Commit 02c6a9334335d3ef32c6cc8fafc6cea235c80ffc (rh#1212118)
|
|
introduced detection of CTC devices based on the driver name.
|
|
|
|
That was broken a while ago while refactoring.
|
|
|
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1212118
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1272974
|
|
|
|
Fixes: ddaea22332907c05222cbec1e1b4365689fbda9f
|
|
(cherry picked from commit 8a6afe92c18dfefa91d057518be00b0127720fa5)
|
|
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
|
---
|
|
src/platform/nm-linux-platform.c | 16 ++++++++--------
|
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
|
|
index 94103c5..0eaa8cb 100644
|
|
--- a/src/platform/nm-linux-platform.c
|
|
+++ b/src/platform/nm-linux-platform.c
|
|
@@ -947,18 +947,18 @@ link_extract_type (NMPlatform *platform, struct rtnl_link *rtnllink, gboolean *c
|
|
gs_free char *anycast_mask = NULL;
|
|
gs_free char *devtype = NULL;
|
|
|
|
- if (arptype == 256) {
|
|
- /* Some s390 CTC-type devices report 256 for the encapsulation type
|
|
- * for some reason, but we need to call them Ethernet.
|
|
- */
|
|
- if (!g_strcmp0 (driver, "ctcm"))
|
|
- return NM_LINK_TYPE_ETHERNET;
|
|
- }
|
|
-
|
|
/* Fallback OVS detection for kernel <= 3.16 */
|
|
if (nmp_utils_ethtool_get_driver_info (ifname, &driver, NULL, NULL)) {
|
|
if (!g_strcmp0 (driver, "openvswitch"))
|
|
return NM_LINK_TYPE_OPENVSWITCH;
|
|
+
|
|
+ if (arptype == 256) {
|
|
+ /* Some s390 CTC-type devices report 256 for the encapsulation type
|
|
+ * for some reason, but we need to call them Ethernet.
|
|
+ */
|
|
+ if (!g_strcmp0 (driver, "ctcm"))
|
|
+ return NM_LINK_TYPE_ETHERNET;
|
|
+ }
|
|
}
|
|
|
|
sysfs_path = g_strdup_printf ("/sys/class/net/%s", ifname);
|
|
--
|
|
2.1.0
|
|
|