-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dhcpv6: Fix OPTION_STATUS_CODE parsing (#62)
With current code, all DHCPv6 options after `OPTION_STATUS_CODE` will got parse error as the decoder of `OPTION_STATUS_CODE` read one extra bytes which ruin all follow up options. The status message length of DHCPv6 option `OPTION_STATUS_CODE` should be the total length minus 2. The RFC 8414 section 21.13. Status Code Option: option-len 2 + length of status-message field. And the status message `MUST NOT be null-terminated`. Unit test case included using data captured by wireshark(with DHCP options sorted). Signed-off-by: Gris Ge <fge@redhat.com>
- Loading branch information
Showing
1 changed file
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters