From 6b8bf26b79eb6dcfbefb122d8921b6062999b3da Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 18 Oct 2013 11:12:40 -0500 Subject: [PATCH] platform: don't treat unrecognized WiMAX devices as Ethernet If the WiMAX plugin isn't installed, or the WiMAX device isn't recognized, NetworkManager shouldn't treat the interface as regular ethernet since the device requires specific setup to be ready for IP configuration, which of course NetworkManager can't do because the WiMAX plugin isn't loaded. Ignore them instead. --- src/nm-manager.c | 6 ++++++ src/platform/nm-linux-platform.c | 2 ++ src/platform/nm-platform.h | 1 + 3 files changed, 9 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index b8184c2fb0..008c62d99a 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -2506,6 +2506,12 @@ platform_link_added_cb (NMPlatform *platform, */ break; + case NM_LINK_TYPE_WIMAX: + /* If the WiMAX plugin is not installed, we can't control the + * interface, so ignore it. + */ + break; + default: device = nm_device_generic_new (link); break; diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 984e2f8155..ab7b35eb50 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -495,6 +495,8 @@ link_type_from_udev (NMPlatform *platform, int ifindex, int arptype, const char return_type (NM_LINK_TYPE_WIFI, "wifi"); else if (g_strcmp0 (prop, "wwan") == 0) return_type (NM_LINK_TYPE_WWAN_ETHERNET, "wwan"); + else if (g_strcmp0 (prop, "wimax") == 0) + return_type (NM_LINK_TYPE_WIMAX, "wimax"); if (arptype == ARPHRD_ETHER) return_type (NM_LINK_TYPE_ETHERNET, "ethernet"); diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h index 68d2fdce32..b11bbc31ac 100644 --- a/src/platform/nm-platform.h +++ b/src/platform/nm-platform.h @@ -79,6 +79,7 @@ typedef enum { NM_LINK_TYPE_OLPC_MESH, NM_LINK_TYPE_WIFI, NM_LINK_TYPE_WWAN_ETHERNET, /* WWAN pseudo-ethernet */ + NM_LINK_TYPE_WIMAX, /* Software types */ NM_LINK_TYPE_DUMMY = 0x10000,