aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
AgeCommit message (Collapse)Author
2012-01-02hostip.c: fix Curl_loadhostpairs() OOM handlingYang Tse
2011-12-31create_hostcache_id: use the key lower casedDaniel Stenberg
... to make sure the DNS cache is properly case insensitive
2011-12-31CURLOPT_RESOLVE: avoid adding already present host namesDaniel Stenberg
The load host names to DNS cache function was moved to hostip.c and it now makes sure to not add host names that already are present in the cache. It would previously lead to memory leaks when for example using the --resolve and multiple URLs on the command line.
2011-12-23resolve: don't leak pre-populated dns entriesDaniel Stenberg
CURLOPT_RESOLVE populates the DNS cache with entries that are marked as eternally in use. Those entries need to be taken care of when the cache is killed off. Bug: http://curl.haxx.se/bug/view.cgi?id=3463121 Reported by: "tw84452852"
2011-09-01hostip.c: return immediately from Curl_resolv_timeout() upon expired timeout.Yang Tse
Ensure existing logic in Curl_resolv_timeout() is not subverted upon getting a negative timeout from resolve_server(). The timeout in resolve_server() could be checked to avoid calling Curl_resolv_timeout() with an expired timeout, but fixing this in this way allows existing logic in resolve_server() to be kept unchanged.
2011-07-26stdio.h, stdlib.h, string.h, stdarg.h and ctype.h inclusion done in setup_once.hYang Tse
2011-04-27whitespace cleanup: no space first in conditionalsDaniel Stenberg
"if(a)" is our style, not "if( a )"
2011-04-27source cleanup: unify look, style and indent levelsDaniel Stenberg
By the use of a the new lib/checksrc.pl script that checks that our basic source style rules are followed.
2011-04-25hostip: comment fixed to state current situationDaniel Stenberg
2011-04-25async resolvers: further cleanupsDaniel Stenberg
asyn-ares.c and asyn-thread.c are two separate backends that implement the same (internal) async resolver API for libcurl to use. Backend is specified at build time. The internal resolver API is defined in asyn.h for asynch resolvers.
2010-12-01fix compiler warning: conversion may lose significant bitsYang Tse
2010-11-26hostip: edit commentYang Tse
2010-11-11ip_version: moved to connection structDaniel Stenberg
The IP version choice was previously only in the UserDefined struct within the SessionHandle, but since we sometimes alter that option during a request we need to have it on a per-connection basis. I also moved more "init conn" code into the allocate_conn() function which is designed for that purpose more or less.
2010-11-08CURLOPT_RESOLVE: addedDaniel Stenberg
CURLOPT_RESOLVE is a new option that sends along a curl_slist with name:port:address sets that will populate the DNS cache with entries so that request can be "fooled" to use another host than what otherwise would've been used. Previously we've encouraged the use of Host: for that when dealing with HTTP, but this new feature has the added bonus that it allows the name from the URL to be used for TLS SNI and server certificate name checks as well. This is a first change. Surely more will follow to make it decent.
2010-04-13fix compiler warning: variable might be clobbered by longjmp or vforkYang Tse
2010-04-04simplify code of Curl_resolv_timeout()Kamil Dudka
2010-04-04eliminate a race condition in Curl_resolv_timeout()Kamil Dudka
2010-03-24avoid compiler warning without USE_ALARM_TIMEOUTDaniel Stenberg
2010-03-24remove the CVSish $Id$ linesDaniel Stenberg
2010-03-22fix the alarm()-based DNS timeoutThomas Lopatic
Looking at the code of Curl_resolv_timeout() in hostip.c, I think that in case of a timeout, the signal handler for SIGALRM never gets removed. I think that in my case it gets executed at some point later on when execution has long left Curl_resolv_timeout() or even the cURL library. The code that is jumped to with siglongjmp() simply sets the error message to "name lookup timed out" and then returns with CURLRESOLV_ERROR. I guess that instead of simply returning without cleaning up, the code should have a goto that jumps to the spot right after the call to Curl_resolv().
2010-01-23adjust preprocessor symbol definition check relative to resolver specialtyYang Tse
2010-01-22wrap long lines and do some indent policingDaniel Stenberg
2010-01-22Constantine Sapuntzakis refactoring of async callbacks, allowingYang Tse
removal of Curl_addrinfo_copy(), Curl_addrinfo6_callback(), and Curl_addrinfo4_callback()
2009-12-30VMS specific preprocessor symbol checking adjustmentsYang Tse
2009-11-18Make usage of calloc()'s arguments consistent with rest of code baseYang Tse
2009-11-12Constantine Sapuntzakis patch for hostip.cYang Tse
No need for a separate variable ndns. The memory leak detection will detect code that fails to release a dns reference. The DEBUGASSERT will detect code that releases too many references.
2009-11-12Make hostip.c compile againYang Tse
2009-11-11- Constantine Sapuntzakis posted bug #2891595Daniel Stenberg
(http://curl.haxx.se/bug/view.cgi?id=2891595) which identified how an entry in the DNS cache would linger too long if the request that added it was in use that long. He also provided the patch that now makes libcurl capable of still doing a request while the DNS hash entry may get timed out.
2009-09-01- Peter Sylvester made a debug featuer for Curl_resolv() that now will forceDaniel Stenberg
libcurl to resolve 'localhost' whatever name you use in the URL *if* you set the --interface option to (exactly) "LocalHost". This will enable us to write tests for custom hosts names but still use a local host server.
2009-04-21libcurl's memory.h renamed to curl_memory.hYang Tse
2009-04-21Moved potential inclusion of system's malloc.h and memory.h header files toYang Tse
setup_once.h. Inclusion of each header file is based on the definition of NEED_MALLOC_H and NEED_MEMORY_H respectively.
2008-11-06Merged existing IPv4 and IPv6 Curl_ip2addr functions into a single oneYang Tse
which now also takes a protocol address family argument.
2008-10-30Use our Curl_addrinfo definition even when an addrinfo struct is available.Yang Tse
Use a wrapper function to call system's getaddrinfo().
2008-10-20*** empty log message ***Yang Tse
2008-10-19fix compiler warningYang Tse
2008-10-19attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-10-19attempt to fix compiler warning relative to potential misaligned data accessYang Tse
2008-10-18Removed a line of dead code (discovered by Coverity)Dan Fandrich
2008-10-17protect against 'use after free' or race conditionYang Tse
2008-10-17fix compiler warningYang Tse
2008-10-17OOM condition fixYang Tse
2008-10-13attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-10-10attempt to fix or allow further detection of an elusive icc SIGSEGVYang Tse
2008-10-03fix another error introduced in previously mentioned commitYang Tse
2008-10-03fix error introduced in previous commitYang Tse
2008-10-02take 2 at fixing compiler warning: argument might be clobbered by `longjmp' ↵Yang Tse
or `vfork'
2008-10-02fix compiler warning: `variable' might be clobbered by `longjmp' or `vfork'Yang Tse
2008-10-01Fixed some compiler warnings with gccDan Fandrich
2008-09-29Fixed a couple of compile warnings.Dan Fandrich
2008-09-29Moved all signal-based name resolution timeout handling into a single newDan Fandrich
Curl_resolv_timeout function to reduce coupling.