Synopsis: dhclient is not properly parsing the classless-static-routes
options that my DHCP server sends
Environment:
        System      : OpenBSD 5.5
Details : OpenBSD 5.5 (GENERIC) #271: Wed Mar 5 09:31:16 MST 2014
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC

        Architecture: OpenBSD.amd64
        Machine     : amd64
Description:
My DHCP server sends a classless-static-route option that looks something like this:
0c 00 68 9c fa 01 10 a9 fe 00 00 00 00

This translates to:
Classless-Static-Route Option 121, length 12: (default:104.156.250.1),(169.254.0.0/16:0.0.0.0)

This is correctly parsed by other DHCP clients (linux dhclient, tcpdump, wireshark), but OpenBSD throws the warning:

classless-static-routes: expecting 9 bytes: got 12

I can't seem to figure out why this warning appears. Based on my understanding of RFC3442 the DHCP server is sending the correct values. I don't see anywhere where I could omit 3 bytes and still have the contents be valid.


How-To-Repeat:
1) Configure dhclient to request classeless-static-route, edit /etc/dhclient.conf and add ', classless-static-routes' to the request line 2) Configure a DHCP server to respond with this value. For ISC DHCPD, this would look something like:
option rfc3442-classless-static-routes code 121 = array of integer 8;
option rfc3442-classless-static-routes 0, 104, 156, 250, 1, 16, 169, 254, 0, 0, 0, 0;
3) Run dhclient -d <interface>
4) You'll see the warning 'classless-static-routes: expecting 9 bytes: got 12', and if you look in the dhclient leases file
 the classless static routes option will be completely missing


(I've omitted the rest of the report here, as this doesn't appear to be hardware related at all, and the system I'm using can't send mail)

Reply via email to