dhcp: fix buffer length after adding new option 72/41272/2
authorArtem Glazychev <[email protected]>
Wed, 17 Jul 2024 09:48:45 +0000 (16:48 +0700)
committerMatthew Smith <[email protected]>
Wed, 23 Oct 2024 13:44:09 +0000 (13:44 +0000)
commit768c8d4ece46610de15644342a4f63e4ccd2c04f
tree984db831c68ba960975a715a5938cef2c0921942
parent3bd4e47a9ae8eb53f2441aa82e6f18148ee69c2a
dhcp: fix buffer length after adding new option

The size of dhcp option should be o.length + 2 additional bytes of the header.
Incorrect offset results in an extra byte at the end of the packet:
...
0120  04 00 00 00 04 05 04 AC 10 04 01 FF 00
...
RFC2131 says the last should be the 'end' option (ff)

Type: fix

Change-Id: I056d755d29465aab8c1c55a0b930f65ece6fafce
Signed-off-by: Artem Glazychev <[email protected]>
src/plugins/dhcp/dhcp4_proxy_node.c
test/test_dhcp.py