[Dnsmasq-discuss] dnsmasq launch race condition

richardvoigt at gmail.com richardvoigt at gmail.com
Thu Apr 9 04:56:37 BST 2009


Are you using the options to restrict dnsmasq to a particular interface (or
exclude particular interfaces).  If not, then dnsmasq ought to bind 0.0.0.0
port 67 and thus receive packets even on IP addresses and interfaces created
after startup.  At least I think Simon has said that dnsmasq uses INADDR_ANY
unless the bind-interfaces option is in effect.

On Wed, Apr 8, 2009 at 7:39 PM, Perette Barella <perette at barella.org> wrote:

> dnsmasq has a race condition on OS X.  I believe the problem is that if
> dnsmasq starts before IP V4 is fully up, it can't bind to a IP V4 port and
> therefore won't resolve anything.  It will, of course, happily resolve local
> dns requests.
>
> Of course, maybe the problem report should be against launchd, the OS X
> replacement for /etc/rc*, which doesn't have much in the way of dependency
> resolving.
>
> Below is a time-delay launchd.plist file that will, in a rather stupid way,
> fix the problem.  I think 10 seconds might be excessive, but then, it's not
> like UNIX servers are booting more than every few months.  If there's a
> better solution, I'd be glad to learn it.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
>         "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
> <plist version="1.0">
> <dict>
>        <key>Label</key>
>        <string>uk.org.thekelleys.dnsmasq</string>
>        <key>ProgramArguments</key>
>        <array>
>                <string>/bin/bash</string>
>                <string>-c</string>
>                <string>sleep 10 &amp;&amp; exec /usr/local/sbin/dnsmasq
> -k</string>
>        </array>
>        <key>RunAtLoad</key><false/>
>        <key>AbandonProcessGroup</key><false/>
>        <key>KeepAlive</key>
>        <dict>
>                <key>NetworkState</key><true/>
>        </dict>
> </dict>
> </plist>
>
> Perette
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20090409/86f8f98e/attachment.htm


More information about the Dnsmasq-discuss mailing list