Attached is an updated patch that deals with the fact that if the c-ares timeout is less than 1000us it gets rounded to zero, which when Curl_expire is called removes *all* timeouts. -Jason
On Wed, Nov 30, 2011 at 5:11 PM, Jason Glasgow <[email protected]> wrote: > Please hold off on evaluating this patch. I've been doing some more > testing and I am not sure it is right. -Jason > > > On Wed, Nov 30, 2011 at 3:43 PM, Jason Glasgow <[email protected]>wrote: > >> Attached is a patch to fix a problem I've been having with the >> multi-interface. The problem that I've observed is that if the first name >> server is not available, the multi interface does not invoke the socket_cb >> when the DNS request to the first name server timesout. >> >> This bug can be reproduced if Curl is complied with --enable_ares >> and your code uses the multi socket interfaces and >> the CURLMOPT_SOCKETFUNCTION option. The way I test is to set up an >> iptables rule that discards the name server reply from the first name >> server. This forces a timeout and then cares tries to use the secondary >> name server. Without the patch, the client code is never informed of the >> new socket that cares is using. >> >> To test try: >> iptables -I INPUT \ >> -s $(sed -n -e '/name/{s/.* //p;q}' /etc/resolv.conf)/32 \ >> -j REJECT >> and then run a program which uses the multi-interface >> >> -Jason >> >> >
0001-multi-handle-timeouts-on-DNS-servers-by-checking-for.patch
Description: Binary data
------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
