   Changelog for the c-ares project. Generated with git2changes.pl

Version 1.26.0 (25 Jan 2024)

Brad House (25 Jan 2024)
- clusterfuzz: enforce maximum DNS packet size due to long parser time

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

  Release prep for c-ares 1.26.0 (#698)
  
  release prep

Brad House (24 Jan 2024)
- adig: Differentiate between internal and server error
  
  Should not output "Got answer" if there was no answer from the
  server, instead should just output the internal error.
  
  Fix By: Gisle Vanem (@gvanem)

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

  Event Subsystem: No longer require integrators to have their own (#696)
  
  This PR implements an event thread to process all events on file descriptors registered by c-ares. Prior to this feature, integrators were required to understand the internals of c-ares and how to monitor file descriptors and timeouts and process events.
  
  Implements OS-specific efficient polling such as epoll(), kqueue(), or IOCP, and falls back to poll() or select() if otherwise unsupported. At this point, it depends on basic threading primitives such as pthreads or windows threads.
  
  If enabled via the ARES_OPT_EVENT_THREAD option passed to ares_init_options(), then socket callbacks cannot be used.
  
  Fixes Bug: #611
  Fix By: Brad House (@bradh352)

- [Erik Lax brought this change]

  Added flags to are_dns_parse to force RAW packet parsing (#693)
  
  This pull request adds six flags to instruct the parser under various circumstances to skip parsing of the returned RR records so the raw data can be retrieved.
  
  Fixes Bug: #686
  Fix By: Erik Lax (@eriklax)

- [Brad House brought this change]

  Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS (#695)
  
  The previous build system allowed overwriting of CFLAGS/CPPFLAGS/CXXFLAGS on the make command line. Switch to using AM_CFLAGS/AM_CPPFLAGS/AM_CXXFLAGS when we set our own flags for building which ensures they are kept even when a user tries to override.
  
  Fixes Bug: #694
  Fix By: Brad House (@bradh352)

Brad House (16 Jan 2024)
- fix doxygen typo

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

  man ares_fds(3): mark as deprecated and add explanation (#691)
  
  ares_fds(3) is not safe to use, mark as deprecated.
  
  Fixes Issue: #687
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  autotools: fix building for 32bit windows due to stdcall symbol mangling (#689)
  
  Use AC_CHECK_DECL not AC_CHECK_FUNCS, while this doesn't do a linkage test, it just makes sure the headers define it, this is the only thing without a complex workaround on Windows that will do what we need.
  
  See:
  
  https://github.com/msys2/msys2/wiki/Porting/f87a222118b1008ebc166ad237f04edb759c8f4c#calling-conventions-stdcall-and-autotools
  
  and
  
  https://lists.gnu.org/archive/html/autoconf/2013-05/msg00085.html
  
  and for a more complex workaround, we'd need to use AC_LINK_IFELSE like:
  
  https://mailman.videolan.org/pipermail/vlc-devel/2015-March/101802.html
  
  which would require we check each individually and provide function arguments for the test.  I don't think that is worthwhile.
  
  Fixes Issue: #688
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Do not sanity check RR Name vs Question (#685)
  
  It appears as though we should never sanity check the RR name vs the question name as some DNS servers may return results for alias records.
  
  Fixes Bug: #683
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  no reason to include sys/random.h all the time (#684)
  
  External integrations don't need sys/random.h in order to compile, remove the dependency.  Try to fix building on legacy MacOS versions.
  
  Fixes Issue: #682
  Fix By: Brad House (@bradh352)

- [Gregor Jasny brought this change]

  cmake: improve some include related code (#680)
  
  * cmake: avoid warning about non-existing include dir
  
  In the Debian build logs I noticed the following warning:
  cc1: warning: /build/c-ares-1.25.0/test/include: No such file or directory [-Wmissing-include-dirs]
  
  This happened because ${CMAKE_INSTALL_INCLUDEDIR} had been added to
  caresinternal. I believe it has been copied from the "real" lib
  where it's used in the INSTALL_INTERFACE context. But because
  caresinternal is never installed we don't need that include here.
  
  * cmake: drop CARES_TOPLEVEL_DIR variable
  
  The CARES_TOPLEVEL_DIR variable is the same as the automatically
  created PROJECT_SOURCE_DIR variable. Let's stick to the official
  one. Also because it is already used at places where CARES_TOPLEVEL_DIR
  is used as well.
  
  Fix By: Gregor Jasny (@gjasny)

Brad House (5 Jan 2024)
- test: fix outdated license headers

- RELEASE-NOTES -> RELEASE-NOTES.md

- update format slightly

- update release notes format

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)

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)

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)

Version 1.22.1 (17 Nov 2023)

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

  1.22.1 release prep (#624)

Brad House (17 Nov 2023)
- ares__htable_strvp should be case-insensitive

- optimize: large /etc/hosts files reading
  
  profiling found some hot paths that could be optimized to reduce
  insert times into the cache.
  
  Fix By: Brad House (@bradh352)

- Fix /etc/hosts processing performance with all entries using same IP address
  
  Some users use blacklist files like https://github.com/StevenBlack/hosts which
  can contain 200k+ host entries all pointing to 0.0.0.0.  Due to the merge
  logic in the new hosts processor, all those entries will be associated as
  aliases for the same ip address.
  
  The first issue is that it attempts to check the status of all the hosts for
  the merged entry, when it should only be checking the new hosts added to the
  merged entry, so this caused exponential time as the entries got longer.
  
  The next issue is if searching for one of those hosts, it would append all
  the matches as cnames/aliases, but there is zero use for 200k aliases
  being appended to a lookup, so we are artificially capping this to 100.
  
  Bug report reference: https://bugs.gentoo.org/917400
  
  Fix By: Brad House (@bradh352)

- new badges

- OpenWatcom: time_t is unsigned, change math using time_t to promote to a 64bit signed integer

- fix more docs

GitHub (15 Nov 2023)
- [Gregor Jasny brought this change]

  Fix typos and man page whatis entry (#619)
  
  Those issues were detected by lintian.
  
  Fix By: Gregor Jasny (@gjasny)

- [Douglas R. Reno brought this change]

  Fix building c-ares-1.22.0 and higher under Watcom. (#623)
  
  Update config-win32.h to define HAVE_STDINT_H when OpenWatcom is in use.
  
  Fix By: Douglas R. Reno (@renodr)

Brad House (15 Nov 2023)
- OpenWatcom: fix PR building

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- CI/CD: Add OpenWatcom

- warnings: try to prevent warnings due to automatic integer promotion

- only push to coverity weekly or on explicit coverity_scan branch commits

- try to cleanup bogus compiler warnings

- try to cleanup bogus compiler warnings

- additional test coverage

- Coverity: omit tests

- Coverity: more

- Coverity: silence false positives

Version 1.22.0 (14 Nov 2023)

Brad House (14 Nov 2023)
- fix workflow

- try a different coverity workflow

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

  coverity workflow (#618)

Brad House (14 Nov 2023)
- typos

- getaddrinfo ESERVICE

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

  Release 1.22.0 (#616)

Brad House (13 Nov 2023)
- SonarCloud: minor codesmells

- clang-format

- Extended RCODE in OPT RR PsuedoRecord should not be exposed directly, it should be presented as part of the normal rcode

- Slight fixes for PR #615
  
  1. the maxtimeout must come at the end of the structure
  2. fix comment form to be C style
  3. fix timeplus randomness if statement

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

  Add DNS record manpages (#615)
  
  The new DNS record parser and writer needs manpages. This PR implements those.
  
  Fix By: Brad House (@bradh352)

- [Ignat brought this change]

  Randomize retry penalties to prevent thundering herd type issues (#606)
  
  The retry timeout values were using a fixed calculation which could cause multiple simultaneous queries to timeout and retry at the exact same time.  If a DNS server is throttling requests, this could cause the issue to never self-resolve due to all requests recurring at the same instance again.
  
  This PR also creates a maximum timeout option to make sure the random value selected does not exceed this value.
  
  Fix By: Ignat (@Kontakter)

Brad House (13 Nov 2023)
- fix typos

- some simplification and better error handling

- SonarCloud: fix some minor codesmells

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

  Implement ares_reinit() to reload system configuration into existing channel (#614)
  
  This PR implements ares_reinit() to safely reload a channel's configuration even if there are existing queries.  This function can be called when system configuration is detected to be changed, however since c-ares isn't thread aware, care must be taken to ensure no other c-ares calls are in progress at the time this function is called.  Also, this function may update the open file descriptor list so care must also be taken to wake any event loops and reprocess the list of file descriptors.
  
  Fixes Bug #301
  
  Fix By: Brad House (@bradh352)

Brad House (11 Nov 2023)
- test case ensures tag for caa is not blank

- 0-length strings are ok

- SonarCloud: fix up codesmells

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

  rewrite adig using new helpers (#607)
  
  adig previously performed manual parsing of the DNS records.  Now it can focus strictly on formatting of output data for printing.  It simply iterates across the parsed DNS packet and queries for the RRs, parameters for each RR, and the datatypes for each parameter.  adig will now automatically pick up new RRs from the c-ares library due to the dynamic nature.
  
  The adig format also now more closely resembles that of BIND's `dig` output.
  
  A few more helpers needed to be added to the c-ares library that were missing.  There ware a couple of minor bugs and enhancements also needed.
  
  Example:
  ```
  ./adig -t ANY www.google.com
  
  ; <<>> c-ares DiG 1.21.0 <<>> www.google.com
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: RCODE, id: 23913
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 1
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags: 0; udp: 512
  ;; QUESTION SECTION:
  ;www.google.com.                        IN      ANY
  
  ;; ANSWER SECTION:
  www.google.com.         162     IN      A       142.251.107.99
  www.google.com.         162     IN      A       142.251.107.105
  www.google.com.         162     IN      A       142.251.107.103
  www.google.com.         162     IN      A       142.251.107.147
  www.google.com.         162     IN      A       142.251.107.104
  www.google.com.         162     IN      A       142.251.107.106
  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::93
  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::69
  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::68
  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::6a
  www.google.com.         21462   IN      HTTPS   1 . alpn="h2,h3"
  
  ;; MSG SIZE  rcvd: 276
  ```
  
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  make dns parser/writer public (#604)
  
  This PR makes the c-ares parser introduced in 1.21, and the new writer, along with associated helpers public.  These helpers are contained in a new public header of `ares_dns_record.h` which should _**not**_ be included directly, instead simply including `ares.h` is sufficient.  This will address #587, as well as #470.
  
  A follow-up PR will be made which will transform `adig` to use the new parsers and helpers.
  
  This PR does not currently add man pages for these public functions, that will be in a follow-up PR once the `adig` migration is done which may expose additional needed helpers.
  
  The two aforementioned PRs will be done before the 1.22 release.
  
  Fix By: Brad House (@bradh352)

Brad House (9 Nov 2023)
- options helpers: fix dereference to properly return params

- clang-format

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

  Add SVCB and HTTPS RR (RFC 9460) (#603)
  
  This PR adds parsing and writing support for SVCB and HTTPS RRs as defined in RFC 9460.
  
  This should fix #566
  
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  OPT RR should support parsing key/value options (#602)
  
  The OPT RR record has some seldom used options with a 16bit key and a binary value.  The current parser and writer was not supporting this.  This PR adds support.  The same format is also used for SVCB/HTTPS records, so getting this in there is necessary to support that RR type.
  
  Also, we split the Binary record format into BIN and BINP, where BINP is an indicator that the binary data is _likely_ printable and will guarantee a NULL terminator.  This is helpful for those attempting to print RRs.
  
  Fix By: Brad House (@bradh352)

Brad House (8 Nov 2023)
- SonarCloud: fix some easy codesmells

- clang-format

- Mark a couple of parameters as const in the public API

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

  Add TLSA record support (#600)
  
  As per #470, c-ares is missing a parser for the TLSA record format (RFC 6698). This PR introduces that parser.
  
  Once the new parser interface becomes public and this PR is merged, then #470 can be closed.
  
  Fix By: Brad House (@bradh352)

Brad House (7 Nov 2023)
- memory leak in test case

- fix bad variable reference

- DNS Write: fix name compression

- SonarCloud: fix codesmells

- Coverage: add tests for writing and parsing various record formats

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

  DNS Record Write (#598)
  
  The `ares_dns_record_t` data structure created in the prior release is capable of holding a complete parsed DNS message and also provides all helpers in order to fill in the data structure.  This PR adds write capabilities for this data structure to form a complete message and supports features such as DNS name compression as defined in RFC1035.  Though this message writing capability goes further than c-ares internally needs, external users may find it useful ... and we may find it useful for test validation as well.
  
  This also replaces the existing message writing code in `ares_create_query()`, as well rewriting the request message without EDNS in ares_process.c's `process_answer()`.
  
  Fix By: Brad House (@bradh352)

Brad House (6 Nov 2023)
- PATH_RESOLV_CONF: use empty string instead of NULL to prevent warnings

- build fix

- const: fix some usecases

- remove tests that depend on randomness

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

  Use EDNS by default (#596)
  
  All DNS servers support EDNS, by using this by default, it will allow larger responses without the need to switch to TCP. If by chance a DNS server is hit that doesn't support EDNS, this is detected due to the lack of the OPT RR in the response and will be automatically retried without EDNS.
  
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  `ares_channel` -> `ares_channel_t *`: don't bury the pointer (#595)
  
  `ares_channel` is defined as `typedef struct ares_channeldata *ares_channel;`.  The problem with this, is it embeds the pointer into the typedef, which means an `ares_channel` can never be declared as `const` as if you write `const ares_channel channel`, that expands to `struct ares_channeldata * const ares_channel` and not `const struct ares_channeldata *channel`.
  
  We will now typedef `ares_channel_t` as `typedef struct ares_channeldata ares_channel_t;`, so if you write `const ares_channel_t *channel`, it properly expands to `const struct ares_channeldata *channel`.
  
  We are maintaining the old typedef for API compatibility with existing integrations, and due to typedef expansion this should not even cause any compiler warnings for existing code.  There are no ABI implications with this change.  I could be convinced to keep existing public functions as `ares_channel` if a sufficient argument exists, but internally we really need make this change for modern best practices.
  
  This change will allow us to internally use `const ares_channel_t *` where appropriate.  Whether or not we decide to change any public interfaces to use `const` may require further discussion on if there might be ABI implications (I don't think so, but I'm also not 100% sure what a compiler internally does with `const` when emitting machine code ... I think more likely ABI implications would occur going the opposite direction).
  
  FYI, This PR was done via a combination of sed and clang-format, the only manual code change was the addition of the new typedef, and a couple doc fixes :)
  
  Fix By: Brad House (@bradh352)

Brad House (4 Nov 2023)
- win32 warnings look good, remove commented out block

- more msvc warnings

- fix

- docs: document setting servers can be done live

- SonarCloud: more easy codesmells

- clang-format

- SonarCloud: fix up codesmells

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

  Dynamic Server List (#594)
  
  This PR makes the server list a dynamic sorted list of servers. The sort order is [ consecutive failures, system config index ]. The server list can be updated via ares_set_servers_*(). Any queries currently directed to servers that are no longer in the list will be automatically re-queued to a different server.
  
  Also, any time a failure occurs on the server, the sort order of the servers will be updated so that the one with the fewest consecutive failures is chosen for the next query that goes on the wire, this way bad or non-responsive servers are automatically isolated.
  
  Since the server list is now dynamic, the tracking of query failures per server has been removed and instead is relying on the server sort order as previously described. This simplifies the logic while also reducing the amount of memory required per query. However, because of this dynamic nature, it may not be easy to determine the server attempt order for enqueued queries if there have been any failures.
  
  If using the ARES_OPT_ROTATE, this is now implemented to be a random selection of the configured servers. Since the server list is dynamic, its not possible to go to the next server as configuration could have changed between queries or attempts for the same query.
  
  Finally, this PR moved some existing functions into new files to logically separate them.
  
  This should address issues #550 and #440, while also setting the framework to implement #301. #301 needs a little more effort since it configures things other than the servers themselves (domains, search, sortlist, lookups), which need to make sure they can be safely updated.
  
  Fix By: Brad House (@bradh352)

Brad House (1 Nov 2023)
- no reason to run LSAN, ASAN already does it

GitHub (31 Oct 2023)
