[Dnsmasq-discuss] Patch: Add --ping-timeout option

Aaron Opfer aopfer at bennett-electric.com
Thu May 17 13:51:23 BST 2012


> Where in the man page does it say that the default wait is 1.5 seconds?
>  I can't find that. The code which does the waiting is rather
> susceptible to rounding errors: by staring at it I think it will wait
> somewhere between 2 and 3.25 seconds for the default value, but I've not
> done a live test to verify that.

I actually can't find that anymore. Its possible I just synthesized the
"fact" out of thin air. :-)

My understanding of floating point math might be a bit fuzzy; where
does that rounding error come from?

> Under what circumstances is increasing this time useful? Making it
> longer has definite downsides, since whilst dnsmasq is waiting for a
> ping reply, it doesn't handle other DHCP requests. If it's too long this
> risks other clients timing out. Certainly allowing people the ability to
> tweak this knob risks that they'll inadvertently break things. At the
> very least PING_CACHE_TIME needs to be increased in proportion with
> PING_WAIT

I wasn't aware of this limitation, but I see that comment in the code
now. I think I'll let someone else restructure dnsmasq to fix that...
In the meantime putting a more sensible maximum value could be a good
idea. I think only the slowest clients over the slowest possible link
could miss the ping reply in the default 3 seconds. Maybe, since we
have the rounding issues, we could put the maximum at 5 seconds. Even
so, if dnsmasq ran well all this time with that default, maybe only
lowering the value from the default should be supported.

I'm making tweaks to my patch right now to remedy concerns expressed
over this list.

And lastly: can someone inform me of the proper way to use this mailing
list? My responses appear in new threads instead of underneath the
person I'm responding to, and I can't figure out why. At least I
figured out the correct word-wrap width, unfortunately by messing it up
the first time. This webmail client is pretty much a pain to use, I
only just now got it to put my full name in the from field.

Aaron Opfer





More information about the Dnsmasq-discuss mailing list