]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r298385
authorsephe <sephe@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 6 May 2016 05:44:12 +0000 (05:44 +0000)
committersephe <sephe@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 6 May 2016 05:44:12 +0000 (05:44 +0000)
commit0b87f9247f0a16cb578c4e52cb6f847ba537559d
treecd31fad6537658930b1bbcf141e75dc14401a559
parentd7a988773525e607df14e475e16a9ba567cfd962
MFC r298385

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

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

Reported by: Hongxiong Xian <v-hoxian microsoft com>
Reviewed by: jhb, Dexuan Cui <decui microsoft com>
Tested by: Hongxiong Xian <v-hoxian microsoft com>
Analyzed by: Dong Liu <doliu microsoft com>
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5853

git-svn-id: svn://svn.freebsd.org/base/stable/10@299156 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/dhclient/dhclient.c