The NetBSD Project

CVS log for pkgsrc/net/libcares/distinfo

[BACK] Up to [cvs.NetBSD.org] / pkgsrc / net / libcares

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.43: download - view: text, markup, annotated - select for diffs
Sun Nov 10 09:14:10 2024 UTC (4 weeks, 1 day ago) by adam
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +4 -4 lines
libcares: updated to 1.34.3

c-ares version 1.34.3 - November 9 2024

This is a bugfix release.

Changes:
* Build the release package in an automated way so we can provide
  provenance as per [SLSA3](https://slsa.dev/).

Bugfixes:
* Some upstream servers are non-compliant with EDNS options, resend queries
  without EDNS.
* Android: <=7 needs sys/system_properties.h
* Android: CMake needs `-D_GNU_SOURCE` and others.
* TSAN warns on missing lock, but lock isn't actually necessary.
* `ares_getaddrinfo()` for `AF_UNSPEC` should retry IPv4 if only IPv6 is
  received.
* `ares_send()` shouldn't return `ARES_EBADRESP`, its `ARES_EBADQUERY`.
* Fix typos in man pages.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Wed Oct 16 08:51:31 2024 UTC (7 weeks, 5 days ago) by adam
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +4 -5 lines
libcares: updated to 1.34.2

c-ares version 1.34.2 - October 15 2024

This release contains a fix for downstream packages detecting the c-ares
version based on the contents of the header file rather than the
distributed pkgconf or cmake files.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Mon Oct 14 22:06:30 2024 UTC (7 weeks, 6 days ago) by wiz
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +2 -1 lines
libcares: fix version string in header for CMake

Bug report filed upstream.

Bump PKGREVISION.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sun Oct 13 07:45:54 2024 UTC (8 weeks, 1 day ago) by wiz
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +4 -4 lines
libcares: update to 1.34.1.

## c-ares version 1.34.1 - Octover 9 2024

This release fixes a packaging issue.

## c-ares version 1.34.0 - October 9 2024

This is a feature and bugfix release.

Features:
* adig: read arguments from adigrc.
* Add new pending write callback optimization via `ares_set_pending_write_cb`.
* New function `ares_process_fds()`.
* Failed servers should be probed rather than redirecting queries which could
  cause unexpected latency.
* adig: rework command line arguments to mimic dig from bind.
* Add new method for overriding network functions
  `ares_set_socket_function_ex()` to properly support all new functionality.
* Fix regression with custom socket callbacks due to DNS cookie support.
* ares_socket: set IP_BIND_ADDRESS_NO_PORT on ares_set_local_ip* tcp sockets
* URI parser/writer for ares_set_servers_csv()/ares_get_servers_csv().

Changes:
* Connection handling modularization.
* Expose library/utility functions to tools.
* Remove `ares__` prefix, just use `ares_` for internal functions.

Bugfixes:
* fix: potential WIN32_LEAN_AND_MEAN redefinition.
* Fix googletest v1.15 compatibility.
* Fix pkgconfig thread dependencies.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Sep 2 20:50:42 2024 UTC (3 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +4 -4 lines
libcares: updated to 1.33.1

c-ares version 1.33.1 - August 23 2024
This is a bugfix release.

Bugfixes:

Work around systemd-resolved quirk that returns unexpected codes for single label names. Also adds test cases to validate the work around works and will continue to work in future releases.
Fix sysconfig ndots default value, also adds containerized test case to prevent future regressions.
Fix blank DNS name returning error code rather than valid record for commands like: adig -t SOA .. Also adds test case to prevent future regressions. 9e574af
Fix calculation of query times > 1s. 2b2eae7
Fix building on old Linux releases that don’t have TCP_FASTOPEN_CONNECT. b7a89b9
Fix minor Android build warnings.

c-ares version 1.33.0 - August 2 2024
This is a feature and bugfix release.

Features:

Add DNS cookie support (RFC7873 + RFC9018) to help prevent off-path cache poisoning attacks.
Implement TCP FastOpen (TFO) RFC7413, which will make TCP reconnects 0-RTT on supported systems.
Changes:

Reorganize source tree.
Refactoring of connection handling to prevent code duplication.
New dynamic array data structure to prevent simple logic flaws in array handling in various code paths.
Bugfixes:

ares_destroy() race condition during shutdown due to missing lock.
Android: Preserve thread name after attaching it to JVM.
Windows UWP (Store) support fix.

c-ares version 1.32.3 - July 24 2024
This is a bugfix release.

Changes:

Prevent complex recursion during query requeuing and connection cleanup for stability. e8b32b8
Better propagate error codes on requeue situations. a9bc0a2
Try to prevent SIGPIPE from being generated and delivered to integrations. de01baa
Bugfixes:

Missing manpage for ares_dns_record_set_id() aa462b3
Memory leak in ares__hosts_entry_to_hostent() due to allocation strategy.
UDP write failure detected via ICMP unreachable should trigger faster failover.
Fix pycares test case regression due to wrong error code being returned. Regression from 1.31.0.
Fix possible Windows crash during ares_destroy() when using event threads. 5609bd4
ARES_OPT_MAXTIMEOUTMS wasn’t being honored in all cases. a649c60
c-ares version 1.32.2 - July 15 2024
This is a bugfix release.

Bugfixes:

Windows: rework EventThread AFD code for better stability.
Windows: If an IP address was detected to have changed, it could lead to a crash due to a bad pointer. Regression introduced in 1.31.0. 59e3a1f4
Windows: use QueryPerformanceCounters() instead of GetTickCount64() for better time accuracy (~15ms -> ~1us). 8a50fc6c
Windows 32bit config change callback needs to be tagged as stdcall otherwise could result in a crash. 5c2bab35
Tests that need accurate timing should not depend on internal symbols as there are C++ equivalents in std::chrono.
Kqueue (MacOS, *BSD): If the open socket count exceeded 8 (unlikely), it would try to allocate a new buffer that was too small. 5aad7981

c-ares version 1.32.1 - July 7 2024
This is a bugfix release.

Bugfixes:

Channel lock needs to be recursive to ensure calls into c-ares functions can be made from callbacks otherwise deadlocks will occur. This regression was introduced in 1.32.0.
c-ares version 1.32.0 - July 4 2024
This is a feature and bugfix release.

Features:

Add support for DNS 0x20 to help prevent cache poisoning attacks, enabled by specifying ARES_FLAG_DNS0x20. Disabled by default.
Rework query timeout logic to automatically adjust timeouts based on network conditions. The timeout specified now is only used as a hint until there is enough history to calculate a more valid timeout.
Changes:

DNS RR TXT strings should not be automatically concatenated as there are use cases outside of RFC 7208. In order to maintain ABI compliance, the ability to retrieve TXT strings concatenated is retained as well as a new API to retrieve the individual strings. This restores behavior from c-ares 1.20.0.
Clean up header inclusion logic to make hacking on code easier.
GCC/Clang: Enable even more strict warnings to catch more coding flaws. 253bdee
MSVC: Enable /W4 warning level.
Bugfixes:

Tests: Fix thread race condition in test cases for EventThread.
Windows: Fix building with UNICODE.
Thread Saftey: ares_timeout() was missing lock. 74a64e4
Fix building with DJGPP (32bit protected mode DOS).

Revision 1.38: download - view: text, markup, annotated - select for diffs
Fri Apr 5 11:17:03 2024 UTC (8 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2024Q2-base, pkgsrc-2024Q2
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +4 -4 lines
libcares: update to 1.28.1.

c-ares version 1.28.1 - Mar 30 2024

This release contains a fix for a single significant regression introduced in c-ares 1.28.0.

    ares_search() and ares_getaddrinfo() resolution fails if no search domains are specified. Issue #737

c-ares version 1.28.0 - Mar 29 2024

This is a feature and bugfix release.

Features:

    Emit warnings when deprecated c-ares functions are used. This can be disabled by passing a compiler definition of CARES_NO_DEPRECATED. PR #732
    Add function ares_search_dnsrec() to search for records using the new DNS record data structures. PR #719
    Rework internals to pass around ares_dns_record_t instead of binary data, this introduces new public functions of ares_query_dnsrec() and ares_send_dnsrec(). PR #730

Changes:

    tests: when performing simulated queries, reduce timeouts to make tests run faster
    Replace configuration file parsers with memory-safe parser. PR #725
    Remove acountry completely, the manpage might still get installed otherwise. Issue #718

Bugfixes:

    CMake: don't overwrite global required libraries/definitions/includes which could cause build errors for projects chain building c-ares. Issue #729
    On some platforms, netinet6/in6.h is not included by netinet/in.h and needs to be included separately. PR #728
    Fix a potential memory leak in ares_init(). Issue #724
    Some platforms don't have the isascii() function. Implement as a macro. PR #721
    CMake: Fix Chain building if CMAKE runtime paths not set
    NDots configuration should allow a value of zero. PR #735

Revision 1.37: download - view: text, markup, annotated - select for diffs
Fri Feb 23 12:58:34 2024 UTC (9 months, 2 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2024Q1-base, pkgsrc-2024Q1
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +4 -4 lines
libcares: update to 1.27.0.

This is a security, feature, and bugfix release.

Security:

    Moderate. CVE-2024-25629. Reading malformatted /etc/resolv.conf,
    /etc/nsswitch.conf or the HOSTALIASES file could result in a
    crash. GHSA-mg26-v6qh-x48q

Features:

    New function ares_queue_active_queries() to retrieve number of
    in-flight queries. PR #712
    New function ares_queue_wait_empty() to wait for the number of
    in-flight queries to reach zero. PR #710
    New ARES_FLAG_NO_DEFLT_SVR for ares_init_options() to return
    a failure if no DNS servers can be found rather than attempting
    to use 127.0.0.1. This also introduces a new ares status code
    of ARES_ENOSERVER. PR #713

Changes:

    EDNS Packet size should be 1232 as per DNS Flag Day. PR #705

Bugfixes:

    Windows DNS suffix search list memory leak. PR #711
    Fix warning due to ignoring return code of write(). PR #709
    CMake: don't override target output locations if not top-level. Issue #708
    Fix building c-ares without thread support. PR #700

Revision 1.36: download - view: text, markup, annotated - select for diffs
Sun Jan 28 13:02:11 2024 UTC (10 months, 1 week ago) by wiz
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +4 -4 lines
libcares: update to 1.26.0.

## c-ares version 1.26.0 - Jan 26 2024

Features:

* Event Thread support.  Integrators are no longer requried to monitor the
  file descriptors registered by c-ares for events and call `ares_process()`
  when enabling the event thread feature via `ARES_OPT_EVENT_THREAD` passed
  to `ares_init_options()`. [PR #696](https://github.com/c-ares/c-ares/pull/696)
* Added flags to `are_dns_parse()` to force RAW packet parsing.
  [PR #693](https://github.com/c-ares/c-ares/pull/693)

Changes:

* Mark `ares_fds()` as deprected.
  [PR #691](https://github.com/c-ares/c-ares/pull/691)

Bugfixes:

* `adig`: Differentiate between internal and server errors.
  [e10b16a](https://github.com/c-ares/c-ares/commit/e10b16a)
* Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS.
  [PR #695](https://github.com/c-ares/c-ares/pull/695)
* Autotools: fix building for 32bit windows due to stdcall symbol mangling.
  [PR #689](https://github.com/c-ares/c-ares/pull/689)
* RR Name should not be sanity checked against the Question.
  [PR #685](https://github.com/c-ares/c-ares/pull/685)

Revision 1.35: download - view: text, markup, annotated - select for diffs
Sun Jan 7 16:05:32 2024 UTC (11 months ago) by wiz
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +4 -4 lines
libcares: update to 1.25.0.

Version 1.25.0 (2 Jan 2024)

GitHub (2 Jan 2024)
- [Brad House brought this change]

  1.25.0 release prep (#676)

Brad House (31 Dec 2023)
- tests: replace google DNS with CloudFlare for reverse lookups as google's servers stopped responding properly

- OSSFuzz: it assumes autotools builds a static library by default, which means the old autotools must have done that even though there were comments saying it wasn't.  Disable static by default on Windows however since it can't build both simultaneously.

- autotools: update logic for building tests to provide more feedback

- set winver consistently across build systems

GitHub (28 Dec 2023)
- [Brad House brought this change]

  Autotools: rework to simplify and fix recent issues (#674)

  Completely rework the autotools build system, issues have cropped up due to the complexity and could cause issues on even semi-modern Linux systems (Ubuntu 20.04 for example).

  Changes include:

  Remove all curl/xc/cares m4 helper files, they go overboard on detections of functions and datatypes. Go back to more plain autoconf macros as they've come a long way over the years.
  Use known systems and heuristics to determine datatypes for functions like send() and recv(), rather than the error prone detection which required thousands of permutations and might still get it wrong.
  Remove unneeded configure arguments like --enable-debug or --enable-optimize, its more common for people to simply pass their own CFLAGS on the command line.
  Only require CARES_STATICLIB definition on Windows static builds, its not necessary ever for other systems, even when hiding non-public symbols.
  Remove some function and definition detections that were never used in c-ares
  The test framework is now embedded into the toplevel configure system, there was no need to chain build the test system as it is never built externally to c-ares.
  As a side-effect of the changes, a configure run completes in about 25% of the original time.

  This has been tested on various Linux distributions (of varying age), FreeBSD, MacOS, Windows (via MSYS2 with Mingw), and Solaris10/11 (by @dfandrich), AIX 7.3 (by @dfandrich). It is not unlikely that this may have broken more esoteric or legacy systems, and we'll likely need to be ready to accept bug reports and patches, but it has removed over 10k lines of build system code. It is very likely any issues that crop up will add far fewer lines of code to fix such systems.

  Fixes Bug: #670
  Fix By: Brad House (@bradh352)

Brad House (22 Dec 2023)
- docs: host -> ip

  fix mismatched documentation stating host instead of ip

  Fix By: Brad House (@bradh352)

GitHub (21 Dec 2023)
- [Brad House brought this change]

  Old MacOS SDKs require you include sys/socket.h before net/if.h (#673)

  Old MacOS SDKs (like 10.8) require you include `sys/socket.h` before you include `net/if.h` as reported by MacPorts.  Using a new SDK but with setting the macos target version does not have the same issue.

  Fixes Issue: #672
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Autotools warning fixes (#671)

  * get rid of clashes with curl namespace
  * remove warnings due to deprecated functionality
  * reorder some macro calls to get rid of warnings due to being called in the wrong order

  Fix By: Brad House (@bradh352)

Brad House (19 Dec 2023)
- clang-format

- ares_strsplit() rewrite as wrapper around ares__buf_split()

  We want to limit as much as possible any hand written parsers.
  ares__buf_split() uses the new memory-safe parsing routines.  This
  adds a couple of additional flags to remove duplicates which the
  existing split code did.

  Fix By: Brad House (@bradh352)

- clang-format

- sonarcloud: const

- Connection failure should increment server failure count first

  In order to be sure a different server is chosen on the next query,
  a read error should result in the failure count being updated
  first before requeing the request to a different server.

  Fix By: Brad House (@bradh352)

GitHub (18 Dec 2023)
- [Brad House brought this change]

  ahost should use ares_getaddrinfo() these days (#669)

  ahost wasn't printing both ipv4 and ipv6 addresses. This day and age, it really should.

  This PR also adds the ability to specify the servers to use.

  Fix By: Brad House (@bradh352)

Brad House (17 Dec 2023)
- Fix bad stub for ares__iface_ips_enumerate()

  If the ability to enumerate interface ip addresses does not exist
  on a system, the stub function contained the wrong prototype.

  Fixes Bug: #668
  Fix By: Brad House (@bradh352)

GitHub (17 Dec 2023)
- [Gregor Jasny brought this change]

  Fix minor warnings and documentation typos (#666)

  Build warnings could be seen [here](https://buildd.debian.org/status/fetch.php?pkg=c-ares&arch=arm64&ver=1.24.0-1&stamp=1702826366&raw=0) [origin](https://buildd.debian.org/status/package.php?p=c-ares)

  Fix By: Gregor Jasny (@gjasny)

- [Brad House brought this change]

  CI: Add Alpine Linux and old Ubuntu (#667)

  Alpine linux doesn't use glibc but instead musl c, so provides a good alternative test bed. We are also adding the oldest non-EOL ubuntu version so we can test against older linux variants to prevent surprises.

  This patch also migrates more tests to use cmake and ninja in order to reduce overall build times as we seem to run out of credits on Cirrus-CI pretty quickly.

  Fix By: Brad House (@bradh352)

Brad House (17 Dec 2023)
- fix support with older google test versions

- getrandom() may require sys/random.h on some systems

  There is a reported build issue where getrandom() is detected
  but compile fails due to a missing prototype. This commit attempts
  to resolve that issue.

  Fixes Bug: #665
  Fix By: Brad House (@bradh352)

GitHub (17 Dec 2023)
- [Martin Chang brought this change]

  Use SOCK_DNS extension on socket on OpenBSD (#659)

  This patch added the `SOCK_DNS` flag when running on OpenBSD. Allowing a reduced set of `pledge(2)` promises. Before this patch. The "stdio rpath inet" promises must be used in order to resolve any records. After the patch inet can be replaced with dns which only allows communication on destination port 53, instead of on all ports.

  Side note: I checked the OpenBSD kernel source code. Even though the socket document says the DNS port (typically 53)., The OpenBSD 7.4 kernel only allows 53.

  Fix By: Martin Chang (@marty1885)

Brad House (17 Dec 2023)
- ci: disable static for symbol hiding tests

- ci: add test case for building with hidden symbol visibility

- fix test building with symbol hiding

  New test cases depend on internal symbols for calculating timeouts.
  Disable those test features if symbol hiding is enabled.

  Fixes Bug: #664
  Fix By: Brad House (@bradh352)

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Dec 30 10:14:00 2023 UTC (11 months, 1 week ago) by wiz
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +4 -4 lines
libcares: update to 1.24.0.

Version 1.24.0 (16 Dec 2023)

GitHub (16 Dec 2023)
- [Brad House brought this change]

  ares_cancel() could trigger callback with wrong response code (#663)

  When doing ares_gethostbyname() or ares_getaddrinfo() with AF_UNSPEC, if ares_cancel() was called after one address class was returned but before the other address class, it would return ARES_SUCCESS rather than ARES_ECANCELLED.

  Test case has been added for this specific condition.

  Fixes Bug: #662
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  rand: allow fallback from OS (#661)

  getrandom() can fail with ENOSYS if the libc supports the function but the kernel does not.

  Fixes Bug: #660
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  1.24.0 release prep (#657)

Brad House (11 Dec 2023)
- reference alternative to ares_getsock() in docs

- tag some functions as deprecated in docs

- Coverity: fix allocation size as reported in new code

- remove dead code: ares_iphlpapi.h

- remove dead code: bitncmp

GitHub (9 Dec 2023)
- [Brad House brought this change]

  Use external GoogleTest instead of bundling it (#655)

  GoogleTest should be unbundled. Google changed their guidance a few years back and modern versions of google test cannot build the bundling code file.

  This PR also updates to use C++14 as is required by modern GoogleTest versions.

  Fixes Bug: #506
  Fix By: Brad House (@bradh352)

Brad House (8 Dec 2023)
- use IF_NAMESIZE instead of IFNAMSIZ to avoid warning

- remove redundant cast

- clang-format and fix one warning

GitHub (8 Dec 2023)
- [Brad House brought this change]

  Clean up some Windows-only warnings (#654)

  Windows was emitting some warnings due to datatype differences.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Rewrite sortlist hand parser for memory safety and bugs (#653)

  The parser for the sortlist has been rewritten to use the ares__buf_*() functions. This also resolves some known bugs in accepting invalid sortlist entries which should have caused parse failures.

  Fixes Bug: #501
  Fix By: Brad House (@bradh352)

Brad House (8 Dec 2023)
- enhance timeout test case to make sure it will re-use a previously downed server

- enhance timeout test case

- SonarCloud: make const

GitHub (7 Dec 2023)
- [Brad House brought this change]

  increment failures on timeout (#651)

  As of c-ares 1.22.0, server timeouts were erroneously not incrementing server failures meaning the server in use wouldn't rotate.  There was apparently never a test case for this condition.

  This PR fixes the bug and adds a test case to ensure it behaves properly.

  Fixes Bug: #650
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Windows UBSAN tests (#649)

  Fix UBSAN error, and enable UBSAN testing in AppVeyor.

  Fixes Bug #648
  Fix By: Gisle Vanem (@gvanem)

- [Brad House brought this change]

  Support ipv6 link-local servers and %iface syntax (#646)

  Some environments may send router advertisements on a link setting their link-local (fe80::/10) address as a valid DNS server to the remote system.  This will cause a DNS entry to be created like `fe80::1%iface`, since all link-local network interfaces are technically part of the same /10 subnet, it must be told what interface to send packets through explicitly if there are multiple physical interfaces.

  This PR adds support for the %iface modifier when setting DNS servers via `/etc/resolv.conf` as well as via `ares_set_servers_csv()`.

  For MacOS and iOS it is assumed that libresolve will set the `sin6_scope_id` and should be supported, but my test systems don't seem to read the Router Advertisement for RDNSS link-local.  Specifying the link-local dns server on MacOS via adig has been tested and confirmed working.

  For Windows, this is similar to MacOS in that the system doesn't seem to honor the RDNSS RA, but specifying manually has been tested to work.

  At this point, Android support does not exist.

  Fixes Bug #462
  Supersedes PR #463

  Fix By: Brad House (@bradh352) and Serhii Purik (@sergvpurik)

Brad House (4 Dec 2023)
- silence openwatcom warning due to qcache_max_ttl being unsigned

- ares__round_up_pow2() work around bogus warning

  On 32bit systems, a codeblock that would intentionally never
  be executed was emitting a warning.  Rework the code to
  prevent the warning.  More code, no behavior difference, but
  keeps people from complaining about the warning...

  Fixes Bug: #645
  Fix By: Brad House (@bradh352)

- try to move AC_USE_SYSTEM_EXTENSIONS

- Enable system extensions

  Certain defines are needed on some systems to enable functionality like
  pthread recursive mutexes.

  Fixes #644
  Fix By: Brad House (@bradh352)

- ares_init_options() with invalid options values should unset the option

  Apparently nodejs is relying on the above behavior for legacy reasons.  Add
  sanity checks to the various optmask parameters where it makes sense.

  See https://github.com/nodejs/node/pull/50800

  Fix By: Brad House (@bradh352)

- SonarCloud: silence bogus reported error

- clang-format

GitHub (2 Dec 2023)
- [Brad House brought this change]

  Nameserver parsing: replace another hand-written parser (#643)

  This replaces the nameserver parsing code with code that use ares__buf_*() in the name of memory safety.

  Fix By: Brad House (@bradh352)

Revision 1.33: download - view: text, markup, annotated - select for diffs
Thu Dec 7 09:05:19 2023 UTC (12 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q4-base, pkgsrc-2023Q4
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +4 -4 lines
libcares: update to 1.23.0.

Version 1.23.0 (28 Nov 2023)

GitHub (28 Nov 2023)
- [Brad House brought this change]

  1.23.0 release prep (#641)

Brad House (28 Nov 2023)
- add missing manpage to distribution list

- clang-format

- remove a simply

- fix doc typo

- ares_init_options with ARES_OPT_UDP_PORT wrong byte order

  Regression from c-ares 1.19.1, ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT are
  specified from the user in host-byte order, but there was a regression that
  caused it to be read as if it was network byte order.

  Fixes Bug: #640
  Reported By: @Flow86
  Fix By: Brad House (@bradh352)

- fix ares_threadsafety() prototype

GitHub (28 Nov 2023)
- [Brad House brought this change]

  Basic Thread Safety (#636)

  c-ares does not have any concept of thread-safety. It has always been 100% up to the implementor to ensure they never call c-ares from more than one thread at a time. This patch adds basic thread-safety support, which can be disabled at compile time if not desired. It uses a single recursive mutex per channel, which should be extremely quick when uncontested so overhead should be minimal.

  Fixes Bug: #610

  Also sets the stage to implement #611

  Fix By: Brad House (@bradh352)

- [petrvh brought this change]

  ares_getaddrinfo(): do not use search domains if ARES_FLAG_NOSEARCH is set (#638)

  c-ares init options defines a flag ARES_FLAG_NOSEARCH that is supposed to prevent search using configured domain suffixes, however when using ares_getaddrinfo() the flag was ignored and domain suffixes were used anyway.

  Configuring zero domains to search also does not work (if ndomains == 0 default domain search list is loaded regardless of the flag ARES_OPT_DOMAINS being set).

  This change adds a check for the ARES_FLAG_NOSEARCH in as_is_only() function that is used by ares_getaddrinfo() to decide if to try to query next possible name ( next_dns_lookup() )

  Fix By: @petrvh

Brad House (25 Nov 2023)
- Fix MacOS version test

  It appears that the Issue #454 wasn't really fixed for some reason.  This commit should fix the detection.

  Fix By: Brad House (@bradh352)

Daniel Stenberg (24 Nov 2023)
- CI: codespell

  Closes #635

GitHub (24 Nov 2023)
- [Christian Clauss brought this change]

  Fix typos discovered by codespell (#634)

  % `codespell --ignore-words-list="aas,aci,acter,atleast,contentss,firey,fo,sais,seh,statics"`
  * https://pypi.org/project/codespell

  Fix By: Christian Clauss (@cclauss)

Brad House (22 Nov 2023)
- environment is meant as an override for sysconfig

GitHub (22 Nov 2023)
- [Ignat brought this change]

  Support attempts and timeout options from resolv.conf (#632)

  c-ares parses only antique version of options for timeout and number of retries from resolv.conf (`retrans` and `retry` are missing in modern documentation https://man7.org/linux/man-pages/man5/resolv.conf.5.html).

  I add support of `attempts` and `timeout` options

  Fix By: Ignat (@Kontakter)

- [Brad House brought this change]

  more precise timeout calculation (#633)

  The timeout calculation was occurring with millisecond precision, but on some systems, there is microsecond precision which could mean we'd tell a user a timeout time prior to the actual timeout.

  Fixes Bug: #631
  Fix By: Brad House (@bradh352)

- [Christian Clauss brought this change]

  INSTALL.md: Fix typo (#630)

  Fix By: Christian Clauss (@cclauss)

Brad House (19 Nov 2023)
- SonarCloud: fix minor codesmells

- fix test case regression due to missing parens

- now that warnings are enabled on test cases, clear a bunch of warnings

- CMake: CXXFLAGS environment wasn't being read because C++ compiler was enabled after settings warnings.

- fix additional windows test warnings

- cleanup some Windows warnings in test

- clang-format

GitHub (19 Nov 2023)
- [Brad House brought this change]

  Fix Windows UWP (Store) building and add to CI/CD (#627)

  When building for UWP (WindowsStore), additional headers are needed and some functions are not available. This also adds AppVeyor CI/CD support to catch these issues in the future.

  Fix By: Deal (@halx99) and Brad House (@bradh352)

Brad House (19 Nov 2023)
- ares_set_servers_*() should allow an empty server list

  For historic reasons, we have users depending on ares_set_servers_*()
  to return ARES_SUCCESS when passing no servers and actually *clear*
  the server list.  It appears they do this for test cases to simulate
  DNS unavailable or similar.  Presumably they could achieve the same
  effect in other ways (point to localhost on a port that isn't in use).
  But it seems like this might be wide-spread enough to cause headaches
  so we just will document and test for this behavior, clearly it hasn't
  caused "issues" for anyone with the old behavior.

  See: https://github.com/nodejs/node/pull/50800

  Fix By: Brad House (@bradh352)

GitHub (19 Nov 2023)
- [Brad House brought this change]

  Query Cache support (#625)

  This PR implements a query cache at the lowest possible level, the actual dns request and response messages.  Only successful and `NXDOMAIN` responses are cached. The lowest TTL in the response message determines the cache validity period for the response, and is capped at the configuration value for `qcache_max_ttl`.  For `NXDOMAIN` responses, the SOA record is evaluated.

  For a query to match the cache, the opcode, flags, and each question's class, type, and name are all evaluated.  This is to prevent matching a cached entry for a subtly different query (such as if the RD flag is set on one request and not another).

  For things like ares_getaddrinfo() or ares_search() that may spawn multiple queries, each individual message received is cached rather than the overarching response.  This makes it possible for one query in the sequence to be purged from the cache while others still return cached results which means there is no chance of ever returning stale data.

  We have had a lot of user requests to return TTLs on all the various parsers like `ares_parse_caa_reply()`, and likely this is because they want to implement caching mechanisms of their own, thus this PR should solve those issues as well.

  Due to the internal data structures we have these days, this PR is less than 500 lines of new code.

  Fixes #608

  Fix By: Brad House (@bradh352)

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Nov 22 11:48:32 2023 UTC (12 months, 2 weeks ago) by adam
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +4 -4 lines
libcares: updated to 1.22.1

c-ares version 1.22.1

Bugfixes:

Fix /etc/hosts processing performance with all entries using same IPaddress. Large hosts files using the same IP address for all entries could use exponential time.
Fix typos in manpages
Fix OpenWatcom building

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Nov 19 13:35:07 2023 UTC (12 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +4 -4 lines
libcares: update to 1.22.0.

c-ares version 1.22.0

This is a feature release with some significant internal changes.

Features:
 o ares_reinit() is now implemented to re-read any system configuration and
   immediately apply to an existing ares channel [2]
 o The adig command line program has been rewritten and its format now more
   closely matches that of BIND's dig utility [3]
 o The new DNS message parser and writer functions have now been made public [4]
 o RFC9460 HTTPS and SVCB records are now supported [5]
 o RFC6698 TLSA records are now supported [6]
 o The server list is now internally dynamic and can be changed without
   impacting existing queries [10]
 o Hosts file processing is now cached until the file is detected to be changed
   to speed up repetitive lookups of large hosts files [11]

Changes:
 o Internally all DNS messages are now written using the new DNS writing
   functions [7]
 o EDNS is now enabled by default [8]
 o Internal cleanups in function prototypes [9]

Bug Fixes:
 o Randomize retry penalties to prevent thundering herd issues when dns
   servers throttle requests [1]
 o Fix Windows build error for missing if_indextoname() [10]

Revision 1.30: download - view: text, markup, annotated - select for diffs
Mon Nov 6 13:54:49 2023 UTC (13 months ago) by wiz
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +4 -4 lines
libcares: update to 1.21.0.

Version 1.21.0 (26 Oct 2023)

Brad House (26 Oct 2023)
- SonarCloud: reduce reported complexity that exists for no reason.

- SonarCloud: fix some #undef codesmells

- formatting

- document ARES_RR_* records

- no reason to limit on truncation

- linguist fixes

- don't use test cases to determine language of c-ares

- fix grammar

- fix count

GitHub (25 Oct 2023)
- [Brad House brought this change]

  1.21.0 release prep (#585)

Brad House (25 Oct 2023)
- fix build warning

GitHub (25 Oct 2023)
- [Brad House brought this change]

  SonarCloud: clean up more codesmells (#584)

Brad House (25 Oct 2023)
- resolve reported memory leaks

- add test vector said to cause a memory leak

GitHub (25 Oct 2023)
- [Brad House brought this change]

  sonarcloud: fix more codesmells (#583)

- [Brad House brought this change]

  sonarcloud easy codesmells (#582)

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Modernization: replace multiple hand-parsers with new memory-safe parser (#581)

  New DNS record parsing code. The old code was basically just some helper macros and functions for parsing an entire DNS message. The caller had to know the RFCs to use the parsers, except for some pre-made exceptions. The new parsing code parses the entire DNS message into an opaque data structure in a memory safe manner with various accessors for reading and manipulating the data.

  The existing parser helpers for the various record types were reimplemented as wrappers around the new parser.

  The accessors allow easy iteration across the DNS record datastructure, and can be used to easily create dig-like output without needing to know anything about the various record types and formats as dynamic helpers are provided for enumeration of values and data types of those values.

  At some point in the future, this new DNS record structure, accessors, and parser will be exposed publicly. This is not done at this point as we don't want to do that until the API is completely stable. Likely a write() function to output the DNS record back into an actual message buffer will be introduced with the stable API as well.

  Some subtle bugs in the existing code were uncovered, some which had test cases which turned out to be bogus. Validation with third-party implementations (e.g. BIND9) were performed to validate such cases were indeed bugs.

  Adding additional RR parsers such as for TLSA (#470) or SVCB/HTTPS (#566) are trivial now since focus can be put on only parsing the data within the RR, not the entire message. That said, as the new parser is not yet public, it isn't clear the best way to expose any new RRs (probably best to wait for the new parser to be public rather than hacking in another legacy function).

  Some additional RRs that are part of DNS RFC1035 or EDNS RFC6891 that didn't have previously implemented parsers are now also implemented (e.g. HINFO, OPT). Any unrecognized RRs are encapsulated into a "RAW_RR" as binary data which can be inserted or extracted, but are otherwise not interpreted in any way.

  Fix By: Brad House (@bradh352)

- [Gregor Jasny brought this change]

  feat: use CMake to control symbol visibility (#574)

  In contrast to #572 this solution does not need any extra headers. But it is also limited to GCC-like compilers.

  Fix By: Gregor Jasny (@gjasny)

- [Brad House brought this change]

  remove ares_nowarn helpers #580

  Now that the code internally is using proper datatypes, there is no longer a need for ares_nowarn helpers. Remove them.

  Fix By: Brad House (@bradh352)

Brad House (16 Oct 2023)
- clang-format: fix structure alignment

  It appears the structure alignment chosen just doesn't work right.
  Switch to 'left', it appears to be mostly correct.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Reformat code using clang-format (#579)

  c-ares uses multiple code styles, standardize on one. Talking with @bagder he feels strongly about maintaining an 80 column limit, but feels less strongly about things I feel strongly about (like alignment).

  Can re-run the formatter on the codebase via:
  ```
  clang-format -i */*.c */*.h */*/*.c */*/*.h
  ```

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- inet_ntop requires ares_private.h

- SonarCloud: Fix additional code smells

  Fix By: Brad House (@bradh352)

- SonarCloud: Ignore codesmells c89 doesn't support

  C89 doesn't support iterator declaration in for loop, kill warning.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  set compiler standard to ISO C90/ANSI C89 (#577)

  SonarCloud is outputting some code smells for things that aren't possible for C89. Hopefully setting the code standard to C89/C90 properly will fix those bogus warnings.

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- fix new ares_strcpy to ensure null termination

- build fix

GitHub (15 Oct 2023)
- [Brad House brought this change]

  SonarCloud: Fix up codesmells due to strlen(), strcpy(), and strncpy() (#576)

  Create ares_strlen() and ares_strcpy() in order to resolve SonarCloud codesmells related to their use.

  ares_strlen() just becomes null-safe.

  ares_strcpy() is equivalent to strlcpy(), so unlike strncpy() it guarantees NULL termination.

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- SonarCloud: try to appease it better

- SonarCloud: Fix reported bugs

  SonarCloud reported a few bugs, this commit should fix those reports.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Fix internal datatype usage and warnings (#573)

  PR #568 increased the warning levels and c-ares code emitted a bunch of warnings. This PR fixes those warnings and starts transitioning internal data types into more proper forms (e.g. data lengths should be size_t not int). It does, however, have to manually cast back to what the public API needs due to API and ABI compliance (we aren't looking to break integrations, just clean up internals).

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- SonarCloud: exclude tests

- fix source directories

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Sonarcloud (#575)

- [Brad House brought this change]

  Increase compiler warnings by default (#568)

  c-ares was missing a couple of common compiler warnings during building that are widely recognized as a best practice. This PR makes no code changes, only build system changes to increase warning levels.

  This PR does cause some new warnings to be emitted, a follow-up PR will address those.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  introduce ares_bool_t datatype (#570)

  c-ares currently uses int for boolean, which can be confusing as there are some functions which return int but use '0' as the success condition. Some internal variable usage is similar. Lets try to identify the boolean use cases and split them out into their own data type of ares_bool_t. Since we're trying to keep C89 compatibility, we can't rely on stdbool.h or the _Bool C99 data type, so we'll define our own.

  Also, chose using an enum rather than say unsigned char or int because of the type safety benefits it provides. Compilers should warn if you try to pass, ARES_TRUE on to a ares_status_t enum (or similar) since they are different enums.

  Fix By: Brad House (@bradh352)

Brad House (12 Oct 2023)
- Socket callbacks were passed SOCK_STREAM instead of SOCK_DGRAM on udp

  A regression was introduced in 1.20.0 that would pass SOCK_STREAM on udp
  connections due to code refactoring.  If a client application validated this
  data, it could cause issues as seen in gRPC.

  Fixes Issue: #571
  Fix By: Brad House (@bradh352)

- Enhance test of ares_getsock()

  In an attempt to see if ares_getsock() was broken as per #571, do
  further sanity checks of the results of ares_getsock().  It seems
  as though ares_getsock() is fine.

  Fix By: Brad House (@bradh352)

GitHub (10 Oct 2023)
- [Brad House brought this change]

  Tool: STAYOPEN flag could make tools not terminate (#569)

  If a flag is set to keep the connections to the DNS servers open even if there are no queries, the tools would not exit until the remote server closed the connection due to the user of ares_fds() to determine if there are any active queries. Instead, rely on ares_timeout() returning NULL if there are no active queries (technically this returns the value passed to max_tv in ares_timeout(), but in our use case, that is always NULL).

  Fixes Issue: #452
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  ares_status_t enum for status codes (#567)

  The list of possible error codes in c-ares was a #define list. This not only doesn't provide for any sort of type safety but it also lacks clarification on what a function may return or what it takes, as an int could be an ares status, a boolean, or possibly even a length in the current code.

  We are not changing any public APIs as though the C standard states the underlying size and type of an enum is int, there are compiler attributes to override this as well as compiler flags like -fshort-enums. GCC in particular is known to expand an enum's width based on the data values (e.g., it can emit a 64bit integer enum).

  All internal usages should be changed by this PR, but of course, there may be some I missed.

  Fix By: Brad House (@bradh352)

Daniel Stenberg (9 Oct 2023)
- docs: provide better man page references

  When referring to another c-ares function use \fI function(3) \fP to let
  the webpage rendering find and cross-link them appropriately.

  SEE ALSO references should be ".BR name (3),", with a space before the
  open parenthesis. This helps the manpage to HTML renderer.

  Closes #565

Revision 1.29: download - view: text, markup, annotated - select for diffs
Thu Oct 19 14:49:23 2023 UTC (13 months, 3 weeks ago) by wiz
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +4 -4 lines
libcares: update to 1.20.1.

Version 1.20.1 (8 Oct 2023)

GitHub (8 Oct 2023)
- [Daniel Stenberg brought this change]

  ares-test:  silence warning (#564)

  warning: comparison of integer expressions of different signedness

  Fix By: Daniel Stenberg (@bagder)

Brad House (8 Oct 2023)
- fix README.md

GitHub (8 Oct 2023)
- [Brad House brought this change]

  1.20.1 release (#563)

- [Brad House brought this change]

  fix reference to freed memory (#562)

  Issue #561 shows free'd memory could be accessed in some error conditions.

  Fixes Issue #561
  Fix By: Brad House (@bradh352)

Brad House (8 Oct 2023)
- reported build/test systems may timeout on intensive tests. reduce test case to still be relevant but to reduce false positive errors

GitHub (8 Oct 2023)
- [Gregor Jasny brought this change]

  Regression: Fix typo in fuzzcheck target name (#559)

  This seems to be a vim'esque typo introduced with c1b00c41.

  Fix By: Gregor Jasny (@gjasny)

Version 1.20.0 (6 Oct 2023)

Brad House (6 Oct 2023)
- fix slist search off by 1

GitHub (6 Oct 2023)
- [Brad House brought this change]

  1.20.0 release prep (#557)

- [Brad House brought this change]

  ares__buf should return standard error codes.  more helpers implemented. (#558)

  The purpose of this PR is to hopefully make the private API of this set of routines less likely to need to be changed in a future release.  While this is not a public API, it could become harder in the future to change usage as it becomes more widely used within c-ares.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Update from 1989 MIT license text to modern MIT license text (#556)

  ares (and thus c-ares) was originally licensed under the 1989 MIT license text:
  https://fedoraproject.org/wiki/Licensing:MIT#Old_Style_(no_advertising_without_permission)

  This change updates the license to the modern MIT license as recognized here:
  https://opensource.org/license/mit/

  care has been taken to ensure correct attributions remain for the authors contained within the copyright headers, and all authors with attributions in the headers have been contacted for approval regarding the change.  Any authors which were not able to be contacted, the original copyright maintains, luckily that exists in only a single file `ares_parse_caa_reply.c` at this time.

  Please see PR #556 for the documented approvals by each contributor.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Test Harness: use ares_timeout() to calculate the value to pass to select() these days. (#555)

  The test framework was using 100ms timeout passed to select(), and not using ares_timeout() to calculate the actual recommended value based on the queries in queue. Using ares_timeout() tests the functionality of ares_timeout() itself and will provide more responsive results.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Fix for TCP back to back queries (#552)

  As per #266, TCP queries are basically broken. If we get a partial reply, things just don't work, but unlike UDP, TCP may get fragmented and we need to properly handle that.

  I've started creating a basic parser/buffer framework for c-ares for memory safety reasons, but it also helps for things like this where we shouldn't be manually tracking positions and fetching only a couple of bytes at a time from a socket. This parser/buffer will be expanded and used more in the future.

  This also resolves #206 by allowing NULL to be specified for some socket callbacks so they will auto-route to the built-in c-ares functions.

  Fixes: #206, #266
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  remove acountry from built tools as nerd.dk is gone (#554)

  The acountry utility required a third party DNSBL service from nerd.dk in order to operate. That service has been offline for about a year and there is no other comparable service offering. We are keeping the code in the repository as an example, but no longer building it.

  Fixes: #537
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Don't requeue any queries for getaddrinfo() during destruction. (#553)

  During ares_destroy(), any outstanding queries are terminated, however ares_getaddrinfo() had an ordering issue with status codes which in some circumstances could lead to a new query being enqueued rather than honoring the termination.

  Fixes #532
  Fix By: @Chilledheart and Brad House (@bradh352)

- [Brad House brought this change]

  ares_getaddrinfo(): Fail faster on AF_UNSPEC if we've already received one address class  (#551)

  As per #541, when using AF_UNSPEC with ares_getaddrinfo() (and in turn with ares_gethostbynam()) if we receive a successful response for one address class, we should not allow the other address class to continue on with retries, just return the address class we have.

  This will limit the overall query time to whatever timeout remains for the pending query for the other address class, it will not, however, terminate the other query as it may still prove to be successful (possibly coming in less than a millisecond later) and we'd want that result still. It just turns off additional error processing to get the result back quicker.

  Fixes Bug: #541
  Fix By: Brad House (@bradh352)

- [Sam Morris brought this change]

  Avoid producing an ill-formed result when qualifying a name with the root domain (#546)

  This prevents the result of qualifying "name" with "." being "name.." which is ill-formed.

  Fixes Bug: #545
  Fix By: Sam Morris (@yrro)

- [Brad House brought this change]

  Configuration option to limit number of UDP queries per ephemeral port (#549)

  Add a new ARES_OPT_UDP_MAX_QUERIES option with udp_max_queries parameter that can be passed to ares_init_options(). This value defaults to 0 (unlimited) to maintain existing compatibility, any positive number will cause new UDP ephemeral ports to be created once the threshold is reached, we'll call these 'connections' even though its technically wrong for UDP.

  Implementation Details:
  * Each server entry in a channel now has a linked-list of connections/ports for udp and tcp. The first connection in the list is the one most likely to be eligible to accept new queries.
  * Queries are now tracked by connection rather than by server.
  * Every time a query is detached from a connection, the connection that it was attached to will be checked to see if it needs to be cleaned up.
  * Insertion, lookup, and searching for connections has been implemented as O(1) complexity so the number of connections will not impact performance.
  * Remove is_broken from the server, it appears it would be set and immediately unset, so must have been invalidated via a prior patch. A future patch should probably track consecutive server errors and de-prioritize such servers. The code right now will always try servers in the order of configuration, so a bad server in the list will always be tried and may rely on timeout logic to try the next.
  * Various other cleanups to remove code duplication and for clarification.

  Fixes Bug: #444
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  its not 1991 anymore, lower default timeout and retry count (#542)

  A lot of time has passed since the original timeouts and retry counts were chosen. We have on and off issues reported due to this. Even on geostationary satellite links, latency is worst case around 1.5s. This PR changes the per-server timeout to 2s and the retry count lowered from 4 to 3.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Modernization: Implement base data-structures and replace usage (#540)

  c-ares currently lacks modern data structures that can make coding easier and more efficient. This PR implements a new linked list, skip list (sorted linked list), and hashtable implementation that are easy to use and hard to misuse. Though these implementations use more memory allocations than the prior implementation, the ability to more rapidly iterate on the codebase is a bigger win than any marginal performance difference (which is unlikely to be visible, modern systems are much more powerful than when c-ares was initially created).

  The data structure implementation favors readability and audit-ability over performance, however using the algorithmically correct data type for the purpose should offset any perceived losses.

  The primary motivation for this PR is to facilitate future implementation for Issues #444, #135, #458, and possibly #301

  A couple additional notes:

  The ares_timeout() function is now O(1) complexity instead of O(n) due to the use of a skiplist.
  Some obscure bugs were uncovered which were actually being incorrectly validated in the test cases. These have been addressed in this PR but are not explicitly discussed.
  Fixed some dead code warnings in ares_rand for systems that don't need rc4

  Fix By: Brad House (@bradh352)

- [Jérôme Duval brought this change]

  fix missing prefix for CMake generated libcares.pc (#530)

  'pkg-config grpc --cflags' complains with:
  Variable 'prefix' not defined in libcares.pc

  Fix By: Jérôme Duval (@korli)

bradh352 (11 Jul 2023)
- windows get_DNS_Windows port fix for ipv6

- windows get_DNS_Windows port is in network byte order

- backoff to debian 11 due to coverage check failure

- extend on PR #534, windows should also honor a port

GitHub (11 Jul 2023)
- [Brad House brought this change]

  Support configuration of DNS server ports (#534)

  As per https://man.openbsd.org/OpenBSD-5.1/resolv.conf.5 we should
  support bracketed syntax for resolv.conf entries to contain an optional
  port number.

  We also need to utilize this format for configuration of MacOS
  DNS servers as seen when using the Viscosity OpenVPN client, where
  it starts a private DNS server listening on localhost on a non-standard
  port.

  Fix By: Brad House (@bradh352)

Daniel Stenberg (9 Jun 2023)
- provide SPDX identifiers and a REUSE CI job to verify

  All files have their licence and copyright information clearly
  identifiable. If not in the file header, they are set separately in
  .reuse/dep5.

  All used license texts are provided in LICENSES/

GitHub (30 May 2023)
- [Alexey A Tikhonov brought this change]

  Remove unreachable code as reported by Coverity (#527)

  Coverity reported some code as unreachable.  A manual inspection confirmed the reports.

  Fix By: Alexey A Tikhonov (@alexey-tikhonov)

- [Ben Noordhuis brought this change]

  rand: add support for getrandom() (#526)

  glibc provides arc4random_buf() but musl does not and /dev/urandom is
  not always available.

- [Tim Wojtulewicz brought this change]

  Replace uses of sprintf with snprintf (#525)

  sprintf isn't safe even if you think you are using it right.  Switch to snprintf().

  Fix By: Tim Wojtulewicz (@timwoj)

bradh352 (23 May 2023)
- update version and release procedure

GitHub (22 May 2023)
- [Douglas R. Reno brought this change]

  INSTALL.md: Add Watcom instructions and update Windows documentation URLs (#524)

  This commit adds instructions on how to use the WATCOM compiler to build c-ares. This was just tested on c-ares-1.19.1 and works well.

  While going through the links for the C Runtime documentation for Windows systems, I discovered that all three of the KB articles that were linked are now nonexistent. This commit replaces KB94248 with the current replacement available on Microsoft's website, which also makes the other two KB articles obsolete.

  Fix By: Douglas R. Reno (@renodr)

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon May 22 13:00:41 2023 UTC (18 months, 2 weeks ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +4 -4 lines
libcares: update to 1.19.1.

Security bugfix release.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Tue Jan 31 14:26:52 2023 UTC (22 months, 1 week ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2023Q1-base, pkgsrc-2023Q1
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -4 lines
libcares: update to 1.19.0.

Version 1.19.0 (18 Jan 2023)

bradh352 (18 Jan 2023)
- Prep for 1.19.0 release

- Fix inverted logic in 25523e2

  Fix .localhost. handling in prior commit

  Fix By: Brad House (@bradh352)

- RFC6761 localhost definition includes subdomains

  RFC6761 6.3 states:
    The domain "localhost." and any names falling within ".localhost."

  We were only honoring "localhost".

  Fixes: #477
  Fix By: Brad House (@bradh352)

- docs: ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT docs wrong byte order

  As per #487, documentation states the port should be in network byte
  order, but we can see from the test cases using MockServers on
  different ports that this is not the case, it is definitely in host
  byte order.

  Fix By: Brad House (@bradh352)

GitHub (18 Jan 2023)
- [hopper-vul brought this change]

  Add str len check in config_sortlist to avoid stack overflow (#497)

  In ares_set_sortlist, it calls config_sortlist(..., sortstr) to parse
  the input str and initialize a sortlist configuration.

  However, ares_set_sortlist has not any checks about the validity of the input str.
  It is very easy to create an arbitrary length stack overflow with the unchecked
  `memcpy(ipbuf, str, q-str);` and `memcpy(ipbufpfx, str, q-str);`
  statements in the config_sortlist call, which could potentially cause severe
  security impact in practical programs.

  This commit add necessary check for `ipbuf` and `ipbufpfx` which avoid the
  potential stack overflows.

  fixes #496

  Fix By: @hopper-vul

bradh352 (18 Jan 2023)
- Fix build due to str-split sed gone wrong

  Fix By: Brad House (@bradh352)

- cirrus-ci: switch to scan-build-py for MacOS

  MacOS seems to work better with scan-build-py

  Fix By: Brad House (@bradh352)

- ares_strsplit* -> ares__strsplit* to comply with internal function naming

  Inspired by #495, but was missing test cases and would failed to build.

  Fix By: Brad House (@bradh352), Daniel Stenberg (@bagder)

- Cirrus-CI: MacOS Homebrew has changed from /usr/local/opt to /opt/homebrew

  Fix paths for homebrew.

  Fix By: Brad House (@bradh352)

- cirrus-ci: iOS build needs to use ARM MacOS image

  CirrusCI removed Intel-based MacOS images.  Need to switch
  iOS builds to use new ARM images as well.

  Fix By: Brad House (@bradh352)

- cirrus-ci: new MacOS image

  Cirrus-CI has recently EOL'd Intel MacOS VMs, switch to the latest
  ARM-based image.

  Fix By: Brad House (@bradh352)

- acountry was passing stack variable to callback

  Recent ASAN versions picked up that acountry was passing stack
  variables to ares_gethostbyname() then leaving the stack context.
  We will now allocate a buffer for this.

  Fix By: Brad House (@bradh352)

GitHub (13 Dec 2022)
- [Daniel Stenberg brought this change]

  docs: reformat/cleanup man pages SYNOPSIS sections (#494)

  To make them render "nicer" in both terminals and on the website.

  - Removes the bold
  - Removes .PP lines
  - Indents them more like proper code style

  Fix By: Daniel Stenberg (@bagder)

- [Nikolaos Chatzikonstantinou brought this change]

  bug fix: new ares_strsplit (#492)

  * add ares_strsplit unit test

  The test reveals a bug in the implementation of ares_strsplit when the
  make_set parameter is set to 1, as distinct domains are confused for
  equal:

    out = ares_strsplit("example.com, example.co", ", ", 1, &n);

  evaluates to n = 1 with out = { "example.com" }.

  * bugfix and cleanup of ares_strsplit

  The purpose of ares_strsplit in c-ares is to split a comma-delimited
  string of unique (up to letter case) domains. However, because the
  terminating NUL byte was not checked in the substrings when comparing
  for uniqueness, the function would sometimes drop domains it should
  not. For example,

      ares_strsplit("example.com, example.co", ",")

  would only result in a single domain "example.com".

  Aside from this bugfix, the following cleanup is performed:

  1. The tokenization now happens with the help of strcspn instead of the
     custom function is_delim.
  2. The function list_contains has been inlined.
  3. The interface of ares_strsplit has been simplified by removing the
     parameter make_set since in practice it was always 1.
  4. There are fewer passes over the input string.
  5. We resize the table using realloc() down to its minimum size.
  6. The docstring of ares_strsplit is updated and also a couple typos
     are fixed.

  There occurs a single use of ares_strsplit and since the make_set
  parameter has been removed, the call in ares_init.c is modified
  accordingly. The unit test for ares_strsplit is also updated.

  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)

bradh352 (23 Oct 2022)
- CirrusCI: update freebsd image

  Old FreeBSD image for CirrusCI has issues with newer symbols, update to later one.

  Fix By: Brad House (@bradh352)

GitHub (23 Oct 2022)
- [Stephen Sachs brought this change]

  Fix Intel compiler deprecated options (#485)

  Options `-we ###` and `-wd ###` should not include a whitespace. They are also deprecated and `-diag-error` and `-diag-disable` are their replacements.

  Intel compiler 2021.6 is not able to be used in configure without the proposed patch.

  Fix By: Stephen Sachs (@stephenmsachs)

- [Jonathan Ringer brought this change]

  Allow for CMake to use absolute install paths (#486)

  Generated libcares.pc could have bad paths when using absolute paths.

  Fix By: Jonathan Ringer (@jonringer)

- [Thomas Dreibholz brought this change]

  Fix for issue #488: ensure that the number of iovec entries does not exceed system limits. (#489)

  c-ares could try to exceed maximum number of iovec entries supported by system.

  Fix By: Thomas Dreibholz (@dreibh)

- [bsergean brought this change]

  Add include guards to ares_data.h (#491)

  All the other header files in the src/lib folder do have an include guard so it look like an overthought.

  Fix By: @bsergean

- [Brad Spencer brought this change]

  Fix typo in docs for ares_process_fd (#490)

  A single letter was missing

  Fix By: Brad Spencer (@b-spencer)

- [lifenjoiner brought this change]

  tools: refine help (#481)

  fix invalid help options and documentation typos

  Fix By: @lifenjoiner

- [lifenjoiner brought this change]

  Git: ignore CMake temporary files (#480)

  exclude more files from git

  Fix By: @lifenjoiner

- [lifenjoiner brought this change]

  adig: fix `-T` option (#479)

  Helper was missing flag to enable TCP mode of operation.

  Fix By: @lifenjoiner

- [Frank brought this change]

  Add vcpkg installation instructions (#478)

  Update to include vcpkg installation instructions

  Fix By: @FrankXie05

- [marc-groundctl brought this change]

  Convert total timeout to per-query (#467)

  On Apple platforms, libresolv reports the total timeout in retrans, not the per-query time. This patch undoes that math to get the per-query time, which is what c-ares expects. This is not perfect because libresolv is inconsistent on whether the timeout is multiplied by retry or retry+1, but I don't see any way to distinguish these cases.

  Fix By: Marc Aldorasi (@marc-groundctl)

- [marc-groundctl brought this change]

  Don't include version info in the static library (#468)

  The static library should not contain version info, since it would be linked into an executable or dll with its own version info.

  Fix By: @marc-groundctl

- [Ridge Kennedy brought this change]

  Fix ares_getaddrinfo() numerical address fast path with AF_UNSPEC (#469)

  The conversion of numeric IPv4 addresses in fake_addrinfo() is broken when
  the family is AF_UNSPEC. The initial call to ares_inet_pton with AF_INET
  will succeed, but the subsequent call using AF_INET6 will fail. This results
  in the fake_addrinfo() fast path failing, and ares_getaddrinfo() making a
  query when none should be required.

  Resolve this by only attempting the call to ares_inet_pton with AF_INET6
  if the initial call with AF_INET was unsuccessful.

  Fix By: Ridge Kennedy (@ridgek)

- [Manish Mehra brought this change]

  Configurable hosts path for file_lookup (#465)

  This changeset adds support for configurable hosts file
  ARES_OPT_HOSTS_FILE (similar to ARES_OPT_RESOLVCONF).

  Co-authored-by: Manish Mehra (@mmehra)

bradh352 (27 Apr 2022)
- CMake: Windows DLLs lack version information

  The cares.rc was not included in the build for CMake.  Conditionally
  add it when building for Windows.

  Fix By: Brad House (@bradh352)
  Fixes Bug: #460

GitHub (27 Apr 2022)
- [Kai Pastor brought this change]

  CMake: Guard target creation in exported config (#464)

  User projects may call 'find_package(c-ares)' multiple times (e.g.
  via dependencies), but targets must be created only once.
  Shared and static target must be treated independently.

  Fix By: Kai Pastor (@dg0yt)

bradh352 (27 Apr 2022)
- Honor valid DNS result even if other class returned an error

  When using ares_getaddrinfo() with PF_UNSPEC, if a DNS server returned
  good data on an A record, followed by bad data on an AAAA record, the
  good record would be thrown away and an error returned.

  If we got a good response from one of the two queries, regardless of
  the order returned, we should honor that.

  Fix By: Dmitry Karpov (dkarpov@roku.com)
  Signed Off By: Brad House (@bradh352)

GitHub (2 Apr 2022)
- [Sam James brought this change]

  configure.ac: fix STDC_HEADERS typo (#459)

  There is no autoconf macro called STDC_HEADERS. AC_HEADER_STDC however does
  exist and it defines the STDC_HEADERS macro for use.

  Not clear that STDC_HEADERS from its use in the repo is needed but
  would rather not meddle with it for now.

  Fixes an annoying warning on `./configure`:
  ```
  /var/tmp/portage/net-dns/c-ares-1.18.1/work/c-ares-1.18.1/configure: 24546: STDC_HEADERS: not found
  ```

  Signed-off-by: Sam James <sam@gentoo.org>

bradh352 (2 Mar 2022)
- Asterisks should be allowed in host validation as CNAMEs may reference wildcard domains

  CloudFlare appears to use this logic in CNAMEs as per
  https://github.com/nodejs/node/issues/42171

  Fixes: #457
  Fix By: Brad House (@bradh352)

- Don't return on file lookup failure, set status

  When resolving a host via /etc/hosts, don't return with a predefined
  error as there may be other tries.

  Fix By: Brad House (@bradh352)

- 'localhost' special treatment enhancement

  Since localhost is special-cased, any errors should be ignored when
  reading /etc/hosts as otherwise we could return an error if there
  were for instance an invalidly formatted /etc/hosts or if /etc/hosts
  had a permissions error while reading.

  This exact behavior appears to have been seen on OS/400 PASE
  environments which allows AIX binares to run.

  Fix By: Brad House (@bradh352)

- If chain building c-ares as part of another project, detect of res_servicename could fail (#451)

  If libresolv is already included with the build, c-ares wouldn't properly detect its use.

  May fix: #451
  Fix by: Brad House (@bradh352)

- no analyze capability on ios

- attempt to use scan-build on ios

- disable tests on ios

- fix switch statement

- code coverage had gotten disabled

- looks like shell expansion doesn't work with cirrus-ci, lets do it another way

- attempt to autobuild for iOS

GitHub (8 Dec 2021)
- [Brad House brought this change]

  Windows: rework/simplify initialization code, drop long EOL systems (#445)

  There was a lot of windows initialization code specific to the era that predates Windows Vista such as reading DNS configuration from the registry, and dynamically loading libraries to get access to functions that didn't exist in XP or earlier releases.

  Vista was released in January 2007, and was EOL'd in 2017, and support for Vista is still maintained with this patch set.

  XP was EOL'd in Apr 8 2014.

  I believe the last OS based on something earlier than Vista was POSReady 2009, as it was XP based for some reason, and that was EOL'd in January 2019. Considering any POS system falls under the PCI-DSS rules, they aren't allow to run POSReady 2009 any more so there is no reason to try to continue supporting such systems.

  We have also targeted with our build system Vista support for the last few years, and while developers could change the target, we haven't had any reports that they have.

bradh352 (9 Nov 2021)
- Fix memory leak in reading /etc/hosts

  When an /etc/hosts lookup is performed, but fails with ENOTFOUND, and
  a valid RFC6761 Section 6.3 fallback is performed, it could overwrite
  variables that were already set and therefore leave the pointers
  dangling, never to be cleaned up.

  Clean up explicitly on ENOTFOUND when returning from the file parser.

  Fixes: #439
  Fix By: Brad House (@bradh352)

GitHub (2 Nov 2021)
- [Bobby Reynolds brought this change]

  Fix cross-compilation from Windows to Linux due to CPACK logic (#436)

  When determining value for CPACK_PACKAGE_ARCHITECTURE, prefer to use
  value from CMAKE_SYSTEM_PROCESSOR before falling back to uname output.

  Additionally, if building from a Windows host, emit a fatal error
  instead of attempting to call uname.

  Fix By: Bobby Reynolds (@reynoldsbd)

bradh352 (1 Nov 2021)
- fix coveralls link

- coveralls needs token

- coveralls appears to require git

- fix a couple of coveralls vars

- more coveralls fixes

- add code coverage libs to LDADD instead of _LIBS

- make verbose

- try to fix code coverage building

- need -y for install

- try to fix asan/ubsan/lsan when built with clang. try to support code coverage properly.

- try another path

- fix pip

- attempt to enable some other build types that travis supported

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Nov 1 09:57:53 2021 UTC (3 years, 1 month ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, pkgsrc-2021Q4-base, pkgsrc-2021Q4
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +4 -4 lines
libcares: update to 1.18.1.

c-ares version 1.18.1 - Oct 27 2021

Bug fixes:

    ares_getaddrinfo() would return ai_addrlen of 16 for ipv6
    adddresses rather than the sizeof(struct sockaddr_in6)

c-ares version 1.18.0 - Oct 25 2021

Changes:

    Add support for URI(Uniform Resource Identifier) records via
    ares_parse_uri_reply()
    Provide ares_nameser.h as a public interface as needed by NodeJS
    Update URLs from c-ares.haxx.se to c-ares.org
    During a domain search, treat ARES_ENODATA as ARES_NXDOMAIN so
    that the search process will continue to the next domain in
    the search.
    Turn ares_gethostbyname() into a wrapper for ares_getaddrinfo()
    as they followed very similar code paths and ares_gethostbyaddr()
    has some more desirable features such as priority sorting and
    parallel queries for AF_UNSPEC.
    ares_getaddrinfo() now contains a name element in the address
    info structure as the last element. This is not an API or ABI
    break due to the structure always being internally allocated
    and it being the last element.
    ares_parse_a_reply() and ares_parse_aaaa_reply() were nearly
    identical, those now use the same helper functions for parsing
    rather than having their own code.
    RFC6761 Section 6.3 says "localhost" lookups need to be special
    cased to return loopback addresses, and not forward queries to
    recursive dns servers. On Windows this now returns all loopback
    addresses, on other systems it returns 127.0.0.1 or ::1 always,
    and will never forward a request for "localhost" to outside
    DNS servers.
    Haiki: port

Bug fixes:

    add build to .gitignore
    z/OS minor update, add missing semicolon in ares_init.c
    Fix building when latest ax_code_coverage.m4 is imported
    Work around autotools 'error: too many loops' and other newer
    autotools import related bugs.
    MinGW cross builds need advapi32 link as lower case
    Cygwin build fix due to containing both socket.h and winsock2.h
    ares_expand_name should allow underscores (_) as SRV records
    legitimately use them
    Allow '/' as a valid character for a returned name for CNAME
    in-addr.arpa delegation
    ares_getaddrinfo() was not honoring HOSTALIASES
    ares_getaddrinfo() had some test cases disabled due to a bug
    in the test framework itself which has now been resolved

Revision 1.25: download - view: text, markup, annotated - select for diffs
Tue Oct 26 11:05:53 2021 UTC (3 years, 1 month ago) by nia
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +2 -2 lines

net: Replace RMD160 checksums with BLAKE2s checksums

All checksums have been double-checked against existing RMD160 and
SHA512 hashes

Not committed (merge conflicts...):

net/radsecproxy/distinfo

The following distfiles could not be fetched (fetched conditionally?):

./net/citrix_ica/distinfo citrix_ica-10.6.115659/en.linuxx86.tar.gz
./net/djbdns/distinfo dnscache-1.05-multiple-ip.patch
./net/djbdns/distinfo djbdns-1.05-test28.diff.xz
./net/djbdns/distinfo djbdns-1.05-ignoreip2.patch
./net/djbdns/distinfo djbdns-1.05-multiip.diff
./net/djbdns/distinfo djbdns-cachestats.patch

Revision 1.24: download - view: text, markup, annotated - select for diffs
Thu Oct 7 14:41:43 2021 UTC (3 years, 2 months ago) by nia
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +1 -2 lines
net: Remove SHA1 hashes for distfiles

Revision 1.23: download - view: text, markup, annotated - select for diffs
Tue Aug 10 07:27:23 2021 UTC (3 years, 4 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2021Q3-base, pkgsrc-2021Q3
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +5 -5 lines
libcares: update to 1.17.2.

c-ares version 1.17.2

This is a security and bugfix release.  It addresses a few security related
issues along with various bugfixes mostly related to portability.

Security:
 o NodeJS passes NULL for addr and 0 for addrlen to ares_parse_ptr_reply() on
   systems where malloc(0) returns NULL.  This would cause a crash. [8]
 o When building c-ares with CMake, the RANDOM_FILE would not be set and
   therefore downgrade to the less secure random number generator [12]
 o If ares_getaddrinfo() was terminated by an ares_destroy(), it would cause
   a crash [13]
 o Crash in sortaddrinfo() if the list size equals 0 due to an unexpected
   DNS response [14]
 o Expand number of escaped characters in DNS replies as per RFC1035 5.1 to
   prevent spoofing [16], [17]
 o Perform validation on hostnames to prevent possible XSS due to applications
   not performing valiation themselves [18]

Changes:
 o Use non-blocking /dev/urandom for random data to prevent early startup
   performance issues [5]
 o z/OS port [6]
 o ares_malloc(0) is now defined behavior (returns NULL) rather than
   system-specific to catch edge cases [7]

Bug fixes:
 o Fuzz testing files were not distributed with official archives [1]
 o Building tests should not force building of static libraries except on
   Windows [2]
 o Windows builds of the tools would fail if built as static due to a missing
   CARES_STATICLIB definition [3]
 o Relative headers must use double quotes to prevent pulling in a system
   library [4]
 o Fix OpenBSD building by implementing portability updates for including
   arpa/nameser.h [9]
 o Fix building out-of-tree for autotools [10]
 o Make install on MacOS/iOS with CMake was missing the bundle destination so
   libraries weren't actually installed [11]
 o Fix retrieving DNS server configuration on MacOS and iOS if the configuration
   did not include search domains [15]
 o ares_parse_a_reply and ares_parse_aaa_reply were erroneously using strdup()
   instead of ares_strdup() [19]

Revision 1.22: download - view: text, markup, annotated - select for diffs
Mon Nov 23 15:47:19 2020 UTC (4 years ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2021Q2-base, pkgsrc-2021Q2, pkgsrc-2021Q1-base, pkgsrc-2021Q1, pkgsrc-2020Q4-base, pkgsrc-2020Q4
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +5 -5 lines
libcares: update to 1.17.1.

Version 1.17.1 (19 Nov 2020)

GitHub (19 Nov 2020)
- [Brad House brought this change]

  Travis: add iOS target built with CMake (#378)

  Issue #377 suggested that CMake builds for iOS with c-ares were broken. This PR adds an automatic Travis build for iOS CMake.

  Fix By: Brad House (@bradh352)

bradh352 (18 Nov 2020)
- fix build

GitHub (18 Nov 2020)
- [Fabrice Fontaine brought this change]

  External projects were using non-public header ares_dns.h, make public again (#376)

  It appears some outside projects were relying on macros in ares_dns.h, even though it doesn't appear that header was ever meant to be public.  That said, we don't want to break external integrators so we should distribute this header again.

  Fix By: Fabrice Fontaine (@ffontaine)

bradh352 (17 Nov 2020)
- note that so versioning has moved to configure.ac

- note about 1.17.1

- fix sed gone wrong

GitHub (17 Nov 2020)
- [Daniel Stenberg brought this change]

  autotools cleanup (#372)

  * remove: install-sh mkinstalldirs

  They're generated when needed, no need to store in it.

  * buildconf: remove custom logic with autoreconf

  Fix By: Daniel Stenberg (@bagder)

bradh352 (17 Nov 2020)
- attempt to fix 1.17.0 release distribution issues

Version 1.17.0 (16 Nov 2020)

bradh352 (16 Nov 2020)
- 1.17.0 release prep

- ares_getaddrinfo(): duplicate hints ai_socktype and ai_protocol into output

  ai_socktype and ai_protocol were ignored from the hints input.  They are now
  duplicated into the output as expected.  Currently no sanity checks on
  proper values are taking place.

  Fixes: #317
  Fix By: Brad House (@bradh352)

- ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in

  If there are more ttls returned than the maximum provided by the requestor, then
  the *naddrttls response would be larger than the actual number of elements in
  the addrttls array.

  This bug could lead to invalid memory accesses in applications using c-ares.

  This behavior appeared to break with PR #257

  Fixes: #371
  Reported By: Momtchil Momtchev (@mmomtchev)
  Fix By: Brad House (@bradh352)

GitHub (5 Nov 2020)
- [Dustin Lundquist brought this change]

  docs: ares_set_local_ip4() uses host byte order (#368)

  Properly document brain-dead behavior of ares_set_local_ip4() using host byte order instead of expected network byte order.

  Fix By: Dustin Lundquist <d.lundquist@tempered.io>

- [Łukasz Marszał brought this change]

  empty hquery->name could lead to invalid memory access (#367)

  If hquery->name is empty (=="\0"), &hquery->name[strlen(hquery->name)-1] would point to "random" place in memory. This is causing some of my address sanitizer tests to fail.

  Fix By: Łukasz Marszał (@lmarszal)

bradh352 (28 Sep 2020)
- Fix OSSFuzz reported issue in CAA reply parsing

  OSS-Fuzz is reporting a use-of-uninitialized-value:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26012

  Reported By: David Drysdale (@daviddrysdale)

GitHub (26 Sep 2020)
- [David Hotham brought this change]

  fuzz CAA parsing (#363)

  Add fuzz support for CAA parsing

  Fix By: David Hotham (@dimbleby)

- [Daniela Sonnenschein brought this change]

  Allow parsing of CAA Resource Record (#360)

  CAA (Certification Authority Authorization) was introduced in RFC 6844.
  This has been obsoleted by RFC 8659. This commit added the possibility
  to query CAA resource records with adig and adds a parser for CAA
  records, that can be used in conjunction with ares_query(3).

  Closes Bug: #292
  Fix By: Daniela Sonnenschein (@lxdicted)

Daniel Stenberg (17 Sep 2020)
- docs: remove the html and pdf make targets

  They're rarely used in our daily work flow and mostly just add friction,

  Closes #362

bradh352 (14 Sep 2020)
- ares_process needs to always include nameser.h as it has compat

- Define T_OPT if system doesn't provide it

GitHub (12 Sep 2020)
- [Gisle Vanem brought this change]

  Change the mailman links (#358)

  Links when wrapping become misleading.  Insert newline to prevent wrapping.

  Fix By: Gisle Vanem (@gvanem)

- [Gisle Vanem brought this change]

  [adig] Update man-page for the '-x' option (#357)

  Fix By: Gisle Vanem (@gvanem)

- [Gisle Vanem brought this change]

  [adig] add '-x' option. (#356)

  Added a 'dig-style' '-x' option. Also support '-xx' for a
  IPv6 bit-string PTR query.

  Fix By: Gisle Vanem (@gvanem)

bradh352 (12 Sep 2020)
- fix indentation

- ns_t_opt -> T_OPT

GitHub (12 Sep 2020)
- [Gisle Vanem brought this change]

  Fixes for Watt-32 on djgpp + Windows (#355)

  No longer any relation to libcurl since '<libcurl-root>/packages/DOS/common.dj' is dropped.
  This Makefile.dj has been tested on Win-10 only (using the Windows hosted djgpp cross compiler).

  Fix By: Gisle Vanem (@gvanem)

- [Gisle Vanem brought this change]

  Fixes for Watt-32 on Windows and MSDOS (#354)

  Move the prototype to 'ares_private.h'.

  Fix By: Gisle Vanem (@gvanem)

bradh352 (11 Sep 2020)
- update path for include

- remove stale information

- remove stale information

Brad House (9 Sep 2020)
- silence compiler warnings

- Remove stale msvc files from makefile

GitHub (9 Sep 2020)
- [Brad House brought this change]

  Reorganize source tree (#349)

  Originally started by Daniel Stenberg (@bagder) with #123, this patch reorganizes the c-ares source tree to have a more modern layout.  It also fixes out of tree builds for autotools, and automatically builds the tests if tests are enabled.  All tests are passing which tests each of the supported build systems (autotools, cmake, nmake, mingw gmake).  There may be some edge cases that will have to be caught later on for things I'm not aware of.

  Fix By: Brad House (@bradh352)

Brad House (1 Sep 2020)
- remove CURLDEBUG as per #82

GitHub (1 Sep 2020)
- [Erik Lax brought this change]

  Detect remote DNS server does not support EDNS as per RFC 6891 (#244)

  EDNS retry should be based on FORMERR returned without an OPT RR record as per https://tools.ietf.org/html/rfc6891#section-7 rather than just treating any unexpected error condition as a reason to disable EDNS on the channel.

  Fix By: Erik Lax (@eriklax)

Brad House (27 Aug 2020)
- Fix for #345, don't use 'true' use 1

GitHub (27 Aug 2020)
- [Seraphime Kirkovski brought this change]

  ares_gethostbyname: Fix AF_UNSPEC support when using an ip address (#204)

  fake_hostent() was not supporting AF_UNSPEC, so when an ip address was specified when using AF_UNSPEC it would attempt to do a DNS lookup rather than returning a fake hostent using the ip address.

  Fix By: Seraphime Kirkovski (@Seraphime)

- [apenn-msft brought this change]

  Tests should use dynamic system-assigned ports rather than static port (#346)

  The c-ares test suite was hardcoded to use port 5300 (and possibly 5301, 5302) for the test suite.  Especially in containers, there may be no guarantee these ports are available and cause tests to fail when they could otherwise succeed.  Instead, request the system to assign a port to use dynamically.  This is now the default.  To override, the test suite still takes the "-p <port>" option as it always has and will honor that.

  Fix By: Anthony Penniston (@apenn-msft)

Brad House (25 Aug 2020)
- Unset members of the addr struct contain garbage values (#343)

  When generating the ares_sockaddr data by getaddrinfo() it was only filling
  in certain members while leaving others uninitialized.  This left garbage
  data if a user tried to use the unset values.  memset() the ares_sockaddr
  to 0 prior to filling in the values to prevent this.

  Reported By: @SmorkalovG
  Fix By: Brad House (@bradh352)

GitHub (24 Aug 2020)
- [Jonathan Maye-Hobbs brought this change]

  FQDN with trailing period should be queried first with larger ndot value (#345)

  If a query is performed for dynamodb.us-east-1.amazonaws.com. with ndots=5, it was attempting to search the search domains rather than just attempting the FQDN that was passed it.  This patch now at least attempts the FQDN first.

  We may need to determine if we should abort any further searching, however as is probably intended.

  Fix by: Jonathan Maye-Hobbs (@wheelpharoah)

- [Gisle Vanem brought this change]

  Update acountry.c country code list (#341)

  Updated country_list[]:
   * 2-letter ISO-3166 country-codes.
   * Add, rename some names + codes in accordance with latest table at https://en.wikipedia.org/wiki/ISO_3166-1.

  Fix By: Gisle Vanem (@gvanem)

- [Bulat Gaifullin brought this change]

  Test case should honor flag HAVE_WRITEV rather than WIN32 (#344)

  Test cases where not honoring the HAVE_WRITEV flag but instead using WIN32 to determine if WRITEV was available or not.  This patch fixes that.

  Fix By: Bulat Gaifullin (@bgaifullin)

Brad House (18 Jul 2020)
- Ensure c89 support

  A couple of for loops in Mac-specific code were using integer declarations
  inside a for loop.  Move the declaration to the top of the preceding
  code block to retain c89 compliance.

  Reported By: Jeffrey Walton

GitHub (2 Jul 2020)
- [Fionn Fitzmaurice brought this change]

  Avoid buffer overflow in RC4 loop comparison (#336)

  The rc4 function iterates over a buffer of size buffer_len who's maximum
  value is INT_MAX with a counter of type short that is not guaranteed to
  have maximum size INT_MAX.

  In circumstances where short is narrower than int and where buffer_len
  is larger than the maximum value of a short, it may be possible to loop
  infinitely as counter will overflow and never be greater than or equal
  to buffer_len.

  The solution is to make the comparison be between types of equal width.
  This commit defines counter as an int.

  Fix By: Fionn Fitzmaurice (@fionn)

- [anonymoushelpishere brought this change]

  Updated help information for adig, acountry, and ahost. (#334)

  Provide more descriptive help information for various utilities.

  Fix By: @anonymoushelpishere

- [lutianxiong brought this change]

  avoid read-heap-buffer-overflow (#332)

  Fix invalid read in ares_parse_soa_reply.c found during fuzzing

  Fixes Bug: #333
  Fix By: lutianxiong (@ltx2018)

- [Ivan Baidakou brought this change]

  Fix: sizeof(sizeof(addr.saX)) -> sizeof(addr.saX) in readaddrinfo (#331)

  Looks like a sed-gone-wrong, a sizeof inside of a sizeof.

  Fix By: Ivan Baidakou (@basiliscos)

Revision 1.21: download - view: text, markup, annotated - select for diffs
Mon Jun 1 19:11:37 2020 UTC (4 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q3-base, pkgsrc-2020Q3, pkgsrc-2020Q2-base, pkgsrc-2020Q2
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +5 -5 lines
libcares: updated to 1.16.1

c-ares version 1.16.1

Security:
* Prevent possible use-after-free and double-free in ares_getaddrinfo() if ares_destroy() is called prior to ares_getaddrinfo() completing. Reported by Jann Horn at Google Project Zero.

Changes:
* Allow TXT records on CHAOS qclass. Used for retriving things like version.bind, version.server, authoris.bind, hostname.bind, and id.server.

Bug fixes:
* Fix Windows Unicode incompatibilities with ares_getaddrinfo()
* Silence false cast-align compiler warnings due to valid casts of struct sockaddr to struct sockaddr_in and struct sockaddr_in6.
* MacOS should use libresolv for retrieving DNS servers, like iOS
* CMake build system should populate the INCLUDE_DIRECTORIES property of installed targets
* Correct macros in use for the ares_getaddrinfo.3 man page

Revision 1.20: download - view: text, markup, annotated - select for diffs
Fri Mar 13 09:49:41 2020 UTC (4 years, 8 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2020Q1-base, pkgsrc-2020Q1
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +5 -6 lines
libcares: updated to 1.16.0

c-ares version 1.16.0:

Changes:
Introduction of ares_getaddrinfo() API which provides similar output (including proper sorting as per RFC 6724) to the system native API, but utilizes different data structures in order to provide additional information such as TTLs and all aliases. Please reference the respective man pages for usage details.
Parse SOA records from ns_t_any response
CMake: Provide c-ares version in package export file
CMake: Add CPACK functionality for DEB and RPM
CMake: Generate PDB files during build
CMake: Support manpage installation

Bug fixes:
Fix bad expectation in IPv6 localhost test.
AutoTools: use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS to prevent complaints about CPPFLAGS in CFLAGS.
Fix .onion handling
Command line usage was out of date for adig and ahost.
Typos in manpages
If ares_getenv is defined, it must return a value on all platforms
If /etc/resolv.conf has invalid lookup values, use the defaults.
Tests: Separate live tests from SetServers* tests as only live tests should require internet access.
ares_gethostbyname() should return ENODATA if no valid A or AAAA record is found, but a CNAME was found.
CMake: Rework library function checking to prevent unintended linking with system libraries that aren't needed.
Due to use of inet_addr() it was not possible to return 255.255.255.255 from ares_gethostbyname().
CMake: Fix building of tests on Windows

Revision 1.19: download - view: text, markup, annotated - select for diffs
Fri May 31 08:11:39 2019 UTC (5 years, 6 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +2 -2 lines
libcares: comment patch

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri May 31 08:09:41 2019 UTC (5 years, 6 months ago) by adam
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +2 -5 lines
libcares: switch to CMake - needed for grpc; bump revision

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Nov 28 08:53:18 2018 UTC (6 years ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -5 lines
libcares: updated to 1.15.0

c-ares version 1.15.0:

Changes:
- Add ares_init_options() configurability for path to resolv.conf file
- Ability to exclude building of tools (adig, ahost, acountry) in CMake
- Android: Support for domain search suffix
- Report ARES_ENOTFOUND for .onion domain names as per RFC7686

Bug fixes:
- AIX build fix for trying to include both nameser_compat.h and onameser_compat.h
- Windows: Improve DNS suffixes extracting from WinNT registry
- Fix modern GCC warnings
- Apply the IPv6 server blacklist to all nameserver sources, not just Windows
- Fix warnings emitted by MSVC when using -W4
- Prevent changing name servers while queries are outstanding
- Harden and rationalize c-ares timeout computation
- Distribute ares_android.h
- ares_set_servers_csv() on failure should not leave channel in a bad state
- Add missing docs to distribution

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Mar 1 08:56:31 2018 UTC (6 years, 9 months ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +5 -5 lines
libcares: updated to 1.14.0

c-ares version 1.14.0:

Changes:
android: Introduce new ares_library_init_android() call for Oreo support

Bug fixes:
Fix patch for CVE-2017-1000381 to not be overly aggressive
win32: Preserve DNS server order returned by Windows when sorting and exclude DNS servers in legacy subnets
win32: Support most recent Visual Studio 2017
gethostbyaddr should fail with ECANCELLED not ENOTFOUND when ares_cancel is called
win32: Exclude legacy ipv6 subnets
android: Applications compiled for Oreo can no longer use __system_property_get and must use Java calls to retrieve DNS servers
win32: Force use of ANSI functions
CMake minimum version is now 3.1
ares_gethostbyname.3: fix callback status values
docs: Document WSAStartup requirement
Fix a typo in init_by_resolv_conf
Android JNI code leaks local references in some cases
Force using the ANSI versions of WinAPI functions

Revision 1.15: download - view: text, markup, annotated - select for diffs
Wed Dec 13 15:15:45 2017 UTC (6 years, 11 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +2 -1 lines
libcares: Don't strip out user-supplied debug flags.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sat Jul 15 17:15:16 2017 UTC (7 years, 4 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2017Q3-base, pkgsrc-2017Q3
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -2 lines
Do not prescribe what should be in CFLAGS/CPPFLAGS.

While here, remove patch that does nothing since autoreconf is used.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue Jun 20 07:48:50 2017 UTC (7 years, 5 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2017Q2-base, pkgsrc-2017Q2
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -5 lines
Updated libcares to 1.13.0.

 c-ares version 1.13.0 - June 20 2017

Changes:

    cmake build system support added
    Add virtual function set for socket IO: ares_set_socket_functions

Bug fixes:

    CVE-2017-1000381: c-ares NAPTR parser out of bounds access
    macos: do not set HAVE_CLOCK_GETTIME_MONOTONIC
    test: check ares_create_query with too-long name
    dist: add ares_library_initialized.* to the tarball
    fix build on OpenBSD
    dist: ship msvc_ver.inc too
    test: Add gTest/gMock files to SOURCES
    test: add fuzz entrypoint for ares_create_query()
    configure: clock_gettime workaround
    docs: convert INSTALL to MarkDown & tweak
    ares_process: fix return type of socket_create function (win32 warning)
    docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
    Windows DNS server sorting
    Use ares_socklen_t instead of socket_t
    ares_create_query: use ares_free not naked free
    msvc_ver.inc support most recent Visual Studio 2017
    acountry: Convert char from ISO-8859-1 to UTF-8
    ares_expand_name: limit number of indirections
    configure: do not check for ar if specified manually
    Added support for Windows DNS Suffix Search List
    ares.h: support compiling with QNX

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Sep 30 09:00:10 2016 UTC (8 years, 2 months ago) by wiz
Branches: MAIN
CVS tags: pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +2 -1 lines
Fix parallel build with BSD make.
Sent upstream.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Sep 29 14:19:59 2016 UTC (8 years, 2 months ago) by wiz
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +5 -5 lines
Updated libcares to 1.12.0. Security fix.

Version 1.12.0 (29 Sep 2016)

Daniel Stenberg (29 Sep 2016)
- RELEASE-NOTES: 1.12.0

- [David Drysdale brought this change]

  ares-test-misc: test ares_create_query with escaped trailing dot

- ares_create_query: avoid single-byte buffer overwrite

  ... when the name ends with an escaped dot.

  CVE-2016-5180

  Bug: https://c-ares.haxx.se/adv_20160929.html

- ares_library_initialized.3: added

- make: bump CARES_VERSION_INFO for release

David Drysdale (29 Sep 2016)
- man: update ares_init_options.3

Daniel Stenberg (29 Sep 2016)
- ares_library_init.3: corrected the ares_library_init_mem proto

- README.md: remove space from link

- README: link to the correct c-ares badge!

  Reported-by: David Hotham

  Fixes #63

- docs: minor formatting edits

- ares_destroy.3: formatting polish

- ares_init.3: split the init docs into two separate man pages

- SECURITY: point to the vulnerabilities page now

- RELEASE-NOTES: synced with daa7235b1a5

- ares_create_query.3: edit language

  Tried to make the man page more readable.

David Drysdale (26 Sep 2016)
- test: fix gMock to work with gcc >= 6.x

  Taken from:
  https://github.com/google/googletest/issues/705#issuecomment-235067917

Daniel Stenberg (26 Sep 2016)
- [Brad House brought this change]

  headers: remove checks for and defines of variable sizes

  ... they're not really used and by avoiding them in the ares_build.h
  output we make the public header less dependent on data sizes.

David Drysdale (24 Sep 2016)
- api: add ARES_OPT_NOROTATE optmask value

  Fix up a couple of problems with configuring whether c-ares rotates
  between different name servers between requests.

  Firstly, ares_save_options() returns (in *optmask) the value of
  (channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily
  indicate whether the channel is or is not actually doing rotation.
  This can be confusing/incorrect if:
   - the channel was originally configured without ARES_OPT_ROTATE
     (so it appears that the channel is not rotating)
   - the /etc/resolv.conf file includes the 'rotate' option
     (so the channel is actually performing rotation).

  Secondly, it is not possible to reliably configure a channel
  to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since
  a 'rotate' option in /etc/resolv.conf will turn it on again.

  Therefore:
   - add an ARES_OPT_NOROTATE optmask value to allow explicit
     configuration of no-rotate behaviour
   - in ares_save_options(), report the value of channel->rotate
     as exactly one of (optmask & ARES_OPT_ROTATE) or
     (optmask & ARES_OPT_NOROTATE).

  In terms of back-compatibility:
   - existing apps that set ARES_OPT_ROTATE will continue to rotate,
     and to have ARES_OPT_ROTATE reported back from ares_save_options()
   - existing apps that don't set ARES_OPT_ROTATE will continue to
     use local config/defaults to decide whether to rotate, and will
     now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from
     ares_save_options() rather than 0.

- ares_init_options: only propagate init failures from options

  Commit 46bb820be3a8 ("ares_init_options: don't lose init failure")
  changed init behaviour so that earlier errors in initialization
  weren't lost.  In particular, if the user passes in specific
  options but they are not applied (e.g. because of an allocation
  failure), that failure needs to be reported back to the user; this
  also applies when duplicating a channel with ares_dup().

  However, other initialization failures can be ignored and
  overridden -- in particular, if init_by_resolv_conf() or
  init_by_environment() fail, then falling back to default values
  is OK.

  So only preserve failures from the init_by_options() stage, not
  from all initialization stages.

  Fixes issue 60.

- test: Force reinstall of libtool on OSX

  Travis build environment appears to have changed.

- test: Add valgrind build variant

- test: Add null pointer to gtest args

  GoogleTest assumes that there is a null pointer in argv[argc],
  so make it look like that. Without this change, tests run with
  command-line arguments get memory errors under valgrind/ASAN.

Daniel Stenberg (21 Aug 2016)
- AUTHOR: maybe gitgub isn't really an author =)

- AUTHORS: added contributors from the git log

- LICENSE.md: add a stand-alone license file

  Just the MIT license used in the top the source files moved out to a
  stand-alone file for easier reference and discovery.

- README: added "CII best practices" badge

- SECURITY.md: suggested "security process" for the project

David Drysdale (17 Aug 2016)
- test: Add Clang static analysis build to Travis

  Run scan-build over the library source code, but skip the
  tests.  Needs a later Clang install in Travis

- test: more info on how to run fuzz testing

- test: make fuzzer driver code C not C++

- test: fuzzer mode for AFL's persistent mode

  When fuzzing with AFL, if the LLVM-based instrumentation is
  used (via the afl-clang-fast wrapper), then it is possible to
  have a single execution of the fuzzer program iterate multiple
  times over the fuzzing entrypoint (similar to libFuzzer's normal
  mode of execution) with different data.  This is much (e.g. 10x)
  faster.

  Add code to support this, by checking whether __AFL_LOOP is
  defined at compile-time.

  Also, shift the code to effectively be C rather than C++.

- test: simplify deps for fuzzer entrypoint

  No need to depend on the rest of the test code (ares-test.h) for
  the fuzzer entrypoint; this makes the entrypoint slightly simpler
  to build with LLVM's libFuzzer.

  Also shift the code to effectively be C rather than C++

- test: disable MinGW tests

  The test binary built in the MinGW build is failing for some
  reason.  It works for me when I build locally, so I'm guessing
  it's down to some sort of AppVeyor environment issue.

  Disable for now.

Daniel Stenberg (16 Aug 2016)
- read_tcp_data: remove superfluous NULL check

  CID 56884 by Coverity. The pointer is already derefenced before this
  point so it can't be NULL here anyway.

- web: http => https

GitHub (20 Jul 2016)
- [David Drysdale brought this change]

  Merge pull request #59 from fuze/master

  Update msvc_ver.inc for VS2015 Update 3

- [Chris Araman brought this change]

  Update msvc_ver.inc

  support Visual Studio 2015 Update 3

David Drysdale (2 May 2016)
- Fix trailing comment for #endif

Daniel Stenberg (30 Apr 2016)
- email: use Gisle's "new" address

David Drysdale (18 Apr 2016)
- test: drop superfluous fuzz inputs

  Where there are multiple fuzz input files that only differ in
  the first two bytes (the query ID), just keep the first such
  file.

svante karlsson (15 Apr 2016)
- Update msvc_ver.inc

  support Visual Studio 2015 Update 2

David Drysdale (31 Mar 2016)
- test: Run fuzzcheck.sh in Travis build

- test: add fuzzing check script to tests

  Add a test script that runs the fuzzing command over the
  corpus of DNS packets.  This doesn't actually do any fuzzing
  (it just runs them as inputs without generating any variations)
  but it does ensure that the fuzzing entrypoint is still working.

- test: allow multiple files in aresfuzz command line

  If no arguments are specified, use stdin as input.
  Otherwise treat each argument as a filename and feed
  its contents to the fuzz entrypoint.

- test: Add corpus of DNS packets

  For fuzz testing it is useful to start from a corpus of valid
  packets, so fill out the test/fuzzinput/ directory with a bunch
  of inputs.

  These packets were generated by temporarily modifying the c-ares
  process_answer() function to save off any incoming response messages.

- test: Add utility to show DNS packet from file

- [nordsturm brought this change]

  Fix nsort initialization

  Author: Alexander Drachevskiy
  http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml
  http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml

- test: Check setting nsort=0 option is respected

- test: Update fuzzing function prototype

  libFuzzer changed expected return type from void to int
  in LLVM 3.8.

- Explicitly clear struct servent before use

  On a build where MSAN has been manually set up (which involves
  using an MSAN-instrumented version of the standard C++ library, see
  https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo)
  there's a warning about use of uninitialized memory here.  It
  might be a false positive, but the fix is trivial so include it.

- test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record

  Also shuffle expected responses rsp6/rsp4 into the order they will occur.

- [Chris Araman brought this change]

  msvc_ver.inc: support Visual Studio 2015 Update 1

- build: commonize MSVC version detection

  Remove the need to copy/paste version number mapping between
  Makefile.msvc and test/Makefile.msvc.

- test: Use different name in live test

- test: Only pass unused args to GoogleTest

- ahost.c: add cast to fix C++ compile

  If ahost.c is force-compiled as C++ the missing cast from
  (void *) to (char **) is problematic.

- ares_library_cleanup: reset ares_realloc too

  Otherwise a subsequent use of the library might use a previous
  incarnation's realloc() implementation.

Daniel Stenberg (9 Mar 2016)
- [Brad House brought this change]

  configure: check if tests can get built before enabled

  The current approach for disabling tests is not a good solution because
  it forces you to pass --disable-tests, rather than auto-detect if your
  system can support the tests in the first place.  Many (most?) systems
  do not have C++11.  This also causes issues when chain-building c-ares,
  the hosting system needs to be updated to support passing this
  additional flag if necessary, it doesn't seem reasonable to add this
  requirement which breaks compatibility.

  This change auto-detects if the system can build the tests and
  automatically disable them if it cannot.  If you pass --enable-tests to
  configure and the system cannot build them either due to lack of system
  support, or because cross-compilation is being used, it will throw an
  appropriate error since the user indicated they really did want the
  tests.

David Drysdale (3 Mar 2016)
- [Viktor Szakats brought this change]

  Makefile.m32: add support for CROSSPREFIX

- [Viktor Szakats brought this change]

  Makefile.m32: add support for extra flags

  Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars
  for mingw

- test: Build with MinGW on AppVeyor

- test: avoid in6addr_* constants

  These aren't available on MinGW, so use explicit addresses instead.

- test: add missing #includes for dns-proto.cc

- [Gregor Jasny brought this change]

  Fix man page typos detected by Lintian

Daniel Stenberg (19 Feb 2016)
- configure: acknowledge --disable-tests

  Fixes #44

- AUTHORS: added contributors from the 1.11.0 release

- bump: start working on the next version

Version 1.11.0 (19 Feb 2016)

Daniel Stenberg (19 Feb 2016)
- RELEASE-NOTES: final edits for 1.11.0

David Drysdale (15 Feb 2016)
- ares_dup.3: remove mention of nonexistent function

  ares_dup_options() doesn't exist, so don't document it.

- test: skip repeated build steps

  Top-level buildconf/configure now triggers for the
  test/ subdir too, so don't need to do explicitly.

- test: namespaces unavailable when cross-compiling

Daniel Stenberg (13 Feb 2016)
- configure: only run configure in test when NOT cross-compiling

  ... as the tests won't run cross-compiled anyway

David Drysdale (13 Feb 2016)
- test: prefer ON_CALL to EXPECT_CALL to reduce flakes

  For UDP tests, there's a chance of a retry.  EXPECT_CALL only
  expects a single request to arrive at the server; ON_CALL allows
  for a UDP retry and repeats the same answer.

  Note that ON_CALL and EXPECT_CALL can't be mixed in the same
  test, and that tests that have a varied sequence of responses
  for the same repeated request still have to use EXPECT_CALL.

Daniel Stenberg (13 Feb 2016)
- configure: run configure in 'test' too

  Having the test dir completely stand-alone causes too many issues for
  users and devs. It still needs to be built specifically.

- configure: build silently by default

- buildconf: run test/buildconf too if present

- test/configure: build silently by default

- [Gregor Jasny brought this change]

  dist: Distribute README.md

  Closes #42

Version 1.11.0 (11 Feb 2016)

Daniel Stenberg (11 Feb 2016)
- Makefile.am: distribute the test dir too

- RELEASE-NOTES: synced with 385582bd14b68a

- [Nicolas \"Pixel\" Noble brought this change]

  ares_win32_init: make LoadLibrary work when using UNICODE too

  Closes #17

David Drysdale (11 Feb 2016)
- Use "resolve" as synonym of "dns" in nsswitch.conf

  Modern Linux systems may have libnss_resolve from systemd as the
  resolver, which is then configured in /etc/nsswitch.conf with
  the "resolve" keyword rather than "dns".

  Fixes #33

- ares_set_socket_callback: make manpage match code

  The code in ares_process.c that invokes the socket creation/connection
  callback only checks for rc < 0, not for standard ares error codes.

- Merge pull request #36 from AGWA-forks/master

  Add ares_set_socket_configure_callback()

- test: Update init tests to match behaviour

  Unreadable config files are now treated the same way
  as absent config files.

- [Fedor Indutny brought this change]

  Ignore `fopen` errors to use default values

  After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf`
  errors are no longer swallowed in `ares_init_options`. This has exposed
  a previously unknown bug in `lookups` initialization code.

  If there is no lookup configuration in `resolv.conf`,
  `init_by_resolv_conf` will attempt to read it from other files available
  on the system. However, some of these files may have restricted
  permissions (like `600`), which will lead to `EACCESS` errno, which in
  turn is handled like a fatal error by `init_by_resolv_conf`.

  However, it sounds illogical that this error should be handled as a
  fatal. There is a `init_by_defaults` call that overrides `lookups` with
  default value, and certainly possible absence of lookup information is
  the reason why this function exists in a first place!

  I suggest handling any `fopen` errors as non-fatal ones, allowing to
  pick up the `lookups` value from different config files, or to pick up
  default value.

Andrew Ayer (9 Feb 2016)
- Document callback type in man page for ares_set_socket_callback

- Add ares_set_socket_configure_callback()

  This function sets a callback that is invoked after the socket is
  created, but before the connection is established.  This is an ideal
  time to customize various socket options.

David Drysdale (9 Feb 2016)
- test: ares_set_socket_callback failure behaviour

- test: Check ares_parse_txt_reply_ext() entrypoint

- [Fedor Indutny brought this change]

  txt: introduce `ares_parse_txt_reply_ext`

  Introduce `ares_txt_ext` structure with an extra `record_start`
  field, which indicates a start of a new TXT record, thus allowing to
  differentiate the chunks in the same record, from a chunks in a
  different record.

  Introduce a new API method: `ares_parse_txt_reply_ext` that works with
  this kind of struct.

- doc: Update missed repo references

- doc: Update docs on contributing

- test: Run command line tools in Travis

  Do a quick execution of each of the command line tools
  in the continuous integration build, so that any (say)
  sanitizer failures show up.

- acountry: drop inert test

  If ver_1 is true, then z0 and z1 must both be 'z', and so
  (z0 != 'z' && z1 != 'z') can never be true.

  CID 56879, pointed out by Coverity.

- doc: update badge locations to master repo

- test: Enable maintainer mode + debug in Travis

- test: Add an iOS build target

- test: Ignore SIGPIPE in tests

- test: More initialization tests

- test: Improve containerized test mechanism

  Aim is to ensure that code coverage information can escape the
  container.  To do this:
   - Enter a new mount namespace too, so that we can...
   - Bind mount the expected source directory into the container
   - Share memory with the sub-process so coverage information is
     shared too.

- test: Make contained tests easier to write

- test: Add framework for containerized testing

  On Linux we can potentially use user and UTS namespaces to run  a test
  in a pseudo-container with:
   - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
   - arbitrary hostname/domainname.

  Include a first pass at the framework code to allow this, along with a
  first test case that uses the container.

- test: Use a longer timeout for less flakiness

  Having occasional test failures from timeout before multiple
  queries can complete, so up the default timeout for the test
  from 100ms to 1500ms.

- test: Make failure tests more robust

  Different platforms will do different numbers of allocations
  in the processing of a given API call; just check that the
  return code is either success or ENOMEM, and free off any
  returned state in the former case.

  Also cope with ECONNREFUSED as well as ENOTFOUND.

- test: Get test code building under Windows

   - Initial nmake file based off library nmake file
   - Cast socket call arguments to (char *)
   - Use wrapper sclose() that maps to closesocket() or close()
   - Build a config.h indicating presence of headers
   - Conditionally include netdb.h
   - Remove unnecessary include of sys/socket.h
   - Force longer bitmask for allocation failure tracking
   - Call WSAStartup() / WSACleanup() in main()
   - Set TCP_NODELAY for mock server
   - Turn on tests in AppVeyor build

- test: Disable tests that manipulate env on Windows

- test: Move file lists into Makefile.inc

  In preparation for a Win32 build of the test suite.

- test: Add a simple multi-server test

  Check rotate option does something

- test: Allow for multiple mock servers

   - Update the MockServer to allow separate specification of
     UDP and TCP ports
   - Have an array of mock servers listening on consecutive
     sets of ports.
   - Rename Process(fd) to ProcessFD(fd) to avoid confusion.
   - Initialize channel by using the new ares_set_servers_ports()
     entrypoint, so multiple ports on the same loopback address
     can be used.

- test: Update test for set/get_servers variants

  Ports are significant in the _ports_ variant functions, so update test to cope.

- test: Make GetNameServers() utility function port-aware

  Also make it generally available.

- test: more testing, including of internal static functions

- test: more tests, especially fallback processing

   - Make mock server listen on UDP + TCP in parallel.
   - Test UDP->TCP fallback on truncation
   - Test EDNS->no-EDNS fallback
   - Test some environment init options
   - Test nonsense reply

  test: short response

- test: more tests, particularly of initialization

- test: Run mock tests over both TCP and UDP

  With the exception of a few tests that make use of the timed
  retry aspect of UDP.

- test: Run mock tests over both IPv4 and IPv6

- test: Add more tests for edge cases

- test: more nooks and crannies of pton functions

- test: More tests for PTR parsing

- test: Use of HOSTALIAS environment variable

- test: Add RAII utility classes for testing

   - TempFile holds specific contents
   - EnvValue sets an environment variable

- test: More search domain scenarios

- test: Remove duplicate flags from Makefile.am

- test: Make test code leak-free

- test: More tests

   - test use of sortlist
   - test gethostbyname(AF_UNSPEC)

- test: Test ares_gethostbyname_file()

- test: Add more tests of ares_getnameinfo()

- test: Tweak tests, add alloc failure test

- test: Test init with options

- test: More tests

   - ares_inet_net_pton() variants
   - ares_getsock() variants

- test: Expose ProcessWork() function

- test: More parsing tests

  Including:
   - Split each parse function test set out into separate files.
   - Add an allocation failure test for each parsing function.
   - Add error check test for each parsing function.

- test: Add various additional tests

- test: More tests

  Include tests of internal functions, based on the value of the
  CARES_SYMBOL_HIDING macro; need to configure the library with
  --disable-symbol-hiding to enable these tests.

- test: Allow command line override of mock server port

- test: Add README.md documentation

- test: Temporarily avoid latest Python requests package

  Currently get error from Travis on this install step, and downgrading one
  version appears to fix the problem.

  "Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13
  (from requests[security])"

- test: Add AppVeyor config file for Windows build

- test: Add configuration for a Travis build

  Cover Linux & OSX on the container infrastructure, but install
  a later G++ to satisfy the tests' need for C++11.

  Use a build matrix to include a variety of build variants:
   - ASAN
   - UBSAN
   - LSAN
   - Coverage via coveralls.io

  test: invoke ASAN and coverage in Travis build

  Also shift to use explicit build matrix

  test: Use coveralls.io for coverage tracking

  test: Add a build with UBSAN

  Also expand and re-order the setting of environment variables
  for easier modification.

  test: Add LSAN build to Travis config

- test: Add initial unit tests for c-ares library

  The tests are written in C++11, using the GoogleTest and GoogleMock
  frameworks.  They have their own independent autoconf setup, so that
  users of the library need not have a C++ compiler just to get c-ares
  working (however, the test/configure.ac file does assume the use of
  a shared top-level m4/ directory).  However, this autoconf setup has
  only been tested on Linux and OSX so far.

  Run with "./arestest", or "./arestest -v" to see extra debug info.
  The GoogleTest options for running specific tests are also
  available (e.g. "./arestest --gtest_filter=*Live*").

  The tests are nowhere near complete yet (currently hitting around
  60% coverage as reported by gcov), but they do include examples
  of a few different styles of testing:

   - There are live tests (ares-test-live.cc), which assume that the
     current machine has a valid DNS setup and connection to the
     internet; these tests issue queries for real domains but don't
     particularly check what gets returned.  The tests will fail on
     an offline machine.

   - There a few mock tests (ares-test-mock.cc) that set up a fake DNS
     server and inject its port into the c-ares library configuration.
     These tests allow specific response messages to be crafted and
     injected, and so are likely to be used for many more tests in
     future.

      - To make this generation/injection easier, the dns-proto.h file
        includes C++ helper classes for building DNS packets.

   - Other library entrypoints that don't require network activity
     (e.g. ares_parse_*_reply) are tested directly.

   - There are few tests of library-internal functions that are not
     normally visible to API users (in ares-test-internal.cc).

   - A couple of the tests use a helper method of the test fixture to
     inject memory allocation failures, using the earlier change to the
     library to allow override of malloc/realloc/free.

   - There is also an entrypoint to allow Clang's libfuzzer to drive
     the packet parsing code in ares_parse_*_reply, together with a
     standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz
     for further fuzz testing.

- test: Add local copy of GoogleMock/GoogleTest 1.7.0

  Don't check in gtest/m4 files, as they are unused and interfere
  with the top-level configure process.

- doc: Show build badges in README.md

  Note that these URLs will need to be updated if/when the test branch
  gets pulled into the master repo/branch.

- doc: Convert README to README.md

  Gives better display on GitHub

- doc: Update in preparation for next release

  Assume 1.11.0 is next (as there are various API additions).
  Also add myself to AUTHORS.

- build: Allow header compilation by Windows C++ compiler

- build: Expose whether symbol hiding is on

  Adding the CARES_SYMBOL_HIDING definition allows the test suite to
  detect whether internal symbols are available or not.

- build: Add autoconf macros for C++11 code using pthreads

  Pull in testing macros from the GNU autoconf archive to allow
  configure scripts to test for and setup use of a C++11 compiler
  (AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD).

  Note that these macros are not used by the main library autoconf,
  just by the tests (which share the same m4/ directory).

- build: Add a code coverage option

  Configure with:
    ./configure --enable-code-coverage
  Show coverage output with:
    make code-coverage-capture

  Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
  to provide the macros to check for presence of gcov + lcov;
  upstream macro modified to:
   - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
     autoconf (such as the one used by default on Travis) do not have this.
   - Rather than automatically defining CODE_COVERAGE_RULES to be a set
     of makefile rules that use ifeq/endif (which is GNU make-specific),
     instead only define CODE_COVERAGE_RULES if coverages is turned on,
     and in that case don't use conditionals in the makefile.

- api: Add entrypoints to allow use of per-server ports

  Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
  take struct ares_addr_port_node rather than struct ares_addr_node.
  This structure includes a UDP and TCP port number; if this is set
  to zero, the channel-wide port values are used as before.

  Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
  is analogous to ares_set_servers(3) except it doesn't ignore any
  specified port information; instead, any per-server specified port
  is used as both the UDP and TCP port for that server.

  The internal struct ares_addr is extended to hold the UDP/TCP ports,
  stored in network order, with the convention that a value of zero
  indicates that the channel-wide UDP/TCP port should be used.

  For the internal implementation of ares_dup(3), shift to use the
  _ports() version of the get/set functions, so port information is
  transferred correctly to the new channel.

  Update manpages, and add missing ares_set_servers_csv to the lists
  while we're at it

- api: Add ares_set_sortlist(3) entrypoint

  Allow explicit configuration of the channel's sortlist, by
  specifying a string in the same format as the equivalent
  /etc/resolv.conf option.

  This allows library users to perform the same configuration
  that is available via /etc/resolv.conf, but without needing
  to change that file.

- api: Allow injection of user-specified malloc/free functions

  Add a new ares_library_init_mem() initialization function for the
  library which allows the library user to specify their own malloc,
  realloc & free equivalents for use library-wide.

  Store these function pointers in library-wide global variables,
  defaulting to libc's malloc(), realloc() and free().

  Change all calls to malloc, realloc and free to use the function pointer
  instead.  Also ensure that ares_strdup() is always available
  (even if the local environment includes strdup(3)), and change the
  library code to always use it.

  Convert calls to calloc() to use ares_malloc() + memset

- api: Add option to expose some internal functions

  Purely for testing, add --enable-expose-statics option to configure
  which converts some static internal functions to be externally visible.

- api: Expose the ares_library_initialized() function

- ahost: Allow repeated -s <domain> options

  This also removes a potential leak where later -s options would
  replace earlier ones without freeing the relevant string.

- Mark unhittable lines

  Add comments for the benefit of the lcov tool, marking
  lines that cannot be hit.  Typically these are fall-back
  protection arms that are already covered by earlier checks,
  and so it's not worth taking out the unhittable code (in case
  someone changes the code between the two places in future).

- ares_set_servers_csv.3: make return type match code

- bitncmp: update comment to match code behaviour

- ares_striendstr: fix so non-NULL return can happen

  This looks to have been broken since it was first introduced in 2005 in
  commit aba0b775ea30 ("Added ares_getnameinfo which mimics the
  getnameinfo API")

- config_sortlist: free any existing sortlist on (re)alloc failure

  If we get an allocation failure on 2nd or later entry in the sortlist, the
  code would return ENOMEM but still leave the initial entries allocated.
  Ensure that *sortlist is set to NULL whenever ENOMEM is returned.

- ares_dup: clear new channel on failure

  If the attempt to transfer IPv6 servers from the old to the new channel
  fails, the previous code would still return a channel to the user even though
  an error return code was generated.  This makes it likely that users would
  leak the channel, so explicitly clear the channel in this case.

- ares_init_options: don't lose init failure

  If (say) init_by_options() fails, the subsequent call to
  init_by_defaults() was overwriting the return code with
  success.  Still call init_by_defaults() regardless, but track
  its return value separately

- ares_gethostbyname: don't leak valid-but-empty hostent

  If an AF_UNSPEC query gets a valid response to its AAAA query,
  but which has no IPv6 addresses in it, then the code chains on to
  a A record query.  However, the hostent from the AAAA response
  was being leaked along the way (because it gets replaced before
  the follow-on end_hquery() invocation).

- ares_parse_txt_reply: propagate errors from per-substring loop

  If we get an allocation failure when processing a particular substring in a
  TXT record, that failure is silently lost; fix that by propagating errors from
  the inner loop to the outer loop.

- process_answer: fix things up correctly when removing EDNS option

  When a server rejects an EDNS-equipped request, we retry without
  the EDNS option.  However, in TCP mode, the 2-byte length prefix was
  being calculated wrong -- it was built from the answer length rather than
  the length of the original request.

  Also, it is theoretically possible that the call to realloc() might change
  the data pointed to; to allow for this, qbuf also needs updating.

  (Both these fixes were actually included in a patchset sent on the mailing
  list in Oct 2012, but were included with other functional changes that
  didn't get merged:
  http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml)

- ares__read_line: clear buf pointer on realloc failure

- ares_expand_name: check for valid bits in label length

  The top two bits of the label length indicate whether this is a
  label length (00) or an index to a name elsewhere in the message
  (11).  RFC1035 4.1.4 says that the other possible values for the
  top two bits (01, 10) are reserved for future use.

Daniel Stenberg (23 Jan 2016)
- [Gregor Jasny brought this change]

  Fix typos detected by lintian

  Closes #32

- [Gregor Jasny brought this change]

  Distribute all man pages

- README.cares: s/I/Daniel

  ... and add a pointer to an existing version of the original area 1.1.1
  package.a

- read_tcp_data: don't try to use NULL pointer after malloc failure

  CID 56884, pointed out by Coverity. We really should make this function
  return an error code so that a malloc() failure can return back a major
  failure.

- configure_socket: explicitly ignore return code

  CID 56889 in Coverity pointed out the return code from setsocknonblock()
  is ignored, and this added typecast to (void) makes it explicit.

- ahost: check the select() return code

  Fixes CID 137189, pointed out by Coverity

David Drysdale (18 Jan 2016)
- Fix buildconf on platforms using glibtoolize

  Commit c49a87eea538 changed buildconf to only check for
  libtoolize, but missed a line

- Don't exit loop early leaving uninitialized entries

  Update for commit affc63cba875d.

  The original patch from Gregor Jasny did not have the break
  statement; I incorrectly added it to prevent continuing the loop.
  However, the later entries in the array would then be left
  uninitialized, causing problems for later cleanup.

  So fix to match Gregor's original patch, with apologies.

Daniel Stenberg (18 Jan 2016)
- buildconf: remove check for libtool, it only requires libtoolize

David Drysdale (17 Jan 2016)
- [Gregor Jasny brought this change]

  Use libresolv to initialize cares on iPhone targets

  On iPhone targets like iOS, watchOS or tvOS the file
  /etc/resolv.conf cannot be used to configure cares.

  Instead the resolver library is queried for configuration
  values.

  CC: Yury Kirpichev <ykirpichev@yandex-team.ru>

Daniel Stenberg (17 Jan 2016)
- README: updated to new repo URL

David Drysdale (14 Jan 2016)
- [Lei Shi brought this change]

  Fixing slow DNS lookup issue

  This patch is fixing the dns lookup issue due to dummy dns information
  of a disconnected adapter(in my case is a bluetooth adapter). I changed
  the dns lookup policy to try GetNetworkParams first because the
  GetNetworkParams provides the most reliable dns information (lots of
  checks were done by system). I also filter out inoperable adapter in
  DNS_AdaptersAddresses in case GetNetworkParams fail.

- Merge pull request #30 from p-push/vs-2015

  Support Visual Studio 2015

Oleg Pudeyev (3 Jan 2016)
- [Gisle Vanem brought this change]

  Support Visual Studio 2015

David Drysdale (11 Nov 2015)
- [Andrew Andkjar brought this change]

  added another version case to Makefile.msvc

  nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110

- Merge pull request #26 from bitbouncer/vs-2013

  added define for visual studio 2013

svante karlsson (25 Jun 2015)
- added define for visual studio 2013

Jakub Hrozek (6 Nov 2014)
- ares__read_line: free buf on realloc failure

- Destroy options if ares_save_options fails

  It's possible that, if ares_save_options failed, the opts structure
  would contain some allocated memory. Calling ares_destroy_options in
  this case is safe, because ares_save_options zeroes out the memory
  initially.

- [David Drysdale brought this change]

  Continue loop if space for hostname not large enough

  When attempting to build a search domain from the local hostname
  (used as a fallback when no other methods have given a search
  domain), the code doubles the buffer size on each loop iteration.

  However, the loop previously had a WHILE_FALSE terminator so the continue
  statement exited the loop rather than going round again.

Daniel Stenberg (30 Oct 2014)
- ares_getnameinfo.3: there is no ares_getaddrinfo

David Drysdale (30 Sep 2014)
- [Gregor Jasny brought this change]

  Prevent tmpbuf from overrunning

  Fix Coverity error CID 56886.

  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>

- [Gregor Jasny brought this change]

  Re-start loop if select fails

  Fix Coverity error CID 56882

  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>

- [Gregor Jasny brought this change]

  Free temporary variable in error path

  Fix Coverity CID 56890

  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>

- [Gregor Jasny brought this change]

  Fix integer shift overflow if both tcp_socket and udp_socket are set

  The problem occurs if at the start of the loop the sockindex is at the
  last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
  tcp_socket are valid, sockindex gets incremented for UDP first and
  points one entry behind the array for the tcp block.
  So the fix is to check after every increment of sockindex if it is still
  valid.

  Fix Coverity error CID 56878

  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>

- [Gregor Jasny brought this change]

  Null check before dereference

  Fix Coverity error CID 56880

  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>

Jakub Hrozek (28 Jul 2014)
- [Gisle Vanem brought this change]

  Comment in ares_ipv6.h

David Drysdale (25 Jul 2014)
- CONTRIBUTING: add file to indicate mailing list is preferred

- Add -t u option to ahost

  Add an option to allow specification of the AF_UNSPEC
  address family.

Jakub Hrozek (24 Jul 2014)
- host_callback: Fall back to AF_INET on searching with AF_UNSPEC

  Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
  first AF_INET6 call only returned CNAMEs, the host_callback never
  retried AF_INET.

  This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
  taken as authoritative only if the result contains some addresses.

- [David Drysdale brought this change]

  Move memset call below platform-specific declarations

  A GitHub commenter [1] says that my recent change to ahost.c has
  problems compiling on Windows + C89 platforms.

  [1]  https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616

- [David Drysdale brought this change]

  Update ahost man page to describe -s option.

  Commit ee22246507c9 added the -s <domain> option to the
  ahost command, but neglected to update the man page to
  describe it.

  Also fix typo in description of -t option.

- ares_parse_soa_reply: Do not leak rr_name on allocation failure

  If ares_malloc_data failed, already allocated rr_name would go out of
  scope.

- [David Drysdale brought this change]

  Don't override explicitly specified search domains

  Only set search domains from /etc/resolv.conf if there isn't a value
  already present in the channel.

- [David Drysdale brought this change]

  Allow specification of search domain in ahost

  Add the "-s domain" command line option to override the search
  domains.

Daniel Stenberg (12 May 2014)
- Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"

  This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451.

- [Frederic Germain brought this change]

  ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address

- [Doug Kwan brought this change]

  ares_build.h: fix building on 64-bit powerpc

  There are two issues.

  1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
  __PPC64__.  The tests of __ILP32__ and __LP64__ are sufficient for gcc.

  2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
  targeting ppc64.  This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
  when building with clang.

  My patch is two change the order of the checks so that we check the
  64-bit case first.

- refresh: updated now with automake 1.14

- [David Drysdale brought this change]

  single_domain: Invalid memory access for empty string input

  We noticed a small buglet in ares_search() when it gets an empty string
  as input -- the single_domain() utility function in ares_search.c
  accesses invalid memory (before the start of the string).

Guenter Knauf (31 Aug 2013)
- Fixed warning 'type specifier missing'.

Daniel Stenberg (30 Aug 2013)
- [Tor Arntsen brought this change]

  ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it

  It was removed in f19387dd72432

- nowarn: use <limits.h> instead of configure for size of long

  This makes the header file much more multi-arch friendly and can be used
  as-is with both 32 bit and 64 bit builds.

- timeoffset: made static and private

  ares__timeoffset() was only used once within this single source file

- timeadd: make static

  ares__timeadd() was only ever used from within the same source

Yang Tse (18 Jul 2013)
- xc-am-iface.m4: comments refinement

- configure: fix 'subdir-objects' distclean related issue

  See XC_AMEND_DISTCLEAN comments for details.

- configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)

- xc-am-iface.m4: provide XC_AUTOMAKE macro

Daniel Stenberg (12 May 2013)
- gitignore: ignore all ares_*pdf but also CHANGES.dist

- bump: start working towards 1.10.1

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Nov 4 00:35:08 2015 UTC (9 years, 1 month ago) by agc
Branches: MAIN
CVS tags: pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -1 lines
Add SHA512 digests for distfiles for net category

Problems found with existing digests:
	Package haproxy distfile haproxy-1.5.14.tar.gz
	159f5beb8fdc6b8059ae51b53dc935d91c0fb51f [recorded]
	da39a3ee5e6b4b0d3255bfef95601890afd80709 [calculated]

Problems found locating distfiles:
	Package bsddip: missing distfile bsddip-1.02.tar.Z
	Package citrix_ica: missing distfile citrix_ica-10.6.115659/en.linuxx86.tar.gz
	Package djbdns: missing distfile djbdns-1.05-test25.diff.bz2
	Package djbdns: missing distfile djbdns-cachestats.patch
	Package djbdns: missing distfile 0002-dnscache-cache-soa-records.patch
	Package gated: missing distfile gated-3-5-11.tar.gz
	Package owncloudclient: missing distfile owncloudclient-2.0.2.tar.xz
	Package poink: missing distfile poink-1.6.tar.gz
	Package ra-rtsp-proxy: missing distfile rtspd-src-1.0.0.0.tar.gz
	Package ucspi-ssl: missing distfile ucspi-ssl-0.70-ucspitls-0.1.patch
	Package waste: missing distfile waste-source.tar.gz

Otherwise, existing SHA1 digests verified and found to be the same on
the machine holding the existing distfiles (morden).  All existing
SHA1 digests retained for now as an audit trail.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Fri Dec 13 10:42:57 2013 UTC (10 years, 11 months ago) by jperkin
Branches: MAIN
CVS tags: pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -1 lines
Don't play games with CFLAGS/CPPFLAGS and munging -isystem, fixes SunOS.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Jul 14 14:51:49 2013 UTC (11 years, 4 months ago) by rodent
Branches: MAIN
CVS tags: pkgsrc-2013Q3-base, pkgsrc-2013Q3
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +4 -4 lines
Updated to latest stable version 1.10.0. From CHANGES:

- ares_set_servers_csv: fixed IPv6 address parsing
- nroff: fix two syntax mistakes
- build: fix build on msvc11
- Makefile.am: increment -version-info for 1.10.0 release
- README: remove unnecessary comment
- ares_version.h: copyright end range year is now 2013
- ares_parse_aaaa_reply: Plug memory leak
- ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
- library init: documentation update
- library init: be recursive
- protocol parsing: check input data stricter
- Create ares_build.h when buidling from Git.
- Added -DCARES_STATICLIB to CFLAGS.
- ares_destroy() documentation: no new requests
- Documentation: properly document ARES_ECANCELLED
- ares_cancel(): cancel requests safely
- ares.h: stricter CARES_EXTERN linkage decorations logic
- ares_build.h.dist: enhance non-configure GCC ABI detection logic
  - check __ILP32__ before 32 and 64bit processor architectures in
    order to detect ILP32 programming model on 64 bit processors
    which, of course, also support LP64 programming model, when using
    gcc 4.7 or newer.
  - keep 32bit processor architecture checks in order to support gcc
    versions older than 4.7 which don't define __ILP32__
  - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
    architecture checks for older versions which don't define __LP64__
- ares.h: there is no ares_free_soa function
- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
- ares_inet_ntop.3: s/socklen_t/ares_socklen_t
- configure: use XC_LIBTOOL for portability across libtool versions
- xc-lt-iface.m4: provide XC_LIBTOOL macro
- Makefile.am: use AM_CPPFLAGS instead of INCLUDES
- inet_ntop.c: s/socklen_t/ares_socklen_t
- inet_ntop.c: s/socklen_t/ares_socklen_t for portability
- ares.h: s/socklen_t/ares_socklen_t for portability
- ares_inet_ntop.3: 4th argument is socklen_t!
- spell inet correctly!
- ares_inet_pton/ntop: cleanup
- ares_inet_ntop/ares_inet_pton: added man pages
- curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
- config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
- config-dos.h: define strerror() to strerror_s_() for High-C
- ares_get_datatype: removed unused function
- ares__bitncmp: use two underscores for private functions
- ares__generate_new_id: moved to ares_query.c
- ares__swap_lists: make private and static
- Makefile.msvc: add four VS version strings
- ares_expand_name.3: clarify how to free the data
- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
  - Fix a pair of single quotes to double quotes.
- zz40-xc-ovr.m4: fix 'wc' detection - follow-up
  - Take into account that 'wc' may return leading spaces and/or tabs.
  - Set initial IFS to space, tab and newline.
- zz40-xc-ovr.m4: fix 'wc' detection
  - Take into account that 'wc' may return leading spaces.
  - Set internationalization behavior variables.
- zz40-xc-ovr.m4: check another three basic utilities
- zz40-xc-ovr.m4: 1.0 interface stabilization
  - Stabilization results in 4 public interface m4 macros:
  - Avoid one level of internal indirection
  - Update comments
  - Drop XC_OVR_ZZ40 macro
- zz40-xc-ovr.m4: emit witness message in configure BODY
- zz40-xc-ovr.m4: truly do version conditional overriding
  - version conditional overriding
  - catch unexpanded XC macros
  - fix double words in comments
- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
- zz40-xc-ovr.m4: avoid double single-quote usage
- zz40-xc-ovr.m4: parentheses balancing of 'case' statements
- zz40-xc-ovr.m4: internals overhauling
  - Update comments
  - Execute commands in subshells
  - Faster path separator check
  - Fix missing 'test' command
  - Rename private macros
  - Minimize AC_REQUIRE usage
- zz40-xc-ovr.m4: redirect errors and warnings to stderr
- configure: use XC_CONFIGURE_PREAMBLE early checks
- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
- configure: autotools compatibility fixes - step I
- configure: fix automake 1.13 compatibility
- ares_private.h: use again memdebug.h instead of curl_memdebug.h
- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
- cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
- ares_private.h: use curl_memdebug.h instead of memdebug.h
- vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c
- cares-functions.m4: improve gethostname arg 2 data type check
- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
- configure: check if compiler halts on function prototype mismatch
- cares-functions.m4: add gethostname arg 2 data type check and definition
- cares-functions.m4: update thread-safeness detection of getaddrinfo()
- setup_once.h: HP-UX <sys/socket.h> issue workaround
- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
- Header inclusion clean-up
- setup_once.h: HP-UX specific TRUE and FALSE definitions
- ares_timeout.c: fix compiler warning
- ares_create_query.c: IRIX compilation fix
- c-ares/nameser.h: add some T_* defines for ns_t_* values
- adig: perror() doesn't work for socket errors on windows
- get_DNS_AdaptersAddresses: fix IPv6 parsing
- ares_create_query.3: mention when this is added
- Added new feature (rfc2671)
- code police: fix indents, < 80 columns, reflowed comments
- Cleaned up version awk script.
- read_udp_packets: bail out loop on bad sockets
- cares-compilers.m4: remove -Wstrict-aliasing=3 from clang
- cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon Aug 6 13:57:23 2012 UTC (12 years, 4 months ago) by mspo
Branches: MAIN
CVS tags: pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -4 lines
update to 1.9.1

c-ares version 1.9.1
 include the ares_parse_soa_reply.* files in the tarball
c-ares version 1.9.0
 Added ares_parse_soa_reply
 libcares.pc generation for static MingW* cross builds
 ares_dup: UDP and TCP port byte order in saved options
c-ares version 1.8
 Added ares_parse_naptr_reply()
 handle CNAME-only in ares_parse_aaaa_reply()
 support multiple DNS servers on Android
 check for __ANDROID__ in addition to ANDROID macro
 port numbers: convert them to network order
 get_iphlpapi_dns_info: fix buffer overrun
 configure: make CURL_CHECK_DEF ignore leading whitespace
 segfault triggered in ares_init_options()
 ares_getnameinfo's memcpy did not copy enough bytes
 ares_destroy: fix segfault in ares_destroy_options()
 CHANGES: generate from script
 configure: fix symbol hiding usability check
c-ares version 1.7.5
 detection of semicolon comments in resolv.conf
 avoid using system's inet_net_pton affected by the WLB-2008080064 advisory
 replacement ares_inet_net_pton affected by the WLB-2008080064 advisory
 replacement ares_inet_ntop affected by potential out of bounds write
 added install target to Makefile.msvc
 only fall back to AF_INET searches when looking for AF_UNSPEC addresses
 fixed ares_parse_*_reply memory leaks
 Use correct sizeof in ares_getnameinfo()
 IPv6-on-windows: find DNS servers correctly
 man pages: docs for the c-ares utility programs
 getservbyport replacement for Win CE
 config_sortlist: (win32) missing else
 advance_tcp_send_queue: avoid NULL ptr dereference
 configure: fix a bashism
 ares_expand_name: Fix encoded length for indirect root
c-ares version 1.7.4
 local-bind: Support binding to local interface/IPs, see
   ares_set_local_ip4, ares_set_local_ip6, ares_set_local_dev
 memory leak in ares_getnameinfo
 add missing break that caused get_ares_servers to fail
 ares_parse_a_reply: fix CNAME response parsing
 init_by_options: don't copy an empty sortlist
 Replaced uint32_t with unsigned int to fix broken builds
   on a couple of platforms
 Fix lookup with HOSTALIASES set
 adig: fix NAPTR parsing
 compiler warning cleanups
c-ares version 1.7.3
 builds on Android
 now includes all files necessary to build it (1.7.2 lacked a file)
c-ares version 1.7.2
 Added ares_parse_mx_reply()
 ares_init: Last, not first instance of domain or search should win
 improve alternative definition of bool
 fix VS2010 compiler warnings

Revision 1.6: download - view: text, markup, annotated - select for diffs
Wed Apr 25 15:50:51 2012 UTC (12 years, 7 months ago) by drochner
Branches: MAIN
CVS tags: pkgsrc-2012Q2-base, pkgsrc-2012Q2
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -6 lines
update to 1.7.5
changes:
-minor feature additions, e.g. bind to local i/f addresses
-API extensions
-bugfixes

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Jul 25 13:09:42 2010 UTC (14 years, 4 months ago) by obache
Branches: MAIN
CVS tags: pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +6 -6 lines
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.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Jul 14 22:05:57 2007 UTC (17 years, 5 months ago) by adrianp
Branches: MAIN
CVS tags: pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, pkgsrc-2009Q3-base, pkgsrc-2009Q3, pkgsrc-2009Q2-base, pkgsrc-2009Q2, pkgsrc-2009Q1-base, pkgsrc-2009Q1, pkgsrc-2008Q4-base, pkgsrc-2008Q4, pkgsrc-2008Q3-base, pkgsrc-2008Q3, pkgsrc-2008Q2-base, pkgsrc-2008Q2, pkgsrc-2008Q1-base, pkgsrc-2008Q1, pkgsrc-2007Q4-base, pkgsrc-2007Q4, pkgsrc-2007Q3-base, pkgsrc-2007Q3, cwrapper, cube-native-xorg-base, cube-native-xorg
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +6 -6 lines
Update to 1.4.0
- Install ares_dns.h too
- Brad House added ares_save_options() and ares_destroy_options() that can be
  used to keep options for later re-usal when ares_init_options() is used.
- Brad House's man pages for ares_save_options() and ares_destroy_options()
  were added.
- James Bursa reported a major memory problem when resolving multi-IP names
  and I found and fixed the problem. It was added by Ashish Sharma's patch
  two days ago.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Wed Jan 3 12:38:38 2007 UTC (17 years, 11 months ago) by adrianp
Branches: MAIN
CVS tags: pkgsrc-2007Q2-base, pkgsrc-2007Q2, pkgsrc-2007Q1-base, pkgsrc-2007Q1
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +5 -5 lines
Update to 1.3.2

In brief:
Version 1.3.2 (November 3, 2006)

* October 12 2006

- Prevent ares_getsock() to overflow if more than 16 sockets are used.

Version 1.3.1 (June 24, 2006)

* July 23, 2006

- Gisle Vanem added getopt() to the ahost program. Currently accepts
  only [-t {a|aaaa}] to specify address family in ares_gethostbyname().

* June 19, 2006

- (wahern) Removed "big endian" DNS section and RR data integer parser
  macros from ares_dns.h, which break c-ares on my Sparc64. Bit-wise
  operations in C operate on logical values. And in any event the octets are
  already in big-endian (aka network) byte order so they're being reversed
  (thus the source of the breakage).

* May 10, 2006

- Bram Matthys brought my attention to a libtool peculiarity where detecting
  things such as C++ compiler actually is a bad thing and since we don't need
  that detection I added a work-around, much inspired by a previous patch by
  Paolo Bonzini. This also shortens the configure script quite a lot.

* November 25
- Yang Tse fixed some send() / recv() compiler warnings

* September 18
- Added constants that will be used by ares_getaddrinfo
- Made ares_getnameinfo use the reentrant getservbyport (getservbyport_r) if it
  is available to ensure it works properly in a threaded environment.

* September 10
- configure fix for detecting a member in the sockaddr_in6 struct which failed
  on ipv6-enabled HP-UX 11.00

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jul 18 22:38:18 2006 UTC (18 years, 4 months ago) by adrianp
Branches: MAIN
CVS tags: pkgsrc-2006Q4-base, pkgsrc-2006Q4, pkgsrc-2006Q3-base, pkgsrc-2006Q3
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +3 -1 lines
Add ares_get_config() from CVS for unrealircd 3.2.5 to work
Bump to nb1

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Thu Dec 1 17:27:10 2005 UTC (19 years ago) by adrianp
Branches: TNF
CVS tags: pkgsrc-base, pkgsrc-2006Q2-base, pkgsrc-2006Q2, pkgsrc-2006Q1-base, pkgsrc-2006Q1, pkgsrc-2005Q4-base, pkgsrc-2005Q4
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
c-ares is a C library that performs DNS requests and name resolves
asynchronously.

c-ares is a fork of the library named 'ares', written by Greg Hudson at MIT.
The fork was made on ares 1.1.1.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Thu Dec 1 17:27:10 2005 UTC (19 years ago) by adrianp
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>