Kea fails to log useful information about option 82
I was trying to debug some issues and spent a lot of time trying to figure out why my DHCP relay on an L3 switch was not inserting option82 correctly. Turns out: It does, but kea does not log it properly.
This is the debug log:
pr 25 02:19:07 pve kea-dhcp4[44191]: DEBUG DHCP4_QUERY_DATA [hwtype=1 8c:16:45:d8:b5:b4], cid=[no info], tid=0x37048b4a, packet details: local_address=10.2.1.1:67, remote_address=10.2.0.3:67, msg_type=DHCPREQUEST (3), transid=0x37048b4a,
Apr 25 02:19:07 pve kea-dhcp4[44191]: options:
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=012, len=018: "robin-ThinkPad-P52" (string)
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=050, len=004: 10.21.1.0 (ipv4-address)
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=053, len=001: 3 (uint8)
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=054, len=004: 10.2.1.1 (ipv4-address)
Apr 25 02:19:07 pve kea-dhcp4[44191]: 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)
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=082, len=006:,
Apr 25 02:19:07 pve kea-dhcp4[44191]: options:
Apr 25 02:19:07 pve kea-dhcp4[44191]: type=001, len=004: 6b:75:72:7a
As we can see, nothing is logged for Option 82, just len 006
(which is easy to miss)
This is the actual contents, captured with Wireshark:
Frame 43: 346 bytes on wire (2768 bits), 346 bytes captured (2768 bits)
Ethernet II, Src: Mellanox_46:1d:78 (f4:52:14:46:1d:78), Dst: Mellanox_87:28:22 (24:8a:07:87:28:22)
802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 2
Internet Protocol Version 4, Src: 10.2.0.2, Dst: 10.2.1.1
User Datagram Protocol, Src Port: 67, Dst Port: 67
Dynamic Host Configuration Protocol (Discover)
Message type: Boot Request (1)
Hardware type: Ethernet (0x01)
Hardware address length: 6
Hops: 1
Transaction ID: 0x454ea131
Seconds elapsed: 0
Bootp flags: 0x0000 (Unicast)
Client IP address: 0.0.0.0
Your (client) IP address: 0.0.0.0
Next server IP address: 0.0.0.0
Relay agent IP address: 10.21.0.2
Client MAC address: LCFCHeFe_d8:b5:b4 (8c:16:45:d8:b5:b4)
Client hardware address padding: 00000000000000000000
Server host name not given
Boot file name not given
Magic cookie: DHCP
Option: (53) DHCP Message Type (Discover)
Option: (50) Requested IP Address (10.21.1.0)
Option: (12) Host Name
Option: (55) Parameter Request List
Option: (82) Agent Information Option
Length: 6
Option 82 Suboption: (1) Agent Circuit ID
Length: 4
Agent Circuit ID: 6b75727a
Option: (255) End
Padding: 00000000000000
Binary contents of the option 82 field:
0000 52 06 01 04 6b 75 72 7a R...kurz
(expected value is kurz
)
As we can see, there is a circuit it, but kea does not log it. I believe this is a bug and should be fixed.
Environment:
- Kea version is 2.2.0
- Proxmox 7.4
Edited by Robin Christ