Here is an update to libcares 1.29.0.
## c-ares version 1.29.0 - May 24 2024 This is a feature and bugfix release. Features: * When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration when network conditions change. [PR #759](https://github.com/c-ares/c-ares/pull/759) * Apple: reimplement DNS configuration reading to more accurately pull DNS settings. [PR #750](https://github.com/c-ares/c-ares/pull/750) * Add observability into DNS server health via a server state callback, invoked whenever a query finishes. [PR #744](https://github.com/c-ares/c-ares/pull/744) * Add server failover retry behavior, where failed servers are retried with small probability after a minimum delay. [PR #731](https://github.com/c-ares/c-ares/pull/731) Changes: * Mark `ares_channel_t *` as const in more places in the public API. [PR #758](https://github.com/c-ares/c-ares/pull/758) Bugfixes: * Due to a logic flaw dns name compression writing was not properly implemented which would result in the name prefix not being written for a partial match. This could cause issues in various record types such as MX records when using the deprecated API. Regression introduced in 1.28.0. [Issue #757](https://github.com/c-ares/c-ares/issues/757) * Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and causes c-ares to become non-functional. [PR #754](https://github.com/c-ares/c-ares/pull/754) * `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752](https://github.com/c-ares/c-ares/issues/752) * cmake: Android requires C99. [PR #748](https://github.com/c-ares/c-ares/pull/748) * `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742](https://github.com/c-ares/c-ares/pull/742) Index: Makefile =================================================================== RCS file: /cvs/ports/net/libcares/Makefile,v retrieving revision 1.30 diff -u -p -u -p -r1.30 Makefile --- Makefile 15 May 2024 06:13:37 -0000 1.30 +++ Makefile 24 May 2024 11:41:38 -0000 @@ -1,12 +1,12 @@ COMMENT= asynchronous resolver library -V= 1.28.1 +V= 1.29.0 DISTNAME= c-ares-${V} PKGNAME= libcares-${V} CATEGORIES= net devel SITES= ${HOMEPAGE}download/ -SHARED_LIBS += cares 3.6 # 2.13.1 +SHARED_LIBS += cares 3.7 # 2.13.1 HOMEPAGE= https://c-ares.haxx.se/ Index: distinfo =================================================================== RCS file: /cvs/ports/net/libcares/distinfo,v retrieving revision 1.17 diff -u -p -u -p -r1.17 distinfo --- distinfo 15 May 2024 06:13:37 -0000 1.17 +++ distinfo 24 May 2024 11:41:38 -0000 @@ -1,2 +1,2 @@ -SHA256 (c-ares-1.28.1.tar.gz) = Z1pp/FTdv0LmgwvGce62zYnuykOCjrQTJD/SwKdggJ0= -SIZE (c-ares-1.28.1.tar.gz) = 1312102 +SHA256 (c-ares-1.29.0.tar.gz) = C4n6QluCXEx7xwhJTzdK5pNA5NH9xkUjvbsnUL/ALqc= +SIZE (c-ares-1.29.0.tar.gz) = 1329299 Index: patches/patch-src_lib_ares__socket_c =================================================================== RCS file: patches/patch-src_lib_ares__socket_c diff -N patches/patch-src_lib_ares__socket_c --- patches/patch-src_lib_ares__socket_c 8 May 2024 18:10:24 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,20 +0,0 @@ -Revert the change from https://github.com/c-ares/c-ares/pull/659 -because it breaks node (https://github.com/nodejs/node/issues/52439) -and likely other use cases as well. - -Index: src/lib/ares__socket.c ---- src/lib/ares__socket.c.orig -+++ src/lib/ares__socket.c -@@ -253,12 +253,6 @@ ares_status_t ares__open_connection(ares_channel_t - struct server_connection *conn; - ares__llist_node_t *node; - int type = is_tcp ? SOCK_STREAM : SOCK_DGRAM; --#ifdef __OpenBSD__ -- if ((is_tcp && server->tcp_port == 53) || -- (!is_tcp && server->udp_port == 53)) { -- type |= SOCK_DNS; -- } --#endif - - switch (server->addr.family) { - case AF_INET: Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/libcares/pkg/PLIST,v retrieving revision 1.15 diff -u -p -u -p -r1.15 PLIST --- pkg/PLIST 5 Apr 2024 20:38:05 -0000 1.15 +++ pkg/PLIST 24 May 2024 11:41:38 -0000 @@ -136,6 +136,7 @@ lib/pkgconfig/libcares.pc @man man/man3/ares_set_local_dev.3 @man man/man3/ares_set_local_ip4.3 @man man/man3/ares_set_local_ip6.3 +@man man/man3/ares_set_server_state_callback.3 @man man/man3/ares_set_servers.3 @man man/man3/ares_set_servers_csv.3 @man man/man3/ares_set_servers_ports.3