Options stanza in query packet doesn't reflect the information from dhcpd
Using dhcpd to write the requested options to a log file with this code:
on commit { log(info, concat("Client :", binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)), ": requests ", binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list), " - ", pick-first-value(option vendor-class-identifier, "no_vendor_id")) ); }
We get log output like: (Debian Buster VM as a client).
Apr 2 19:32:33 128.180.2.9 dhcpd[8378]: Client :0:50:56:bf:89:87: requests 1:1c:2:3:f:6:77:c:2c:2f:1a:79:2a - no_vendor_id
Using the same client against kea 1.7.6, we added the following to the forensic logging hook in lease4_callout.cc:
stream << " Full packet: " << query->toText();
And we get this in the forensic log:
2020-04-02 19:32:08 EDT Address: 192.0.2.2 has been renewed for 1 hrs 0 mins 0 secs to a device with hardware address: hwtype=1 00:50:56:bf:ba:d4, client-id: ff:56:bf:ba:d4:00:01:00:01:26:18:e8:9c:00:50:56:bf:ba:d4 Full packet: local_address=192.0.2.222:67, remote_address=192.0.2.2:68, msg_type=DHCPREQUEST (3), transid=0xd09df007, options: type=012, len=010: "dhcpclient" (string) type=053, len=001: 3 (uint8) type=055, len=013: 1(uint8) 28(uint8) 2(uint8) 3(uint8) 15(uint8) 6(uint8) 119(uint8) 12(uint8) 44(uint8) 47(uint8) 26(uint8) 121(uint8) 42(uint8) type=061, len=019: ff:56:bf:ba:d4:00:01:00:01:26:18:e8:9c:00:50:56:bf:ba:d4
It looks like kea isn't capturing all of the same options that dhcpd is capturing, and it also looks like kea isn't preserving the order in which the options are requested.