<div dir="ltr">Hi,<div><br></div><div>I have a library which I think has a bug, but this bug is affecting DNS queries, and bringing out some odd behaviour in dnsmasq...</div><div><br></div><div>Program is making a query to resolve an address (<a href="http://foo.bar.com">foo.bar.com</a>)</div><div>A normal query results in a CNAME (<a href="http://foo.bar.com.edgekey.net">foo.bar.com.edgekey.net</a>), which results in another CNAME (<a href="http://e1234.a.akamaiedge.net">e1234.a.akamaiedge.net</a>) which has an A record.</div><div><br></div><div>However every so often dnsmasq returns just the first CNAME.</div><div>Note I haven't yet caught it in the act of that first truncated response.  The only thing that makes sense to me is if the <a href="http://edgekey.net">edgekey.net</a> name servers didn't respond in good time... but....</div><div><br></div><div>However the bug in the library then means it asks again, instantly.  and again... and again....</div><div>It manages over 100MB/ minute of DNS requests - dnsmasq answering them all from the cache (I see *no* external requests for that address).</div><div><div><br></div><div>When I restart the program the very first query (identical query as before) gets a complete answer from dnsmasq.</div><div><br></div><div>What I can't understand is how that restart makes any difference to dnsmasq.</div><div>Does dnsmasq have some sort of 'Oh hell the query load is insane I'm just extending the cache a bit to help' mode which it then escapes from as the program restarts?</div><div>There are no external queries for this name during the period of insanity, but the first request after does get put to the external name servers.</div><div><br></div><div>I'm running an 'external interface only' capture to try and capture the initial error condition (which I very much doubt is a problem in dnsmasq), to see if that can shed some light on the issue.</div><div><br></div><div> </div><div>Thoughts? debug hints? laughter?</div><div><br></div><div>Cheers,</div><div><br></div><div>John</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><span style="font-size:12px"><strong>John Robson</strong></span><span style="font-size:12px"><br>
</span></div></div></div>