platform: use driver name to detect IBM z-System CTC devices (rh #1212118)
https://bugzilla.redhat.com/show_bug.cgi?id=1212118
This commit is contained in:
parent
2a59fdf6e4
commit
87260524cc
@ -10,7 +10,7 @@
|
||||
%define snapshot %{nil}
|
||||
%define git_sha %{nil}
|
||||
%define realversion 1.0.0
|
||||
%define release_version 8
|
||||
%define release_version 9
|
||||
%define epoch_version 1
|
||||
|
||||
%define obsoletes_nmver 1:0.9.9.95-1
|
||||
@ -86,6 +86,7 @@ Patch2: NetworkManager-1.0.0-bridge_resume.patch
|
||||
Patch3: 0001-ip6-config-remove-the-link-local-address-on-address-.patch
|
||||
Patch4: bgo742823-connectivity-no-dns.patch
|
||||
Patch5: 0001-connectivity-disable-HTTP-keepalive-for-connectivity.patch
|
||||
Patch6: rh1212118-detect-CTC-devices.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
@ -373,6 +374,7 @@ by nm-connection-editor and nm-applet in a non-graphical environment.
|
||||
%patch3 -p1 -b .v6ll-flush
|
||||
%patch4 -p1 -b .bgo742823-connectivity-no-dns.orig
|
||||
%patch5 -p1 -b .0001-connectivity-disable-HTTP-keepalive-for-connectivity.orig
|
||||
%patch6 -p1 -b .rh1212118-detect-CTC-devices.orig
|
||||
|
||||
%build
|
||||
|
||||
@ -665,6 +667,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Apr 29 2015 Jiří Klimeš <jklimes@redhat.com> - 1:1.0.0-9
|
||||
- platform: use driver name to detect IBM z-System CTC devices (rh #1212118)
|
||||
|
||||
* Mon Mar 16 2015 Dan Williams <dcbw@redhat.com> - 1:1.0.0-8
|
||||
- Turn off keepalive for connectivity checking
|
||||
|
||||
|
48
rh1212118-detect-CTC-devices.patch
Normal file
48
rh1212118-detect-CTC-devices.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 02c6a9334335d3ef32c6cc8fafc6cea235c80ffc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= <jklimes@redhat.com>
|
||||
Date: Mon, 20 Apr 2015 14:14:36 +0200
|
||||
Subject: [PATCH] platform: use driver name to detect IBM z-System CTC devices
|
||||
(rh #1212118)
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
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
|
||||
Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
|
||||
---
|
||||
src/platform/nm-linux-platform.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
|
||||
index d831bd3..ed22fe2 100644
|
||||
--- a/src/platform/nm-linux-platform.c
|
||||
+++ b/src/platform/nm-linux-platform.c
|
||||
@@ -954,16 +954,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");
|
||||
|
||||
--
|
||||
2.1.0
|
||||
|
Loading…
Reference in New Issue
Block a user