ares_inet_net_pton would return wrong values when excessively large,
and invalid, netmasks are used. Fixes are from bind-9.5.3rc1,
issue also described in the WLB-2008080064 advisory.
Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6
capable and is not affected by the WLB-2008080064 advisory.
HAVE_INET_NET_PTON_IPV6 is no longer defined nor used.
File resolv.conf may either use a hash '#' or a semicolon ';' character as an
indication that the rest of the line is a comment. This fixes not recognizing
the semicolon as a valid comment indicator in resolv.conf.
Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
rules and warnings. Given that cross-compiled targets autobuilds do not run the
test-suite, there is no risk of running code that violates strict aliasing rules
Upon socket address family and length validation failure return ARES_ENOTIMP
in callback again, this is the error code documented in man page and used
mostly all over the library.
Validate socket address family and that the socket address length is appropriate
for the specified family. Failure is reported with ARES_EBADFAMILY in callback.
07bc7ea7953392a50ea39912637d32
The purpose of the whole patch was to silence a compiler warning triggered
with GCC 4 on file ares_process.c The specific compiler warning was
'dereferencing type-punned pointer might break strict-aliasing rules'.
A simpler patch will follow to equally silence the warning.
I ran across a small "issue" in your adig example.
It is simply the last part of the NAPTR record, the replacement element,
which is not a string, as currently handled in adig, but a domain name.
If there aren't any sort items to copy, don't bother. Without this
little precaution it would do a malloc(0) which causes undefined
behaviors and is frowned upon by curl's memdebug-system.
ares__read_line returns ARES_EOF when it reaches the end of the
file. This will happen every time when reading to the end of the
HOSTALIASES file. Unfortunately single_domain treats this error as
being fatal.
Signed-off-by: Mike Crowe <mac@mcrowe.com>
AIX, at least, does not have sockaddr_storage.ss_family member.
Detect this in the configure logic and use proper #ifdefs in the
ares_process logic.
Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Tor Arntsen <tor@spacetec.no>