kea4 drops packet when server id option is included twice, but because of wrong reason
We have pretty complicated test for fqdn sanitisation, we came across weird problem. When Kea gets v4 packet that include server id option twice - it's get dropped but Kea logs:
2022-08-19 02:35:41.529 DEBUG [kea-dhcp4.bad-packets/169499.139645022918400] DHCP4_PACKET_DROP_0003 [hwtype=1 00:1f:d0:00:00:22], cid=[no info], tid=0x8c57ee, from interface enp0s9: it contains a foreign server identifier
interesting part is that value of server id is correct.
packet:
###[ Ethernet ]###
dst = ff:ff:ff:ff:ff:ff
src = 08:00:27:6d:ee:67
type = IPv4
###[ IP ]###
version = 4
ihl = None
tos = 0x0
len = None
id = 1
flags =
frag = 0
ttl = 64
proto = udp
chksum = None
src = 0.0.0.0
dst = 255.255.255.255
\options \
###[ UDP ]###
sport = bootpc
dport = bootps
len = None
chksum = None
###[ BOOTP ]###
op = BOOTREQUEST
htype = 1
hlen = 6
hops = 0
xid = 9197550
secs = 0
flags =
ciaddr = 0.0.0.0
yiaddr = 0.0.0.0
siaddr = 0.0.0.0
giaddr = 0.0.0.0
chaddr = b'\x00\x1f\xd0\x00\x00"'
sname = b''
file = b''
options = 'c\\x82Sc'
###[ DHCP options ]###
options = [message-type='request' server_id=192.168.50.252 server_id=192.168.50.252 requested_addr=192.168.50.11 client_FQDN='\x01\x00\x00client2.four.example.com.' end]