pkgsrc/net/libcares/buildlink3.mk
obache 994f77874c Update libcares to 1.6.0.
shlib bumped to 2.

Version 1.6.0 (Dec 9, 2008)

* December 9 2008 (Gisle Vanem)

  Fixes for Win32 targets using the Watt-32 tcp/ip stack.

* Dec 4 2008 (Daniel Stenberg)

  Gregor Jasny provided the patch that introduces ares_set_socket_callback(),
  and I edited it to also get duped by ares_dup().

* Dec 3 2008 (Daniel Stenberg)

  API changes:

  I made sure the public ares_config struct looks like before and yet it
  supports the ROTATE option thanks to c-ares now storing the "optmask"
  internally. Thus we should be ABI compatible with the past release(s)
  now. My efforts mentioned below should not break backwards ABI compliance.

  Here's how I suggest we proceed with the API:

  ares_init() will be primary "channel creator" function.

  ares_init_options() will continue to work exactly like now and before. For
  starters, it will be the (only) way to set the existing options.

  ares_save_options() will continue to work like today, but will ONLY save
  options that you can set today (including ARES_OPT_ROTATE actually) but new
  options that we add may not be saved with this.

  Instead we introduce:

  ares_dup() that instead can make a new channel and clone the config used
  from an existing channel. It will then clone all config options, including
  future new things we add.

  ares_set_*() style functions that set (new) config options. As a start we
  simply add these for new functionality, but over time we can also introduce
  them for existing "struct ares_options" so that we can eventually deprecate
  the two ares_*_options() functions.

  ares_get_*() style functions for extracting info from a channel handle that
  should be used instead of ares_save_options().

* Nov 26 2008 (Yang Tse)
- Brad Spencer provided changes to allow buildconf to work on OS X.

- 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.

* Nov 25 2008 (Yang Tse)
- 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.

* Nov 19 2008 (Daniel Stenberg)
- Brad Spencer brought the new function ares_gethostbyname_file() which simply
  resolves a host name from the given file, using the regular hosts syntax.

* Nov 1 2008 (Daniel Stenberg)
- 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

* Oct 21 2008 (Yang Tse)
  Charles Hardin added handling of EINPROGRESS for UDP connects.

* Oct 18 2008 (Daniel Stenberg)
  Charles Hardin made adig support a regular numerical dotted IP address for the
  -s option as well.

* Oct 7 2008 (Yang Tse)
- Added --enable-optimize configure option to enable and disable compiler
  optimizations to allow decoupled setting from --enable-debug.

* Oct 2 2008 (Yang Tse)
- Added --enable-warnings configure option to enable and disable strict
  compiler warnings to allow decoupled setting from --enable-debug.

* Sep 17 2008 (Yang Tse)
- Code reorganization to allow internal/private use of "nameser.h" to any
  system that lacks arpa/nameser.h or arpa/nameser_compat.h header files.

* Sep 16 2008 (Yang Tse)
- Code reorganization to allow internal/private use of ares_writev to any
  system that lacks the writev function.

* Sep 15 2008 (Yang Tse)
- Code reorganization to allow internal/private use of ares_strcasecmp to any
  system that lacks the strcasecmp function.

- Improve configure detection of some string functions.

* Sep 11 2008 (Yang Tse)
- Code reorganization to allow internal/private use of ares_strdup to any
  system that lacks the strdup function.

Version 1.5.3 (Aug 29, 2008)

* Aug 25 2008 (Yang Tse)
- Improvement by Brad House:

  This patch addresses an issue in which a response could be sent back to the
  source port of a client from a different address than the request was made to.
  This is one form of a DNS cache poisoning attack.

  The patch simply uses recvfrom() rather than recv() and validates that the
  address returned from recvfrom() matches the address of the server we have
  connected to. Only necessary on UDP sockets as they are connection-less, TCP
  is unaffected.

- Fix by George Neill:
  Fixed compilation of acountry sample application failure on some systems.

* Aug 4 2008 (Daniel Stenberg)
- 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.


* Aug 4 2008 (Yang Tse)
- 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. 2.62
  version of AC_AIX defines _ALL_SOURCE and other four preprocessor symbols
  no matter if the system is AIX or not. To keep the traditional behaviour,
  and an uniform one across autoconf versions AC_AIX is replaced with our
  own internal macro CARES_CHECK_AIX_ALL_SOURCE.

* Aug 1 2008 (Yang Tse)
- Configure process now checks if the preprocessor _REENTRANT symbol is already
  defined. If it isn't currently defined a set of checks are performed to test
  if its definition is required to make visible to the compiler a set of *_r
  functions. Finally, if _REENTRANT is already defined or needed it takes care
  of making adjustments necessary to ensure that it is defined equally for the
  configure process tests and generated config file.

* Jul 20 2008 (Yang Tse)
- When recvfrom prototype uses a void pointer for arguments 2, 5 or 6 this will
  now cause the definition, as appropriate, of RECVFROM_TYPE_ARG2_IS_VOID,
  RECVFROM_TYPE_ARG5_IS_VOID or RECVFROM_TYPE_ARG6_IS_VOID.

* Jul 17 2008 (Yang Tse)
- 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.

* Jul 16 2008 (Yang Tse)
- Improved configure detection of number of arguments for getservbyport_r.
  Detection is now based on compilation checks instead of linker ones.

- 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 in the future.

* Jul 15 2008 (Yang Tse)
- Introduce definition of _REENTRANT symbol in setup.h to improve library
  usability.  Previously the configure process only used the AC_SYS_LARGEFILE
  macro for debug builds, now it is also used for non-debug ones enabling the
  use of configure options --enable-largefile and --disable-largefile which
  might be needed for library compatibility.  Remove checking the size of
  curl_off_t, it is no longer needed.

* Jul 3 2008 (Daniel Stenberg)
- 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.

* Jul 2 2008 (Yang Tse)
- Fallback to gettimeofday when monotonic clock is unavailable at run-time.

* Jun 30 2008 (Daniel Stenberg)

- 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.

* Jun 9 2008 (Yang Tse)

- Make libcares.pc generated file for pkg-config include information relative
  to the libraries needed for the static linking of c-ares.

* May 30 2008 (Yang Tse)

- Brad House fixed a missing header file inclusion in adig sample program.

Version 1.5.2 (May 29, 2008)

* May 13 2008 (Daniel Stenberg)

- Introducing millisecond resolution support for the timeout option. See
  ares_init_options()'s ARES_OPT_TIMEOUTMS.

* May 9 2008 (Yang Tse)

- Use monotonic time source if available, for private function ares__tvnow()

* May 7 2008 (Daniel Stenberg)

- 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.

- 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).

* May 5 2008 (Yang Tse)

- Improved parsing of resolver configuration files.

* April 4 2008 (Daniel Stenberg)

- Eino Tuominen improved the code when a file is used to seed the randomizer.

- Alexey Simak made adig support NAPTR records

- Alexey Simak fixed the VC dsp file by adding the missing source file
  ares_expand_string.c

* December 11 2007 (Gisle Vanem)

- Added another sample application; acountry.c which converts an
  IPv4-address(es) and/or host-name(s) to country-name and country-code.
  This uses the service of the DNSBL at countries.nerd.dk.

* December 3 2007 (Daniel Stenberg)

- 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.

- Erik Kline cleaned up ares_gethostbyaddr.c:next_lookup() somewhat

Version 1.5.1 (Nov 21, 2007)

* November 21 2007 (Daniel Stenberg)

- Robin Cornelius pointed out that ares_llist.h was missing in the release
  archive for 1.5.0

Version 1.5.0 (Nov 21, 2007)

* October 2 2007 (Daniel Stenberg)

- ares_strerror() segfaulted if the input error number was out of the currently
  supported range.

- Yang Tse: Avoid a segfault when generating a DNS "Transaction ID" in
  internal function init_id_key() under low memory conditions.

* September 28 2007 (Daniel Stenberg)

- Bumped version to 1.5.0 for next release and soname bumped to 2 due to ABI
  and API changes in the progress callback (and possibly more coming up from
  Steinar)

* September 28 2007 (Steinar H. Gunderson)

- Don't skip a server if it's the only one. (Bugfix from the Google tree.)

- Made the query callbacks receive the number of timeouts that happened during
  the execution of a query, and updated documentation accordingly. (Patch from
  the Google tree.)

- Support a few more socket options: ARES_OPT_SOCK_SNDBUF and
  ARES_OPT_SOCK_RCVBUF

- Always register for TCP events even if there are no outstanding queries, as
  the other side could always close the connection, which is a valid event
  which should be responded to.

* September 22 2007 (Daniel Stenberg)

- Steinar H. Gunderson fixed: Correctly clear sockets from the fd_set on in
  several functions (write_tcp_data, read_tcp_data, read_udp_packets) so that
  if it fails and the socket is closed the following code doesn't try to use
  the file descriptor.

- Steinar H. Gunderson modified c-ares to now also do to DNS retries even when
  TCP is used since there are several edge cases where it still makes sense.

- Brad House provided a fix for ares_save_options():

  Apparently I overlooked something with the ares_save_options() where it
  would try to do a malloc(0) when no options of that type needed to be saved.
  On most platforms, this was fine because malloc(0) doesn't actually return
  NULL, but on AIX it does, so ares_save_options would return ARES_ENOMEM.

* July 14 2007 (Daniel Stenberg)

- Vlad Dinulescu fixed two outstanding valgrind reports:

  1. In ares_query.c , in find_query_by_id we compare q->qid (which is a short
  int variable) with qid, which is declared as an int variable.  Moreover,
  DNS_HEADER_SET_QID is used to set the value of qid, but DNS_HEADER_SET_QID
  sets only the first two bytes of qid. I think that qid should be declared as
  "unsigned short" in this function.

  2. The same problem occurs in ares_process.c, process_answer() .  query->qid
  (an unsigned short integer variable) is compared with id, which is an
  integer variable. Moreover, id is initialized from DNS_HEADER_QID which sets
  only the first two bytes of id. I think that the id variable should be
  declared as "unsigned short" in this function.

  Even after declaring these variables as "unsigned short", the valgrind
  errors are still there. Which brings us to the third problem.

  3. The third problem is that Valgrind assumes that query->qid is not
  initialised correctly. And it does that because query->qid is set from
  DNS_HEADER_QID(qbuf); Valgrind says that qbuf has unitialised bytes. And
  qbuf has uninitialised bytes because of channel->next_id . And next_id is
  set by ares_init.c:ares__generate_new_id() . I found that putting short r=0
  in this function (instead of short r) makes all Valgrind warnings go away.
  I have studied ares__rc4() too, and this is the offending line:

        buffer_ptr[counter] ^= state[xorIndex];   (ares_query.c:62)

  This is what triggers Valgrind.. buffer_ptr is unitialised in this function,
  and by applying ^= on it, it remains unitialised.
2010-07-25 13:09:42 +00:00

13 lines
366 B
Makefile

# $NetBSD: buildlink3.mk,v 1.8 2010/07/25 13:09:42 obache Exp $
BUILDLINK_TREE+= libcares
.if !defined(LIBCARES_BUILDLINK3_MK)
LIBCARES_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libcares+= libcares>=1.3.0nb1
BUILDLINK_ABI_DEPENDS.libcares+= libcares>=1.6.0
BUILDLINK_PKGSRCDIR.libcares?= ../../net/libcares
.endif # LIBCARES_BUILDLINK3_MK
BUILDLINK_TREE+= -libcares