[Dnsmasq-discuss] bind-dynamic race condition

Francesco francesco.montorsi at gmail.com
Tue Nov 3 13:55:25 UTC 2026


Hi all,

First of all thanks for developing and maintaining dnsmasq, it's really
useful and I'm the maintainer of an addon that integrates it with
HomeAssistant (https://github.com/f18m/ha-addon-dnsmasq-dhcp).

I recently started using the "bind-dynamic" feature and I have definitively
isolated a bug in dnsmasq: I can reproduce an intermittent issue with
dnsmasq 2.93-44-g10fbc39 on Linux using bind-dynamic. I created an isolated
test to reproduce it, based on docker (compose).

What happens is that after repeated creation and removal of Docker bridge
container endpoints, dnsmasq stops listening on 127.0.0.1 over both UDP and
TCP, while the IPv6 listener on ::1 remains. Its log reports:

stopped listening on lo(#1): 127.0.0.1 port 1053

The reproducer uses dnsmasq in host networking, bound only to 127.0.0.1:1053,
and repeatedly creates/removes short-lived containers on an IPv6-enabled
bridge. It reproduced after 11 and 40 cycles on Linux 7.2.10-200.fc44.x86_64
with Docker Engine 29.9.0. I can provide the minimal Docker Compose
reproducer.

I suspect there is a race condition somewhere related to the bind-dynamic
implementation.

What is the best way to share the test that reproduces this issue with you?

I didn't find any bug tracker and although I git cloned the source, I'm not
sure in which format you prefer to receive the test that reproduces the
bug... should I send a .patch file?

Thanks,

Francesco Montorsi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20261103/b5a31b36/attachment.htm>


More information about the Dnsmasq-discuss mailing list