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 751733 - [review] cleanup DHCP instance on unmanaging NMDevice [th/device-cleanup-bgo751733]
[review] cleanup DHCP instance on unmanaging NMDevice [th/device-cleanup-bgo7...
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: 2015-06-30 14:38 UTC by Thomas Haller
Modified: 2015-07-01 09:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2015-06-30 14:38:36 UTC
Please review
Comment 1 Thomas Haller 2015-06-30 14:40:39 UTC
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'.
Comment 2 Beniamino Galvani 2015-06-30 21:59:29 UTC
> 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.