Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option 50 (Address Request) in DHCP Request #15

Open
osresearch opened this issue Jan 27, 2023 · 0 comments
Open

Option 50 (Address Request) in DHCP Request #15

osresearch opened this issue Jan 27, 2023 · 0 comments

Comments

@osresearch
Copy link

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,
        )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant