[Dnsmasq-discuss] [PATCH] Refuse to start with EADDRINUSE in --bind-dynamic mode

Petr Menšík pemensik at redhat.com
Wed Nov 22 19:27:03 UTC 2023


Hello everyone,

I have received error report RHEL-16398 [1], which I think makes sense 
to fix even in the lastest version. I believe it allows non-intentional 
another instance running without error. What is worse, it does not even 
show any warning that initialization is incomplete.

Of course the problem at start is those errors happen in time when no 
log is available. I think that can be fixed easily by using stderr at 
that time. That is patch #1.

Second makes EADDRNOTAVAIL bind errors still hidden, but prints all 
other errors at least to stderr. On a system with systemd that should 
make it present in journalctl -u dnsmasq anyway. EADDRINUSE is made 
fatal, because that would not be usually handled by new addresses added 
later. If there is a need to start another dnsmasq instance without TCP 
listeners, I think that should be specified more explicitly. Makes 
EADDRINUSE fatal the same way as with --bind-interfaces.

Would you find any other errors, which should be hidden or made fatal? 
What would you think of those changes?

1. https://issues.redhat.com/browse/RHEL-16398

-- 
Petr Menšík
Software Engineer, RHEL
Red Hat, http://www.redhat.com/
PGP: DFCF908DB7C87E8E529925BC4931CA5B6C9FC5CB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Prevent-starting-another-instance-with-bind-dynamic.patch
Type: text/x-patch
Size: 1922 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20231122/9428d7c4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-stderr-logging-enabled-until-normal-logging-sta.patch
Type: text/x-patch
Size: 960 bytes
Desc: not available
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20231122/9428d7c4/attachment-0001.bin>


More information about the Dnsmasq-discuss mailing list