After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 740992 - [review] lr/device-rm: device: Deal with links that vanish during initialization
[review] lr/device-rm: device: Deal with links that vanish during initialization
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2014-12-01 16:38 UTC by Lubomir Rintel
Modified: 2015-01-12 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Lubomir Rintel 2014-12-01 16:38:25 UTC
nm_device_get_hw_address() may return NULL and nm_platform_link_get_type may return NM_LINK_TYPE_NONE. While it might be a good idea to check for such cases at the init time it seems easier to just ignore it and prevent blowing up in subsequent deactivation. A quick test case: # while :; do ip link add moo0 type veth peer moo1; ip link del moo0 ; done Yields: NetworkManager:ERROR:devices/nm-device-ethernet.c:268:constructor: assertion failed: (link_type == NM_LINK_TYPE_ETHERNET || link_type == NM_LINK_TYPE_VETH) nm_device_set_hw_addr: assertion 'addr != NULL' failed

http://cgit.freedesktop.org/NetworkManager/NetworkManager/log/?h=lr/device-rm
Comment 1 Thomas Haller 2014-12-01 16:52:00 UTC
Looks right.

Except whitespace error in:
+         g_assert (   link_type == NM_LINK_TYPE_ETHERNET
+                   || link_type == NM_LINK_TYPE_VETH
+                || link_type == NM_LINK_TYPE_NONE);
Comment 2 Lubomir Rintel 2014-12-02 10:45:38 UTC
e257744 device: Deal with links that vanish during initialization