GNOME Bugzilla – Bug 751733
[review] cleanup DHCP instance on unmanaging NMDevice [th/device-cleanup-bgo751733]
Last modified: 2015-07-01 09:45:41 UTC
Please review
Branch th/device-cleanup-bgo751733 device: fix cleanup DHCP instance when unmanaging device on removed platform link When the platform link gets removed outside of NetworkManager, we would unmanage the device first. By checking the device state reason NM_DEVICE_STATE_REASON_REMOVED, we would then not deconfigure the interface, as it is already gone. This was not correct because we must at least stop the dhcp client. Otherwise, the dhclient process keeps running. Fix it by replacing the 'boolean deconfigure' by a tri-state 'cleanup_type'.
> device: fix cleanup DHCP instance when unmanaging device on removed platform link typedef enum { + NM_CLEANUP_TYPE_DECONFIGURE, + NM_CLEANUP_TYPE_KEEP, + NM_CLEANUP_TYPE_REMOVED, +} NMCleanupType; Since this is local to the file, maybe it shouldn't have the NM prefix. Anyway, LGTM.
merged: master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=e3348b46bd0efbd23c0448a0c2ae367cee658d2c nm-1-0: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=77cbaf611af41084deaa67956096851a65b5fc92