diff options
author | obache <obache> | 2010-07-25 13:09:42 +0000 |
---|---|---|
committer | obache <obache> | 2010-07-25 13:09:42 +0000 |
commit | 81e4ad92afc208eaa63b0fd2f0916833e12e942a (patch) | |
tree | f2d43ba83be83c3db15815751cdd2fb76d29e035 /net | |
parent | fe565d6b868b62f18ffbe3544cc2b889f348e72b (diff) | |
download | pkgsrc-81e4ad92afc208eaa63b0fd2f0916833e12e942a.tar.gz |
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.
Diffstat (limited to 'net')
-rw-r--r-- | net/libcares/Makefile | 11 | ||||
-rw-r--r-- | net/libcares/PLIST | 6 | ||||
-rw-r--r-- | net/libcares/buildlink3.mk | 3 | ||||
-rw-r--r-- | net/libcares/distinfo | 12 | ||||
-rw-r--r-- | net/libcares/patches/patch-aa | 8 | ||||
-rw-r--r-- | net/libcares/patches/patch-ab | 13 |
6 files changed, 33 insertions, 20 deletions
diff --git a/net/libcares/Makefile b/net/libcares/Makefile index 62a494d4d8e..96851c43f8d 100644 --- a/net/libcares/Makefile +++ b/net/libcares/Makefile @@ -1,24 +1,29 @@ -# $NetBSD: Makefile,v 1.10 2010/07/25 02:37:16 obache Exp $ +# $NetBSD: Makefile,v 1.11 2010/07/25 13:09:42 obache Exp $ # # Please do not update or modify this package as it has been imported only # as a dependecy for chat/unrealircd. This package should only be updated # when chat/unrealircd requires it. # -DISTNAME= c-ares-1.4.0 -PKGNAME= libcares-1.4.0 +DISTNAME= c-ares-1.6.0 +PKGNAME= libcares-1.6.0 CATEGORIES= net MASTER_SITES= http://c-ares.haxx.se/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://c-ares.haxx.se/ COMMENT= Asynchronous resolver library +LICENSE= mit CONFLICTS+= libares-[0-9]* PKG_DESTDIR_SUPPORT= user-destdir +MAKE_JOBS_SAFE= no + GNU_CONFIGURE= YES USE_LIBTOOL= YES +PKGCONFIG_OVERRIDE+= libcares.pc.in + .include "../../mk/bsd.pkg.mk" diff --git a/net/libcares/PLIST b/net/libcares/PLIST index 41f82948f05..627b2568e21 100644 --- a/net/libcares/PLIST +++ b/net/libcares/PLIST @@ -1,11 +1,13 @@ -@comment $NetBSD: PLIST,v 1.3 2007/07/14 22:05:57 adrianp Exp $ +@comment $NetBSD: PLIST,v 1.4 2010/07/25 13:09:42 obache Exp $ include/ares.h include/ares_dns.h include/ares_version.h lib/libcares.la +lib/pkgconfig/libcares.pc man/man3/ares_cancel.3 man/man3/ares_destroy.3 man/man3/ares_destroy_options.3 +man/man3/ares_dup.3 man/man3/ares_expand_name.3 man/man3/ares_expand_string.3 man/man3/ares_fds.3 @@ -13,6 +15,7 @@ man/man3/ares_free_hostent.3 man/man3/ares_free_string.3 man/man3/ares_gethostbyaddr.3 man/man3/ares_gethostbyname.3 +man/man3/ares_gethostbyname_file.3 man/man3/ares_getnameinfo.3 man/man3/ares_getsock.3 man/man3/ares_init.3 @@ -27,6 +30,7 @@ man/man3/ares_query.3 man/man3/ares_save_options.3 man/man3/ares_search.3 man/man3/ares_send.3 +man/man3/ares_set_socket_callback.3 man/man3/ares_strerror.3 man/man3/ares_timeout.3 man/man3/ares_version.3 diff --git a/net/libcares/buildlink3.mk b/net/libcares/buildlink3.mk index 85de59b99e5..ab8b4d17915 100644 --- a/net/libcares/buildlink3.mk +++ b/net/libcares/buildlink3.mk @@ -1,4 +1,4 @@ -# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:25:09 joerg Exp $ +# $NetBSD: buildlink3.mk,v 1.8 2010/07/25 13:09:42 obache Exp $ BUILDLINK_TREE+= libcares @@ -6,6 +6,7 @@ BUILDLINK_TREE+= libcares 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 diff --git a/net/libcares/distinfo b/net/libcares/distinfo index 59d88aa919e..b120166a2f8 100644 --- a/net/libcares/distinfo +++ b/net/libcares/distinfo @@ -1,7 +1,7 @@ -$NetBSD: distinfo,v 1.4 2007/07/14 22:05:57 adrianp Exp $ +$NetBSD: distinfo,v 1.5 2010/07/25 13:09:42 obache Exp $ -SHA1 (c-ares-1.4.0.tar.gz) = 810074d2792ff5e996816aa52ff676bb102be885 -RMD160 (c-ares-1.4.0.tar.gz) = 06d52e3a36579baf8f6244f927683b43e42fad81 -Size (c-ares-1.4.0.tar.gz) = 431082 bytes -SHA1 (patch-aa) = 5e217928dd4e836d4c76d155ae0ede485ab819c7 -SHA1 (patch-ab) = bc8e815b500ed3090028dec430f73bffb5638d49 +SHA1 (c-ares-1.6.0.tar.gz) = 50b0f5955769117720c8ff2bde6a8a8ece65d7a3 +RMD160 (c-ares-1.6.0.tar.gz) = 3eccaad5df124525c70c47a76cc3fc2cbd31bbe8 +Size (c-ares-1.6.0.tar.gz) = 448639 bytes +SHA1 (patch-aa) = 3fa66b6909821b410141e5514b2d09777f3e2040 +SHA1 (patch-ab) = 356b35b0cb98691a75acf2a9b048a6c5a17117f8 diff --git a/net/libcares/patches/patch-aa b/net/libcares/patches/patch-aa index 4b33f874551..429937368ec 100644 --- a/net/libcares/patches/patch-aa +++ b/net/libcares/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.3 2007/07/14 22:05:57 adrianp Exp $ +$NetBSD: patch-aa,v 1.4 2010/07/25 13:09:42 obache Exp $ ---- ares.h.orig 2007-06-04 08:36:31.000000000 +0100 +--- ares.h.orig 2008-12-04 12:53:03.000000000 +0000 +++ ares.h -@@ -185,6 +185,13 @@ struct ares_options { +@@ -218,6 +218,13 @@ struct ares_options { int nsort; }; @@ -16,7 +16,7 @@ $NetBSD: patch-aa,v 1.3 2007/07/14 22:05:57 adrianp Exp $ struct hostent; struct timeval; struct sockaddr; -@@ -243,7 +250,7 @@ int ares_parse_ns_reply(const unsigned c +@@ -313,7 +320,7 @@ int ares_parse_ns_reply(const unsigned c void ares_free_string(void *str); void ares_free_hostent(struct hostent *host); const char *ares_strerror(int code); diff --git a/net/libcares/patches/patch-ab b/net/libcares/patches/patch-ab index 196d3a8d04a..b95a74d6c0c 100644 --- a/net/libcares/patches/patch-ab +++ b/net/libcares/patches/patch-ab @@ -1,12 +1,11 @@ -$NetBSD: patch-ab,v 1.2 2007/07/14 22:05:57 adrianp Exp $ +$NetBSD: patch-ab,v 1.3 2010/07/25 13:09:42 obache Exp $ ---- ares_init.c.orig 2007-06-04 08:36:31.000000000 +0100 +--- ares_init.c.orig 2008-12-04 12:53:03.000000000 +0000 +++ ares_init.c -@@ -1342,3 +1342,24 @@ short ares__generate_new_id(rc4_key* key - ares__rc4(key, (unsigned char *)&r, sizeof(r)); +@@ -1555,6 +1555,27 @@ unsigned short ares__generate_new_id(rc4 return r; } -+ + +int ares_get_config(struct ares_config_info *d, ares_channel c) +{ +int i; @@ -27,3 +26,7 @@ $NetBSD: patch-ab,v 1.2 2007/07/14 22:05:57 adrianp Exp $ + return ARES_SUCCESS; +} + ++ + void ares_set_socket_callback(ares_channel channel, + ares_sock_create_callback cb, + void *data) |