Skip to content

Commit

Permalink
libcares: update to 1.23.0.
Browse files Browse the repository at this point in the history
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: nodejs/node#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)
  • Loading branch information
wiz committed Dec 7, 2023
1 parent 87ff2c9 commit 5dd4594
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions net/libcares/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.38 2023/11/22 11:48:32 adam Exp $
# $NetBSD: Makefile,v 1.39 2023/12/07 09:05:19 wiz Exp $

DISTNAME= c-ares-1.22.1
DISTNAME= c-ares-1.23.0
PKGNAME= ${DISTNAME:S/c-/libc/1}
CATEGORIES= net
MASTER_SITES= https://c-ares.haxx.se/download/
Expand Down
5 changes: 3 additions & 2 deletions net/libcares/PLIST
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.22 2023/11/22 11:48:32 adam Exp $
@comment $NetBSD: PLIST,v 1.23 2023/12/07 09:05:19 wiz Exp $
bin/adig
bin/ahost
include/ares.h
Expand All @@ -14,7 +14,7 @@ lib/cmake/c-ares/c-ares-targets-noconfig.cmake
lib/cmake/c-ares/c-ares-targets.cmake
lib/libcares.so
lib/libcares.so.2
lib/libcares.so.2.8.1
lib/libcares.so.2.9.0
lib/libcares_static.a
lib/pkgconfig/libcares.pc
man/man1/adig.1
Expand Down Expand Up @@ -140,6 +140,7 @@ man/man3/ares_set_socket_functions.3
man/man3/ares_set_sortlist.3
man/man3/ares_strerror.3
man/man3/ares_svcb_param_t.3
man/man3/ares_threadsafety.3
man/man3/ares_timeout.3
man/man3/ares_tlsa_match_t.3
man/man3/ares_tlsa_selector_t.3
Expand Down
8 changes: 4 additions & 4 deletions net/libcares/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.32 2023/11/22 11:48:32 adam Exp $
$NetBSD: distinfo,v 1.33 2023/12/07 09:05:19 wiz Exp $

BLAKE2s (c-ares-1.22.1.tar.gz) = 186e873b7721e82be5dd703773baa28cc8cddac50479882e0a6a95cb092a65d3
SHA512 (c-ares-1.22.1.tar.gz) = 9b9aa3ff48a76e7d1464f5fc644e736d09898b2245c81292c510d1a3b967dca13e4711bab564947ec99c118094c385d12a92ddd767a84153fdd21df03da75349
Size (c-ares-1.22.1.tar.gz) = 1665059 bytes
BLAKE2s (c-ares-1.23.0.tar.gz) = fe08dc79a3809e5d531035041ce179f63c19019eea41a7a36c4eb69b4cb19aa5
SHA512 (c-ares-1.23.0.tar.gz) = 0302fe809118bc81310c4f5ca4bbea3e2aee262da2c44ad6266d9da05e9326452f274508685974ff8aa6fce8332a2862008c12fbbc2917af258daa90b69567f0
Size (c-ares-1.23.0.tar.gz) = 1681336 bytes

0 comments on commit 5dd4594

Please sign in to comment.