Page MenuHomeFreeBSD

dhclient: Log a warning instead of bailing upon "illegal" options
ClosedPublic

Authored by sepherosa_gmail.com on Apr 6 2016, 6:50 AM.
Tags
None
Referenced Files
F106076531: D5853.diff
Wed, Dec 25, 12:14 AM
Unknown Object (File)
Mon, Dec 2, 3:51 AM
Unknown Object (File)
Sep 22 2024, 10:35 AM
Unknown Object (File)
Sep 22 2024, 5:06 AM
Unknown Object (File)
Sep 22 2024, 3:43 AM
Unknown Object (File)
Sep 19 2024, 4:35 AM
Unknown Object (File)
Sep 15 2024, 2:04 PM
Unknown Object (File)
Sep 5 2024, 4:42 PM
Subscribers

Details

Summary

In Azure, the DHCP servers add private option (id 0xf5), which contains binary form of an IPv4 address. Once this option is converted to string form, it could contain '$', e.g.

IPv4 address: 100.72.36.54
binary form: 0x64 0x48 0x24 0x36
string form: "dH$6"

dhclient bails upon "illegal" options like the above example, thus the VM bring-up will fail.

Also as a side note, this "illegal" option detection was added in OpenBSD ~11years ago:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sbin/dhclient/dhclient.c?rev=1.50&content-type=text/x-cvsweb-markup

And it was removed along with the removal of script support in OpenBSD ~3years ago:
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sbin/dhclient/dhclient.c?rev=1.159&content-type=text/x-cvsweb-markup

Noticed by: Hongxiong Xian <v-hoxian microsoft com>
Tested by: Hongxiong Xian <v-hoxian microsoft com>
Analyzed by: Dong Liu <doliu microsoft com>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sepherosa_gmail.com retitled this revision from to dhclient: Log a warning instead of bailing upon "illegal" options.
sepherosa_gmail.com updated this object.
sepherosa_gmail.com edited the test plan for this revision. (Show Details)
This revision is now accepted and ready to land.Apr 6 2016, 7:01 AM

If no objection comes, it will be committed in the middle of next week.

sbruno added a subscriber: sbruno.

spam a few more reviewers who have poked at dhclient in the past.

jhb edited edge metadata.
This revision was automatically updated to reflect the committed changes.