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 764398 - DHCP leases do not get renewed for bond devices after resume
DHCP leases do not get renewed for bond devices after resume
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
unspecified
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-03-31 03:29 UTC by Nikolay Martynov
Modified: 2016-03-31 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch to fix the problem (1.98 KB, patch)
2016-03-31 03:29 UTC, Nikolay Martynov
none Details | Review
device: renew dhcp leases on awake for software devices (3.29 KB, patch)
2016-03-31 13:29 UTC, Thomas Haller
none Details | Review

Description Nikolay Martynov 2016-03-31 03:29:04 UTC
Created attachment 325060 [details] [review]
Proposed patch to fix the problem

My laptop has a bond connection and it looses ip configuration sometime after going through suspend/resume circle. I was able to track down that it happens when DHCP lease completely expires.

Things get even worse if I try to connect to VPN after resume - interface looses ipv4 address right after connection is established and never recovers without manual intervention.

I was not able to track down exact cause of VPN dropping connection but proposed patch fixes both problems.

And overall I think it makes sense: when resume happens DHCP leases should be checked/renewed because box may have been down long enough for them to be no longer valid. This is not a problem for 'hardware' connections because they are brought up and down during suspend/resume process. Software devices are not subject to this process so I guess the need special handling.

I'll attach a patch that fixes problem fir me.
Comment 1 Beniamino Galvani 2016-03-31 08:16:17 UTC
(In reply to Nikolay Martynov from comment #0)
> Created attachment 325060 [details] [review] [review]
> Proposed patch to fix the problem

> And overall I think it makes sense: when resume happens DHCP leases should
> be checked/renewed because box may have been down long enough for them to be
> no longer valid. This is not a problem for 'hardware' connections because
> they are brought up and down during suspend/resume process. Software devices
> are not subject to this process so I guess the need special handling.

The patch looks good to me.
Comment 2 Thomas Haller 2016-03-31 13:29:24 UTC
Created attachment 325086 [details] [review]
device: renew dhcp leases on awake for software devices

This makes sure that devices like bond get their dhcp renewed

Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>

[thaller@redhat.com: original patch modified to rename
 now-public function update_dynamic_ip_setup()]
Comment 3 Thomas Haller 2016-03-31 13:30:09 UTC
(In reply to Thomas Haller from comment #2)
> Created attachment 325086 [details] [review] [review]

looks right to me too -- with the attached style update.
Comment 4 Ferry Huberts 2016-03-31 13:49:43 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1320418
Comment 5 Lubomir Rintel 2016-03-31 14:09:30 UTC
Looks good to me too.

Alternatively, we could make the devices watch for manager's sleeping property change; but this will do too.