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 739482 - [PATCH] core: better handle DHCP expiry/nak during initial lease acquisition
[PATCH] core: better handle DHCP expiry/nak during initial lease acquisition
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: nm-1.0
 
 
Reported: 2014-11-01 07:37 UTC by Oleksii Shevchuk
Modified: 2015-01-12 15:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log messages from NM (3.56 KB, text/plain)
2014-11-01 07:45 UTC, Oleksii Shevchuk
  Details
Debug log from NetworkManager (1.28 MB, text/plain)
2014-12-11 10:22 UTC, Oleksii Shevchuk
  Details
0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch (5.49 KB, patch)
2014-12-11 21:43 UTC, Dan Williams
none Details | Review
0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch (5.80 KB, patch)
2014-12-11 21:46 UTC, Dan Williams
none Details | Review

Description Oleksii Shevchuk 2014-11-01 07:37:41 UTC
I ran into this problem when using wwan connection.

I previous attempt was successfull, NM caches leased state in leases file.
Next time NM trying to reuse this. If NAK returned, then connection failed. So, to establish connection .lease files should be deleted.
Comment 1 Oleksii Shevchuk 2014-11-01 07:45:43 UTC
Created attachment 289768 [details]
Log messages from NM
Comment 2 Oleksii Shevchuk 2014-12-11 10:22:30 UTC
Created attachment 292516 [details]
Debug log from NetworkManager
Comment 3 Thomas Haller 2014-12-11 11:41:54 UTC
(In reply to comment #2)
> Created an attachment (id=292516) [details]
> Debug log from NetworkManager

(thanks for the logfile)

For the record, this is the lease file that caused the problem:

lease {
  interface "wlan0";
  fixed-address 192.168.10.105;
  option subnet-mask 255.255.255.0;
  option dhcp-lease-time 604800;
  option routers 192.168.10.1;
  option dhcp-message-type 5;
  option dhcp-server-identifier 192.168.10.1;
  option domain-name-servers 192.168.10.1;
  renew 0 2014/12/14 15:59:43;
  rebind 3 2014/12/17 10:22:12;
  expire 4 2014/12/18 07:22:12;
}
Comment 4 Pavel Simerda 2014-12-11 16:43:27 UTC
I've noticed this issue as well, with one specific router (it was a Zyxel). So if there's a fix and I have time to visit the owner of the router, I can test it.
Comment 5 Pavel Simerda 2014-12-11 16:47:42 UTC
Looks serious enough for nm-1.0, please consider.
Comment 6 Dan Williams 2014-12-11 21:43:40 UTC
Created attachment 292573 [details] [review]
0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch
Comment 7 Dan Williams 2014-12-11 21:46:29 UTC
Created attachment 292574 [details] [review]
0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch
Comment 8 Pavel Simerda 2014-12-12 10:57:29 UTC
Also confirmed on local network in a hopefully reproducible way, just started the same system on another laptop, thus with new MAC address.
Comment 9 Pavel Simerda 2014-12-12 10:58:59 UTC
Review of attachment 292574 [details] [review]:

Looks good but no time to test right now.
Comment 10 Thomas Haller 2014-12-12 11:01:58 UTC
(In reply to comment #7)
> Created an attachment (id=292574) [details] [review]
> 0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch

LGTM, didn't test it though.

This doesn't fix dhcpcd, does it?
Comment 11 Dan Williams 2014-12-12 15:28:41 UTC
(In reply to comment #10)
> (In reply to comment #7)
> > Created an attachment (id=292574) [details] [review] [details] [review]
> > 0001-core-better-handle-DHCP-expiry-nak-during-initial-le.patch
> 
> LGTM, didn't test it though.
> 
> This doesn't fix dhcpcd, does it?

I believe it should fix dhcpcd actually.  I've seen some 'nak' logs in the past for dhcpcd, and that should now be treated as EXPIRE, which is ignored during initial IP configuration.
Comment 12 Dan Williams 2014-12-12 17:01:53 UTC
Pushed as 1172178ce659f705987c0840ddf142eab550eb5d