1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-08 18:45:05 -05:00
Commit Graph

145 Commits

Author SHA1 Message Date
Daniel Stenberg
468019e947 - Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to
only expose functions starting with ares_.
2009-05-11 13:53:26 +00:00
Yang Tse
80186aa7f4 Use build-time configured ares_socklen_t instead of socklen_t 2009-05-02 02:36:47 +00:00
Yang Tse
9770899a4b Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
Yang Tse
0922a0fc3f s/u_long/unsigned long/ 2009-03-11 05:09:03 +00:00
Yang Tse
51b46f451f Do not halt compilation when using VS2008 to build a Windows 2000 target 2009-02-20 11:30:11 +00:00
Phil Blundell
83d135f990 * February 3 2009 (Phil Blundell)
- If the server returns garbage or nothing at all in response to an AAAA query,
  go on and ask for A records anyway.
2009-02-03 14:38:09 +00:00
Daniel Stenberg
a2256e899b - ares_gethostbyname() now accepts 'AF_UNSPEC' as a family for resolving
either AF_INET6 or AF_INET. It works by accepting any of the looksups in the
  hosts file, and it resolves the AAAA field with a fallback to A.
2009-01-31 20:17:41 +00:00
Daniel Stenberg
29b6a732f3 - ares.h no longer uses the HAVE_STRUCT_IN6_ADDR define check, but instead it
now declares the private struct ares_in6_addr for all systems instead of
  relying on one possibly not present in the system.
2009-01-14 13:08:50 +00:00
Phil Blundell
35d8fb0501 - ares__send_query() now varies the retry timeout pseudo-randomly to avoid
packet storms when several queries were started at the same time.
2009-01-13 11:51:04 +00:00
Daniel Stenberg
32b75d1b69 - Phil Blundell added the internal function ares__expand_name_for_response()
that is now used by the ares_parse_*_reply() functions instead of the
  ares_expand_name() simply to easier return ARES_EBADRESP for the cases where
  the name expansion fails as in responses that really isn't expected.
2009-01-11 13:49:13 +00:00
Gisle Vanem
df7b1d8e64 Fix for Win32 targets using Watt-32. 2008-12-09 14:39:08 +00:00
Daniel Stenberg
e5b0533dab Gregor Jasny provided the patch that introduces ares_set_socket_callback(),
and I edited it to also get duped by ares_dup().
2008-12-04 12:53:03 +00:00
Daniel Stenberg
dd3594c6b3 Introduce ares_dup(3) and new thoughts about API/ABI and how to move forwards.
Also discussed on the ml.
2008-12-03 09:59:50 +00:00
Yang Tse
67fb731ec4 Gerald Combs fixed a bug in ares_parse_ptr_reply() which would cause a
buffer to shrink instead of expand if a reply contained 8 or more records.
2008-11-26 17:04:35 +00:00
Yang Tse
a30a6f2f20 Brad Spencer provided changes to allow buildconf to work on OS X. 2008-11-26 16:51:51 +00:00
Yang Tse
3b0c5ae467 In preparation for the upcomming IPv6 nameservers patch, the internal
ares_addr union is now changed into an internal struct which also holds
the address family.
2008-11-25 16:26:58 +00:00
Daniel Stenberg
7383225271 - Brad Spencer brought the new function ares_gethostbyname_file() which simply
resolves a host name from the given file, using the regular hosts syntax.
2008-11-19 15:16:16 +00:00
Daniel Stenberg
3e3d10824f - Carlo Contavalli added support for the glibc "rotate" option, as documented
in man resolv.conf:

  causes round robin selection of nameservers from among those listed.  This
  has the effect of spreading the query load among all listed servers, rather
  than having all clients try the first listed server first every time.

  You can enable it with ARES_OPT_ROTATE
2008-11-01 18:35:19 +00:00
Yang Tse
3f2de3d101 Charles Hardin patch:
- handles the EINPROGRESS for UDP connects
- uses closesocket instead of close on some paths that were noticed
2008-10-21 01:58:23 +00:00
Daniel Stenberg
eb612bfdfc Charles Hardin made adig support a regular numerical dotted IP address for the
-s option as well.
2008-10-17 11:26:36 +00:00
Yang Tse
bfc09ac211 Sync up with reality 2008-10-07 13:34:59 +00:00
Yang Tse
0776701396 Sync up with reality 2008-09-17 01:33:43 +00:00
Daniel Stenberg
09df1cdb5c Version 1.5.3 2008-08-29 08:33:02 +00:00
Yang Tse
db23538898 George Neill's fix acountry sample application compilation failure. 2008-08-25 03:44:43 +00:00
Yang Tse
423a18cecc Brad House's validation that DNS response address matches the request address 2008-08-25 03:34:50 +00:00
Daniel Stenberg
931fc45f05 - Fix by Tofu Linden:
The symptom:
  * Users (usually, but not always) on 2-Wire routers and the Comcast service
  and a wired connection to their router would find that the second and
  subsequent DNS lookups from fresh processes using c-ares to resolve the same
  address would cause the process to never see a reply (it keeps polling for
  around 1m15s before giving up).

  The repro:
  * On such a machine (and yeah, it took us a lot of QA to find the systems
  that reproduce such a specific problem!), do 'ahost www.secondlife.com',
  then do it again.  The first process's lookup will work, subsequent lookups
  will time-out and fail.

  The cause:
  * init_id_key() was calling randomize_key() *before* it initialized
  key->state, meaning that the randomness generated by randomize_key() is
  immediately overwritten with deterministic values. (/dev/urandom was also
  being read incorrectly in the c-ares version we were using, but this was
  fixed in a later version.)
  * This makes the stream of generated query-IDs from any new c-ares process
  be an identical and predictable sequence of IDs.
  * This makes the 2-Wire's default built-in DNS server detect these queries
  as probable-duplicates and (erroneously) not respond at all.
2008-08-04 20:23:12 +00:00
Yang Tse
b4fdccf87a Autoconf 2.62 has changed the behaviour of the AC_AIX macro which we use.
Prior versions of autoconf defined _ALL_SOURCE if _AIX was defined. But,
autoconf 2.62 version of AC_AIX defines _ALL_SOURCE along with other four
preprocessor symbols no matter if the system is AIX or not. To keep the
traditional behaviour, as well as an uniform one, across autoconf versions
AC_AIX is replaced with our own internal macro.
2008-08-04 06:48:11 +00:00
Yang Tse
5cff8124b0 Sync up with reality 2008-08-01 03:10:54 +00:00
Yang Tse
bffe69a151 when recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
now cause the definition of RECVFROM_TYPE_ARG2_IS_VOID, RECVFROM_TYPE_ARG5_IS_VOID
or RECVFROM_TYPE_ARG6_IS_VOID, as appropriate.
2008-07-21 00:36:55 +00:00
Yang Tse
39f23aec6b RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
2008-07-17 03:07:54 +00:00
Yang Tse
a9dc900515 Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions
for non-configure systems config files, and introduced macro sreadfrom which
will be used on udp sockets as a recvfrom() wrapper.
2008-07-16 19:16:41 +00:00
Yang Tse
2cfb8a2bf0 Improved configure detection of number of arguments for getservbyport_r 2008-07-16 12:26:09 +00:00
Yang Tse
21ee1c2d01 Allow --enable-largefile and --disable-largefile configurations.
Configure process no longer needs nor checks size of curl_off_t.
Library will now be built with _REENTRANT symbol defined.
2008-07-15 16:43:39 +00:00
Daniel Stenberg
e3b5673e98 - Phil Blundell: If you ask ares_gethostbyname() to do an AF_INET6 lookup and
the target host has only A records, it automatically falls back to an
  AF_INET lookup and gives you the A results.  However, if the target host has
  a CNAME record, this behaviour is defeated since the original query does
  return some data even though ares_parse_aaa_reply() doesn't consider it
  relevant. Here's a small patch to make it behave the same with and without
  the CNAME.
2008-07-03 11:32:35 +00:00
Yang Tse
97333deb3f fallback to gettimeofday when monotonic clock is unavailable at run-time 2008-07-02 03:04:56 +00:00
Daniel Stenberg
67f139e016 - As was pointed out to me by Andreas Schuldei, the MAXHOSTNAMELEN define is
not posix or anything and thus c-ares failed to build on hurd (and possibly
  elsewhere). The define was also somewhat artificially used in the windows
  port. Now, I instead rewrote the use of gethostbyname to enlarge the host
  name buffer in case of need and totally avoid the use of the MAXHOSTNAMELEN
  define. I thus also removed the defien from the namser.h file where it was
  once added for the windows build.

  I also fixed init_by_defaults() function to not leak memory in case if
  error.
2008-06-30 12:48:25 +00:00
Yang Tse
6cd007838d fix pkg-config reporting of private libraries needed for static linking 2008-06-09 01:06:48 +00:00
Yang Tse
e5f0c38fa9 Brad House fixed a missing header file inclusion in adig sample program 2008-05-30 15:26:42 +00:00
Daniel Stenberg
1806879bb2 1.5.2 2008-05-29 20:10:40 +00:00
Daniel Stenberg
76c251513e - Introducing millisecond resolution support for the timeout option. See
ares_init_options()'s ARES_OPT_TIMEOUTMS.
2008-05-13 20:48:48 +00:00
Yang Tse
d708ef6731 Use monotonic time source if available. 2008-05-09 16:30:24 +00:00
Daniel Stenberg
836fa69e2e - Sebastian made c-ares able to return all PTR-records when doing reverse
lookups. It is not common practice to have multiple PTR-Records for a single
  IP, but its perfectly legal and some sites have those.
2008-05-07 21:20:45 +00:00
Daniel Stenberg
9026dc2da4 - Doug Goldstein provided a configure patch: updates autoconf 2.13 usage to
autoconf 2.57 usage (which is the version you have specified as the minimum
  version). It's a minor change but it does clean up some warnings with newer
  autoconf (specifically 2.62).
2008-05-07 21:16:06 +00:00
Yang Tse
a60c9ef88e Improved parsing of resolver configuration files 2008-05-05 17:48:25 +00:00
Daniel Stenberg
12a90289ed - Alexey Simak fixed the VC dsp file by adding the missing source file
ares_expand_string.c
2008-04-04 20:26:06 +00:00
Daniel Stenberg
592697583d Alexey Simak made adig support NAPTR records 2008-04-04 20:24:41 +00:00
Daniel Stenberg
b50a96982e Eino Tuominen improved the code when a file is used to seed the randomizer 2008-04-04 20:05:23 +00:00
Gisle Vanem
e3c5f8374b Added acountry.c. 2007-12-11 17:26:07 +00:00
Daniel Stenberg
a1772ca406 Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat 2007-12-03 10:25:05 +00:00
Daniel Stenberg
30eda92a53 Brad Spencer fixed the configure script to assume that there's no
/dev/urandom when built cross-compiled as then the script cannot check for
it.
2007-12-03 10:22:29 +00:00