]> The Tcpdump Group git mirrors - tcpdump/commit
DHCP: Fix the option 81 flags field printing
authorFrancois-Xavier Le Bail <[email protected]>
Sun, 10 May 2020 21:13:27 +0000 (23:13 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 14 May 2020 11:46:55 +0000 (13:46 +0200)
commite2481334a1f4402cf735ec851d14f1428d7a5f58
tree9dfe370f01bec7fe32dfb1e17ae5fa6e5b3492bc
parente4f2e97ad06b55b9fc7bcd3df32ce21cee894c6b
DHCP: Fix the option 81 flags field printing

The first nibble of the option 81 flags field must be zero.
The current flags are in the second nibble.

From RFC 4702:

2.1.  The Flags Field

   The format of the 1-octet Flags field is:

        0 1 2 3 4 5 6 7
       +-+-+-+-+-+-+-+-+
       |  MBZ  |N|E|O|S|
       +-+-+-+-+-+-+-+-+

[...]

   The remaining bits in the Flags field are reserved for future
   assignment.  DHCP clients and servers that send the Client FQDN
   option MUST clear the MBZ bits, and they MUST ignore these bits.
print-bootp.c