GNOME Bugzilla – Bug 740992
[review] lr/device-rm: device: Deal with links that vanish during initialization
Last modified: 2015-01-12 15:51:03 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
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);
e257744 device: Deal with links that vanish during initialization