[Dnsmasq-discuss] Behavior on DHCP denied
Geert Stappers
stappers at stappers.nl
Tue Apr 18 19:51:06 UTC 2023
On Tue, Apr 18, 2023 at 08:24:17PM +0100, Simon Kelley wrote:
> On 18/04/2023 16:35, 0zl wrote:
> > Hello,
> >
> > This is an issue I've experienced
> > with ESP8266 and proxy ARP on my WiFi network.
Please confirm that it is proxy ARP
as in https://en.wikipedia.org/wiki/Proxy_ARP
> > I was able to work around it by assigning the devices an
> > infinite lease, however I think dnsmasq's behavior is undesirable.
> >
> > In short, ESP8266 is on a network with proxy ARP setup; getting the
> > initial lease works fine, however once proxy ARP kicks in it fails to
> > renew. This is the chain of events leading up to the issue:
> >
> > * MCU tries to renew the address
> > * dnsmasq properly renews its address
> > * MCU sends an ARP request to check if the address is in use and
> > receives an ARP reply from the router because of proxy ARP
> > * MCU mistakenly believes that the address was assigned already even
> > though it was not, sends a DENIED message back to dnsmasq and tries
> > again
> > * dnsmasq then allocates the exact same address that the MCU just rejected
> >
> > I think in this scenario, dnsmasq should try to allocate a different
> > address because MCU has rejected it already.
> >
> > Not sure what people in this mailing list think, but it feels like
> > dnsmasq shouldn't be doing this.
>
> This situation was considered and there should be sensible behaviour.
>
> Dnsmasq uses a hash of the MAC address to determine which the address to
> offer to the client, which would cause the same address always to be offered
> to the client. But if a client returns a DHCPDECLINE reply then a global
> variable is incremented. That variable is also used as an input to the hash
> function, so when the client asks again for an address it should get offered
> a different one.
>
> So, this situation has been considered, but something is going wrong in your
> setup. Please could you post more details of the configuration you are using
> and logs of what happens so we can try and work out what is going wrong?
Yes, interesting problem.
I do hope there will be libpcap files.
Groeten
Geert Stappers
--
Silence is hard to parse
More information about the Dnsmasq-discuss
mailing list