Skip to content

Option 50 (Address Request) in DHCP Request #15

@osresearch

Description

@osresearch

It seems that dnsmasq will not reply correctly to a DCHP Request packet that does not have option 50 (Address Request) included. According to (this DHCP overview)[https://learn.microsoft.com/en-us/windows-server/troubleshoot/dynamic-host-configuration-protocol-basics], filling in only the Client IP Address is RFC compliant, although on my network dnsmasq doesn't seem to process the DHCPREQUEST packets that arrive if the source IP is 0.0.0.0 and only the ciaddr field is filled in.

Changing the request packet in get_lease() allows my devices to get IP addresses:

        # R
        # dnsmasq wants option field DHCP Requested Address filled in
        option_list = option_list if option_list else options.OptionList()
        option_list.insert(0, options.options.short_value_to_object(50, offer.yiaddr.packed))
        request = packet.DHCPPacket.Request(
            mac_addr,
            int(default_timer() - start),
            tx_id,
            use_broadcast=broadcast,
            option_list=option_list,
            #client_ip=offer.yiaddr,
            relay=relay,
        )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions