From edefc552fda071ea148a1da36551b43a13634163 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 18 Nov 2011 12:09:05 -0600 Subject: [PATCH] core: clarify non-modem device addition handling --- src/nm-manager.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nm-manager.c b/src/nm-manager.c index 55687ea9a5..dd2d027c87 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -1487,6 +1487,14 @@ add_device (NMManager *self, NMDevice *device) iface = nm_device_get_ip_iface (device); g_assert (iface); + /* Ignore the device if we already know about it. But some modems will + * provide pseudo-ethernet devices that NM has already claimed while + * ModemManager is still detecting the modem's serial ports, so when the + * MM modem object finally shows up it may have the same IP interface as the + * ethernet interface we've already detected. In this case we skip the + * check for an existing device with the same IP interface name and kill + * the ethernet device later in favor of the modem device. + */ if (!NM_IS_DEVICE_MODEM (device) && find_device_by_ip_iface (self, iface)) { g_object_unref (device); return;