dhclient is unable to parse zero-length option values (breaks DHCPv6)

Bug #1371833 reported by pdf
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
dhcp (Fedora)
Fix Released
Medium
isc-dhcp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Description: Ubuntu 14.04.1 LTS
Release: 14.04

isc-dhcp-client:
  Installed: 4.2.4-7ubuntu12
  Candidate: 4.2.4-7ubuntu12
  Version table:
 *** 4.2.4-7ubuntu12 0
        500 http://mirror.internode.on.net/pub/ubuntu/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

Any option with a zero-length value, ie the common DHCPv6 option:

option dhcp6.reconf-accept ;

with isc-dhcp-client_4.2.4 produces a parser failure:

dhclient: /var/lib/NetworkManager/dhclient6-...-wlan0.lease line 35: semicolon expected.

Tags: patch
Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Please attach the /var/lib/dhclient/dhclient6.leases

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

Created attachment 446968
leases file

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

I made the comment #0 private, because I forgot to remove your email address.

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

My bugzilla frontpage is full so please do not bother.

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

The problem does the
  option dhcp6.reconf-accept ;
line in the lease file.

man dhcp-option says:

option dhcp6.reconf-accept ;
 The reconf-accept option is included by DHCPv6 clients that support the
 Reconfigure extentions, advertising that they will respond
 if the server were to ask them to Reconfigure.
 There is no support for DHCPv6 Reconfigure extensions,
 and this option is documented informationally only.

Do you have any idea what it is and how it got into the leases file ?

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

I just ran a ` dhclient -6 -P ppp0` and that commandline created the dhclient6.leases file. The file grows and gets shorter all the time. So I do guess now that isc dhclient is NOT compatible with itself.

Yes, I had to patch dhcp to make it work with ppp as isc does not give ppp a well deserved place. see https://bugzilla.redhat.com/show_bug.cgi?id=626514.
ppp plus pd is the way to go for ipv6 I read.

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

So if dhclient inserts a line in the leases file that it (according to documentation) does not use, why doesn't dhclient parse it OK and then ignore it?
Is documentation still current for this version?

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

# rpm -q dhclient
dhclient-4.2.2-2.fc16.i68

Sep 28 12:54:54 ep1a dhclient[32104]: /var/lib/dhclient/dhclient6.leases line 197: semicolon expected.

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

Still happens.

/var/lib/dhclient/dhclient6.leases line
71: semicolon expected.

dhclient-4.2.4-5.fc17.i686

Revision history for this message
In , Tomáš (tom-redhat-bugs-1) wrote :

Created attachment 600310
Patch fixing the problem.

This patch solves the problem with parsing zero-length options in dhclient6.leases file.

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

Jay! Thanks!
Hopefully Jiri can include this in the very next dhcp release...!

Revision history for this message
In , Jiri (jiri-redhat-bugs) wrote :

Tomas can do that, actually.

You rock Tomas ! :-)

Revision history for this message
In , Tomáš (tom-redhat-bugs-1) wrote :

Thank you :-)

Udo, you can find build with this fix here http://koji.fedoraproject.org/koji/buildinfo?buildID=344071

Revision history for this message
In , udo (udo-redhat-bugs) wrote :

Thanks Tomas!

dhclient still works:

Jul 25 16:52:25 epia dhclient[21795]: Bound to *:546
Jul 25 16:52:25 epia dhclient[21795]: xid: warning: no netdev with useable HWADDR found for seed's uniqueness enforcement
Jul 25 16:52:25 epia dhclient[21795]: xid: rand init seed (0xf8d06a23) built using gethostid
Jul 25 16:52:26 epia dhclient[21795]: XMT: Rebind on ppp0, interval 970ms.
Jul 25 16:52:26 epia dhclient[21795]: RCV: Reply message on ppp0 from fe80::90:1a00:1a1:88e6.
Jul 25 16:52:26 epia dhclient[21795]: message status code Success.

And no semicolon complaints in the messages log!

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

dhcp-4.2.4-9.P1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/FEDORA-2012-11079/dhcp-4.2.4-9.P1.fc17

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

dhcp-4.2.4-9.P1.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.

Revision history for this message
pdf (pdffs) wrote :
Revision history for this message
pdf (pdffs) wrote :

Patch resolves the issue for me locally

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch from Fedora tracker" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in isc-dhcp (Ubuntu):
status: New → Confirmed
Changed in dhcp (Fedora):
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

This patch has been applied in the meantime. isc-dhcp 4.4.1-2.3ubuntu2 in Ubuntu 22.04 (jammy) carries it.

Changed in isc-dhcp (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.