[Dnsmasq-discuss] Lease attribution on bad network when one configured interface does not exists
Florent Fourcot
florent.fourcot at wifirst.fr
Mon Aug 18 13:46:21 UTC 2025
Hello,
We are observing wrong IPv4 attributions by dnsmasq. We don't have (yet)
a ready-to-use reproducer, but the scenario is this one:
* Dnsmasq is configured to distribute addresses on two interfaces:
* eth1.211 with subnet 10.188.0.1/16
* eth1.2395 with subnet 10.191.95.0/24
Configuration is this one:
interface=eth1.211
dhcp-range=eth1.211,10.188.1.1,10.188.255.254,604800
interface=eth1.2395
dhcp-range=eth1.2395,10.191.95.2,10.191.95.254,24h
The bug is triggered only when eth1.2395 does not exists. dnsmasq is
emitting a warning on startup: "warning: interface eth1.2395 does not
currently exist".
Bad network attribution does not start immediately. Dnsmasq can be
running without any issue for several days. But at one point, IP of 2395
are being distributed to eth1.211 client. It looks like something
trigger a bug in network detection. Here are the log of the first user
receiving a bad IP address:
DHCPREQUEST(eth1.211) 10.228.2.57 aa:bb:cc:ed:f2:89 # this request is
not valid
DHCPNAK(eth1.211) 10.228.2.57 aa:bb:cc:ed:f2:89 address not available
DHCPDISCOVER(eth1.211) aa:bb:cc:ed:f2:89
DHCPOFFER(eth1.211) 10.191.95.64 aa:bb:cc:ed:f2:89 # IP address for
eth1.2395 interface, not eth1.211
DHCPREQUEST(eth1.211) 10.191.95.64 aa:bb:cc:ed:f2:89
DHCPACK(eth1.211) 10.191.95.64 aa:bb:cc:ed:f2:89
After this first bad lease, a lot of client a receiving this kind of not
working IP addresses. A restart of dnsmasq fixes this issue.
Our current workaround is to never run dnsmasq with a missing interface,
but I think that something interesting can be found with this issue. We
are running dnsmasq version 2.92.
Please do not hesitate if I can provide more logs or configuration. We
will try to generate a reproducer, but it does not look very easy.
Best regards,
Florent Fourcot
More information about the Dnsmasq-discuss
mailing list