Skip to content

In DHCP packets, Message Type is not always the first option (not mandated by the standard) #242

Description

@ylmw0131

AI: DHCP standard (RFC 2131 and RFC 2132) and the protocol does not require the DHCP Message Type (option 53) to be the first option in the options list.

I used Wireshark to investigate some DHCP packets on my Ubuntu 24.04 tap1 interface. I found that in these packets, the first DHCP option is not MessageType. Because of this, PacketDotNet fails to parse them and stops due to the assumption: “The message type must be the first DHCP option, the option type for that is 53.”

Image

PacketDotNet current DHCP MessageType implementation: (.\DhcpV4Packet.cs)

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions