xref: /third_party/node/deps/cares/CHANGES (revision 1cb0ef41)
11cb0ef41Sopenharmony_ci   Changelog for the c-ares project. Generated with git2changes.pl
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ciVersion 1.27.0 (22 Feb 2024)
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciGitHub (22 Feb 2024)
61cb0ef41Sopenharmony_ci- [Brad House brought this change]
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_ci  Release 1.27.0 (#715)
91cb0ef41Sopenharmony_ci  
101cb0ef41Sopenharmony_ci  release prep for 1.27.0 release
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ci- [Brad House brought this change]
131cb0ef41Sopenharmony_ci
141cb0ef41Sopenharmony_ci  Merge pull request from GHSA-mg26-v6qh-x48q
151cb0ef41Sopenharmony_ci
161cb0ef41Sopenharmony_ci- [Oliver Welsh brought this change]
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ci  Add flag to not use a default local named server on channel initialization (#713)
191cb0ef41Sopenharmony_ci  
201cb0ef41Sopenharmony_ci  Hello, I work on an application for Microsoft which uses c-ares to
211cb0ef41Sopenharmony_ci  perform DNS lookups. We have made some minor changes to the library over
221cb0ef41Sopenharmony_ci  time, and would like to contribute these back to the project in case
231cb0ef41Sopenharmony_ci  they are useful more widely. This PR adds a new channel init flag,
241cb0ef41Sopenharmony_ci  described below.
251cb0ef41Sopenharmony_ci  
261cb0ef41Sopenharmony_ci  Please let me know if I can include any more information to make this PR
271cb0ef41Sopenharmony_ci  better/easier for you to review. Thanks!
281cb0ef41Sopenharmony_ci  
291cb0ef41Sopenharmony_ci  **Summary**
301cb0ef41Sopenharmony_ci  When initializing a channel with `ares_init_options()`, if there are no
311cb0ef41Sopenharmony_ci  nameservers available (because `ARES_OPT_SERVERS` is not used and
321cb0ef41Sopenharmony_ci  `/etc/resolv.conf` is either empty or not available) then a default
331cb0ef41Sopenharmony_ci  local named server will be added to the channel.
341cb0ef41Sopenharmony_ci  
351cb0ef41Sopenharmony_ci  However in some applications a local named server will never be
361cb0ef41Sopenharmony_ci  available. In this case, all subsequent queries on the channel will
371cb0ef41Sopenharmony_ci  fail.
381cb0ef41Sopenharmony_ci  
391cb0ef41Sopenharmony_ci  If we know this ahead of time, then it may be preferred to fail channel
401cb0ef41Sopenharmony_ci  initialization directly rather than wait for the queries to fail. This
411cb0ef41Sopenharmony_ci  gives better visibility, since we know that the failure is due to
421cb0ef41Sopenharmony_ci  missing servers rather than something going wrong with the queries.
431cb0ef41Sopenharmony_ci  
441cb0ef41Sopenharmony_ci  This PR adds a new flag `ARES_FLAG_NO_DFLT_SVR`, to indicate that a
451cb0ef41Sopenharmony_ci  default local named server should not be added to a channel in this
461cb0ef41Sopenharmony_ci  scenario. Instead, a new error `ARES_EINITNOSERVER` is returned and
471cb0ef41Sopenharmony_ci  initialization fails.
481cb0ef41Sopenharmony_ci  
491cb0ef41Sopenharmony_ci  **Testing**
501cb0ef41Sopenharmony_ci  I have added 2 new FV tests:
511cb0ef41Sopenharmony_ci  - `ContainerNoDfltSvrEmptyInit` to test that initialization fails when
521cb0ef41Sopenharmony_ci  no nameservers are available and the flag is set.
531cb0ef41Sopenharmony_ci  - `ContainerNoDfltSvrFullInit` to test that initialization still
541cb0ef41Sopenharmony_ci  succeeds when the flag is set but other nameservers are available.
551cb0ef41Sopenharmony_ci  
561cb0ef41Sopenharmony_ci  Existing FVs are all passing.
571cb0ef41Sopenharmony_ci  
581cb0ef41Sopenharmony_ci  **Documentation**
591cb0ef41Sopenharmony_ci  I have had a go at manually updating the docs to describe the new
601cb0ef41Sopenharmony_ci  flag/error, but couldn't see any contributing guidance about testing
611cb0ef41Sopenharmony_ci  this. Please let me know if you'd like anything more here.
621cb0ef41Sopenharmony_ci  
631cb0ef41Sopenharmony_ci  ---------
641cb0ef41Sopenharmony_ci  
651cb0ef41Sopenharmony_ci  Fix By: Oliver Welsh (@oliverwelsh)
661cb0ef41Sopenharmony_ci
671cb0ef41Sopenharmony_ciBrad House (18 Feb 2024)
681cb0ef41Sopenharmony_ci- badge should be only main branch
691cb0ef41Sopenharmony_ci
701cb0ef41Sopenharmony_ci- put logo in readme
711cb0ef41Sopenharmony_ci
721cb0ef41Sopenharmony_ci- clang-format
731cb0ef41Sopenharmony_ci
741cb0ef41Sopenharmony_ciGitHub (17 Feb 2024)
751cb0ef41Sopenharmony_ci- [Brad House brought this change]
761cb0ef41Sopenharmony_ci
771cb0ef41Sopenharmony_ci  Add ares_queue_active_queries() (#712)
781cb0ef41Sopenharmony_ci  
791cb0ef41Sopenharmony_ci  Add a function to request the number of active queries from an ares
801cb0ef41Sopenharmony_ci  channel. This will return the number of inflight requests to dns
811cb0ef41Sopenharmony_ci  servers. Some functions like `ares_getaddrinfo()` when using `AF_UNSPEC`
821cb0ef41Sopenharmony_ci  may enqueue multiple queries which will be reflected in this count.
831cb0ef41Sopenharmony_ci  
841cb0ef41Sopenharmony_ci  In the future, if we implement support for queuing (e.g. for throttling
851cb0ef41Sopenharmony_ci  purposes), and/or implement support for tracking user-requested queries
861cb0ef41Sopenharmony_ci  (e.g. for cancelation), we can provide additional functions for
871cb0ef41Sopenharmony_ci  inspecting those queues.
881cb0ef41Sopenharmony_ci  
891cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
901cb0ef41Sopenharmony_ci
911cb0ef41Sopenharmony_ci- [Vojtěch Vobr brought this change]
921cb0ef41Sopenharmony_ci
931cb0ef41Sopenharmony_ci  fix leaking DNS suffix search list on Windows (#711)
941cb0ef41Sopenharmony_ci  
951cb0ef41Sopenharmony_ci  ares__strsplit provides a newly allocated buffer, so suffix list in
961cb0ef41Sopenharmony_ci  line variable isn't referenced anymore. Related ares_free seems to
971cb0ef41Sopenharmony_ci  have gone missing during refactoring made in #594
981cb0ef41Sopenharmony_ci  
991cb0ef41Sopenharmony_ci  Fix By: Vojtěch Vobr (@vojtechvobr)
1001cb0ef41Sopenharmony_ci
1011cb0ef41Sopenharmony_ci- [Brad House brought this change]
1021cb0ef41Sopenharmony_ci
1031cb0ef41Sopenharmony_ci  Add ares_queue_wait_empty() for use with EventThreads (#710)
1041cb0ef41Sopenharmony_ci  
1051cb0ef41Sopenharmony_ci  It may be useful to wait for the queue to be empty under certain conditions (mainly test cases), expose a function to efficiently do this and rework test cases to use it.
1061cb0ef41Sopenharmony_ci  
1071cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
1081cb0ef41Sopenharmony_ci
1091cb0ef41Sopenharmony_ci- [Cheng Zhao brought this change]
1101cb0ef41Sopenharmony_ci
1111cb0ef41Sopenharmony_ci  Fix warning about ignoring result of write (#709)
1121cb0ef41Sopenharmony_ci  
1131cb0ef41Sopenharmony_ci  Fix the compiler warning from clang:
1141cb0ef41Sopenharmony_ci  
1151cb0ef41Sopenharmony_ci  ```
1161cb0ef41Sopenharmony_ci  ares_event_wake_pipe.c:120:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
1171cb0ef41Sopenharmony_ci    120 |   write(p->filedes[1], "1", 1);
1181cb0ef41Sopenharmony_ci        |   ^~~~~ ~~~~~~~~~~~~~~~~~~~~~
1191cb0ef41Sopenharmony_ci  1 error generated.
1201cb0ef41Sopenharmony_ci  ```
1211cb0ef41Sopenharmony_ci  
1221cb0ef41Sopenharmony_ci  Fix By: Cheng Zhao (@zcbenz)
1231cb0ef41Sopenharmony_ci
1241cb0ef41Sopenharmony_ciBrad House (5 Feb 2024)
1251cb0ef41Sopenharmony_ci- CMake: don't override target output locations if not top-level
1261cb0ef41Sopenharmony_ci  
1271cb0ef41Sopenharmony_ci  CMake was unconditionally setting output locations globally, but
1281cb0ef41Sopenharmony_ci  it should not do that if it is not the top-level project (e.g.
1291cb0ef41Sopenharmony_ci  during chain building).  Detect this fact and only set the output
1301cb0ef41Sopenharmony_ci  location when top level.
1311cb0ef41Sopenharmony_ci  
1321cb0ef41Sopenharmony_ci  Fixes Issue: #708
1331cb0ef41Sopenharmony_ci  Fix By: Anthony Alayo (@anthonyalayo)
1341cb0ef41Sopenharmony_ci
1351cb0ef41Sopenharmony_ci- make docs match PR #705
1361cb0ef41Sopenharmony_ci
1371cb0ef41Sopenharmony_ciGitHub (31 Jan 2024)
1381cb0ef41Sopenharmony_ci- [Cristian Rodríguez brought this change]
1391cb0ef41Sopenharmony_ci
1401cb0ef41Sopenharmony_ci  lower EDNSPACKETSZ to 1232 (#705)
1411cb0ef41Sopenharmony_ci  
1421cb0ef41Sopenharmony_ci  In 2020, it was agreed this is optimal maximum size and all
1431cb0ef41Sopenharmony_ci  major server software was updated to reflect this.
1441cb0ef41Sopenharmony_ci  
1451cb0ef41Sopenharmony_ci  see https://www.dnsflagday.net/2020/#faq
1461cb0ef41Sopenharmony_ci  
1471cb0ef41Sopenharmony_ci  Fix By: Cristian Rodríguez (@crrodriguez)
1481cb0ef41Sopenharmony_ci
1491cb0ef41Sopenharmony_ciBrad House (30 Jan 2024)
1501cb0ef41Sopenharmony_ci- fix version
1511cb0ef41Sopenharmony_ci
1521cb0ef41Sopenharmony_ci- fix typo
1531cb0ef41Sopenharmony_ci
1541cb0ef41Sopenharmony_ci- bad symlink
1551cb0ef41Sopenharmony_ci
1561cb0ef41Sopenharmony_ci- attempt to fix pkgconfig on windows for static builds
1571cb0ef41Sopenharmony_ci
1581cb0ef41Sopenharmony_ciGitHub (28 Jan 2024)
1591cb0ef41Sopenharmony_ci- [Andriy Utkin brought this change]
1601cb0ef41Sopenharmony_ci
1611cb0ef41Sopenharmony_ci  docs/ares_init_options.3: fix args in analogy (#701)
1621cb0ef41Sopenharmony_ci  
1631cb0ef41Sopenharmony_ci  Fix By: Andriy Utkin <hello@autkin.net>
1641cb0ef41Sopenharmony_ci
1651cb0ef41Sopenharmony_ci- [Brad House brought this change]
1661cb0ef41Sopenharmony_ci
1671cb0ef41Sopenharmony_ci  sonarcloud: fix minor codesmells (#702)
1681cb0ef41Sopenharmony_ci  
1691cb0ef41Sopenharmony_ci  Fix minor codesmells, mostly related to missing 'const' in the new event system.
1701cb0ef41Sopenharmony_ci  
1711cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
1721cb0ef41Sopenharmony_ci
1731cb0ef41Sopenharmony_ciBrad House (26 Jan 2024)
1741cb0ef41Sopenharmony_ci- remove outdated copyright text
1751cb0ef41Sopenharmony_ci
1761cb0ef41Sopenharmony_ci- spelling
1771cb0ef41Sopenharmony_ci
1781cb0ef41Sopenharmony_ci- sanity check GTest includes GMock component
1791cb0ef41Sopenharmony_ci
1801cb0ef41Sopenharmony_ciGitHub (26 Jan 2024)
1811cb0ef41Sopenharmony_ci- [Brad House brought this change]
1821cb0ef41Sopenharmony_ci
1831cb0ef41Sopenharmony_ci  build-time disabled threads breaks c-ares (#700)
1841cb0ef41Sopenharmony_ci  
1851cb0ef41Sopenharmony_ci  Regression introduced in 1.26.0, building c-ares with threading disabled results in ares_init{_options}() failing.
1861cb0ef41Sopenharmony_ci  
1871cb0ef41Sopenharmony_ci  Also adds a new CI test case to prevent this regression in the future.
1881cb0ef41Sopenharmony_ci  
1891cb0ef41Sopenharmony_ci  Fixes Bug: #699
1901cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
1911cb0ef41Sopenharmony_ci
1921cb0ef41Sopenharmony_ciVersion 1.26.0 (25 Jan 2024)
1931cb0ef41Sopenharmony_ci
1941cb0ef41Sopenharmony_ciBrad House (25 Jan 2024)
1951cb0ef41Sopenharmony_ci- clusterfuzz: enforce maximum DNS packet size due to long parser time
1961cb0ef41Sopenharmony_ci
1971cb0ef41Sopenharmony_ciGitHub (24 Jan 2024)
1981cb0ef41Sopenharmony_ci- [Brad House brought this change]
1991cb0ef41Sopenharmony_ci
2001cb0ef41Sopenharmony_ci  Release prep for c-ares 1.26.0 (#698)
2011cb0ef41Sopenharmony_ci  
2021cb0ef41Sopenharmony_ci  release prep
2031cb0ef41Sopenharmony_ci
2041cb0ef41Sopenharmony_ciBrad House (24 Jan 2024)
2051cb0ef41Sopenharmony_ci- adig: Differentiate between internal and server error
2061cb0ef41Sopenharmony_ci  
2071cb0ef41Sopenharmony_ci  Should not output "Got answer" if there was no answer from the
2081cb0ef41Sopenharmony_ci  server, instead should just output the internal error.
2091cb0ef41Sopenharmony_ci  
2101cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
2111cb0ef41Sopenharmony_ci
2121cb0ef41Sopenharmony_ciGitHub (24 Jan 2024)
2131cb0ef41Sopenharmony_ci- [Brad House brought this change]
2141cb0ef41Sopenharmony_ci
2151cb0ef41Sopenharmony_ci  Event Subsystem: No longer require integrators to have their own (#696)
2161cb0ef41Sopenharmony_ci  
2171cb0ef41Sopenharmony_ci  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.
2181cb0ef41Sopenharmony_ci  
2191cb0ef41Sopenharmony_ci  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.
2201cb0ef41Sopenharmony_ci  
2211cb0ef41Sopenharmony_ci  If enabled via the ARES_OPT_EVENT_THREAD option passed to ares_init_options(), then socket callbacks cannot be used.
2221cb0ef41Sopenharmony_ci  
2231cb0ef41Sopenharmony_ci  Fixes Bug: #611
2241cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2251cb0ef41Sopenharmony_ci
2261cb0ef41Sopenharmony_ci- [Erik Lax brought this change]
2271cb0ef41Sopenharmony_ci
2281cb0ef41Sopenharmony_ci  Added flags to are_dns_parse to force RAW packet parsing (#693)
2291cb0ef41Sopenharmony_ci  
2301cb0ef41Sopenharmony_ci  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.
2311cb0ef41Sopenharmony_ci  
2321cb0ef41Sopenharmony_ci  Fixes Bug: #686
2331cb0ef41Sopenharmony_ci  Fix By: Erik Lax (@eriklax)
2341cb0ef41Sopenharmony_ci
2351cb0ef41Sopenharmony_ci- [Brad House brought this change]
2361cb0ef41Sopenharmony_ci
2371cb0ef41Sopenharmony_ci  Autotools allow make to override CFLAGS/CPPFLAGS/CXXFLAGS (#695)
2381cb0ef41Sopenharmony_ci  
2391cb0ef41Sopenharmony_ci  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.
2401cb0ef41Sopenharmony_ci  
2411cb0ef41Sopenharmony_ci  Fixes Bug: #694
2421cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2431cb0ef41Sopenharmony_ci
2441cb0ef41Sopenharmony_ciBrad House (16 Jan 2024)
2451cb0ef41Sopenharmony_ci- fix doxygen typo
2461cb0ef41Sopenharmony_ci
2471cb0ef41Sopenharmony_ciGitHub (16 Jan 2024)
2481cb0ef41Sopenharmony_ci- [Brad House brought this change]
2491cb0ef41Sopenharmony_ci
2501cb0ef41Sopenharmony_ci  man ares_fds(3): mark as deprecated and add explanation (#691)
2511cb0ef41Sopenharmony_ci  
2521cb0ef41Sopenharmony_ci  ares_fds(3) is not safe to use, mark as deprecated.
2531cb0ef41Sopenharmony_ci  
2541cb0ef41Sopenharmony_ci  Fixes Issue: #687
2551cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2561cb0ef41Sopenharmony_ci
2571cb0ef41Sopenharmony_ci- [Brad House brought this change]
2581cb0ef41Sopenharmony_ci
2591cb0ef41Sopenharmony_ci  autotools: fix building for 32bit windows due to stdcall symbol mangling (#689)
2601cb0ef41Sopenharmony_ci  
2611cb0ef41Sopenharmony_ci  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.
2621cb0ef41Sopenharmony_ci  
2631cb0ef41Sopenharmony_ci  See:
2641cb0ef41Sopenharmony_ci  
2651cb0ef41Sopenharmony_ci  https://github.com/msys2/msys2/wiki/Porting/f87a222118b1008ebc166ad237f04edb759c8f4c#calling-conventions-stdcall-and-autotools
2661cb0ef41Sopenharmony_ci  
2671cb0ef41Sopenharmony_ci  and
2681cb0ef41Sopenharmony_ci  
2691cb0ef41Sopenharmony_ci  https://lists.gnu.org/archive/html/autoconf/2013-05/msg00085.html
2701cb0ef41Sopenharmony_ci  
2711cb0ef41Sopenharmony_ci  and for a more complex workaround, we'd need to use AC_LINK_IFELSE like:
2721cb0ef41Sopenharmony_ci  
2731cb0ef41Sopenharmony_ci  https://mailman.videolan.org/pipermail/vlc-devel/2015-March/101802.html
2741cb0ef41Sopenharmony_ci  
2751cb0ef41Sopenharmony_ci  which would require we check each individually and provide function arguments for the test.  I don't think that is worthwhile.
2761cb0ef41Sopenharmony_ci  
2771cb0ef41Sopenharmony_ci  Fixes Issue: #688
2781cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2791cb0ef41Sopenharmony_ci
2801cb0ef41Sopenharmony_ci- [Brad House brought this change]
2811cb0ef41Sopenharmony_ci
2821cb0ef41Sopenharmony_ci  Do not sanity check RR Name vs Question (#685)
2831cb0ef41Sopenharmony_ci  
2841cb0ef41Sopenharmony_ci  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.
2851cb0ef41Sopenharmony_ci  
2861cb0ef41Sopenharmony_ci  Fixes Bug: #683
2871cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2881cb0ef41Sopenharmony_ci
2891cb0ef41Sopenharmony_ci- [Brad House brought this change]
2901cb0ef41Sopenharmony_ci
2911cb0ef41Sopenharmony_ci  no reason to include sys/random.h all the time (#684)
2921cb0ef41Sopenharmony_ci  
2931cb0ef41Sopenharmony_ci  External integrations don't need sys/random.h in order to compile, remove the dependency.  Try to fix building on legacy MacOS versions.
2941cb0ef41Sopenharmony_ci  
2951cb0ef41Sopenharmony_ci  Fixes Issue: #682
2961cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
2971cb0ef41Sopenharmony_ci
2981cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
2991cb0ef41Sopenharmony_ci
3001cb0ef41Sopenharmony_ci  cmake: improve some include related code (#680)
3011cb0ef41Sopenharmony_ci  
3021cb0ef41Sopenharmony_ci  * cmake: avoid warning about non-existing include dir
3031cb0ef41Sopenharmony_ci  
3041cb0ef41Sopenharmony_ci  In the Debian build logs I noticed the following warning:
3051cb0ef41Sopenharmony_ci  cc1: warning: /build/c-ares-1.25.0/test/include: No such file or directory [-Wmissing-include-dirs]
3061cb0ef41Sopenharmony_ci  
3071cb0ef41Sopenharmony_ci  This happened because ${CMAKE_INSTALL_INCLUDEDIR} had been added to
3081cb0ef41Sopenharmony_ci  caresinternal. I believe it has been copied from the "real" lib
3091cb0ef41Sopenharmony_ci  where it's used in the INSTALL_INTERFACE context. But because
3101cb0ef41Sopenharmony_ci  caresinternal is never installed we don't need that include here.
3111cb0ef41Sopenharmony_ci  
3121cb0ef41Sopenharmony_ci  * cmake: drop CARES_TOPLEVEL_DIR variable
3131cb0ef41Sopenharmony_ci  
3141cb0ef41Sopenharmony_ci  The CARES_TOPLEVEL_DIR variable is the same as the automatically
3151cb0ef41Sopenharmony_ci  created PROJECT_SOURCE_DIR variable. Let's stick to the official
3161cb0ef41Sopenharmony_ci  one. Also because it is already used at places where CARES_TOPLEVEL_DIR
3171cb0ef41Sopenharmony_ci  is used as well.
3181cb0ef41Sopenharmony_ci  
3191cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
3201cb0ef41Sopenharmony_ci
3211cb0ef41Sopenharmony_ciBrad House (5 Jan 2024)
3221cb0ef41Sopenharmony_ci- test: fix outdated license headers
3231cb0ef41Sopenharmony_ci
3241cb0ef41Sopenharmony_ci- RELEASE-NOTES -> RELEASE-NOTES.md
3251cb0ef41Sopenharmony_ci
3261cb0ef41Sopenharmony_ci- update format slightly
3271cb0ef41Sopenharmony_ci
3281cb0ef41Sopenharmony_ci- update release notes format
3291cb0ef41Sopenharmony_ci
3301cb0ef41Sopenharmony_ciVersion 1.25.0 (2 Jan 2024)
3311cb0ef41Sopenharmony_ci
3321cb0ef41Sopenharmony_ciGitHub (2 Jan 2024)
3331cb0ef41Sopenharmony_ci- [Brad House brought this change]
3341cb0ef41Sopenharmony_ci
3351cb0ef41Sopenharmony_ci  1.25.0 release prep (#676)
3361cb0ef41Sopenharmony_ci
3371cb0ef41Sopenharmony_ciBrad House (31 Dec 2023)
3381cb0ef41Sopenharmony_ci- tests: replace google DNS with CloudFlare for reverse lookups as google's servers stopped responding properly
3391cb0ef41Sopenharmony_ci
3401cb0ef41Sopenharmony_ci- 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.
3411cb0ef41Sopenharmony_ci
3421cb0ef41Sopenharmony_ci- autotools: update logic for building tests to provide more feedback
3431cb0ef41Sopenharmony_ci
3441cb0ef41Sopenharmony_ci- set winver consistently across build systems
3451cb0ef41Sopenharmony_ci
3461cb0ef41Sopenharmony_ciGitHub (28 Dec 2023)
3471cb0ef41Sopenharmony_ci- [Brad House brought this change]
3481cb0ef41Sopenharmony_ci
3491cb0ef41Sopenharmony_ci  Autotools: rework to simplify and fix recent issues (#674)
3501cb0ef41Sopenharmony_ci  
3511cb0ef41Sopenharmony_ci  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).
3521cb0ef41Sopenharmony_ci  
3531cb0ef41Sopenharmony_ci  Changes include:
3541cb0ef41Sopenharmony_ci  
3551cb0ef41Sopenharmony_ci  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.
3561cb0ef41Sopenharmony_ci  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.
3571cb0ef41Sopenharmony_ci  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.
3581cb0ef41Sopenharmony_ci  Only require CARES_STATICLIB definition on Windows static builds, its not necessary ever for other systems, even when hiding non-public symbols.
3591cb0ef41Sopenharmony_ci  Remove some function and definition detections that were never used in c-ares
3601cb0ef41Sopenharmony_ci  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.
3611cb0ef41Sopenharmony_ci  As a side-effect of the changes, a configure run completes in about 25% of the original time.
3621cb0ef41Sopenharmony_ci  
3631cb0ef41Sopenharmony_ci  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.
3641cb0ef41Sopenharmony_ci  
3651cb0ef41Sopenharmony_ci  Fixes Bug: #670
3661cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
3671cb0ef41Sopenharmony_ci
3681cb0ef41Sopenharmony_ciBrad House (22 Dec 2023)
3691cb0ef41Sopenharmony_ci- docs: host -> ip
3701cb0ef41Sopenharmony_ci  
3711cb0ef41Sopenharmony_ci  fix mismatched documentation stating host instead of ip
3721cb0ef41Sopenharmony_ci  
3731cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
3741cb0ef41Sopenharmony_ci
3751cb0ef41Sopenharmony_ciGitHub (21 Dec 2023)
3761cb0ef41Sopenharmony_ci- [Brad House brought this change]
3771cb0ef41Sopenharmony_ci
3781cb0ef41Sopenharmony_ci  Old MacOS SDKs require you include sys/socket.h before net/if.h (#673)
3791cb0ef41Sopenharmony_ci  
3801cb0ef41Sopenharmony_ci  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.
3811cb0ef41Sopenharmony_ci  
3821cb0ef41Sopenharmony_ci  Fixes Issue: #672
3831cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
3841cb0ef41Sopenharmony_ci
3851cb0ef41Sopenharmony_ci- [Brad House brought this change]
3861cb0ef41Sopenharmony_ci
3871cb0ef41Sopenharmony_ci  Autotools warning fixes (#671)
3881cb0ef41Sopenharmony_ci  
3891cb0ef41Sopenharmony_ci  * get rid of clashes with curl namespace
3901cb0ef41Sopenharmony_ci  * remove warnings due to deprecated functionality
3911cb0ef41Sopenharmony_ci  * reorder some macro calls to get rid of warnings due to being called in the wrong order
3921cb0ef41Sopenharmony_ci  
3931cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
3941cb0ef41Sopenharmony_ci
3951cb0ef41Sopenharmony_ciBrad House (19 Dec 2023)
3961cb0ef41Sopenharmony_ci- clang-format
3971cb0ef41Sopenharmony_ci
3981cb0ef41Sopenharmony_ci- ares_strsplit() rewrite as wrapper around ares__buf_split()
3991cb0ef41Sopenharmony_ci  
4001cb0ef41Sopenharmony_ci  We want to limit as much as possible any hand written parsers.
4011cb0ef41Sopenharmony_ci  ares__buf_split() uses the new memory-safe parsing routines.  This
4021cb0ef41Sopenharmony_ci  adds a couple of additional flags to remove duplicates which the
4031cb0ef41Sopenharmony_ci  existing split code did.
4041cb0ef41Sopenharmony_ci  
4051cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4061cb0ef41Sopenharmony_ci
4071cb0ef41Sopenharmony_ci- clang-format
4081cb0ef41Sopenharmony_ci
4091cb0ef41Sopenharmony_ci- sonarcloud: const
4101cb0ef41Sopenharmony_ci
4111cb0ef41Sopenharmony_ci- Connection failure should increment server failure count first
4121cb0ef41Sopenharmony_ci  
4131cb0ef41Sopenharmony_ci  In order to be sure a different server is chosen on the next query,
4141cb0ef41Sopenharmony_ci  a read error should result in the failure count being updated
4151cb0ef41Sopenharmony_ci  first before requeing the request to a different server.
4161cb0ef41Sopenharmony_ci  
4171cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4181cb0ef41Sopenharmony_ci
4191cb0ef41Sopenharmony_ciGitHub (18 Dec 2023)
4201cb0ef41Sopenharmony_ci- [Brad House brought this change]
4211cb0ef41Sopenharmony_ci
4221cb0ef41Sopenharmony_ci  ahost should use ares_getaddrinfo() these days (#669)
4231cb0ef41Sopenharmony_ci  
4241cb0ef41Sopenharmony_ci  ahost wasn't printing both ipv4 and ipv6 addresses. This day and age, it really should.
4251cb0ef41Sopenharmony_ci  
4261cb0ef41Sopenharmony_ci  This PR also adds the ability to specify the servers to use.
4271cb0ef41Sopenharmony_ci  
4281cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4291cb0ef41Sopenharmony_ci
4301cb0ef41Sopenharmony_ciBrad House (17 Dec 2023)
4311cb0ef41Sopenharmony_ci- Fix bad stub for ares__iface_ips_enumerate()
4321cb0ef41Sopenharmony_ci  
4331cb0ef41Sopenharmony_ci  If the ability to enumerate interface ip addresses does not exist
4341cb0ef41Sopenharmony_ci  on a system, the stub function contained the wrong prototype.
4351cb0ef41Sopenharmony_ci  
4361cb0ef41Sopenharmony_ci  Fixes Bug: #668
4371cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4381cb0ef41Sopenharmony_ci
4391cb0ef41Sopenharmony_ciGitHub (17 Dec 2023)
4401cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
4411cb0ef41Sopenharmony_ci
4421cb0ef41Sopenharmony_ci  Fix minor warnings and documentation typos (#666)
4431cb0ef41Sopenharmony_ci  
4441cb0ef41Sopenharmony_ci  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)
4451cb0ef41Sopenharmony_ci  
4461cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
4471cb0ef41Sopenharmony_ci
4481cb0ef41Sopenharmony_ci- [Brad House brought this change]
4491cb0ef41Sopenharmony_ci
4501cb0ef41Sopenharmony_ci  CI: Add Alpine Linux and old Ubuntu (#667)
4511cb0ef41Sopenharmony_ci  
4521cb0ef41Sopenharmony_ci  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.
4531cb0ef41Sopenharmony_ci  
4541cb0ef41Sopenharmony_ci  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.
4551cb0ef41Sopenharmony_ci  
4561cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4571cb0ef41Sopenharmony_ci
4581cb0ef41Sopenharmony_ciBrad House (17 Dec 2023)
4591cb0ef41Sopenharmony_ci- fix support with older google test versions
4601cb0ef41Sopenharmony_ci
4611cb0ef41Sopenharmony_ci- getrandom() may require sys/random.h on some systems
4621cb0ef41Sopenharmony_ci  
4631cb0ef41Sopenharmony_ci  There is a reported build issue where getrandom() is detected
4641cb0ef41Sopenharmony_ci  but compile fails due to a missing prototype. This commit attempts
4651cb0ef41Sopenharmony_ci  to resolve that issue.
4661cb0ef41Sopenharmony_ci  
4671cb0ef41Sopenharmony_ci  Fixes Bug: #665
4681cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4691cb0ef41Sopenharmony_ci
4701cb0ef41Sopenharmony_ciGitHub (17 Dec 2023)
4711cb0ef41Sopenharmony_ci- [Martin Chang brought this change]
4721cb0ef41Sopenharmony_ci
4731cb0ef41Sopenharmony_ci  Use SOCK_DNS extension on socket on OpenBSD (#659)
4741cb0ef41Sopenharmony_ci  
4751cb0ef41Sopenharmony_ci  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.
4761cb0ef41Sopenharmony_ci  
4771cb0ef41Sopenharmony_ci  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.
4781cb0ef41Sopenharmony_ci  
4791cb0ef41Sopenharmony_ci  Fix By: Martin Chang (@marty1885)
4801cb0ef41Sopenharmony_ci
4811cb0ef41Sopenharmony_ciBrad House (17 Dec 2023)
4821cb0ef41Sopenharmony_ci- ci: disable static for symbol hiding tests
4831cb0ef41Sopenharmony_ci
4841cb0ef41Sopenharmony_ci- ci: add test case for building with hidden symbol visibility
4851cb0ef41Sopenharmony_ci
4861cb0ef41Sopenharmony_ci- fix test building with symbol hiding
4871cb0ef41Sopenharmony_ci  
4881cb0ef41Sopenharmony_ci  New test cases depend on internal symbols for calculating timeouts.
4891cb0ef41Sopenharmony_ci  Disable those test features if symbol hiding is enabled.
4901cb0ef41Sopenharmony_ci  
4911cb0ef41Sopenharmony_ci  Fixes Bug: #664
4921cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
4931cb0ef41Sopenharmony_ci
4941cb0ef41Sopenharmony_ciVersion 1.24.0 (16 Dec 2023)
4951cb0ef41Sopenharmony_ci
4961cb0ef41Sopenharmony_ciGitHub (16 Dec 2023)
4971cb0ef41Sopenharmony_ci- [Brad House brought this change]
4981cb0ef41Sopenharmony_ci
4991cb0ef41Sopenharmony_ci  ares_cancel() could trigger callback with wrong response code (#663)
5001cb0ef41Sopenharmony_ci  
5011cb0ef41Sopenharmony_ci  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.
5021cb0ef41Sopenharmony_ci  
5031cb0ef41Sopenharmony_ci  Test case has been added for this specific condition.
5041cb0ef41Sopenharmony_ci  
5051cb0ef41Sopenharmony_ci  Fixes Bug: #662
5061cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5071cb0ef41Sopenharmony_ci
5081cb0ef41Sopenharmony_ci- [Brad House brought this change]
5091cb0ef41Sopenharmony_ci
5101cb0ef41Sopenharmony_ci  rand: allow fallback from OS (#661)
5111cb0ef41Sopenharmony_ci  
5121cb0ef41Sopenharmony_ci  getrandom() can fail with ENOSYS if the libc supports the function but the kernel does not.
5131cb0ef41Sopenharmony_ci  
5141cb0ef41Sopenharmony_ci  Fixes Bug: #660
5151cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5161cb0ef41Sopenharmony_ci
5171cb0ef41Sopenharmony_ci- [Brad House brought this change]
5181cb0ef41Sopenharmony_ci
5191cb0ef41Sopenharmony_ci  1.24.0 release prep (#657)
5201cb0ef41Sopenharmony_ci
5211cb0ef41Sopenharmony_ciBrad House (11 Dec 2023)
5221cb0ef41Sopenharmony_ci- reference alternative to ares_getsock() in docs
5231cb0ef41Sopenharmony_ci
5241cb0ef41Sopenharmony_ci- tag some functions as deprecated in docs
5251cb0ef41Sopenharmony_ci
5261cb0ef41Sopenharmony_ci- Coverity: fix allocation size as reported in new code
5271cb0ef41Sopenharmony_ci
5281cb0ef41Sopenharmony_ci- remove dead code: ares_iphlpapi.h
5291cb0ef41Sopenharmony_ci
5301cb0ef41Sopenharmony_ci- remove dead code: bitncmp
5311cb0ef41Sopenharmony_ci
5321cb0ef41Sopenharmony_ciGitHub (9 Dec 2023)
5331cb0ef41Sopenharmony_ci- [Brad House brought this change]
5341cb0ef41Sopenharmony_ci
5351cb0ef41Sopenharmony_ci  Use external GoogleTest instead of bundling it (#655)
5361cb0ef41Sopenharmony_ci  
5371cb0ef41Sopenharmony_ci  GoogleTest should be unbundled. Google changed their guidance a few years back and modern versions of google test cannot build the bundling code file.
5381cb0ef41Sopenharmony_ci  
5391cb0ef41Sopenharmony_ci  This PR also updates to use C++14 as is required by modern GoogleTest versions.
5401cb0ef41Sopenharmony_ci  
5411cb0ef41Sopenharmony_ci  Fixes Bug: #506
5421cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5431cb0ef41Sopenharmony_ci
5441cb0ef41Sopenharmony_ciBrad House (8 Dec 2023)
5451cb0ef41Sopenharmony_ci- use IF_NAMESIZE instead of IFNAMSIZ to avoid warning
5461cb0ef41Sopenharmony_ci
5471cb0ef41Sopenharmony_ci- remove redundant cast
5481cb0ef41Sopenharmony_ci
5491cb0ef41Sopenharmony_ci- clang-format and fix one warning
5501cb0ef41Sopenharmony_ci
5511cb0ef41Sopenharmony_ciGitHub (8 Dec 2023)
5521cb0ef41Sopenharmony_ci- [Brad House brought this change]
5531cb0ef41Sopenharmony_ci
5541cb0ef41Sopenharmony_ci  Clean up some Windows-only warnings (#654)
5551cb0ef41Sopenharmony_ci  
5561cb0ef41Sopenharmony_ci  Windows was emitting some warnings due to datatype differences.
5571cb0ef41Sopenharmony_ci  
5581cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5591cb0ef41Sopenharmony_ci
5601cb0ef41Sopenharmony_ci- [Brad House brought this change]
5611cb0ef41Sopenharmony_ci
5621cb0ef41Sopenharmony_ci  Rewrite sortlist hand parser for memory safety and bugs (#653)
5631cb0ef41Sopenharmony_ci  
5641cb0ef41Sopenharmony_ci  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.
5651cb0ef41Sopenharmony_ci  
5661cb0ef41Sopenharmony_ci  Fixes Bug: #501
5671cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5681cb0ef41Sopenharmony_ci
5691cb0ef41Sopenharmony_ciBrad House (8 Dec 2023)
5701cb0ef41Sopenharmony_ci- enhance timeout test case to make sure it will re-use a previously downed server
5711cb0ef41Sopenharmony_ci
5721cb0ef41Sopenharmony_ci- enhance timeout test case
5731cb0ef41Sopenharmony_ci
5741cb0ef41Sopenharmony_ci- SonarCloud: make const
5751cb0ef41Sopenharmony_ci
5761cb0ef41Sopenharmony_ciGitHub (7 Dec 2023)
5771cb0ef41Sopenharmony_ci- [Brad House brought this change]
5781cb0ef41Sopenharmony_ci
5791cb0ef41Sopenharmony_ci  increment failures on timeout (#651)
5801cb0ef41Sopenharmony_ci  
5811cb0ef41Sopenharmony_ci  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.
5821cb0ef41Sopenharmony_ci  
5831cb0ef41Sopenharmony_ci  This PR fixes the bug and adds a test case to ensure it behaves properly.
5841cb0ef41Sopenharmony_ci  
5851cb0ef41Sopenharmony_ci  Fixes Bug: #650
5861cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
5871cb0ef41Sopenharmony_ci
5881cb0ef41Sopenharmony_ci- [Brad House brought this change]
5891cb0ef41Sopenharmony_ci
5901cb0ef41Sopenharmony_ci  Windows UBSAN tests (#649)
5911cb0ef41Sopenharmony_ci  
5921cb0ef41Sopenharmony_ci  Fix UBSAN error, and enable UBSAN testing in AppVeyor.
5931cb0ef41Sopenharmony_ci  
5941cb0ef41Sopenharmony_ci  Fixes Bug #648
5951cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
5961cb0ef41Sopenharmony_ci
5971cb0ef41Sopenharmony_ci- [Brad House brought this change]
5981cb0ef41Sopenharmony_ci
5991cb0ef41Sopenharmony_ci  Support ipv6 link-local servers and %iface syntax (#646)
6001cb0ef41Sopenharmony_ci  
6011cb0ef41Sopenharmony_ci  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.
6021cb0ef41Sopenharmony_ci  
6031cb0ef41Sopenharmony_ci  This PR adds support for the %iface modifier when setting DNS servers via `/etc/resolv.conf` as well as via `ares_set_servers_csv()`.
6041cb0ef41Sopenharmony_ci  
6051cb0ef41Sopenharmony_ci  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.
6061cb0ef41Sopenharmony_ci  
6071cb0ef41Sopenharmony_ci  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.
6081cb0ef41Sopenharmony_ci  
6091cb0ef41Sopenharmony_ci  At this point, Android support does not exist.
6101cb0ef41Sopenharmony_ci  
6111cb0ef41Sopenharmony_ci  Fixes Bug #462
6121cb0ef41Sopenharmony_ci  Supersedes PR #463
6131cb0ef41Sopenharmony_ci  
6141cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352) and Serhii Purik (@sergvpurik)
6151cb0ef41Sopenharmony_ci
6161cb0ef41Sopenharmony_ciBrad House (4 Dec 2023)
6171cb0ef41Sopenharmony_ci- silence openwatcom warning due to qcache_max_ttl being unsigned
6181cb0ef41Sopenharmony_ci
6191cb0ef41Sopenharmony_ci- ares__round_up_pow2() work around bogus warning
6201cb0ef41Sopenharmony_ci  
6211cb0ef41Sopenharmony_ci  On 32bit systems, a codeblock that would intentionally never
6221cb0ef41Sopenharmony_ci  be executed was emitting a warning.  Rework the code to
6231cb0ef41Sopenharmony_ci  prevent the warning.  More code, no behavior difference, but
6241cb0ef41Sopenharmony_ci  keeps people from complaining about the warning...
6251cb0ef41Sopenharmony_ci  
6261cb0ef41Sopenharmony_ci  Fixes Bug: #645
6271cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
6281cb0ef41Sopenharmony_ci
6291cb0ef41Sopenharmony_ci- try to move AC_USE_SYSTEM_EXTENSIONS
6301cb0ef41Sopenharmony_ci
6311cb0ef41Sopenharmony_ci- Enable system extensions
6321cb0ef41Sopenharmony_ci  
6331cb0ef41Sopenharmony_ci  Certain defines are needed on some systems to enable functionality like
6341cb0ef41Sopenharmony_ci  pthread recursive mutexes.
6351cb0ef41Sopenharmony_ci  
6361cb0ef41Sopenharmony_ci  Fixes #644
6371cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
6381cb0ef41Sopenharmony_ci
6391cb0ef41Sopenharmony_ci- ares_init_options() with invalid options values should unset the option
6401cb0ef41Sopenharmony_ci  
6411cb0ef41Sopenharmony_ci  Apparently nodejs is relying on the above behavior for legacy reasons.  Add
6421cb0ef41Sopenharmony_ci  sanity checks to the various optmask parameters where it makes sense.
6431cb0ef41Sopenharmony_ci  
6441cb0ef41Sopenharmony_ci  See https://github.com/nodejs/node/pull/50800
6451cb0ef41Sopenharmony_ci  
6461cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
6471cb0ef41Sopenharmony_ci
6481cb0ef41Sopenharmony_ci- SonarCloud: silence bogus reported error
6491cb0ef41Sopenharmony_ci
6501cb0ef41Sopenharmony_ci- clang-format
6511cb0ef41Sopenharmony_ci
6521cb0ef41Sopenharmony_ciGitHub (2 Dec 2023)
6531cb0ef41Sopenharmony_ci- [Brad House brought this change]
6541cb0ef41Sopenharmony_ci
6551cb0ef41Sopenharmony_ci  Nameserver parsing: replace another hand-written parser (#643)
6561cb0ef41Sopenharmony_ci  
6571cb0ef41Sopenharmony_ci  This replaces the nameserver parsing code with code that use ares__buf_*() in the name of memory safety.
6581cb0ef41Sopenharmony_ci  
6591cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
6601cb0ef41Sopenharmony_ci
6611cb0ef41Sopenharmony_ciVersion 1.23.0 (28 Nov 2023)
6621cb0ef41Sopenharmony_ci
6631cb0ef41Sopenharmony_ciGitHub (28 Nov 2023)
6641cb0ef41Sopenharmony_ci- [Brad House brought this change]
6651cb0ef41Sopenharmony_ci
6661cb0ef41Sopenharmony_ci  1.23.0 release prep (#641)
6671cb0ef41Sopenharmony_ci
6681cb0ef41Sopenharmony_ciBrad House (28 Nov 2023)
6691cb0ef41Sopenharmony_ci- add missing manpage to distribution list
6701cb0ef41Sopenharmony_ci
6711cb0ef41Sopenharmony_ci- clang-format
6721cb0ef41Sopenharmony_ci
6731cb0ef41Sopenharmony_ci- remove a simply
6741cb0ef41Sopenharmony_ci
6751cb0ef41Sopenharmony_ci- fix doc typo
6761cb0ef41Sopenharmony_ci
6771cb0ef41Sopenharmony_ci- ares_init_options with ARES_OPT_UDP_PORT wrong byte order
6781cb0ef41Sopenharmony_ci  
6791cb0ef41Sopenharmony_ci  Regression from c-ares 1.19.1, ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT are
6801cb0ef41Sopenharmony_ci  specified from the user in host-byte order, but there was a regression that
6811cb0ef41Sopenharmony_ci  caused it to be read as if it was network byte order.
6821cb0ef41Sopenharmony_ci  
6831cb0ef41Sopenharmony_ci  Fixes Bug: #640
6841cb0ef41Sopenharmony_ci  Reported By: @Flow86
6851cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
6861cb0ef41Sopenharmony_ci
6871cb0ef41Sopenharmony_ci- fix ares_threadsafety() prototype
6881cb0ef41Sopenharmony_ci
6891cb0ef41Sopenharmony_ciGitHub (28 Nov 2023)
6901cb0ef41Sopenharmony_ci- [Brad House brought this change]
6911cb0ef41Sopenharmony_ci
6921cb0ef41Sopenharmony_ci  Basic Thread Safety (#636)
6931cb0ef41Sopenharmony_ci  
6941cb0ef41Sopenharmony_ci  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.
6951cb0ef41Sopenharmony_ci  
6961cb0ef41Sopenharmony_ci  Fixes Bug: #610
6971cb0ef41Sopenharmony_ci  
6981cb0ef41Sopenharmony_ci  Also sets the stage to implement #611
6991cb0ef41Sopenharmony_ci  
7001cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
7011cb0ef41Sopenharmony_ci
7021cb0ef41Sopenharmony_ci- [petrvh brought this change]
7031cb0ef41Sopenharmony_ci
7041cb0ef41Sopenharmony_ci  ares_getaddrinfo(): do not use search domains if ARES_FLAG_NOSEARCH is set (#638)
7051cb0ef41Sopenharmony_ci  
7061cb0ef41Sopenharmony_ci  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.
7071cb0ef41Sopenharmony_ci  
7081cb0ef41Sopenharmony_ci  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).
7091cb0ef41Sopenharmony_ci  
7101cb0ef41Sopenharmony_ci  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() )
7111cb0ef41Sopenharmony_ci  
7121cb0ef41Sopenharmony_ci  Fix By: @petrvh
7131cb0ef41Sopenharmony_ci
7141cb0ef41Sopenharmony_ciBrad House (25 Nov 2023)
7151cb0ef41Sopenharmony_ci- Fix MacOS version test
7161cb0ef41Sopenharmony_ci  
7171cb0ef41Sopenharmony_ci  It appears that the Issue #454 wasn't really fixed for some reason.  This commit should fix the detection.
7181cb0ef41Sopenharmony_ci  
7191cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
7201cb0ef41Sopenharmony_ci
7211cb0ef41Sopenharmony_ciDaniel Stenberg (24 Nov 2023)
7221cb0ef41Sopenharmony_ci- CI: codespell
7231cb0ef41Sopenharmony_ci  
7241cb0ef41Sopenharmony_ci  Closes #635
7251cb0ef41Sopenharmony_ci
7261cb0ef41Sopenharmony_ciGitHub (24 Nov 2023)
7271cb0ef41Sopenharmony_ci- [Christian Clauss brought this change]
7281cb0ef41Sopenharmony_ci
7291cb0ef41Sopenharmony_ci  Fix typos discovered by codespell (#634)
7301cb0ef41Sopenharmony_ci  
7311cb0ef41Sopenharmony_ci  % `codespell --ignore-words-list="aas,aci,acter,atleast,contentss,firey,fo,sais,seh,statics"`
7321cb0ef41Sopenharmony_ci  * https://pypi.org/project/codespell
7331cb0ef41Sopenharmony_ci  
7341cb0ef41Sopenharmony_ci  Fix By: Christian Clauss (@cclauss)
7351cb0ef41Sopenharmony_ci
7361cb0ef41Sopenharmony_ciBrad House (22 Nov 2023)
7371cb0ef41Sopenharmony_ci- environment is meant as an override for sysconfig
7381cb0ef41Sopenharmony_ci
7391cb0ef41Sopenharmony_ciGitHub (22 Nov 2023)
7401cb0ef41Sopenharmony_ci- [Ignat brought this change]
7411cb0ef41Sopenharmony_ci
7421cb0ef41Sopenharmony_ci  Support attempts and timeout options from resolv.conf (#632)
7431cb0ef41Sopenharmony_ci  
7441cb0ef41Sopenharmony_ci  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).
7451cb0ef41Sopenharmony_ci  
7461cb0ef41Sopenharmony_ci  I add support of `attempts` and `timeout` options
7471cb0ef41Sopenharmony_ci  
7481cb0ef41Sopenharmony_ci  Fix By: Ignat (@Kontakter)
7491cb0ef41Sopenharmony_ci
7501cb0ef41Sopenharmony_ci- [Brad House brought this change]
7511cb0ef41Sopenharmony_ci
7521cb0ef41Sopenharmony_ci  more precise timeout calculation (#633)
7531cb0ef41Sopenharmony_ci  
7541cb0ef41Sopenharmony_ci  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.
7551cb0ef41Sopenharmony_ci  
7561cb0ef41Sopenharmony_ci  Fixes Bug: #631
7571cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
7581cb0ef41Sopenharmony_ci
7591cb0ef41Sopenharmony_ci- [Christian Clauss brought this change]
7601cb0ef41Sopenharmony_ci
7611cb0ef41Sopenharmony_ci  INSTALL.md: Fix typo (#630)
7621cb0ef41Sopenharmony_ci  
7631cb0ef41Sopenharmony_ci  Fix By: Christian Clauss (@cclauss)
7641cb0ef41Sopenharmony_ci
7651cb0ef41Sopenharmony_ciBrad House (19 Nov 2023)
7661cb0ef41Sopenharmony_ci- SonarCloud: fix minor codesmells
7671cb0ef41Sopenharmony_ci
7681cb0ef41Sopenharmony_ci- fix test case regression due to missing parens
7691cb0ef41Sopenharmony_ci
7701cb0ef41Sopenharmony_ci- now that warnings are enabled on test cases, clear a bunch of warnings
7711cb0ef41Sopenharmony_ci
7721cb0ef41Sopenharmony_ci- CMake: CXXFLAGS environment wasn't being read because C++ compiler was enabled after settings warnings.
7731cb0ef41Sopenharmony_ci
7741cb0ef41Sopenharmony_ci- fix additional windows test warnings
7751cb0ef41Sopenharmony_ci
7761cb0ef41Sopenharmony_ci- cleanup some Windows warnings in test
7771cb0ef41Sopenharmony_ci
7781cb0ef41Sopenharmony_ci- clang-format
7791cb0ef41Sopenharmony_ci
7801cb0ef41Sopenharmony_ciGitHub (19 Nov 2023)
7811cb0ef41Sopenharmony_ci- [Brad House brought this change]
7821cb0ef41Sopenharmony_ci
7831cb0ef41Sopenharmony_ci  Fix Windows UWP (Store) building and add to CI/CD (#627)
7841cb0ef41Sopenharmony_ci  
7851cb0ef41Sopenharmony_ci  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.
7861cb0ef41Sopenharmony_ci  
7871cb0ef41Sopenharmony_ci  Fix By: Deal (@halx99) and Brad House (@bradh352)
7881cb0ef41Sopenharmony_ci
7891cb0ef41Sopenharmony_ciBrad House (19 Nov 2023)
7901cb0ef41Sopenharmony_ci- ares_set_servers_*() should allow an empty server list
7911cb0ef41Sopenharmony_ci  
7921cb0ef41Sopenharmony_ci  For historic reasons, we have users depending on ares_set_servers_*()
7931cb0ef41Sopenharmony_ci  to return ARES_SUCCESS when passing no servers and actually *clear*
7941cb0ef41Sopenharmony_ci  the server list.  It appears they do this for test cases to simulate
7951cb0ef41Sopenharmony_ci  DNS unavailable or similar.  Presumably they could achieve the same
7961cb0ef41Sopenharmony_ci  effect in other ways (point to localhost on a port that isn't in use).
7971cb0ef41Sopenharmony_ci  But it seems like this might be wide-spread enough to cause headaches
7981cb0ef41Sopenharmony_ci  so we just will document and test for this behavior, clearly it hasn't
7991cb0ef41Sopenharmony_ci  caused "issues" for anyone with the old behavior.
8001cb0ef41Sopenharmony_ci  
8011cb0ef41Sopenharmony_ci  See: https://github.com/nodejs/node/pull/50800
8021cb0ef41Sopenharmony_ci  
8031cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
8041cb0ef41Sopenharmony_ci
8051cb0ef41Sopenharmony_ciGitHub (19 Nov 2023)
8061cb0ef41Sopenharmony_ci- [Brad House brought this change]
8071cb0ef41Sopenharmony_ci
8081cb0ef41Sopenharmony_ci  Query Cache support (#625)
8091cb0ef41Sopenharmony_ci  
8101cb0ef41Sopenharmony_ci  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.
8111cb0ef41Sopenharmony_ci  
8121cb0ef41Sopenharmony_ci  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).
8131cb0ef41Sopenharmony_ci  
8141cb0ef41Sopenharmony_ci  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.
8151cb0ef41Sopenharmony_ci  
8161cb0ef41Sopenharmony_ci  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.
8171cb0ef41Sopenharmony_ci  
8181cb0ef41Sopenharmony_ci  Due to the internal data structures we have these days, this PR is less than 500 lines of new code.
8191cb0ef41Sopenharmony_ci  
8201cb0ef41Sopenharmony_ci  Fixes #608
8211cb0ef41Sopenharmony_ci  
8221cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
8231cb0ef41Sopenharmony_ci
8241cb0ef41Sopenharmony_ciVersion 1.22.1 (17 Nov 2023)
8251cb0ef41Sopenharmony_ci
8261cb0ef41Sopenharmony_ciGitHub (17 Nov 2023)
8271cb0ef41Sopenharmony_ci- [Brad House brought this change]
8281cb0ef41Sopenharmony_ci
8291cb0ef41Sopenharmony_ci  1.22.1 release prep (#624)
8301cb0ef41Sopenharmony_ci
8311cb0ef41Sopenharmony_ciBrad House (17 Nov 2023)
8321cb0ef41Sopenharmony_ci- ares__htable_strvp should be case-insensitive
8331cb0ef41Sopenharmony_ci
8341cb0ef41Sopenharmony_ci- optimize: large /etc/hosts files reading
8351cb0ef41Sopenharmony_ci  
8361cb0ef41Sopenharmony_ci  profiling found some hot paths that could be optimized to reduce
8371cb0ef41Sopenharmony_ci  insert times into the cache.
8381cb0ef41Sopenharmony_ci  
8391cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
8401cb0ef41Sopenharmony_ci
8411cb0ef41Sopenharmony_ci- Fix /etc/hosts processing performance with all entries using same IP address
8421cb0ef41Sopenharmony_ci  
8431cb0ef41Sopenharmony_ci  Some users use blacklist files like https://github.com/StevenBlack/hosts which
8441cb0ef41Sopenharmony_ci  can contain 200k+ host entries all pointing to 0.0.0.0.  Due to the merge
8451cb0ef41Sopenharmony_ci  logic in the new hosts processor, all those entries will be associated as
8461cb0ef41Sopenharmony_ci  aliases for the same ip address.
8471cb0ef41Sopenharmony_ci  
8481cb0ef41Sopenharmony_ci  The first issue is that it attempts to check the status of all the hosts for
8491cb0ef41Sopenharmony_ci  the merged entry, when it should only be checking the new hosts added to the
8501cb0ef41Sopenharmony_ci  merged entry, so this caused exponential time as the entries got longer.
8511cb0ef41Sopenharmony_ci  
8521cb0ef41Sopenharmony_ci  The next issue is if searching for one of those hosts, it would append all
8531cb0ef41Sopenharmony_ci  the matches as cnames/aliases, but there is zero use for 200k aliases
8541cb0ef41Sopenharmony_ci  being appended to a lookup, so we are artificially capping this to 100.
8551cb0ef41Sopenharmony_ci  
8561cb0ef41Sopenharmony_ci  Bug report reference: https://bugs.gentoo.org/917400
8571cb0ef41Sopenharmony_ci  
8581cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
8591cb0ef41Sopenharmony_ci
8601cb0ef41Sopenharmony_ci- new badges
8611cb0ef41Sopenharmony_ci
8621cb0ef41Sopenharmony_ci- OpenWatcom: time_t is unsigned, change math using time_t to promote to a 64bit signed integer
8631cb0ef41Sopenharmony_ci
8641cb0ef41Sopenharmony_ci- fix more docs
8651cb0ef41Sopenharmony_ci
8661cb0ef41Sopenharmony_ciGitHub (15 Nov 2023)
8671cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
8681cb0ef41Sopenharmony_ci
8691cb0ef41Sopenharmony_ci  Fix typos and man page whatis entry (#619)
8701cb0ef41Sopenharmony_ci  
8711cb0ef41Sopenharmony_ci  Those issues were detected by lintian.
8721cb0ef41Sopenharmony_ci  
8731cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
8741cb0ef41Sopenharmony_ci
8751cb0ef41Sopenharmony_ci- [Douglas R. Reno brought this change]
8761cb0ef41Sopenharmony_ci
8771cb0ef41Sopenharmony_ci  Fix building c-ares-1.22.0 and higher under Watcom. (#623)
8781cb0ef41Sopenharmony_ci  
8791cb0ef41Sopenharmony_ci  Update config-win32.h to define HAVE_STDINT_H when OpenWatcom is in use.
8801cb0ef41Sopenharmony_ci  
8811cb0ef41Sopenharmony_ci  Fix By: Douglas R. Reno (@renodr)
8821cb0ef41Sopenharmony_ci
8831cb0ef41Sopenharmony_ciBrad House (15 Nov 2023)
8841cb0ef41Sopenharmony_ci- OpenWatcom: fix PR building
8851cb0ef41Sopenharmony_ci
8861cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8871cb0ef41Sopenharmony_ci
8881cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8891cb0ef41Sopenharmony_ci
8901cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8911cb0ef41Sopenharmony_ci
8921cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8931cb0ef41Sopenharmony_ci
8941cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8951cb0ef41Sopenharmony_ci
8961cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8971cb0ef41Sopenharmony_ci
8981cb0ef41Sopenharmony_ci- CI/CD: Add OpenWatcom
8991cb0ef41Sopenharmony_ci
9001cb0ef41Sopenharmony_ci- warnings: try to prevent warnings due to automatic integer promotion
9011cb0ef41Sopenharmony_ci
9021cb0ef41Sopenharmony_ci- only push to coverity weekly or on explicit coverity_scan branch commits
9031cb0ef41Sopenharmony_ci
9041cb0ef41Sopenharmony_ci- try to cleanup bogus compiler warnings
9051cb0ef41Sopenharmony_ci
9061cb0ef41Sopenharmony_ci- try to cleanup bogus compiler warnings
9071cb0ef41Sopenharmony_ci
9081cb0ef41Sopenharmony_ci- additional test coverage
9091cb0ef41Sopenharmony_ci
9101cb0ef41Sopenharmony_ci- Coverity: omit tests
9111cb0ef41Sopenharmony_ci
9121cb0ef41Sopenharmony_ci- Coverity: more
9131cb0ef41Sopenharmony_ci
9141cb0ef41Sopenharmony_ci- Coverity: silence false positives
9151cb0ef41Sopenharmony_ci
9161cb0ef41Sopenharmony_ciVersion 1.22.0 (14 Nov 2023)
9171cb0ef41Sopenharmony_ci
9181cb0ef41Sopenharmony_ciBrad House (14 Nov 2023)
9191cb0ef41Sopenharmony_ci- fix workflow
9201cb0ef41Sopenharmony_ci
9211cb0ef41Sopenharmony_ci- try a different coverity workflow
9221cb0ef41Sopenharmony_ci
9231cb0ef41Sopenharmony_ciGitHub (14 Nov 2023)
9241cb0ef41Sopenharmony_ci- [Brad House brought this change]
9251cb0ef41Sopenharmony_ci
9261cb0ef41Sopenharmony_ci  coverity workflow (#618)
9271cb0ef41Sopenharmony_ci
9281cb0ef41Sopenharmony_ciBrad House (14 Nov 2023)
9291cb0ef41Sopenharmony_ci- typos
9301cb0ef41Sopenharmony_ci
9311cb0ef41Sopenharmony_ci- getaddrinfo ESERVICE
9321cb0ef41Sopenharmony_ci
9331cb0ef41Sopenharmony_ciGitHub (14 Nov 2023)
9341cb0ef41Sopenharmony_ci- [Brad House brought this change]
9351cb0ef41Sopenharmony_ci
9361cb0ef41Sopenharmony_ci  Release 1.22.0 (#616)
9371cb0ef41Sopenharmony_ci
9381cb0ef41Sopenharmony_ciBrad House (13 Nov 2023)
9391cb0ef41Sopenharmony_ci- SonarCloud: minor codesmells
9401cb0ef41Sopenharmony_ci
9411cb0ef41Sopenharmony_ci- clang-format
9421cb0ef41Sopenharmony_ci
9431cb0ef41Sopenharmony_ci- Extended RCODE in OPT RR PsuedoRecord should not be exposed directly, it should be presented as part of the normal rcode
9441cb0ef41Sopenharmony_ci
9451cb0ef41Sopenharmony_ci- Slight fixes for PR #615
9461cb0ef41Sopenharmony_ci  
9471cb0ef41Sopenharmony_ci  1. the maxtimeout must come at the end of the structure
9481cb0ef41Sopenharmony_ci  2. fix comment form to be C style
9491cb0ef41Sopenharmony_ci  3. fix timeplus randomness if statement
9501cb0ef41Sopenharmony_ci
9511cb0ef41Sopenharmony_ciGitHub (13 Nov 2023)
9521cb0ef41Sopenharmony_ci- [Brad House brought this change]
9531cb0ef41Sopenharmony_ci
9541cb0ef41Sopenharmony_ci  Add DNS record manpages (#615)
9551cb0ef41Sopenharmony_ci  
9561cb0ef41Sopenharmony_ci  The new DNS record parser and writer needs manpages. This PR implements those.
9571cb0ef41Sopenharmony_ci  
9581cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
9591cb0ef41Sopenharmony_ci
9601cb0ef41Sopenharmony_ci- [Ignat brought this change]
9611cb0ef41Sopenharmony_ci
9621cb0ef41Sopenharmony_ci  Randomize retry penalties to prevent thundering herd type issues (#606)
9631cb0ef41Sopenharmony_ci  
9641cb0ef41Sopenharmony_ci  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.
9651cb0ef41Sopenharmony_ci  
9661cb0ef41Sopenharmony_ci  This PR also creates a maximum timeout option to make sure the random value selected does not exceed this value.
9671cb0ef41Sopenharmony_ci  
9681cb0ef41Sopenharmony_ci  Fix By: Ignat (@Kontakter)
9691cb0ef41Sopenharmony_ci
9701cb0ef41Sopenharmony_ciBrad House (13 Nov 2023)
9711cb0ef41Sopenharmony_ci- fix typos
9721cb0ef41Sopenharmony_ci
9731cb0ef41Sopenharmony_ci- some simplification and better error handling
9741cb0ef41Sopenharmony_ci
9751cb0ef41Sopenharmony_ci- SonarCloud: fix some minor codesmells
9761cb0ef41Sopenharmony_ci
9771cb0ef41Sopenharmony_ciGitHub (12 Nov 2023)
9781cb0ef41Sopenharmony_ci- [Brad House brought this change]
9791cb0ef41Sopenharmony_ci
9801cb0ef41Sopenharmony_ci  Implement ares_reinit() to reload system configuration into existing channel (#614)
9811cb0ef41Sopenharmony_ci  
9821cb0ef41Sopenharmony_ci  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.
9831cb0ef41Sopenharmony_ci  
9841cb0ef41Sopenharmony_ci  Fixes Bug #301
9851cb0ef41Sopenharmony_ci  
9861cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
9871cb0ef41Sopenharmony_ci
9881cb0ef41Sopenharmony_ciBrad House (11 Nov 2023)
9891cb0ef41Sopenharmony_ci- test case ensures tag for caa is not blank
9901cb0ef41Sopenharmony_ci
9911cb0ef41Sopenharmony_ci- 0-length strings are ok
9921cb0ef41Sopenharmony_ci
9931cb0ef41Sopenharmony_ci- SonarCloud: fix up codesmells
9941cb0ef41Sopenharmony_ci
9951cb0ef41Sopenharmony_ciGitHub (11 Nov 2023)
9961cb0ef41Sopenharmony_ci- [Brad House brought this change]
9971cb0ef41Sopenharmony_ci
9981cb0ef41Sopenharmony_ci  rewrite adig using new helpers (#607)
9991cb0ef41Sopenharmony_ci  
10001cb0ef41Sopenharmony_ci  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.
10011cb0ef41Sopenharmony_ci  
10021cb0ef41Sopenharmony_ci  The adig format also now more closely resembles that of BIND's `dig` output.
10031cb0ef41Sopenharmony_ci  
10041cb0ef41Sopenharmony_ci  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.
10051cb0ef41Sopenharmony_ci  
10061cb0ef41Sopenharmony_ci  Example:
10071cb0ef41Sopenharmony_ci  ```
10081cb0ef41Sopenharmony_ci  ./adig -t ANY www.google.com
10091cb0ef41Sopenharmony_ci  
10101cb0ef41Sopenharmony_ci  ; <<>> c-ares DiG 1.21.0 <<>> www.google.com
10111cb0ef41Sopenharmony_ci  ;; Got answer:
10121cb0ef41Sopenharmony_ci  ;; ->>HEADER<<- opcode: QUERY, status: RCODE, id: 23913
10131cb0ef41Sopenharmony_ci  ;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 1
10141cb0ef41Sopenharmony_ci  
10151cb0ef41Sopenharmony_ci  ;; OPT PSEUDOSECTION:
10161cb0ef41Sopenharmony_ci  ; EDNS: version: 0, flags: 0; udp: 512
10171cb0ef41Sopenharmony_ci  ;; QUESTION SECTION:
10181cb0ef41Sopenharmony_ci  ;www.google.com.                        IN      ANY
10191cb0ef41Sopenharmony_ci  
10201cb0ef41Sopenharmony_ci  ;; ANSWER SECTION:
10211cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.99
10221cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.105
10231cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.103
10241cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.147
10251cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.104
10261cb0ef41Sopenharmony_ci  www.google.com.         162     IN      A       142.251.107.106
10271cb0ef41Sopenharmony_ci  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::93
10281cb0ef41Sopenharmony_ci  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::69
10291cb0ef41Sopenharmony_ci  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::68
10301cb0ef41Sopenharmony_ci  www.google.com.         162     IN      AAAA    2607:f8b0:400c:c32::6a
10311cb0ef41Sopenharmony_ci  www.google.com.         21462   IN      HTTPS   1 . alpn="h2,h3"
10321cb0ef41Sopenharmony_ci  
10331cb0ef41Sopenharmony_ci  ;; MSG SIZE  rcvd: 276
10341cb0ef41Sopenharmony_ci  ```
10351cb0ef41Sopenharmony_ci  
10361cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
10371cb0ef41Sopenharmony_ci
10381cb0ef41Sopenharmony_ci- [Brad House brought this change]
10391cb0ef41Sopenharmony_ci
10401cb0ef41Sopenharmony_ci  make dns parser/writer public (#604)
10411cb0ef41Sopenharmony_ci  
10421cb0ef41Sopenharmony_ci  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.
10431cb0ef41Sopenharmony_ci  
10441cb0ef41Sopenharmony_ci  A follow-up PR will be made which will transform `adig` to use the new parsers and helpers.
10451cb0ef41Sopenharmony_ci  
10461cb0ef41Sopenharmony_ci  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.
10471cb0ef41Sopenharmony_ci  
10481cb0ef41Sopenharmony_ci  The two aforementioned PRs will be done before the 1.22 release.
10491cb0ef41Sopenharmony_ci  
10501cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
10511cb0ef41Sopenharmony_ci
10521cb0ef41Sopenharmony_ciBrad House (9 Nov 2023)
10531cb0ef41Sopenharmony_ci- options helpers: fix dereference to properly return params
10541cb0ef41Sopenharmony_ci
10551cb0ef41Sopenharmony_ci- clang-format
10561cb0ef41Sopenharmony_ci
10571cb0ef41Sopenharmony_ciGitHub (9 Nov 2023)
10581cb0ef41Sopenharmony_ci- [Brad House brought this change]
10591cb0ef41Sopenharmony_ci
10601cb0ef41Sopenharmony_ci  Add SVCB and HTTPS RR (RFC 9460) (#603)
10611cb0ef41Sopenharmony_ci  
10621cb0ef41Sopenharmony_ci  This PR adds parsing and writing support for SVCB and HTTPS RRs as defined in RFC 9460.
10631cb0ef41Sopenharmony_ci  
10641cb0ef41Sopenharmony_ci  This should fix #566
10651cb0ef41Sopenharmony_ci  
10661cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
10671cb0ef41Sopenharmony_ci
10681cb0ef41Sopenharmony_ci- [Brad House brought this change]
10691cb0ef41Sopenharmony_ci
10701cb0ef41Sopenharmony_ci  OPT RR should support parsing key/value options (#602)
10711cb0ef41Sopenharmony_ci  
10721cb0ef41Sopenharmony_ci  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.
10731cb0ef41Sopenharmony_ci  
10741cb0ef41Sopenharmony_ci  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.
10751cb0ef41Sopenharmony_ci  
10761cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
10771cb0ef41Sopenharmony_ci
10781cb0ef41Sopenharmony_ciBrad House (8 Nov 2023)
10791cb0ef41Sopenharmony_ci- SonarCloud: fix some easy codesmells
10801cb0ef41Sopenharmony_ci
10811cb0ef41Sopenharmony_ci- clang-format
10821cb0ef41Sopenharmony_ci
10831cb0ef41Sopenharmony_ci- Mark a couple of parameters as const in the public API
10841cb0ef41Sopenharmony_ci
10851cb0ef41Sopenharmony_ciGitHub (7 Nov 2023)
10861cb0ef41Sopenharmony_ci- [Brad House brought this change]
10871cb0ef41Sopenharmony_ci
10881cb0ef41Sopenharmony_ci  Add TLSA record support (#600)
10891cb0ef41Sopenharmony_ci  
10901cb0ef41Sopenharmony_ci  As per #470, c-ares is missing a parser for the TLSA record format (RFC 6698). This PR introduces that parser.
10911cb0ef41Sopenharmony_ci  
10921cb0ef41Sopenharmony_ci  Once the new parser interface becomes public and this PR is merged, then #470 can be closed.
10931cb0ef41Sopenharmony_ci  
10941cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
10951cb0ef41Sopenharmony_ci
10961cb0ef41Sopenharmony_ciBrad House (7 Nov 2023)
10971cb0ef41Sopenharmony_ci- memory leak in test case
10981cb0ef41Sopenharmony_ci
10991cb0ef41Sopenharmony_ci- fix bad variable reference
11001cb0ef41Sopenharmony_ci
11011cb0ef41Sopenharmony_ci- DNS Write: fix name compression
11021cb0ef41Sopenharmony_ci
11031cb0ef41Sopenharmony_ci- SonarCloud: fix codesmells
11041cb0ef41Sopenharmony_ci
11051cb0ef41Sopenharmony_ci- Coverage: add tests for writing and parsing various record formats
11061cb0ef41Sopenharmony_ci
11071cb0ef41Sopenharmony_ciGitHub (7 Nov 2023)
11081cb0ef41Sopenharmony_ci- [Brad House brought this change]
11091cb0ef41Sopenharmony_ci
11101cb0ef41Sopenharmony_ci  DNS Record Write (#598)
11111cb0ef41Sopenharmony_ci  
11121cb0ef41Sopenharmony_ci  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.
11131cb0ef41Sopenharmony_ci  
11141cb0ef41Sopenharmony_ci  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()`.
11151cb0ef41Sopenharmony_ci  
11161cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
11171cb0ef41Sopenharmony_ci
11181cb0ef41Sopenharmony_ciBrad House (6 Nov 2023)
11191cb0ef41Sopenharmony_ci- PATH_RESOLV_CONF: use empty string instead of NULL to prevent warnings
11201cb0ef41Sopenharmony_ci
11211cb0ef41Sopenharmony_ci- build fix
11221cb0ef41Sopenharmony_ci
11231cb0ef41Sopenharmony_ci- const: fix some usecases
11241cb0ef41Sopenharmony_ci
11251cb0ef41Sopenharmony_ci- remove tests that depend on randomness
11261cb0ef41Sopenharmony_ci
11271cb0ef41Sopenharmony_ciGitHub (5 Nov 2023)
11281cb0ef41Sopenharmony_ci- [Brad House brought this change]
11291cb0ef41Sopenharmony_ci
11301cb0ef41Sopenharmony_ci  Use EDNS by default (#596)
11311cb0ef41Sopenharmony_ci  
11321cb0ef41Sopenharmony_ci  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.
11331cb0ef41Sopenharmony_ci  
11341cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
11351cb0ef41Sopenharmony_ci
11361cb0ef41Sopenharmony_ci- [Brad House brought this change]
11371cb0ef41Sopenharmony_ci
11381cb0ef41Sopenharmony_ci  `ares_channel` -> `ares_channel_t *`: don't bury the pointer (#595)
11391cb0ef41Sopenharmony_ci  
11401cb0ef41Sopenharmony_ci  `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`.
11411cb0ef41Sopenharmony_ci  
11421cb0ef41Sopenharmony_ci  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`.
11431cb0ef41Sopenharmony_ci  
11441cb0ef41Sopenharmony_ci  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.
11451cb0ef41Sopenharmony_ci  
11461cb0ef41Sopenharmony_ci  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).
11471cb0ef41Sopenharmony_ci  
11481cb0ef41Sopenharmony_ci  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 :)
11491cb0ef41Sopenharmony_ci  
11501cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
11511cb0ef41Sopenharmony_ci
11521cb0ef41Sopenharmony_ciBrad House (4 Nov 2023)
11531cb0ef41Sopenharmony_ci- win32 warnings look good, remove commented out block
11541cb0ef41Sopenharmony_ci
11551cb0ef41Sopenharmony_ci- more msvc warnings
11561cb0ef41Sopenharmony_ci
11571cb0ef41Sopenharmony_ci- fix
11581cb0ef41Sopenharmony_ci
11591cb0ef41Sopenharmony_ci- docs: document setting servers can be done live
11601cb0ef41Sopenharmony_ci
11611cb0ef41Sopenharmony_ci- SonarCloud: more easy codesmells
11621cb0ef41Sopenharmony_ci
11631cb0ef41Sopenharmony_ci- clang-format
11641cb0ef41Sopenharmony_ci
11651cb0ef41Sopenharmony_ci- SonarCloud: fix up codesmells
11661cb0ef41Sopenharmony_ci
11671cb0ef41Sopenharmony_ciGitHub (3 Nov 2023)
11681cb0ef41Sopenharmony_ci- [Brad House brought this change]
11691cb0ef41Sopenharmony_ci
11701cb0ef41Sopenharmony_ci  Dynamic Server List (#594)
11711cb0ef41Sopenharmony_ci  
11721cb0ef41Sopenharmony_ci  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.
11731cb0ef41Sopenharmony_ci  
11741cb0ef41Sopenharmony_ci  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.
11751cb0ef41Sopenharmony_ci  
11761cb0ef41Sopenharmony_ci  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.
11771cb0ef41Sopenharmony_ci  
11781cb0ef41Sopenharmony_ci  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.
11791cb0ef41Sopenharmony_ci  
11801cb0ef41Sopenharmony_ci  Finally, this PR moved some existing functions into new files to logically separate them.
11811cb0ef41Sopenharmony_ci  
11821cb0ef41Sopenharmony_ci  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.
11831cb0ef41Sopenharmony_ci  
11841cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
11851cb0ef41Sopenharmony_ci
11861cb0ef41Sopenharmony_ciBrad House (1 Nov 2023)
11871cb0ef41Sopenharmony_ci- no reason to run LSAN, ASAN already does it
11881cb0ef41Sopenharmony_ci
11891cb0ef41Sopenharmony_ciGitHub (31 Oct 2023)
11901cb0ef41Sopenharmony_ci- [Brad House brought this change]
11911cb0ef41Sopenharmony_ci
11921cb0ef41Sopenharmony_ci  AppVeyor: update compiler versions, use Msys2, and Windows fixes (#593)
11931cb0ef41Sopenharmony_ci  
11941cb0ef41Sopenharmony_ci  AppVeyor was using Visual Studio 2015 along with old versions of MinGW. Update to the latest AppVeyor provides and also add an MSYS2 build test using MinGW which will use the bleeding edge version.
11951cb0ef41Sopenharmony_ci  
11961cb0ef41Sopenharmony_ci  When researching #590 this also uncovered a bug in cmake not properly detecting if_indextoname() on windows. This has been corrected as well as the underlying issue reported in #590.
11971cb0ef41Sopenharmony_ci  
11981cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352) and Jonas Kvinge (@jonaski)
11991cb0ef41Sopenharmony_ci
12001cb0ef41Sopenharmony_ciBrad House (31 Oct 2023)
12011cb0ef41Sopenharmony_ci- Coverage: add some code misuse test cases
12021cb0ef41Sopenharmony_ci
12031cb0ef41Sopenharmony_ci- hosts file parsing should set success at end of loop
12041cb0ef41Sopenharmony_ci
12051cb0ef41Sopenharmony_ci- fix windows localhost for ares_gethostbyname_file() when /etc/hosts doesn't have an entry
12061cb0ef41Sopenharmony_ci
12071cb0ef41Sopenharmony_ci- SonarCloud: fix up codesmells (const, unneeded casts, reduce complexity)
12081cb0ef41Sopenharmony_ci
12091cb0ef41Sopenharmony_ciGitHub (30 Oct 2023)
12101cb0ef41Sopenharmony_ci- [Brad House brought this change]
12111cb0ef41Sopenharmony_ci
12121cb0ef41Sopenharmony_ci  Replace hosts parser, add caching capabilities (#591)
12131cb0ef41Sopenharmony_ci  
12141cb0ef41Sopenharmony_ci  HOSTS FILE PROCESSING OVERVIEW
12151cb0ef41Sopenharmony_ci  ==============================
12161cb0ef41Sopenharmony_ci  The hosts file on the system contains static entries to be processed locally
12171cb0ef41Sopenharmony_ci  rather than querying the nameserver.  Each row is an IP address followed by
12181cb0ef41Sopenharmony_ci  a list of space delimited hostnames that match the ip address.  This is used
12191cb0ef41Sopenharmony_ci  for both forward and reverse lookups.
12201cb0ef41Sopenharmony_ci  
12211cb0ef41Sopenharmony_ci  We are caching the entire parsed hosts file for performance reasons.  Some
12221cb0ef41Sopenharmony_ci  files may be quite sizable and as per Issue #458 can approach 1/2MB in size,
12231cb0ef41Sopenharmony_ci  and the parse overhead on a rapid succession of queries can be quite large.
12241cb0ef41Sopenharmony_ci  The entries are stored in forwards and backwards hashtables so we can get
12251cb0ef41Sopenharmony_ci  O(1) performance on lookup.  The file is cached until the file modification
12261cb0ef41Sopenharmony_ci  timestamp changes (or 60s if there is no implemented stat() capability).
12271cb0ef41Sopenharmony_ci  
12281cb0ef41Sopenharmony_ci  The hosts file processing is quite unique. It has to merge all related hosts
12291cb0ef41Sopenharmony_ci  and ips into a single entry due to file formatting requirements.  For
12301cb0ef41Sopenharmony_ci  instance take the below:
12311cb0ef41Sopenharmony_ci  ```
12321cb0ef41Sopenharmony_ci  127.0.0.1    localhost.localdomain localhost
12331cb0ef41Sopenharmony_ci  ::1          localhost.localdomain localhost
12341cb0ef41Sopenharmony_ci  192.168.1.1  host.example.com host
12351cb0ef41Sopenharmony_ci  192.168.1.5  host.example.com host
12361cb0ef41Sopenharmony_ci  2620:1234::1 host.example.com host6.example.com host6 host
12371cb0ef41Sopenharmony_ci  ```
12381cb0ef41Sopenharmony_ci  This will yield 2 entries.
12391cb0ef41Sopenharmony_ci  1) ips: `127.0.0.1,::1`
12401cb0ef41Sopenharmony_ci      hosts: `localhost.localdomain,localhost`
12411cb0ef41Sopenharmony_ci  2) ips: `192.168.1.1,192.168.1.5,2620:1234::1`
12421cb0ef41Sopenharmony_ci      hosts: `host.example.com,host,host6.example.com,host6`
12431cb0ef41Sopenharmony_ci  
12441cb0ef41Sopenharmony_ci  It could be argued that if searching for `192.168.1.1` that the `host6`
12451cb0ef41Sopenharmony_ci  hostnames should not be returned, but this implementation will return them
12461cb0ef41Sopenharmony_ci  since they are related (both ips have the fqdn of host.example.com).  It is
12471cb0ef41Sopenharmony_ci  unlikely this will matter in the real world.
12481cb0ef41Sopenharmony_ci  
12491cb0ef41Sopenharmony_ci  
12501cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
12511cb0ef41Sopenharmony_ci
12521cb0ef41Sopenharmony_ci- [Brad House brought this change]
12531cb0ef41Sopenharmony_ci
12541cb0ef41Sopenharmony_ci  cleanups: split functions out into different files, rename some to be more logical (#589)
12551cb0ef41Sopenharmony_ci
12561cb0ef41Sopenharmony_ciBrad House (27 Oct 2023)
12571cb0ef41Sopenharmony_ci- fix comment
12581cb0ef41Sopenharmony_ci
12591cb0ef41Sopenharmony_ci- recursive git attributes
12601cb0ef41Sopenharmony_ci
12611cb0ef41Sopenharmony_ciVersion 1.21.0 (26 Oct 2023)
12621cb0ef41Sopenharmony_ci
12631cb0ef41Sopenharmony_ciBrad House (26 Oct 2023)
12641cb0ef41Sopenharmony_ci- SonarCloud: reduce reported complexity that exists for no reason.
12651cb0ef41Sopenharmony_ci
12661cb0ef41Sopenharmony_ci- SonarCloud: fix some #undef codesmells
12671cb0ef41Sopenharmony_ci
12681cb0ef41Sopenharmony_ci- formatting
12691cb0ef41Sopenharmony_ci
12701cb0ef41Sopenharmony_ci- document ARES_RR_* records
12711cb0ef41Sopenharmony_ci
12721cb0ef41Sopenharmony_ci- no reason to limit on truncation
12731cb0ef41Sopenharmony_ci
12741cb0ef41Sopenharmony_ci- linguist fixes
12751cb0ef41Sopenharmony_ci
12761cb0ef41Sopenharmony_ci- don't use test cases to determine language of c-ares
12771cb0ef41Sopenharmony_ci
12781cb0ef41Sopenharmony_ci- fix grammar
12791cb0ef41Sopenharmony_ci
12801cb0ef41Sopenharmony_ci- fix count
12811cb0ef41Sopenharmony_ci
12821cb0ef41Sopenharmony_ciGitHub (25 Oct 2023)
12831cb0ef41Sopenharmony_ci- [Brad House brought this change]
12841cb0ef41Sopenharmony_ci
12851cb0ef41Sopenharmony_ci  1.21.0 release prep (#585)
12861cb0ef41Sopenharmony_ci
12871cb0ef41Sopenharmony_ciBrad House (25 Oct 2023)
12881cb0ef41Sopenharmony_ci- fix build warning
12891cb0ef41Sopenharmony_ci
12901cb0ef41Sopenharmony_ciGitHub (25 Oct 2023)
12911cb0ef41Sopenharmony_ci- [Brad House brought this change]
12921cb0ef41Sopenharmony_ci
12931cb0ef41Sopenharmony_ci  SonarCloud: clean up more codesmells (#584)
12941cb0ef41Sopenharmony_ci
12951cb0ef41Sopenharmony_ciBrad House (25 Oct 2023)
12961cb0ef41Sopenharmony_ci- resolve reported memory leaks
12971cb0ef41Sopenharmony_ci
12981cb0ef41Sopenharmony_ci- add test vector said to cause a memory leak
12991cb0ef41Sopenharmony_ci
13001cb0ef41Sopenharmony_ciGitHub (25 Oct 2023)
13011cb0ef41Sopenharmony_ci- [Brad House brought this change]
13021cb0ef41Sopenharmony_ci
13031cb0ef41Sopenharmony_ci  sonarcloud: fix more codesmells (#583)
13041cb0ef41Sopenharmony_ci
13051cb0ef41Sopenharmony_ci- [Brad House brought this change]
13061cb0ef41Sopenharmony_ci
13071cb0ef41Sopenharmony_ci  sonarcloud easy codesmells (#582)
13081cb0ef41Sopenharmony_ci  
13091cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13101cb0ef41Sopenharmony_ci
13111cb0ef41Sopenharmony_ci- [Brad House brought this change]
13121cb0ef41Sopenharmony_ci
13131cb0ef41Sopenharmony_ci  Modernization: replace multiple hand-parsers with new memory-safe parser (#581)
13141cb0ef41Sopenharmony_ci  
13151cb0ef41Sopenharmony_ci  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.
13161cb0ef41Sopenharmony_ci  
13171cb0ef41Sopenharmony_ci  The existing parser helpers for the various record types were reimplemented as wrappers around the new parser.
13181cb0ef41Sopenharmony_ci  
13191cb0ef41Sopenharmony_ci  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.
13201cb0ef41Sopenharmony_ci  
13211cb0ef41Sopenharmony_ci  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.
13221cb0ef41Sopenharmony_ci  
13231cb0ef41Sopenharmony_ci  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.
13241cb0ef41Sopenharmony_ci  
13251cb0ef41Sopenharmony_ci  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).
13261cb0ef41Sopenharmony_ci  
13271cb0ef41Sopenharmony_ci  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.
13281cb0ef41Sopenharmony_ci  
13291cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13301cb0ef41Sopenharmony_ci
13311cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
13321cb0ef41Sopenharmony_ci
13331cb0ef41Sopenharmony_ci  feat: use CMake to control symbol visibility (#574)
13341cb0ef41Sopenharmony_ci  
13351cb0ef41Sopenharmony_ci  In contrast to #572 this solution does not need any extra headers. But it is also limited to GCC-like compilers.
13361cb0ef41Sopenharmony_ci  
13371cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
13381cb0ef41Sopenharmony_ci
13391cb0ef41Sopenharmony_ci- [Brad House brought this change]
13401cb0ef41Sopenharmony_ci
13411cb0ef41Sopenharmony_ci  remove ares_nowarn helpers #580
13421cb0ef41Sopenharmony_ci  
13431cb0ef41Sopenharmony_ci  Now that the code internally is using proper datatypes, there is no longer a need for ares_nowarn helpers. Remove them.
13441cb0ef41Sopenharmony_ci  
13451cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13461cb0ef41Sopenharmony_ci
13471cb0ef41Sopenharmony_ciBrad House (16 Oct 2023)
13481cb0ef41Sopenharmony_ci- clang-format: fix structure alignment
13491cb0ef41Sopenharmony_ci  
13501cb0ef41Sopenharmony_ci  It appears the structure alignment chosen just doesn't work right.
13511cb0ef41Sopenharmony_ci  Switch to 'left', it appears to be mostly correct.
13521cb0ef41Sopenharmony_ci  
13531cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13541cb0ef41Sopenharmony_ci
13551cb0ef41Sopenharmony_ciGitHub (15 Oct 2023)
13561cb0ef41Sopenharmony_ci- [Brad House brought this change]
13571cb0ef41Sopenharmony_ci
13581cb0ef41Sopenharmony_ci  Reformat code using clang-format (#579)
13591cb0ef41Sopenharmony_ci  
13601cb0ef41Sopenharmony_ci  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).
13611cb0ef41Sopenharmony_ci  
13621cb0ef41Sopenharmony_ci  Can re-run the formatter on the codebase via:
13631cb0ef41Sopenharmony_ci  ```
13641cb0ef41Sopenharmony_ci  clang-format -i */*.c */*.h */*/*.c */*/*.h
13651cb0ef41Sopenharmony_ci  ```
13661cb0ef41Sopenharmony_ci  
13671cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13681cb0ef41Sopenharmony_ci
13691cb0ef41Sopenharmony_ciBrad House (15 Oct 2023)
13701cb0ef41Sopenharmony_ci- inet_ntop requires ares_private.h
13711cb0ef41Sopenharmony_ci
13721cb0ef41Sopenharmony_ci- SonarCloud: Fix additional code smells
13731cb0ef41Sopenharmony_ci  
13741cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13751cb0ef41Sopenharmony_ci
13761cb0ef41Sopenharmony_ci- SonarCloud: Ignore codesmells c89 doesn't support
13771cb0ef41Sopenharmony_ci  
13781cb0ef41Sopenharmony_ci  C89 doesn't support iterator declaration in for loop, kill warning.
13791cb0ef41Sopenharmony_ci  
13801cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13811cb0ef41Sopenharmony_ci
13821cb0ef41Sopenharmony_ciGitHub (15 Oct 2023)
13831cb0ef41Sopenharmony_ci- [Brad House brought this change]
13841cb0ef41Sopenharmony_ci
13851cb0ef41Sopenharmony_ci  set compiler standard to ISO C90/ANSI C89 (#577)
13861cb0ef41Sopenharmony_ci  
13871cb0ef41Sopenharmony_ci  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.
13881cb0ef41Sopenharmony_ci  
13891cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
13901cb0ef41Sopenharmony_ci
13911cb0ef41Sopenharmony_ciBrad House (15 Oct 2023)
13921cb0ef41Sopenharmony_ci- fix new ares_strcpy to ensure null termination
13931cb0ef41Sopenharmony_ci
13941cb0ef41Sopenharmony_ci- build fix
13951cb0ef41Sopenharmony_ci
13961cb0ef41Sopenharmony_ciGitHub (15 Oct 2023)
13971cb0ef41Sopenharmony_ci- [Brad House brought this change]
13981cb0ef41Sopenharmony_ci
13991cb0ef41Sopenharmony_ci  SonarCloud: Fix up codesmells due to strlen(), strcpy(), and strncpy() (#576)
14001cb0ef41Sopenharmony_ci  
14011cb0ef41Sopenharmony_ci  Create ares_strlen() and ares_strcpy() in order to resolve SonarCloud codesmells related to their use.
14021cb0ef41Sopenharmony_ci  
14031cb0ef41Sopenharmony_ci  ares_strlen() just becomes null-safe.
14041cb0ef41Sopenharmony_ci  
14051cb0ef41Sopenharmony_ci  ares_strcpy() is equivalent to strlcpy(), so unlike strncpy() it guarantees NULL termination.
14061cb0ef41Sopenharmony_ci  
14071cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14081cb0ef41Sopenharmony_ci
14091cb0ef41Sopenharmony_ciBrad House (15 Oct 2023)
14101cb0ef41Sopenharmony_ci- SonarCloud: try to appease it better
14111cb0ef41Sopenharmony_ci
14121cb0ef41Sopenharmony_ci- SonarCloud: Fix reported bugs
14131cb0ef41Sopenharmony_ci  
14141cb0ef41Sopenharmony_ci  SonarCloud reported a few bugs, this commit should fix those reports.
14151cb0ef41Sopenharmony_ci  
14161cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14171cb0ef41Sopenharmony_ci
14181cb0ef41Sopenharmony_ciGitHub (15 Oct 2023)
14191cb0ef41Sopenharmony_ci- [Brad House brought this change]
14201cb0ef41Sopenharmony_ci
14211cb0ef41Sopenharmony_ci  Fix internal datatype usage and warnings (#573)
14221cb0ef41Sopenharmony_ci  
14231cb0ef41Sopenharmony_ci  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).
14241cb0ef41Sopenharmony_ci  
14251cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14261cb0ef41Sopenharmony_ci
14271cb0ef41Sopenharmony_ciBrad House (15 Oct 2023)
14281cb0ef41Sopenharmony_ci- SonarCloud: exclude tests
14291cb0ef41Sopenharmony_ci
14301cb0ef41Sopenharmony_ci- fix source directories
14311cb0ef41Sopenharmony_ci
14321cb0ef41Sopenharmony_ciGitHub (15 Oct 2023)
14331cb0ef41Sopenharmony_ci- [Brad House brought this change]
14341cb0ef41Sopenharmony_ci
14351cb0ef41Sopenharmony_ci  Sonarcloud (#575)
14361cb0ef41Sopenharmony_ci
14371cb0ef41Sopenharmony_ci- [Brad House brought this change]
14381cb0ef41Sopenharmony_ci
14391cb0ef41Sopenharmony_ci  Increase compiler warnings by default (#568)
14401cb0ef41Sopenharmony_ci  
14411cb0ef41Sopenharmony_ci  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.
14421cb0ef41Sopenharmony_ci  
14431cb0ef41Sopenharmony_ci  This PR does cause some new warnings to be emitted, a follow-up PR will address those.
14441cb0ef41Sopenharmony_ci  
14451cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14461cb0ef41Sopenharmony_ci
14471cb0ef41Sopenharmony_ci- [Brad House brought this change]
14481cb0ef41Sopenharmony_ci
14491cb0ef41Sopenharmony_ci  introduce ares_bool_t datatype (#570)
14501cb0ef41Sopenharmony_ci  
14511cb0ef41Sopenharmony_ci  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.
14521cb0ef41Sopenharmony_ci  
14531cb0ef41Sopenharmony_ci  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.
14541cb0ef41Sopenharmony_ci  
14551cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14561cb0ef41Sopenharmony_ci
14571cb0ef41Sopenharmony_ciBrad House (12 Oct 2023)
14581cb0ef41Sopenharmony_ci- Socket callbacks were passed SOCK_STREAM instead of SOCK_DGRAM on udp
14591cb0ef41Sopenharmony_ci  
14601cb0ef41Sopenharmony_ci  A regression was introduced in 1.20.0 that would pass SOCK_STREAM on udp
14611cb0ef41Sopenharmony_ci  connections due to code refactoring.  If a client application validated this
14621cb0ef41Sopenharmony_ci  data, it could cause issues as seen in gRPC.
14631cb0ef41Sopenharmony_ci  
14641cb0ef41Sopenharmony_ci  Fixes Issue: #571
14651cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14661cb0ef41Sopenharmony_ci
14671cb0ef41Sopenharmony_ci- Enhance test of ares_getsock()
14681cb0ef41Sopenharmony_ci  
14691cb0ef41Sopenharmony_ci  In an attempt to see if ares_getsock() was broken as per #571, do
14701cb0ef41Sopenharmony_ci  further sanity checks of the results of ares_getsock().  It seems
14711cb0ef41Sopenharmony_ci  as though ares_getsock() is fine.
14721cb0ef41Sopenharmony_ci  
14731cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14741cb0ef41Sopenharmony_ci
14751cb0ef41Sopenharmony_ciGitHub (10 Oct 2023)
14761cb0ef41Sopenharmony_ci- [Brad House brought this change]
14771cb0ef41Sopenharmony_ci
14781cb0ef41Sopenharmony_ci  Tool: STAYOPEN flag could make tools not terminate (#569)
14791cb0ef41Sopenharmony_ci  
14801cb0ef41Sopenharmony_ci  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).
14811cb0ef41Sopenharmony_ci  
14821cb0ef41Sopenharmony_ci  Fixes Issue: #452
14831cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14841cb0ef41Sopenharmony_ci
14851cb0ef41Sopenharmony_ci- [Brad House brought this change]
14861cb0ef41Sopenharmony_ci
14871cb0ef41Sopenharmony_ci  ares_status_t enum for status codes (#567)
14881cb0ef41Sopenharmony_ci  
14891cb0ef41Sopenharmony_ci  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.
14901cb0ef41Sopenharmony_ci  
14911cb0ef41Sopenharmony_ci  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).
14921cb0ef41Sopenharmony_ci  
14931cb0ef41Sopenharmony_ci  All internal usages should be changed by this PR, but of course, there may be some I missed.
14941cb0ef41Sopenharmony_ci  
14951cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
14961cb0ef41Sopenharmony_ci
14971cb0ef41Sopenharmony_ciDaniel Stenberg (9 Oct 2023)
14981cb0ef41Sopenharmony_ci- docs: provide better man page references
14991cb0ef41Sopenharmony_ci  
15001cb0ef41Sopenharmony_ci  When referring to another c-ares function use \fI function(3) \fP to let
15011cb0ef41Sopenharmony_ci  the webpage rendering find and cross-link them appropriately.
15021cb0ef41Sopenharmony_ci  
15031cb0ef41Sopenharmony_ci  SEE ALSO references should be ".BR name (3),", with a space before the
15041cb0ef41Sopenharmony_ci  open parenthesis. This helps the manpage to HTML renderer.
15051cb0ef41Sopenharmony_ci  
15061cb0ef41Sopenharmony_ci  Closes #565
15071cb0ef41Sopenharmony_ci
15081cb0ef41Sopenharmony_ciVersion 1.20.1 (8 Oct 2023)
15091cb0ef41Sopenharmony_ci
15101cb0ef41Sopenharmony_ciGitHub (8 Oct 2023)
15111cb0ef41Sopenharmony_ci- [Daniel Stenberg brought this change]
15121cb0ef41Sopenharmony_ci
15131cb0ef41Sopenharmony_ci  ares-test:  silence warning (#564)
15141cb0ef41Sopenharmony_ci  
15151cb0ef41Sopenharmony_ci  warning: comparison of integer expressions of different signedness
15161cb0ef41Sopenharmony_ci  
15171cb0ef41Sopenharmony_ci  Fix By: Daniel Stenberg (@bagder)
15181cb0ef41Sopenharmony_ci
15191cb0ef41Sopenharmony_ciBrad House (8 Oct 2023)
15201cb0ef41Sopenharmony_ci- fix README.md
15211cb0ef41Sopenharmony_ci
15221cb0ef41Sopenharmony_ciGitHub (8 Oct 2023)
15231cb0ef41Sopenharmony_ci- [Brad House brought this change]
15241cb0ef41Sopenharmony_ci
15251cb0ef41Sopenharmony_ci  1.20.1 release (#563)
15261cb0ef41Sopenharmony_ci
15271cb0ef41Sopenharmony_ci- [Brad House brought this change]
15281cb0ef41Sopenharmony_ci
15291cb0ef41Sopenharmony_ci  fix reference to freed memory (#562)
15301cb0ef41Sopenharmony_ci  
15311cb0ef41Sopenharmony_ci  Issue #561 shows free'd memory could be accessed in some error conditions.
15321cb0ef41Sopenharmony_ci  
15331cb0ef41Sopenharmony_ci  Fixes Issue #561
15341cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
15351cb0ef41Sopenharmony_ci
15361cb0ef41Sopenharmony_ciBrad House (8 Oct 2023)
15371cb0ef41Sopenharmony_ci- reported build/test systems may timeout on intensive tests. reduce test case to still be relevant but to reduce false positive errors
15381cb0ef41Sopenharmony_ci
15391cb0ef41Sopenharmony_ciGitHub (8 Oct 2023)
15401cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
15411cb0ef41Sopenharmony_ci
15421cb0ef41Sopenharmony_ci  Regression: Fix typo in fuzzcheck target name (#559)
15431cb0ef41Sopenharmony_ci  
15441cb0ef41Sopenharmony_ci  This seems to be a vim'esque typo introduced with c1b00c41.
15451cb0ef41Sopenharmony_ci  
15461cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
15471cb0ef41Sopenharmony_ci
15481cb0ef41Sopenharmony_ciVersion 1.20.0 (6 Oct 2023)
15491cb0ef41Sopenharmony_ci
15501cb0ef41Sopenharmony_ciBrad House (6 Oct 2023)
15511cb0ef41Sopenharmony_ci- fix slist search off by 1
15521cb0ef41Sopenharmony_ci
15531cb0ef41Sopenharmony_ciGitHub (6 Oct 2023)
15541cb0ef41Sopenharmony_ci- [Brad House brought this change]
15551cb0ef41Sopenharmony_ci
15561cb0ef41Sopenharmony_ci  1.20.0 release prep (#557)
15571cb0ef41Sopenharmony_ci
15581cb0ef41Sopenharmony_ci- [Brad House brought this change]
15591cb0ef41Sopenharmony_ci
15601cb0ef41Sopenharmony_ci  ares__buf should return standard error codes.  more helpers implemented. (#558)
15611cb0ef41Sopenharmony_ci  
15621cb0ef41Sopenharmony_ci  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.
15631cb0ef41Sopenharmony_ci  
15641cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
15651cb0ef41Sopenharmony_ci
15661cb0ef41Sopenharmony_ci- [Brad House brought this change]
15671cb0ef41Sopenharmony_ci
15681cb0ef41Sopenharmony_ci  Update from 1989 MIT license text to modern MIT license text (#556)
15691cb0ef41Sopenharmony_ci  
15701cb0ef41Sopenharmony_ci  ares (and thus c-ares) was originally licensed under the 1989 MIT license text:
15711cb0ef41Sopenharmony_ci  https://fedoraproject.org/wiki/Licensing:MIT#Old_Style_(no_advertising_without_permission)
15721cb0ef41Sopenharmony_ci  
15731cb0ef41Sopenharmony_ci  This change updates the license to the modern MIT license as recognized here:
15741cb0ef41Sopenharmony_ci  https://opensource.org/license/mit/
15751cb0ef41Sopenharmony_ci  
15761cb0ef41Sopenharmony_ci  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.
15771cb0ef41Sopenharmony_ci  
15781cb0ef41Sopenharmony_ci  Please see PR #556 for the documented approvals by each contributor.
15791cb0ef41Sopenharmony_ci  
15801cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
15811cb0ef41Sopenharmony_ci
15821cb0ef41Sopenharmony_ci- [Brad House brought this change]
15831cb0ef41Sopenharmony_ci
15841cb0ef41Sopenharmony_ci  Test Harness: use ares_timeout() to calculate the value to pass to select() these days. (#555)
15851cb0ef41Sopenharmony_ci  
15861cb0ef41Sopenharmony_ci  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.
15871cb0ef41Sopenharmony_ci  
15881cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
15891cb0ef41Sopenharmony_ci
15901cb0ef41Sopenharmony_ci- [Brad House brought this change]
15911cb0ef41Sopenharmony_ci
15921cb0ef41Sopenharmony_ci  Fix for TCP back to back queries (#552)
15931cb0ef41Sopenharmony_ci  
15941cb0ef41Sopenharmony_ci  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.
15951cb0ef41Sopenharmony_ci  
15961cb0ef41Sopenharmony_ci  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.
15971cb0ef41Sopenharmony_ci  
15981cb0ef41Sopenharmony_ci  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.
15991cb0ef41Sopenharmony_ci  
16001cb0ef41Sopenharmony_ci  Fixes: #206, #266
16011cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16021cb0ef41Sopenharmony_ci
16031cb0ef41Sopenharmony_ci- [Brad House brought this change]
16041cb0ef41Sopenharmony_ci
16051cb0ef41Sopenharmony_ci  remove acountry from built tools as nerd.dk is gone (#554)
16061cb0ef41Sopenharmony_ci  
16071cb0ef41Sopenharmony_ci  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.
16081cb0ef41Sopenharmony_ci  
16091cb0ef41Sopenharmony_ci  Fixes: #537
16101cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16111cb0ef41Sopenharmony_ci
16121cb0ef41Sopenharmony_ci- [Brad House brought this change]
16131cb0ef41Sopenharmony_ci
16141cb0ef41Sopenharmony_ci  Don't requeue any queries for getaddrinfo() during destruction. (#553)
16151cb0ef41Sopenharmony_ci  
16161cb0ef41Sopenharmony_ci  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.
16171cb0ef41Sopenharmony_ci  
16181cb0ef41Sopenharmony_ci  Fixes #532
16191cb0ef41Sopenharmony_ci  Fix By: @Chilledheart and Brad House (@bradh352)
16201cb0ef41Sopenharmony_ci
16211cb0ef41Sopenharmony_ci- [Brad House brought this change]
16221cb0ef41Sopenharmony_ci
16231cb0ef41Sopenharmony_ci  ares_getaddrinfo(): Fail faster on AF_UNSPEC if we've already received one address class  (#551)
16241cb0ef41Sopenharmony_ci  
16251cb0ef41Sopenharmony_ci  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.
16261cb0ef41Sopenharmony_ci  
16271cb0ef41Sopenharmony_ci  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.
16281cb0ef41Sopenharmony_ci  
16291cb0ef41Sopenharmony_ci  Fixes Bug: #541
16301cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16311cb0ef41Sopenharmony_ci
16321cb0ef41Sopenharmony_ci- [Sam Morris brought this change]
16331cb0ef41Sopenharmony_ci
16341cb0ef41Sopenharmony_ci  Avoid producing an ill-formed result when qualifying a name with the root domain (#546)
16351cb0ef41Sopenharmony_ci  
16361cb0ef41Sopenharmony_ci  This prevents the result of qualifying "name" with "." being "name.." which is ill-formed.
16371cb0ef41Sopenharmony_ci  
16381cb0ef41Sopenharmony_ci  Fixes Bug: #545
16391cb0ef41Sopenharmony_ci  Fix By: Sam Morris (@yrro)
16401cb0ef41Sopenharmony_ci
16411cb0ef41Sopenharmony_ci- [Brad House brought this change]
16421cb0ef41Sopenharmony_ci
16431cb0ef41Sopenharmony_ci  Configuration option to limit number of UDP queries per ephemeral port (#549)
16441cb0ef41Sopenharmony_ci  
16451cb0ef41Sopenharmony_ci  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.
16461cb0ef41Sopenharmony_ci  
16471cb0ef41Sopenharmony_ci  Implementation Details:
16481cb0ef41Sopenharmony_ci  * 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.
16491cb0ef41Sopenharmony_ci  * Queries are now tracked by connection rather than by server.
16501cb0ef41Sopenharmony_ci  * 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.
16511cb0ef41Sopenharmony_ci  * Insertion, lookup, and searching for connections has been implemented as O(1) complexity so the number of connections will not impact performance.
16521cb0ef41Sopenharmony_ci  * 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.
16531cb0ef41Sopenharmony_ci  * Various other cleanups to remove code duplication and for clarification.
16541cb0ef41Sopenharmony_ci  
16551cb0ef41Sopenharmony_ci  Fixes Bug: #444
16561cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16571cb0ef41Sopenharmony_ci
16581cb0ef41Sopenharmony_ci- [Brad House brought this change]
16591cb0ef41Sopenharmony_ci
16601cb0ef41Sopenharmony_ci  its not 1991 anymore, lower default timeout and retry count (#542)
16611cb0ef41Sopenharmony_ci  
16621cb0ef41Sopenharmony_ci  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.
16631cb0ef41Sopenharmony_ci  
16641cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16651cb0ef41Sopenharmony_ci
16661cb0ef41Sopenharmony_ci- [Brad House brought this change]
16671cb0ef41Sopenharmony_ci
16681cb0ef41Sopenharmony_ci  Modernization: Implement base data-structures and replace usage (#540)
16691cb0ef41Sopenharmony_ci  
16701cb0ef41Sopenharmony_ci  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).
16711cb0ef41Sopenharmony_ci  
16721cb0ef41Sopenharmony_ci  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.
16731cb0ef41Sopenharmony_ci  
16741cb0ef41Sopenharmony_ci  The primary motivation for this PR is to facilitate future implementation for Issues #444, #135, #458, and possibly #301
16751cb0ef41Sopenharmony_ci  
16761cb0ef41Sopenharmony_ci  A couple additional notes:
16771cb0ef41Sopenharmony_ci  
16781cb0ef41Sopenharmony_ci  The ares_timeout() function is now O(1) complexity instead of O(n) due to the use of a skiplist.
16791cb0ef41Sopenharmony_ci  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.
16801cb0ef41Sopenharmony_ci  Fixed some dead code warnings in ares_rand for systems that don't need rc4
16811cb0ef41Sopenharmony_ci  
16821cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
16831cb0ef41Sopenharmony_ci
16841cb0ef41Sopenharmony_ci- [Jérôme Duval brought this change]
16851cb0ef41Sopenharmony_ci
16861cb0ef41Sopenharmony_ci  fix missing prefix for CMake generated libcares.pc (#530)
16871cb0ef41Sopenharmony_ci  
16881cb0ef41Sopenharmony_ci  'pkg-config grpc --cflags' complains with:
16891cb0ef41Sopenharmony_ci  Variable 'prefix' not defined in libcares.pc
16901cb0ef41Sopenharmony_ci  
16911cb0ef41Sopenharmony_ci  Fix By: Jérôme Duval (@korli)
16921cb0ef41Sopenharmony_ci
16931cb0ef41Sopenharmony_cibradh352 (11 Jul 2023)
16941cb0ef41Sopenharmony_ci- windows get_DNS_Windows port fix for ipv6
16951cb0ef41Sopenharmony_ci
16961cb0ef41Sopenharmony_ci- windows get_DNS_Windows port is in network byte order
16971cb0ef41Sopenharmony_ci
16981cb0ef41Sopenharmony_ci- backoff to debian 11 due to coverage check failure
16991cb0ef41Sopenharmony_ci
17001cb0ef41Sopenharmony_ci- extend on PR #534, windows should also honor a port
17011cb0ef41Sopenharmony_ci
17021cb0ef41Sopenharmony_ciGitHub (11 Jul 2023)
17031cb0ef41Sopenharmony_ci- [Brad House brought this change]
17041cb0ef41Sopenharmony_ci
17051cb0ef41Sopenharmony_ci  Support configuration of DNS server ports (#534)
17061cb0ef41Sopenharmony_ci  
17071cb0ef41Sopenharmony_ci  As per https://man.openbsd.org/OpenBSD-5.1/resolv.conf.5 we should
17081cb0ef41Sopenharmony_ci  support bracketed syntax for resolv.conf entries to contain an optional
17091cb0ef41Sopenharmony_ci  port number.
17101cb0ef41Sopenharmony_ci  
17111cb0ef41Sopenharmony_ci  We also need to utilize this format for configuration of MacOS
17121cb0ef41Sopenharmony_ci  DNS servers as seen when using the Viscosity OpenVPN client, where
17131cb0ef41Sopenharmony_ci  it starts a private DNS server listening on localhost on a non-standard
17141cb0ef41Sopenharmony_ci  port.
17151cb0ef41Sopenharmony_ci  
17161cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
17171cb0ef41Sopenharmony_ci
17181cb0ef41Sopenharmony_ciDaniel Stenberg (9 Jun 2023)
17191cb0ef41Sopenharmony_ci- provide SPDX identifiers and a REUSE CI job to verify
17201cb0ef41Sopenharmony_ci  
17211cb0ef41Sopenharmony_ci  All files have their licence and copyright information clearly
17221cb0ef41Sopenharmony_ci  identifiable. If not in the file header, they are set separately in
17231cb0ef41Sopenharmony_ci  .reuse/dep5.
17241cb0ef41Sopenharmony_ci  
17251cb0ef41Sopenharmony_ci  All used license texts are provided in LICENSES/
17261cb0ef41Sopenharmony_ci
17271cb0ef41Sopenharmony_ciGitHub (30 May 2023)
17281cb0ef41Sopenharmony_ci- [Alexey A Tikhonov brought this change]
17291cb0ef41Sopenharmony_ci
17301cb0ef41Sopenharmony_ci  Remove unreachable code as reported by Coverity (#527)
17311cb0ef41Sopenharmony_ci  
17321cb0ef41Sopenharmony_ci  Coverity reported some code as unreachable.  A manual inspection confirmed the reports.
17331cb0ef41Sopenharmony_ci  
17341cb0ef41Sopenharmony_ci  Fix By: Alexey A Tikhonov (@alexey-tikhonov)
17351cb0ef41Sopenharmony_ci
17361cb0ef41Sopenharmony_ci- [Ben Noordhuis brought this change]
17371cb0ef41Sopenharmony_ci
17381cb0ef41Sopenharmony_ci  rand: add support for getrandom() (#526)
17391cb0ef41Sopenharmony_ci  
17401cb0ef41Sopenharmony_ci  glibc provides arc4random_buf() but musl does not and /dev/urandom is
17411cb0ef41Sopenharmony_ci  not always available.
17421cb0ef41Sopenharmony_ci
17431cb0ef41Sopenharmony_ci- [Tim Wojtulewicz brought this change]
17441cb0ef41Sopenharmony_ci
17451cb0ef41Sopenharmony_ci  Replace uses of sprintf with snprintf (#525)
17461cb0ef41Sopenharmony_ci  
17471cb0ef41Sopenharmony_ci  sprintf isn't safe even if you think you are using it right.  Switch to snprintf().
17481cb0ef41Sopenharmony_ci  
17491cb0ef41Sopenharmony_ci  Fix By: Tim Wojtulewicz (@timwoj)
17501cb0ef41Sopenharmony_ci
17511cb0ef41Sopenharmony_cibradh352 (23 May 2023)
17521cb0ef41Sopenharmony_ci- update version and release procedure
17531cb0ef41Sopenharmony_ci
17541cb0ef41Sopenharmony_ciGitHub (22 May 2023)
17551cb0ef41Sopenharmony_ci- [Douglas R. Reno brought this change]
17561cb0ef41Sopenharmony_ci
17571cb0ef41Sopenharmony_ci  INSTALL.md: Add Watcom instructions and update Windows documentation URLs (#524)
17581cb0ef41Sopenharmony_ci  
17591cb0ef41Sopenharmony_ci  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.
17601cb0ef41Sopenharmony_ci  
17611cb0ef41Sopenharmony_ci  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.
17621cb0ef41Sopenharmony_ci  
17631cb0ef41Sopenharmony_ci  Fix By: Douglas R. Reno (@renodr)
17641cb0ef41Sopenharmony_ci
17651cb0ef41Sopenharmony_ciVersion 1.19.1 (22 May 2023)
17661cb0ef41Sopenharmony_ci
17671cb0ef41Sopenharmony_cibradh352 (22 May 2023)
17681cb0ef41Sopenharmony_ci- Makefile.inc Windows requires tabs not spaces for nmake
17691cb0ef41Sopenharmony_ci
17701cb0ef41Sopenharmony_ciGitHub (22 May 2023)
17711cb0ef41Sopenharmony_ci- [Daniel Stenberg brought this change]
17721cb0ef41Sopenharmony_ci
17731cb0ef41Sopenharmony_ci  ares_expand_name: fix compiler warnings (#522)
17741cb0ef41Sopenharmony_ci  
17751cb0ef41Sopenharmony_ci  Fix some compiler warnings (not introduced in this release)
17761cb0ef41Sopenharmony_ci  
17771cb0ef41Sopenharmony_ci  Fix By: Daniel Stenberg (@bagder)
17781cb0ef41Sopenharmony_ci
17791cb0ef41Sopenharmony_cibradh352 (22 May 2023)
17801cb0ef41Sopenharmony_ci- windows MSVC compiler fix on 32bit
17811cb0ef41Sopenharmony_ci
17821cb0ef41Sopenharmony_ci- update security advisory links
17831cb0ef41Sopenharmony_ci
17841cb0ef41Sopenharmony_ci- minor CI issues fixes for imported inet_net_pton
17851cb0ef41Sopenharmony_ci
17861cb0ef41Sopenharmony_ci- ares_rand static analysis fixes from CI
17871cb0ef41Sopenharmony_ci
17881cb0ef41Sopenharmony_ci- windows build fix
17891cb0ef41Sopenharmony_ci
17901cb0ef41Sopenharmony_ci- security release notes
17911cb0ef41Sopenharmony_ci
17921cb0ef41Sopenharmony_ciGitHub (22 May 2023)
17931cb0ef41Sopenharmony_ci- [Brad House brought this change]
17941cb0ef41Sopenharmony_ci
17951cb0ef41Sopenharmony_ci  Merge pull request from GHSA-9g78-jv2r-p7vc
17961cb0ef41Sopenharmony_ci
17971cb0ef41Sopenharmony_ci- [Brad House brought this change]
17981cb0ef41Sopenharmony_ci
17991cb0ef41Sopenharmony_ci  Merge pull request from GHSA-x6mf-cxr9-8q6v
18001cb0ef41Sopenharmony_ci  
18011cb0ef41Sopenharmony_ci  * Merged latest OpenBSD changes for inet_net_pton_ipv6() into c-ares.
18021cb0ef41Sopenharmony_ci  * Always use our own IP conversion functions now, do not delegate to OS
18031cb0ef41Sopenharmony_ci    so we can have consistency in testing and fuzzing.
18041cb0ef41Sopenharmony_ci  * Removed bogus test cases that never should have passed.
18051cb0ef41Sopenharmony_ci  * Add new test case for crash bug found.
18061cb0ef41Sopenharmony_ci  
18071cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
18081cb0ef41Sopenharmony_ci
18091cb0ef41Sopenharmony_ci- [Brad House brought this change]
18101cb0ef41Sopenharmony_ci
18111cb0ef41Sopenharmony_ci  Merge pull request from GHSA-8r8p-23f3-64c2
18121cb0ef41Sopenharmony_ci  
18131cb0ef41Sopenharmony_ci  * segment random number generation into own file
18141cb0ef41Sopenharmony_ci  
18151cb0ef41Sopenharmony_ci  * abstract random code to make it more modular so we can have multiple backends
18161cb0ef41Sopenharmony_ci  
18171cb0ef41Sopenharmony_ci  * rand: add support for arc4random_buf() and also direct CARES_RANDOM_FILE reading
18181cb0ef41Sopenharmony_ci  
18191cb0ef41Sopenharmony_ci  * autotools: fix detection of arc4random_buf
18201cb0ef41Sopenharmony_ci  
18211cb0ef41Sopenharmony_ci  * rework initial rc4 seed for PRNG as last fallback
18221cb0ef41Sopenharmony_ci  
18231cb0ef41Sopenharmony_ci  * rc4: more proper implementation, simplified for clarity
18241cb0ef41Sopenharmony_ci  
18251cb0ef41Sopenharmony_ci  * clarifications
18261cb0ef41Sopenharmony_ci
18271cb0ef41Sopenharmony_cibradh352 (20 May 2023)
18281cb0ef41Sopenharmony_ci- add public release note information
18291cb0ef41Sopenharmony_ci
18301cb0ef41Sopenharmony_ci- bump version to 1.19.1
18311cb0ef41Sopenharmony_ci
18321cb0ef41Sopenharmony_ciGitHub (6 May 2023)
18331cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
18341cb0ef41Sopenharmony_ci
18351cb0ef41Sopenharmony_ci  test: fix warning about uninitialized memory (#515)
18361cb0ef41Sopenharmony_ci  
18371cb0ef41Sopenharmony_ci  fix warning in tests
18381cb0ef41Sopenharmony_ci  
18391cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
18401cb0ef41Sopenharmony_ci
18411cb0ef41Sopenharmony_ci- [lifenjoiner brought this change]
18421cb0ef41Sopenharmony_ci
18431cb0ef41Sopenharmony_ci  Turn off IPV6_V6ONLY on Windows if it is supported (#520)
18441cb0ef41Sopenharmony_ci  
18451cb0ef41Sopenharmony_ci  Turn off IPV6_V6ONLY on Windows if it is supported, support for IPv4-mapped IPv6 addresses.
18461cb0ef41Sopenharmony_ci  
18471cb0ef41Sopenharmony_ci  IPV6_V6ONLY refs:
18481cb0ef41Sopenharmony_ci  https://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses
18491cb0ef41Sopenharmony_ci  https://github.com/golang/go/blob/master/src/net/ipsock_posix.go
18501cb0ef41Sopenharmony_ci  https://en.wikipedia.org/wiki/Unix-like
18511cb0ef41Sopenharmony_ci  off:
18521cb0ef41Sopenharmony_ci  https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
18531cb0ef41Sopenharmony_ci  https://man.netbsd.org/inet6.4
18541cb0ef41Sopenharmony_ci  https://man.freebsd.org/cgi/man.cgi?query=inet6
18551cb0ef41Sopenharmony_ci  https://github.com/apple-oss-distributions/xnu/blob/main/bsd/man/man4/inet6.4
18561cb0ef41Sopenharmony_ci  on:
18571cb0ef41Sopenharmony_ci  https://learn.microsoft.com/en-us/windows/win32/winsock/ipproto-ipv6-socket-options
18581cb0ef41Sopenharmony_ci  acts like off, but returns 1 and dummy setting:
18591cb0ef41Sopenharmony_ci  https://man.dragonflybsd.org/?command=inet6
18601cb0ef41Sopenharmony_ci  https://man.dragonflybsd.org/?command=ip6
18611cb0ef41Sopenharmony_ci  unsupported and read-only returns 1:
18621cb0ef41Sopenharmony_ci  https://man.openbsd.org/inet6.4
18631cb0ef41Sopenharmony_ci  
18641cb0ef41Sopenharmony_ci  default value refs:
18651cb0ef41Sopenharmony_ci  https://datatracker.ietf.org/doc/html/rfc3493#section-5.3
18661cb0ef41Sopenharmony_ci  https://www.kernel.org/doc/html/latest/networking/ip-sysctl.html#proc-sys-net-ipv6-variables
18671cb0ef41Sopenharmony_ci
18681cb0ef41Sopenharmony_ci- [Brad House brought this change]
18691cb0ef41Sopenharmony_ci
18701cb0ef41Sopenharmony_ci  Merge pull request from GHSA-54xr-f67r-4pc4
18711cb0ef41Sopenharmony_ci  
18721cb0ef41Sopenharmony_ci  * CARES_RANDOM_FILE should always default to /dev/urandom
18731cb0ef41Sopenharmony_ci  
18741cb0ef41Sopenharmony_ci  During cross-compilation, CARES_RANDOM_FILE may not be able to be appropriately
18751cb0ef41Sopenharmony_ci  detected, therefore we should always set it to /dev/urandom and allow the
18761cb0ef41Sopenharmony_ci  entity requesting compilation override the value.  The code does appropriately
18771cb0ef41Sopenharmony_ci  fall back if CARES_RANDOM_FILE cannot be opened.
18781cb0ef41Sopenharmony_ci  
18791cb0ef41Sopenharmony_ci  * use set not option
18801cb0ef41Sopenharmony_ci
18811cb0ef41Sopenharmony_cibradh352 (18 Mar 2023)
18821cb0ef41Sopenharmony_ci- ares_getaddrinfo using service of "0" should be allowed
18831cb0ef41Sopenharmony_ci  
18841cb0ef41Sopenharmony_ci  As per #517 glibc allows a service/servname of "0" to be treated the
18851cb0ef41Sopenharmony_ci  same as if NULL was provided.  Also, add a sanity check to ensure
18861cb0ef41Sopenharmony_ci  the port number is in range instead of a blind cast.
18871cb0ef41Sopenharmony_ci  
18881cb0ef41Sopenharmony_ci  Fixes: #517
18891cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
18901cb0ef41Sopenharmony_ci
18911cb0ef41Sopenharmony_ciGitHub (10 Feb 2023)
18921cb0ef41Sopenharmony_ci- [Nikolaos Chatzikonstantinou brought this change]
18931cb0ef41Sopenharmony_ci
18941cb0ef41Sopenharmony_ci  fix memory leak in ares_send (#511)
18951cb0ef41Sopenharmony_ci  
18961cb0ef41Sopenharmony_ci  When the condition channel->nservers < 1 holds, the function returns
18971cb0ef41Sopenharmony_ci  prematurely, without deallocating query->tcpbuf. We rearrange the
18981cb0ef41Sopenharmony_ci  check to be done prior to the allocations, avoiding the memory
18991cb0ef41Sopenharmony_ci  leak. In this way, we also avoid unnecessary allocations if
19001cb0ef41Sopenharmony_ci  channel->nservers < 1 holds.
19011cb0ef41Sopenharmony_ci  
19021cb0ef41Sopenharmony_ci  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
19031cb0ef41Sopenharmony_ci
19041cb0ef41Sopenharmony_ci- [Nikolaos Chatzikonstantinou brought this change]
19051cb0ef41Sopenharmony_ci
19061cb0ef41Sopenharmony_ci  change comment style to old-style (#513)
19071cb0ef41Sopenharmony_ci  
19081cb0ef41Sopenharmony_ci  Following the README.md guidelines,
19091cb0ef41Sopenharmony_ci  
19101cb0ef41Sopenharmony_ci      "Comments must be written in the old-style"
19111cb0ef41Sopenharmony_ci  
19121cb0ef41Sopenharmony_ci  the comment is changed to the old style.
19131cb0ef41Sopenharmony_ci  
19141cb0ef41Sopenharmony_ci  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
19151cb0ef41Sopenharmony_ci
19161cb0ef41Sopenharmony_ci- [Nikolaos Chatzikonstantinou brought this change]
19171cb0ef41Sopenharmony_ci
19181cb0ef41Sopenharmony_ci  use strncasecmp in ares__strsplit (#512)
19191cb0ef41Sopenharmony_ci  
19201cb0ef41Sopenharmony_ci  strncasecmp on platforms that don't already have it is already #define'd to a private implementation.  There is no need to have OS-specific logic.  Also removes ares__strsplit.h as a header as ares_private.h already includes it.
19211cb0ef41Sopenharmony_ci  
19221cb0ef41Sopenharmony_ci  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
19231cb0ef41Sopenharmony_ci
19241cb0ef41Sopenharmony_ci- [Yijie Ma brought this change]
19251cb0ef41Sopenharmony_ci
19261cb0ef41Sopenharmony_ci  Fix a typo in ares_init_options.3 (#510)
19271cb0ef41Sopenharmony_ci  
19281cb0ef41Sopenharmony_ci  that -> than
19291cb0ef41Sopenharmony_ci  
19301cb0ef41Sopenharmony_ci  Fix By: Yijie Ma (@yijiem)
19311cb0ef41Sopenharmony_ci
19321cb0ef41Sopenharmony_ci- [Douglas R. Reno brought this change]
19331cb0ef41Sopenharmony_ci
19341cb0ef41Sopenharmony_ci  Watcom Portability Improvements (#509)
19351cb0ef41Sopenharmony_ci  
19361cb0ef41Sopenharmony_ci  - Modify the Watcom Makefile for the source code reorganization (#352)
19371cb0ef41Sopenharmony_ci  - Add *.map files into .gitignore
19381cb0ef41Sopenharmony_ci  - Fix build errors with Watcom's builtin Windows SDK (which is rather
19391cb0ef41Sopenharmony_ci    outdated). It's smart enough to understand Windows Vista, but doesn't
19401cb0ef41Sopenharmony_ci    have PMIB_UNICASTIPADDRESS_TABLE or MIB_IPFORWARD_ROW2.
19411cb0ef41Sopenharmony_ci  
19421cb0ef41Sopenharmony_ci  It may be possible to use a different Windows SDK with the Watcom
19431cb0ef41Sopenharmony_ci  compiler, such as the most recent Windows 10 SDK. Alternatively the SDK
19441cb0ef41Sopenharmony_ci  in OpenWatcom 2.0 (which is in development) should fix this.
19451cb0ef41Sopenharmony_ci  
19461cb0ef41Sopenharmony_ci  I have no problems testing this Makefile prior to releases, just give me
19471cb0ef41Sopenharmony_ci  a ping.
19481cb0ef41Sopenharmony_ci  
19491cb0ef41Sopenharmony_ci  Tested with Windows Vista, Windows 7, and Windows 10 using 'adig',
19501cb0ef41Sopenharmony_ci  'acountry', and 'ahost'. This also seems to work on Windows XP, though
19511cb0ef41Sopenharmony_ci  this is likely due to the compiler in use.
19521cb0ef41Sopenharmony_ci  
19531cb0ef41Sopenharmony_ci  Fix By: Douglas R. Reno (@renodr)
19541cb0ef41Sopenharmony_ci  Fixes Bug: #352
19551cb0ef41Sopenharmony_ci
19561cb0ef41Sopenharmony_ci- [Jay Freeman (saurik) brought this change]
19571cb0ef41Sopenharmony_ci
19581cb0ef41Sopenharmony_ci  ignore aminclude_static.am, as generated by AX_AM_MACROS_STATIC (#508)
19591cb0ef41Sopenharmony_ci  
19601cb0ef41Sopenharmony_ci  Fix By: Jay Freeman (@saurik)
19611cb0ef41Sopenharmony_ci
19621cb0ef41Sopenharmony_ci- [Jay Freeman (saurik) brought this change]
19631cb0ef41Sopenharmony_ci
19641cb0ef41Sopenharmony_ci  sync ax_pthread.m4 with upstream (#507)
19651cb0ef41Sopenharmony_ci  
19661cb0ef41Sopenharmony_ci  The version in the repository is many years old so this PR simply pulls in the latest
19671cb0ef41Sopenharmony_ci  available revision from:
19681cb0ef41Sopenharmony_ci  http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4
19691cb0ef41Sopenharmony_ci  
19701cb0ef41Sopenharmony_ci  Fix By: Jay Freeman (@saurik)
19711cb0ef41Sopenharmony_ci
19721cb0ef41Sopenharmony_ci- [Chilledheart brought this change]
19731cb0ef41Sopenharmony_ci
19741cb0ef41Sopenharmony_ci  Windows: Invalid stack variable out of scope for HOSTS file path  (#502)
19751cb0ef41Sopenharmony_ci  
19761cb0ef41Sopenharmony_ci  In some conditions Windows might try to use a stack address that has gone out of scope when determining where to read the hosts data from for file lookups.
19771cb0ef41Sopenharmony_ci  
19781cb0ef41Sopenharmony_ci  Fix By: @Chilledheart
19791cb0ef41Sopenharmony_ci
19801cb0ef41Sopenharmony_ci- [Brad House brought this change]
19811cb0ef41Sopenharmony_ci
19821cb0ef41Sopenharmony_ci  sync ax_cxx_compile_stdcxx_11.m4 with upstream (#505)
19831cb0ef41Sopenharmony_ci  
19841cb0ef41Sopenharmony_ci  It was reported that ax_cxx_compile_stdcxx_11.m4 was not compatible with uclibc.
19851cb0ef41Sopenharmony_ci  The version in the repository is many years old so this PR simply pulls in the latest
19861cb0ef41Sopenharmony_ci  available revision from:
19871cb0ef41Sopenharmony_ci  http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=tree;f=m4
19881cb0ef41Sopenharmony_ci  
19891cb0ef41Sopenharmony_ci  Fixes Bug: #504
19901cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
19911cb0ef41Sopenharmony_ci
19921cb0ef41Sopenharmony_ciVersion 1.19.0 (18 Jan 2023)
19931cb0ef41Sopenharmony_ci
19941cb0ef41Sopenharmony_cibradh352 (18 Jan 2023)
19951cb0ef41Sopenharmony_ci- Prep for 1.19.0 release
19961cb0ef41Sopenharmony_ci
19971cb0ef41Sopenharmony_ci- Fix inverted logic in 25523e2
19981cb0ef41Sopenharmony_ci  
19991cb0ef41Sopenharmony_ci  Fix .localhost. handling in prior commit
20001cb0ef41Sopenharmony_ci  
20011cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20021cb0ef41Sopenharmony_ci
20031cb0ef41Sopenharmony_ci- RFC6761 localhost definition includes subdomains
20041cb0ef41Sopenharmony_ci  
20051cb0ef41Sopenharmony_ci  RFC6761 6.3 states:
20061cb0ef41Sopenharmony_ci    The domain "localhost." and any names falling within ".localhost."
20071cb0ef41Sopenharmony_ci  
20081cb0ef41Sopenharmony_ci  We were only honoring "localhost".
20091cb0ef41Sopenharmony_ci  
20101cb0ef41Sopenharmony_ci  Fixes: #477
20111cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20121cb0ef41Sopenharmony_ci
20131cb0ef41Sopenharmony_ci- docs: ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT docs wrong byte order
20141cb0ef41Sopenharmony_ci  
20151cb0ef41Sopenharmony_ci  As per #487, documentation states the port should be in network byte
20161cb0ef41Sopenharmony_ci  order, but we can see from the test cases using MockServers on
20171cb0ef41Sopenharmony_ci  different ports that this is not the case, it is definitely in host
20181cb0ef41Sopenharmony_ci  byte order.
20191cb0ef41Sopenharmony_ci  
20201cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20211cb0ef41Sopenharmony_ci
20221cb0ef41Sopenharmony_ciGitHub (18 Jan 2023)
20231cb0ef41Sopenharmony_ci- [hopper-vul brought this change]
20241cb0ef41Sopenharmony_ci
20251cb0ef41Sopenharmony_ci  Add str len check in config_sortlist to avoid stack overflow (#497)
20261cb0ef41Sopenharmony_ci  
20271cb0ef41Sopenharmony_ci  In ares_set_sortlist, it calls config_sortlist(..., sortstr) to parse
20281cb0ef41Sopenharmony_ci  the input str and initialize a sortlist configuration.
20291cb0ef41Sopenharmony_ci  
20301cb0ef41Sopenharmony_ci  However, ares_set_sortlist has not any checks about the validity of the input str.
20311cb0ef41Sopenharmony_ci  It is very easy to create an arbitrary length stack overflow with the unchecked
20321cb0ef41Sopenharmony_ci  `memcpy(ipbuf, str, q-str);` and `memcpy(ipbufpfx, str, q-str);`
20331cb0ef41Sopenharmony_ci  statements in the config_sortlist call, which could potentially cause severe
20341cb0ef41Sopenharmony_ci  security impact in practical programs.
20351cb0ef41Sopenharmony_ci  
20361cb0ef41Sopenharmony_ci  This commit add necessary check for `ipbuf` and `ipbufpfx` which avoid the
20371cb0ef41Sopenharmony_ci  potential stack overflows.
20381cb0ef41Sopenharmony_ci  
20391cb0ef41Sopenharmony_ci  fixes #496
20401cb0ef41Sopenharmony_ci  
20411cb0ef41Sopenharmony_ci  Fix By: @hopper-vul
20421cb0ef41Sopenharmony_ci
20431cb0ef41Sopenharmony_cibradh352 (18 Jan 2023)
20441cb0ef41Sopenharmony_ci- Fix build due to str-split sed gone wrong
20451cb0ef41Sopenharmony_ci  
20461cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20471cb0ef41Sopenharmony_ci
20481cb0ef41Sopenharmony_ci- cirrus-ci: switch to scan-build-py for MacOS
20491cb0ef41Sopenharmony_ci  
20501cb0ef41Sopenharmony_ci  MacOS seems to work better with scan-build-py
20511cb0ef41Sopenharmony_ci  
20521cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20531cb0ef41Sopenharmony_ci
20541cb0ef41Sopenharmony_ci- ares_strsplit* -> ares__strsplit* to comply with internal function naming
20551cb0ef41Sopenharmony_ci  
20561cb0ef41Sopenharmony_ci  Inspired by #495, but was missing test cases and would failed to build.
20571cb0ef41Sopenharmony_ci  
20581cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352), Daniel Stenberg (@bagder)
20591cb0ef41Sopenharmony_ci
20601cb0ef41Sopenharmony_ci- Cirrus-CI: MacOS Homebrew has changed from /usr/local/opt to /opt/homebrew
20611cb0ef41Sopenharmony_ci  
20621cb0ef41Sopenharmony_ci  Fix paths for homebrew.
20631cb0ef41Sopenharmony_ci  
20641cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20651cb0ef41Sopenharmony_ci
20661cb0ef41Sopenharmony_ci- cirrus-ci: iOS build needs to use ARM MacOS image
20671cb0ef41Sopenharmony_ci  
20681cb0ef41Sopenharmony_ci  CirrusCI removed Intel-based MacOS images.  Need to switch
20691cb0ef41Sopenharmony_ci  iOS builds to use new ARM images as well.
20701cb0ef41Sopenharmony_ci  
20711cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20721cb0ef41Sopenharmony_ci
20731cb0ef41Sopenharmony_ci- cirrus-ci: new MacOS image
20741cb0ef41Sopenharmony_ci  
20751cb0ef41Sopenharmony_ci  Cirrus-CI has recently EOL'd Intel MacOS VMs, switch to the latest
20761cb0ef41Sopenharmony_ci  ARM-based image.
20771cb0ef41Sopenharmony_ci  
20781cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20791cb0ef41Sopenharmony_ci
20801cb0ef41Sopenharmony_ci- acountry was passing stack variable to callback
20811cb0ef41Sopenharmony_ci  
20821cb0ef41Sopenharmony_ci  Recent ASAN versions picked up that acountry was passing stack
20831cb0ef41Sopenharmony_ci  variables to ares_gethostbyname() then leaving the stack context.
20841cb0ef41Sopenharmony_ci  We will now allocate a buffer for this.
20851cb0ef41Sopenharmony_ci  
20861cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
20871cb0ef41Sopenharmony_ci
20881cb0ef41Sopenharmony_ciGitHub (13 Dec 2022)
20891cb0ef41Sopenharmony_ci- [Daniel Stenberg brought this change]
20901cb0ef41Sopenharmony_ci
20911cb0ef41Sopenharmony_ci  docs: reformat/cleanup man pages SYNOPSIS sections (#494)
20921cb0ef41Sopenharmony_ci  
20931cb0ef41Sopenharmony_ci  To make them render "nicer" in both terminals and on the website.
20941cb0ef41Sopenharmony_ci  
20951cb0ef41Sopenharmony_ci  - Removes the bold
20961cb0ef41Sopenharmony_ci  - Removes .PP lines
20971cb0ef41Sopenharmony_ci  - Indents them more like proper code style
20981cb0ef41Sopenharmony_ci  
20991cb0ef41Sopenharmony_ci  Fix By: Daniel Stenberg (@bagder)
21001cb0ef41Sopenharmony_ci
21011cb0ef41Sopenharmony_ci- [Nikolaos Chatzikonstantinou brought this change]
21021cb0ef41Sopenharmony_ci
21031cb0ef41Sopenharmony_ci  bug fix: new ares_strsplit (#492)
21041cb0ef41Sopenharmony_ci  
21051cb0ef41Sopenharmony_ci  * add ares_strsplit unit test
21061cb0ef41Sopenharmony_ci  
21071cb0ef41Sopenharmony_ci  The test reveals a bug in the implementation of ares_strsplit when the
21081cb0ef41Sopenharmony_ci  make_set parameter is set to 1, as distinct domains are confused for
21091cb0ef41Sopenharmony_ci  equal:
21101cb0ef41Sopenharmony_ci  
21111cb0ef41Sopenharmony_ci    out = ares_strsplit("example.com, example.co", ", ", 1, &n);
21121cb0ef41Sopenharmony_ci  
21131cb0ef41Sopenharmony_ci  evaluates to n = 1 with out = { "example.com" }.
21141cb0ef41Sopenharmony_ci  
21151cb0ef41Sopenharmony_ci  * bugfix and cleanup of ares_strsplit
21161cb0ef41Sopenharmony_ci  
21171cb0ef41Sopenharmony_ci  The purpose of ares_strsplit in c-ares is to split a comma-delimited
21181cb0ef41Sopenharmony_ci  string of unique (up to letter case) domains. However, because the
21191cb0ef41Sopenharmony_ci  terminating NUL byte was not checked in the substrings when comparing
21201cb0ef41Sopenharmony_ci  for uniqueness, the function would sometimes drop domains it should
21211cb0ef41Sopenharmony_ci  not. For example,
21221cb0ef41Sopenharmony_ci  
21231cb0ef41Sopenharmony_ci      ares_strsplit("example.com, example.co", ",")
21241cb0ef41Sopenharmony_ci  
21251cb0ef41Sopenharmony_ci  would only result in a single domain "example.com".
21261cb0ef41Sopenharmony_ci  
21271cb0ef41Sopenharmony_ci  Aside from this bugfix, the following cleanup is performed:
21281cb0ef41Sopenharmony_ci  
21291cb0ef41Sopenharmony_ci  1. The tokenization now happens with the help of strcspn instead of the
21301cb0ef41Sopenharmony_ci     custom function is_delim.
21311cb0ef41Sopenharmony_ci  2. The function list_contains has been inlined.
21321cb0ef41Sopenharmony_ci  3. The interface of ares_strsplit has been simplified by removing the
21331cb0ef41Sopenharmony_ci     parameter make_set since in practice it was always 1.
21341cb0ef41Sopenharmony_ci  4. There are fewer passes over the input string.
21351cb0ef41Sopenharmony_ci  5. We resize the table using realloc() down to its minimum size.
21361cb0ef41Sopenharmony_ci  6. The docstring of ares_strsplit is updated and also a couple typos
21371cb0ef41Sopenharmony_ci     are fixed.
21381cb0ef41Sopenharmony_ci  
21391cb0ef41Sopenharmony_ci  There occurs a single use of ares_strsplit and since the make_set
21401cb0ef41Sopenharmony_ci  parameter has been removed, the call in ares_init.c is modified
21411cb0ef41Sopenharmony_ci  accordingly. The unit test for ares_strsplit is also updated.
21421cb0ef41Sopenharmony_ci  
21431cb0ef41Sopenharmony_ci  Fix By: Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
21441cb0ef41Sopenharmony_ci
21451cb0ef41Sopenharmony_cibradh352 (23 Oct 2022)
21461cb0ef41Sopenharmony_ci- CirrusCI: update freebsd image
21471cb0ef41Sopenharmony_ci  
21481cb0ef41Sopenharmony_ci  Old FreeBSD image for CirrusCI has issues with newer symbols, update to later one.
21491cb0ef41Sopenharmony_ci  
21501cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
21511cb0ef41Sopenharmony_ci
21521cb0ef41Sopenharmony_ciGitHub (23 Oct 2022)
21531cb0ef41Sopenharmony_ci- [Stephen Sachs brought this change]
21541cb0ef41Sopenharmony_ci
21551cb0ef41Sopenharmony_ci  Fix Intel compiler deprecated options (#485)
21561cb0ef41Sopenharmony_ci  
21571cb0ef41Sopenharmony_ci  Options `-we ###` and `-wd ###` should not include a whitespace. They are also deprecated and `-diag-error` and `-diag-disable` are their replacements.
21581cb0ef41Sopenharmony_ci  
21591cb0ef41Sopenharmony_ci  Intel compiler 2021.6 is not able to be used in configure without the proposed patch.
21601cb0ef41Sopenharmony_ci  
21611cb0ef41Sopenharmony_ci  Fix By: Stephen Sachs (@stephenmsachs)
21621cb0ef41Sopenharmony_ci
21631cb0ef41Sopenharmony_ci- [Jonathan Ringer brought this change]
21641cb0ef41Sopenharmony_ci
21651cb0ef41Sopenharmony_ci  Allow for CMake to use absolute install paths (#486)
21661cb0ef41Sopenharmony_ci  
21671cb0ef41Sopenharmony_ci  Generated libcares.pc could have bad paths when using absolute paths.
21681cb0ef41Sopenharmony_ci  
21691cb0ef41Sopenharmony_ci  Fix By: Jonathan Ringer (@jonringer)
21701cb0ef41Sopenharmony_ci
21711cb0ef41Sopenharmony_ci- [Thomas Dreibholz brought this change]
21721cb0ef41Sopenharmony_ci
21731cb0ef41Sopenharmony_ci  Fix for issue #488: ensure that the number of iovec entries does not exceed system limits. (#489)
21741cb0ef41Sopenharmony_ci  
21751cb0ef41Sopenharmony_ci  c-ares could try to exceed maximum number of iovec entries supported by system.
21761cb0ef41Sopenharmony_ci  
21771cb0ef41Sopenharmony_ci  Fix By: Thomas Dreibholz (@dreibh)
21781cb0ef41Sopenharmony_ci
21791cb0ef41Sopenharmony_ci- [bsergean brought this change]
21801cb0ef41Sopenharmony_ci
21811cb0ef41Sopenharmony_ci  Add include guards to ares_data.h (#491)
21821cb0ef41Sopenharmony_ci  
21831cb0ef41Sopenharmony_ci  All the other header files in the src/lib folder do have an include guard so it look like an overthought.
21841cb0ef41Sopenharmony_ci  
21851cb0ef41Sopenharmony_ci  Fix By: @bsergean
21861cb0ef41Sopenharmony_ci
21871cb0ef41Sopenharmony_ci- [Brad Spencer brought this change]
21881cb0ef41Sopenharmony_ci
21891cb0ef41Sopenharmony_ci  Fix typo in docs for ares_process_fd (#490)
21901cb0ef41Sopenharmony_ci  
21911cb0ef41Sopenharmony_ci  A single letter was missing
21921cb0ef41Sopenharmony_ci  
21931cb0ef41Sopenharmony_ci  Fix By: Brad Spencer (@b-spencer)
21941cb0ef41Sopenharmony_ci
21951cb0ef41Sopenharmony_ci- [lifenjoiner brought this change]
21961cb0ef41Sopenharmony_ci
21971cb0ef41Sopenharmony_ci  tools: refine help (#481)
21981cb0ef41Sopenharmony_ci  
21991cb0ef41Sopenharmony_ci  fix invalid help options and documentation typos
22001cb0ef41Sopenharmony_ci  
22011cb0ef41Sopenharmony_ci  Fix By: @lifenjoiner
22021cb0ef41Sopenharmony_ci
22031cb0ef41Sopenharmony_ci- [lifenjoiner brought this change]
22041cb0ef41Sopenharmony_ci
22051cb0ef41Sopenharmony_ci  Git: ignore CMake temporary files (#480)
22061cb0ef41Sopenharmony_ci  
22071cb0ef41Sopenharmony_ci  exclude more files from git
22081cb0ef41Sopenharmony_ci  
22091cb0ef41Sopenharmony_ci  Fix By: @lifenjoiner
22101cb0ef41Sopenharmony_ci
22111cb0ef41Sopenharmony_ci- [lifenjoiner brought this change]
22121cb0ef41Sopenharmony_ci
22131cb0ef41Sopenharmony_ci  adig: fix `-T` option (#479)
22141cb0ef41Sopenharmony_ci  
22151cb0ef41Sopenharmony_ci  Helper was missing flag to enable TCP mode of operation.
22161cb0ef41Sopenharmony_ci  
22171cb0ef41Sopenharmony_ci  Fix By: @lifenjoiner
22181cb0ef41Sopenharmony_ci
22191cb0ef41Sopenharmony_ci- [Frank brought this change]
22201cb0ef41Sopenharmony_ci
22211cb0ef41Sopenharmony_ci  Add vcpkg installation instructions (#478)
22221cb0ef41Sopenharmony_ci  
22231cb0ef41Sopenharmony_ci  Update to include vcpkg installation instructions
22241cb0ef41Sopenharmony_ci  
22251cb0ef41Sopenharmony_ci  Fix By: @FrankXie05
22261cb0ef41Sopenharmony_ci
22271cb0ef41Sopenharmony_ci- [marc-groundctl brought this change]
22281cb0ef41Sopenharmony_ci
22291cb0ef41Sopenharmony_ci  Convert total timeout to per-query (#467)
22301cb0ef41Sopenharmony_ci  
22311cb0ef41Sopenharmony_ci  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.
22321cb0ef41Sopenharmony_ci  
22331cb0ef41Sopenharmony_ci  Fix By: Marc Aldorasi (@marc-groundctl)
22341cb0ef41Sopenharmony_ci
22351cb0ef41Sopenharmony_ci- [marc-groundctl brought this change]
22361cb0ef41Sopenharmony_ci
22371cb0ef41Sopenharmony_ci  Don't include version info in the static library (#468)
22381cb0ef41Sopenharmony_ci  
22391cb0ef41Sopenharmony_ci  The static library should not contain version info, since it would be linked into an executable or dll with its own version info.
22401cb0ef41Sopenharmony_ci  
22411cb0ef41Sopenharmony_ci  Fix By: @marc-groundctl
22421cb0ef41Sopenharmony_ci
22431cb0ef41Sopenharmony_ci- [Ridge Kennedy brought this change]
22441cb0ef41Sopenharmony_ci
22451cb0ef41Sopenharmony_ci  Fix ares_getaddrinfo() numerical address fast path with AF_UNSPEC (#469)
22461cb0ef41Sopenharmony_ci  
22471cb0ef41Sopenharmony_ci  The conversion of numeric IPv4 addresses in fake_addrinfo() is broken when
22481cb0ef41Sopenharmony_ci  the family is AF_UNSPEC. The initial call to ares_inet_pton with AF_INET
22491cb0ef41Sopenharmony_ci  will succeed, but the subsequent call using AF_INET6 will fail. This results
22501cb0ef41Sopenharmony_ci  in the fake_addrinfo() fast path failing, and ares_getaddrinfo() making a
22511cb0ef41Sopenharmony_ci  query when none should be required.
22521cb0ef41Sopenharmony_ci  
22531cb0ef41Sopenharmony_ci  Resolve this by only attempting the call to ares_inet_pton with AF_INET6
22541cb0ef41Sopenharmony_ci  if the initial call with AF_INET was unsuccessful.
22551cb0ef41Sopenharmony_ci  
22561cb0ef41Sopenharmony_ci  Fix By: Ridge Kennedy (@ridgek)
22571cb0ef41Sopenharmony_ci
22581cb0ef41Sopenharmony_ci- [Manish Mehra brought this change]
22591cb0ef41Sopenharmony_ci
22601cb0ef41Sopenharmony_ci  Configurable hosts path for file_lookup (#465)
22611cb0ef41Sopenharmony_ci  
22621cb0ef41Sopenharmony_ci  This changeset adds support for configurable hosts file
22631cb0ef41Sopenharmony_ci  ARES_OPT_HOSTS_FILE (similar to ARES_OPT_RESOLVCONF).
22641cb0ef41Sopenharmony_ci  
22651cb0ef41Sopenharmony_ci  Co-authored-by: Manish Mehra (@mmehra)
22661cb0ef41Sopenharmony_ci
22671cb0ef41Sopenharmony_cibradh352 (27 Apr 2022)
22681cb0ef41Sopenharmony_ci- CMake: Windows DLLs lack version information
22691cb0ef41Sopenharmony_ci  
22701cb0ef41Sopenharmony_ci  The cares.rc was not included in the build for CMake.  Conditionally
22711cb0ef41Sopenharmony_ci  add it when building for Windows.
22721cb0ef41Sopenharmony_ci  
22731cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
22741cb0ef41Sopenharmony_ci  Fixes Bug: #460
22751cb0ef41Sopenharmony_ci
22761cb0ef41Sopenharmony_ciGitHub (27 Apr 2022)
22771cb0ef41Sopenharmony_ci- [Kai Pastor brought this change]
22781cb0ef41Sopenharmony_ci
22791cb0ef41Sopenharmony_ci  CMake: Guard target creation in exported config (#464)
22801cb0ef41Sopenharmony_ci  
22811cb0ef41Sopenharmony_ci  User projects may call 'find_package(c-ares)' multiple times (e.g.
22821cb0ef41Sopenharmony_ci  via dependencies), but targets must be created only once.
22831cb0ef41Sopenharmony_ci  Shared and static target must be treated independently.
22841cb0ef41Sopenharmony_ci  
22851cb0ef41Sopenharmony_ci  Fix By: Kai Pastor (@dg0yt)
22861cb0ef41Sopenharmony_ci
22871cb0ef41Sopenharmony_cibradh352 (27 Apr 2022)
22881cb0ef41Sopenharmony_ci- Honor valid DNS result even if other class returned an error
22891cb0ef41Sopenharmony_ci  
22901cb0ef41Sopenharmony_ci  When using ares_getaddrinfo() with PF_UNSPEC, if a DNS server returned
22911cb0ef41Sopenharmony_ci  good data on an A record, followed by bad data on an AAAA record, the
22921cb0ef41Sopenharmony_ci  good record would be thrown away and an error returned.
22931cb0ef41Sopenharmony_ci  
22941cb0ef41Sopenharmony_ci  If we got a good response from one of the two queries, regardless of
22951cb0ef41Sopenharmony_ci  the order returned, we should honor that.
22961cb0ef41Sopenharmony_ci  
22971cb0ef41Sopenharmony_ci  Fix By: Dmitry Karpov (dkarpov@roku.com)
22981cb0ef41Sopenharmony_ci  Signed Off By: Brad House (@bradh352)
22991cb0ef41Sopenharmony_ci
23001cb0ef41Sopenharmony_ciGitHub (2 Apr 2022)
23011cb0ef41Sopenharmony_ci- [Sam James brought this change]
23021cb0ef41Sopenharmony_ci
23031cb0ef41Sopenharmony_ci  configure.ac: fix STDC_HEADERS typo (#459)
23041cb0ef41Sopenharmony_ci  
23051cb0ef41Sopenharmony_ci  There is no autoconf macro called STDC_HEADERS. AC_HEADER_STDC however does
23061cb0ef41Sopenharmony_ci  exist and it defines the STDC_HEADERS macro for use.
23071cb0ef41Sopenharmony_ci  
23081cb0ef41Sopenharmony_ci  Not clear that STDC_HEADERS from its use in the repo is needed but
23091cb0ef41Sopenharmony_ci  would rather not meddle with it for now.
23101cb0ef41Sopenharmony_ci  
23111cb0ef41Sopenharmony_ci  Fixes an annoying warning on `./configure`:
23121cb0ef41Sopenharmony_ci  ```
23131cb0ef41Sopenharmony_ci  /var/tmp/portage/net-dns/c-ares-1.18.1/work/c-ares-1.18.1/configure: 24546: STDC_HEADERS: not found
23141cb0ef41Sopenharmony_ci  ```
23151cb0ef41Sopenharmony_ci  
23161cb0ef41Sopenharmony_ci  Signed-off-by: Sam James <sam@gentoo.org>
23171cb0ef41Sopenharmony_ci
23181cb0ef41Sopenharmony_cibradh352 (2 Mar 2022)
23191cb0ef41Sopenharmony_ci- Asterisks should be allowed in host validation as CNAMEs may reference wildcard domains
23201cb0ef41Sopenharmony_ci  
23211cb0ef41Sopenharmony_ci  CloudFlare appears to use this logic in CNAMEs as per
23221cb0ef41Sopenharmony_ci  https://github.com/nodejs/node/issues/42171
23231cb0ef41Sopenharmony_ci  
23241cb0ef41Sopenharmony_ci  Fixes: #457
23251cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
23261cb0ef41Sopenharmony_ci
23271cb0ef41Sopenharmony_ci- Don't return on file lookup failure, set status
23281cb0ef41Sopenharmony_ci  
23291cb0ef41Sopenharmony_ci  When resolving a host via /etc/hosts, don't return with a predefined
23301cb0ef41Sopenharmony_ci  error as there may be other tries.
23311cb0ef41Sopenharmony_ci  
23321cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
23331cb0ef41Sopenharmony_ci
23341cb0ef41Sopenharmony_ci- 'localhost' special treatment enhancement
23351cb0ef41Sopenharmony_ci  
23361cb0ef41Sopenharmony_ci  Since localhost is special-cased, any errors should be ignored when
23371cb0ef41Sopenharmony_ci  reading /etc/hosts as otherwise we could return an error if there
23381cb0ef41Sopenharmony_ci  were for instance an invalidly formatted /etc/hosts or if /etc/hosts
23391cb0ef41Sopenharmony_ci  had a permissions error while reading.
23401cb0ef41Sopenharmony_ci  
23411cb0ef41Sopenharmony_ci  This exact behavior appears to have been seen on OS/400 PASE
23421cb0ef41Sopenharmony_ci  environments which allows AIX binares to run.
23431cb0ef41Sopenharmony_ci  
23441cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
23451cb0ef41Sopenharmony_ci
23461cb0ef41Sopenharmony_ci- If chain building c-ares as part of another project, detect of res_servicename could fail (#451)
23471cb0ef41Sopenharmony_ci  
23481cb0ef41Sopenharmony_ci  If libresolv is already included with the build, c-ares wouldn't properly detect its use.
23491cb0ef41Sopenharmony_ci  
23501cb0ef41Sopenharmony_ci  May fix: #451
23511cb0ef41Sopenharmony_ci  Fix by: Brad House (@bradh352)
23521cb0ef41Sopenharmony_ci
23531cb0ef41Sopenharmony_ci- no analyze capability on ios
23541cb0ef41Sopenharmony_ci
23551cb0ef41Sopenharmony_ci- attempt to use scan-build on ios
23561cb0ef41Sopenharmony_ci
23571cb0ef41Sopenharmony_ci- disable tests on ios
23581cb0ef41Sopenharmony_ci
23591cb0ef41Sopenharmony_ci- fix switch statement
23601cb0ef41Sopenharmony_ci
23611cb0ef41Sopenharmony_ci- code coverage had gotten disabled
23621cb0ef41Sopenharmony_ci
23631cb0ef41Sopenharmony_ci- looks like shell expansion doesn't work with cirrus-ci, lets do it another way
23641cb0ef41Sopenharmony_ci
23651cb0ef41Sopenharmony_ci- attempt to autobuild for iOS
23661cb0ef41Sopenharmony_ci
23671cb0ef41Sopenharmony_ciGitHub (8 Dec 2021)
23681cb0ef41Sopenharmony_ci- [Brad House brought this change]
23691cb0ef41Sopenharmony_ci
23701cb0ef41Sopenharmony_ci  Windows: rework/simplify initialization code, drop long EOL systems (#445)
23711cb0ef41Sopenharmony_ci  
23721cb0ef41Sopenharmony_ci  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.
23731cb0ef41Sopenharmony_ci  
23741cb0ef41Sopenharmony_ci  Vista was released in January 2007, and was EOL'd in 2017, and support for Vista is still maintained with this patch set.
23751cb0ef41Sopenharmony_ci  
23761cb0ef41Sopenharmony_ci  XP was EOL'd in Apr 8 2014.
23771cb0ef41Sopenharmony_ci  
23781cb0ef41Sopenharmony_ci  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.
23791cb0ef41Sopenharmony_ci  
23801cb0ef41Sopenharmony_ci  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.
23811cb0ef41Sopenharmony_ci
23821cb0ef41Sopenharmony_cibradh352 (9 Nov 2021)
23831cb0ef41Sopenharmony_ci- Fix memory leak in reading /etc/hosts
23841cb0ef41Sopenharmony_ci  
23851cb0ef41Sopenharmony_ci  When an /etc/hosts lookup is performed, but fails with ENOTFOUND, and
23861cb0ef41Sopenharmony_ci  a valid RFC6761 Section 6.3 fallback is performed, it could overwrite
23871cb0ef41Sopenharmony_ci  variables that were already set and therefore leave the pointers
23881cb0ef41Sopenharmony_ci  dangling, never to be cleaned up.
23891cb0ef41Sopenharmony_ci  
23901cb0ef41Sopenharmony_ci  Clean up explicitly on ENOTFOUND when returning from the file parser.
23911cb0ef41Sopenharmony_ci  
23921cb0ef41Sopenharmony_ci  Fixes: #439
23931cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
23941cb0ef41Sopenharmony_ci
23951cb0ef41Sopenharmony_ciGitHub (2 Nov 2021)
23961cb0ef41Sopenharmony_ci- [Bobby Reynolds brought this change]
23971cb0ef41Sopenharmony_ci
23981cb0ef41Sopenharmony_ci  Fix cross-compilation from Windows to Linux due to CPACK logic (#436)
23991cb0ef41Sopenharmony_ci  
24001cb0ef41Sopenharmony_ci  When determining value for CPACK_PACKAGE_ARCHITECTURE, prefer to use
24011cb0ef41Sopenharmony_ci  value from CMAKE_SYSTEM_PROCESSOR before falling back to uname output.
24021cb0ef41Sopenharmony_ci  
24031cb0ef41Sopenharmony_ci  Additionally, if building from a Windows host, emit a fatal error
24041cb0ef41Sopenharmony_ci  instead of attempting to call uname.
24051cb0ef41Sopenharmony_ci  
24061cb0ef41Sopenharmony_ci  Fix By: Bobby Reynolds (@reynoldsbd)
24071cb0ef41Sopenharmony_ci
24081cb0ef41Sopenharmony_cibradh352 (1 Nov 2021)
24091cb0ef41Sopenharmony_ci- fix coveralls link
24101cb0ef41Sopenharmony_ci
24111cb0ef41Sopenharmony_ci- coveralls needs token
24121cb0ef41Sopenharmony_ci
24131cb0ef41Sopenharmony_ci- coveralls appears to require git
24141cb0ef41Sopenharmony_ci
24151cb0ef41Sopenharmony_ci- fix a couple of coveralls vars
24161cb0ef41Sopenharmony_ci
24171cb0ef41Sopenharmony_ci- more coveralls fixes
24181cb0ef41Sopenharmony_ci
24191cb0ef41Sopenharmony_ci- add code coverage libs to LDADD instead of _LIBS
24201cb0ef41Sopenharmony_ci
24211cb0ef41Sopenharmony_ci- make verbose
24221cb0ef41Sopenharmony_ci
24231cb0ef41Sopenharmony_ci- try to fix code coverage building
24241cb0ef41Sopenharmony_ci
24251cb0ef41Sopenharmony_ci- need -y for install
24261cb0ef41Sopenharmony_ci
24271cb0ef41Sopenharmony_ci- try to fix asan/ubsan/lsan when built with clang. try to support code coverage properly.
24281cb0ef41Sopenharmony_ci
24291cb0ef41Sopenharmony_ci- try another path
24301cb0ef41Sopenharmony_ci
24311cb0ef41Sopenharmony_ci- fix pip
24321cb0ef41Sopenharmony_ci
24331cb0ef41Sopenharmony_ci- attempt to enable some other build types that travis supported
24341cb0ef41Sopenharmony_ci
24351cb0ef41Sopenharmony_ciVersion 1.18.1 (26 Oct 2021)
24361cb0ef41Sopenharmony_ci
24371cb0ef41Sopenharmony_cibradh352 (26 Oct 2021)
24381cb0ef41Sopenharmony_ci- missed version
24391cb0ef41Sopenharmony_ci
24401cb0ef41Sopenharmony_ci- 1.18.1 release prep
24411cb0ef41Sopenharmony_ci
24421cb0ef41Sopenharmony_ci- ares_getaddrinfo() was returning the wrong size for ai_addrlen
24431cb0ef41Sopenharmony_ci  
24441cb0ef41Sopenharmony_ci  ai_addrlen was erroneously returning 16 bytes instead of the
24451cb0ef41Sopenharmony_ci  sizeof(struct sockaddr_in6).  This is a regression introduced
24461cb0ef41Sopenharmony_ci  in 1.18.0.
24471cb0ef41Sopenharmony_ci  
24481cb0ef41Sopenharmony_ci  Reported by: James Brown <jbrown@easypost.com>
24491cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
24501cb0ef41Sopenharmony_ci
24511cb0ef41Sopenharmony_ci- Windows: autotools force linking to iphlpapi
24521cb0ef41Sopenharmony_ci
24531cb0ef41Sopenharmony_ciGitHub (26 Oct 2021)
24541cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
24551cb0ef41Sopenharmony_ci
24561cb0ef41Sopenharmony_ci  Fix typo detected by lintian (#434)
24571cb0ef41Sopenharmony_ci  
24581cb0ef41Sopenharmony_ci  typo in docs for ares_parse_uri_reply
24591cb0ef41Sopenharmony_ci  
24601cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
24611cb0ef41Sopenharmony_ci
24621cb0ef41Sopenharmony_ciVersion 1.18.0 (25 Oct 2021)
24631cb0ef41Sopenharmony_ci
24641cb0ef41Sopenharmony_cibradh352 (25 Oct 2021)
24651cb0ef41Sopenharmony_ci- replace Travis badge with Cirrus-CI badge
24661cb0ef41Sopenharmony_ci
24671cb0ef41Sopenharmony_ci- c-ares 1.18.0 release prep
24681cb0ef41Sopenharmony_ci
24691cb0ef41Sopenharmony_ciGitHub (21 Oct 2021)
24701cb0ef41Sopenharmony_ci- [Jérôme Duval brought this change]
24711cb0ef41Sopenharmony_ci
24721cb0ef41Sopenharmony_ci  Haiku: port (#431)
24731cb0ef41Sopenharmony_ci  
24741cb0ef41Sopenharmony_ci  Port for Haiku.  Slight CMake changes, header changes, and resolv.conf/hosts paths specific to Haiku.
24751cb0ef41Sopenharmony_ci  
24761cb0ef41Sopenharmony_ci  Port By: Jérôme Duval (@korli)
24771cb0ef41Sopenharmony_ci
24781cb0ef41Sopenharmony_cibradh352 (19 Oct 2021)
24791cb0ef41Sopenharmony_ci- valgrind: fix reported invalid read
24801cb0ef41Sopenharmony_ci
24811cb0ef41Sopenharmony_ci- make sure distcheck runs
24821cb0ef41Sopenharmony_ci
24831cb0ef41Sopenharmony_ci- detect oddities and skip test if necessary
24841cb0ef41Sopenharmony_ci
24851cb0ef41Sopenharmony_ci- fix null ptr deref in strlen
24861cb0ef41Sopenharmony_ci
24871cb0ef41Sopenharmony_ci- bend over backwards for testing file access, something is weird on debian
24881cb0ef41Sopenharmony_ci
24891cb0ef41Sopenharmony_ci- chmod(fn, 0) is failing on debian
24901cb0ef41Sopenharmony_ci
24911cb0ef41Sopenharmony_ci- maybe process needs to be called
24921cb0ef41Sopenharmony_ci
24931cb0ef41Sopenharmony_ci- split test output
24941cb0ef41Sopenharmony_ci
24951cb0ef41Sopenharmony_ci- clean up a couple of compiler warnings
24961cb0ef41Sopenharmony_ci
24971cb0ef41Sopenharmony_ci- use helper function for addrinfo to simplify code
24981cb0ef41Sopenharmony_ci
24991cb0ef41Sopenharmony_ci- INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P as new convention in googletest
25001cb0ef41Sopenharmony_ci
25011cb0ef41Sopenharmony_ci- gmock: update from 1.8.0 to 1.11.0
25021cb0ef41Sopenharmony_ci
25031cb0ef41Sopenharmony_ci- Cirrus-CI: fix debian arm build
25041cb0ef41Sopenharmony_ci
25051cb0ef41Sopenharmony_ci- Cirrus-CI: more updates for proper testing
25061cb0ef41Sopenharmony_ci
25071cb0ef41Sopenharmony_ci- install proper packages for asan and analyze
25081cb0ef41Sopenharmony_ci
25091cb0ef41Sopenharmony_ci- fix  crash in tests
25101cb0ef41Sopenharmony_ci
25111cb0ef41Sopenharmony_ci- try to disable container tests
25121cb0ef41Sopenharmony_ci
25131cb0ef41Sopenharmony_ci- need g++ for tests on debian
25141cb0ef41Sopenharmony_ci
25151cb0ef41Sopenharmony_ci- try cirrus-ci again
25161cb0ef41Sopenharmony_ci
25171cb0ef41Sopenharmony_ci- whitespace
25181cb0ef41Sopenharmony_ci
25191cb0ef41Sopenharmony_ci- start bringing up cirrus-ci
25201cb0ef41Sopenharmony_ci
25211cb0ef41Sopenharmony_ci- prep for adding new ci
25221cb0ef41Sopenharmony_ci
25231cb0ef41Sopenharmony_ci- fix cut and paste error
25241cb0ef41Sopenharmony_ci
25251cb0ef41Sopenharmony_ciGitHub (18 Oct 2021)
25261cb0ef41Sopenharmony_ci- [Brad House brought this change]
25271cb0ef41Sopenharmony_ci
25281cb0ef41Sopenharmony_ci  RFC6761: special case "localhost" (#430)
25291cb0ef41Sopenharmony_ci  
25301cb0ef41Sopenharmony_ci  As per RFC6761 Section 6.3, "localhost" lookups need to be special cased to return loopback addresses, and not forward queries to recursive dns servers.
25311cb0ef41Sopenharmony_ci  
25321cb0ef41Sopenharmony_ci  We first look up via files (/etc/hosts or equivalent), and if that fails, we then attempt a system-specific address enumeration for loopback addresses (currently Windows-only), and finally fallback to ::1 and 127.0.0.1.
25331cb0ef41Sopenharmony_ci  
25341cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
25351cb0ef41Sopenharmony_ci  Fixes Bug: #399
25361cb0ef41Sopenharmony_ci
25371cb0ef41Sopenharmony_ci- [Brad House brought this change]
25381cb0ef41Sopenharmony_ci
25391cb0ef41Sopenharmony_ci  Reimplement ares_gethostbyname() by wrapping ares_getaddrinfo() (#428)
25401cb0ef41Sopenharmony_ci  
25411cb0ef41Sopenharmony_ci  ares_gethostbyname() and ares_getaddrinfo() do a lot of similar things, however ares_getaddrinfo() has some desirable behaviors that should be imported into ares_gethostbyname(). For one, it sorts the address lists for the most likely to succeed based on the current system routes. Next, when AF_UNSPEC is specified, it properly handles search lists instead of first searching all of AF_INET6 then AF_INET, since ares_gethostbyname() searches in parallel. Therefore, this PR should also resolve the issues attempted in #94.
25421cb0ef41Sopenharmony_ci  
25431cb0ef41Sopenharmony_ci  A few things this PR does:
25441cb0ef41Sopenharmony_ci  
25451cb0ef41Sopenharmony_ci  1. ares_parse_a_reply() and ares_parse_aaaa_reply() had very similar code to translate struct ares_addrinfo into a struct hostent as well as into struct ares_addrttl/ares_addr6ttl this has been split out into helper functions of ares__addrinfo2hostent() and ares__addrinfo2addrttl() to prevent this duplicative code.
25461cb0ef41Sopenharmony_ci  
25471cb0ef41Sopenharmony_ci  2. ares_getaddrinfo() was apparently never honoring HOSTALIASES, and this was discovered once ares_gethostbyname() was turned into a wrapper, the affected test cases started failing.
25481cb0ef41Sopenharmony_ci  
25491cb0ef41Sopenharmony_ci  3. A slight API modification to save the query hostname into struct ares_addrinfo as the last element of name. Since this is the last element, and all user-level instances of struct ares_addrinfo are allocated internally by c-ares, this is not an ABI-breaking change nor would it impact any API compatibility. This was needed since struct hostent has an h_name element.
25501cb0ef41Sopenharmony_ci  
25511cb0ef41Sopenharmony_ci  4. Test Framework: MockServer tests via TCP would fail if more than 1 request was received at a time which is common when ares_getaddrinfo() queries for both A and AAAA records simultaneously. Infact, this was a long standing issue in which the ares_getaddrinfo() test were bypassing TCP alltogether. This has been corrected, the message is now processed in a loop.
25521cb0ef41Sopenharmony_ci  
25531cb0ef41Sopenharmony_ci  5. Some tests had to be updated for overall correctness as they were invalid but somehow passing prior to this change.
25541cb0ef41Sopenharmony_ci  
25551cb0ef41Sopenharmony_ci  Change By: Brad House (@bradh352)
25561cb0ef41Sopenharmony_ci
25571cb0ef41Sopenharmony_cibradh352 (9 Oct 2021)
25581cb0ef41Sopenharmony_ci- ares_getaddrinfo() missing sanity check to fix #426
25591cb0ef41Sopenharmony_ci
25601cb0ef41Sopenharmony_ci- ares_getaddrinfo(): continue to next domain in search if query returns ARES_ENODATA
25611cb0ef41Sopenharmony_ci  
25621cb0ef41Sopenharmony_ci  Some DNS servers may behave badly and return a valid response with no data, in this
25631cb0ef41Sopenharmony_ci  case, continue on to the next search domain, but cache the result.
25641cb0ef41Sopenharmony_ci  
25651cb0ef41Sopenharmony_ci  Fixes Bug: #426
25661cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
25671cb0ef41Sopenharmony_ci
25681cb0ef41Sopenharmony_ci- Allow '/' as a valid character for a returned name
25691cb0ef41Sopenharmony_ci  
25701cb0ef41Sopenharmony_ci  As of c-ares 1.17.2, a CNAME an in-addr.arpa delegation broke due
25711cb0ef41Sopenharmony_ci  to not allowing '/'.  This needs to be allowed to not break valid
25721cb0ef41Sopenharmony_ci  functionality.
25731cb0ef41Sopenharmony_ci  
25741cb0ef41Sopenharmony_ci  Fixes Bug: #427
25751cb0ef41Sopenharmony_ci  Reported By: Adrian (@leftshift)
25761cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
25771cb0ef41Sopenharmony_ci
25781cb0ef41Sopenharmony_ciDaniel Stenberg (5 Oct 2021)
25791cb0ef41Sopenharmony_ci- libcares.pc.in: update the URL
25801cb0ef41Sopenharmony_ci
25811cb0ef41Sopenharmony_cibradh352 (8 Sep 2021)
25821cb0ef41Sopenharmony_ci- ares_expand_name should allow underscores (_) as SRV records legitimately use them
25831cb0ef41Sopenharmony_ci  
25841cb0ef41Sopenharmony_ci  c-ares 1.17.2 introduced response validation to prevent a security issue, however
25851cb0ef41Sopenharmony_ci  it did not have (_) listed as a valid character for domain name responses which
25861cb0ef41Sopenharmony_ci  caused issues when a CNAME referenced a SRV record which contained underscores.
25871cb0ef41Sopenharmony_ci  
25881cb0ef41Sopenharmony_ci  While RFC2181 section 11 does explicitly state not to do validation, that applies
25891cb0ef41Sopenharmony_ci  to servers not clients.
25901cb0ef41Sopenharmony_ci  
25911cb0ef41Sopenharmony_ci  Fixes: #424
25921cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
25931cb0ef41Sopenharmony_ci
25941cb0ef41Sopenharmony_ciDaniel Stenberg (7 Sep 2021)
25951cb0ef41Sopenharmony_ci- domain: update to use c-ares.org
25961cb0ef41Sopenharmony_ci  
25971cb0ef41Sopenharmony_ci  Closes #423
25981cb0ef41Sopenharmony_ci
25991cb0ef41Sopenharmony_ci- mailing list: moved to lists.haxx.se
26001cb0ef41Sopenharmony_ci
26011cb0ef41Sopenharmony_ciGitHub (3 Sep 2021)
26021cb0ef41Sopenharmony_ci- [Biswapriyo Nath brought this change]
26031cb0ef41Sopenharmony_ci
26041cb0ef41Sopenharmony_ci  CMake: Fix build in cygwin (#422)
26051cb0ef41Sopenharmony_ci  
26061cb0ef41Sopenharmony_ci  As cygwin environment has both socket.h and winsock2.h headers check WIN32 not to include the later one here
26071cb0ef41Sopenharmony_ci  
26081cb0ef41Sopenharmony_ci  Fix By: Biswapriyo Nath (@Biswa96)
26091cb0ef41Sopenharmony_ci
26101cb0ef41Sopenharmony_cibradh352 (23 Aug 2021)
26111cb0ef41Sopenharmony_ci- make building more verbose
26121cb0ef41Sopenharmony_ci
26131cb0ef41Sopenharmony_ci- add appveyor cmake/mingw static-only build
26141cb0ef41Sopenharmony_ci
26151cb0ef41Sopenharmony_ciGitHub (17 Aug 2021)
26161cb0ef41Sopenharmony_ci- [Sinan Kaya brought this change]
26171cb0ef41Sopenharmony_ci
26181cb0ef41Sopenharmony_ci  CMake: lower case advapi32 for cross-building with mingw (#420)
26191cb0ef41Sopenharmony_ci  
26201cb0ef41Sopenharmony_ci  When cross compiling with yocto's meta-mingw layer, getting a dependency
26211cb0ef41Sopenharmony_ci  error.
26221cb0ef41Sopenharmony_ci  
26231cb0ef41Sopenharmony_ci  This is caused by the fact that advapi32 is lower case in mingw builds.
26241cb0ef41Sopenharmony_ci  
26251cb0ef41Sopenharmony_ci  Fix By: Sinan Kaya <sinan.kaya@microsoft.com>
26261cb0ef41Sopenharmony_ci
26271cb0ef41Sopenharmony_cibradh352 (17 Aug 2021)
26281cb0ef41Sopenharmony_ci- autotools: add ax_check_gnu_make.m4
26291cb0ef41Sopenharmony_ci
26301cb0ef41Sopenharmony_ci- autotools: add ax_require_defined.m4
26311cb0ef41Sopenharmony_ci
26321cb0ef41Sopenharmony_ci- autotools: dont use newer AC_CHECK_INCLUDES_DEFAULT, don't quote AC_ERROR_MSG
26331cb0ef41Sopenharmony_ci
26341cb0ef41Sopenharmony_ci- import more files needed by newer ax_code_coverage.m4
26351cb0ef41Sopenharmony_ci
26361cb0ef41Sopenharmony_ci- import more files needed by newer ax_code_coverage.m4
26371cb0ef41Sopenharmony_ci
26381cb0ef41Sopenharmony_ci- work around autoreconf -fiv first call returning 'error: too many loops'
26391cb0ef41Sopenharmony_ci
26401cb0ef41Sopenharmony_ci- restore zz40-xc-ovr.m4
26411cb0ef41Sopenharmony_ci
26421cb0ef41Sopenharmony_ci- autotools: processed configure.ac through autoupdate
26431cb0ef41Sopenharmony_ci
26441cb0ef41Sopenharmony_ci- autotools. update ax_code_coverage.m4 to latest. don't use deprecated AC_HELP_STRING
26451cb0ef41Sopenharmony_ci
26461cb0ef41Sopenharmony_ci- pull out some old autotools cruft
26471cb0ef41Sopenharmony_ci
26481cb0ef41Sopenharmony_ciGitHub (17 Aug 2021)
26491cb0ef41Sopenharmony_ci- [Felix Yan brought this change]
26501cb0ef41Sopenharmony_ci
26511cb0ef41Sopenharmony_ci  Provide ares_nameser.h as a public interface (#417)
26521cb0ef41Sopenharmony_ci  
26531cb0ef41Sopenharmony_ci  NodeJS needs ares_nameser.h as a pubic header.
26541cb0ef41Sopenharmony_ci  
26551cb0ef41Sopenharmony_ci  Fixes: #415
26561cb0ef41Sopenharmony_ci  Fix By: Felix Yan (@felixonmars)
26571cb0ef41Sopenharmony_ci
26581cb0ef41Sopenharmony_ci- [Felix Yan brought this change]
26591cb0ef41Sopenharmony_ci
26601cb0ef41Sopenharmony_ci  Fix building when latest ax_code_coverage.m4 is imported (#418)
26611cb0ef41Sopenharmony_ci  
26621cb0ef41Sopenharmony_ci  ax_code_coverage.m4 dropped the @CODE_COVERAGE_RULES@ macro, so we need to switch to the latest recommendation from the m4 file.  This requires updates to Makefile.am.
26631cb0ef41Sopenharmony_ci  
26641cb0ef41Sopenharmony_ci  Fix By: Felix Yan (@felixonmars)
26651cb0ef41Sopenharmony_ci
26661cb0ef41Sopenharmony_cibradh352 (12 Aug 2021)
26671cb0ef41Sopenharmony_ci- bump version to match current release
26681cb0ef41Sopenharmony_ci
26691cb0ef41Sopenharmony_ciGitHub (12 Aug 2021)
26701cb0ef41Sopenharmony_ci- [dhrumilrana brought this change]
26711cb0ef41Sopenharmony_ci
26721cb0ef41Sopenharmony_ci  z/OS minor update, add missing semicolon in ares_init.c (#414)
26731cb0ef41Sopenharmony_ci  
26741cb0ef41Sopenharmony_ci  Build fix for z/OS
26751cb0ef41Sopenharmony_ci  
26761cb0ef41Sopenharmony_ci  Fix by: Dhrumil Rana (@dhrumilrana)
26771cb0ef41Sopenharmony_ci
26781cb0ef41Sopenharmony_ci- [Daniel Bevenius brought this change]
26791cb0ef41Sopenharmony_ci
26801cb0ef41Sopenharmony_ci  add build to .gitignore (#410)
26811cb0ef41Sopenharmony_ci  
26821cb0ef41Sopenharmony_ci  This commit adds the build directory to be ignored by git.
26831cb0ef41Sopenharmony_ci  
26841cb0ef41Sopenharmony_ci  The motivation for adding this to .gitignore as opposed to
26851cb0ef41Sopenharmony_ci  .git/info/exclude is that the CMake example in INSTALL.md uses build
26861cb0ef41Sopenharmony_ci  as the name of the directory to be used by CMake. This will cause
26871cb0ef41Sopenharmony_ci  git to report build as an untracked file.
26881cb0ef41Sopenharmony_ci  
26891cb0ef41Sopenharmony_ci  Fix By: Daniel Bevenius (@danbev)
26901cb0ef41Sopenharmony_ci
26911cb0ef41Sopenharmony_ci- [Martin Holeš brought this change]
26921cb0ef41Sopenharmony_ci
26931cb0ef41Sopenharmony_ci  Add support for URI(Uniform Resource Identifier) records. (#411)
26941cb0ef41Sopenharmony_ci  
26951cb0ef41Sopenharmony_ci  Add ares_parse_uri_reply() for parsing URI DNS replies.
26961cb0ef41Sopenharmony_ci  
26971cb0ef41Sopenharmony_ci  Fix By: Martin Holeš (@martin-256)
26981cb0ef41Sopenharmony_ci
26991cb0ef41Sopenharmony_ciDaniel Stenberg (10 Aug 2021)
27001cb0ef41Sopenharmony_ci- ares_getaddrinfo.3: available since 1.16.0
27011cb0ef41Sopenharmony_ci
27021cb0ef41Sopenharmony_ci- README.md: use https:// links
27031cb0ef41Sopenharmony_ci
27041cb0ef41Sopenharmony_ciVersion 1.17.2 (24 Jul 2021)
27051cb0ef41Sopenharmony_ci
27061cb0ef41Sopenharmony_cibradh352 (24 Jul 2021)
27071cb0ef41Sopenharmony_ci- fix typo
27081cb0ef41Sopenharmony_ci
27091cb0ef41Sopenharmony_ci- prep for 1.17.2 release
27101cb0ef41Sopenharmony_ci
27111cb0ef41Sopenharmony_ciGitHub (30 Jun 2021)
27121cb0ef41Sopenharmony_ci- [jeanpierrecartal brought this change]
27131cb0ef41Sopenharmony_ci
27141cb0ef41Sopenharmony_ci  Replace strdup() with ares_strdup() (#408)
27151cb0ef41Sopenharmony_ci  
27161cb0ef41Sopenharmony_ci  strdup() is used in src/lib/ares_parse_a_reply.c and src/lib/ares_parse_aaaa_reply.c whereas allocated memory is freed using ares_free().
27171cb0ef41Sopenharmony_ci  
27181cb0ef41Sopenharmony_ci  Bug: 407
27191cb0ef41Sopenharmony_ci  Fix By: Jean-pierre Cartal (@jeanpierrecartal)
27201cb0ef41Sopenharmony_ci
27211cb0ef41Sopenharmony_ci- [Brad House brought this change]
27221cb0ef41Sopenharmony_ci
27231cb0ef41Sopenharmony_ci  Validate hostnames in DNS responses and discard from malicious servers (#406)
27241cb0ef41Sopenharmony_ci  
27251cb0ef41Sopenharmony_ci  To prevent possible users having XSS issues due to intentionally malformed DNS replies, validate hostnames returned in responses and return EBADRESP if they are not valid.
27261cb0ef41Sopenharmony_ci  
27271cb0ef41Sopenharmony_ci  It is not clear what legitimate issues this may cause at this point.
27281cb0ef41Sopenharmony_ci  
27291cb0ef41Sopenharmony_ci  Bug Reported By: philipp.jeitner@sit.fraunhofer.de
27301cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
27311cb0ef41Sopenharmony_ci
27321cb0ef41Sopenharmony_cibradh352 (11 Jun 2021)
27331cb0ef41Sopenharmony_ci- ares_expand_name(): fix formatting and handling of root name response
27341cb0ef41Sopenharmony_ci  
27351cb0ef41Sopenharmony_ci  Fixes issue introduced in prior commit with formatting and handling
27361cb0ef41Sopenharmony_ci  of parsing a root name response which should not be escaped.
27371cb0ef41Sopenharmony_ci  
27381cb0ef41Sopenharmony_ci  Fix By: Brad House
27391cb0ef41Sopenharmony_ci
27401cb0ef41Sopenharmony_ci- ares_expand_name() should escape more characters
27411cb0ef41Sopenharmony_ci  
27421cb0ef41Sopenharmony_ci  RFC1035 5.1 specifies some reserved characters and escaping sequences
27431cb0ef41Sopenharmony_ci  that are allowed to be specified.  Expand the list of reserved characters
27441cb0ef41Sopenharmony_ci  and also escape non-printable characters using the \DDD format as
27451cb0ef41Sopenharmony_ci  specified in the RFC.
27461cb0ef41Sopenharmony_ci  
27471cb0ef41Sopenharmony_ci  Bug Reported By: philipp.jeitner@sit.fraunhofer.de
27481cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
27491cb0ef41Sopenharmony_ci
27501cb0ef41Sopenharmony_ciGitHub (15 Apr 2021)
27511cb0ef41Sopenharmony_ci- [HALX99 brought this change]
27521cb0ef41Sopenharmony_ci
27531cb0ef41Sopenharmony_ci  Fix can't get dns server on macos and ios (#401)
27541cb0ef41Sopenharmony_ci  
27551cb0ef41Sopenharmony_ci  If DNS configuration didn't include search domains on MacOS (or iOS) it would throw an error instead of ignoring.
27561cb0ef41Sopenharmony_ci  
27571cb0ef41Sopenharmony_ci  Fix By: @halx99
27581cb0ef41Sopenharmony_ci
27591cb0ef41Sopenharmony_ci- [catalinh-bd brought this change]
27601cb0ef41Sopenharmony_ci
27611cb0ef41Sopenharmony_ci  Bugfix/crash in ares  sortaddrinfo (#400)
27621cb0ef41Sopenharmony_ci  
27631cb0ef41Sopenharmony_ci  The bug was generated because there was no check for the number
27641cb0ef41Sopenharmony_ci  of items in the list and invalid memory was accesed when the list
27651cb0ef41Sopenharmony_ci  was empty. There is a check for null after calling malloc but on
27661cb0ef41Sopenharmony_ci  some systems it always returns a valid address for size equals 0.
27671cb0ef41Sopenharmony_ci  Relates To: #392, 0903dcecabca283d0fa771632892dc7592b7a66d
27681cb0ef41Sopenharmony_ci  
27691cb0ef41Sopenharmony_ci  Fix By: @catalinh-bd
27701cb0ef41Sopenharmony_ci
27711cb0ef41Sopenharmony_cibradh352 (2 Mar 2021)
27721cb0ef41Sopenharmony_ci- Null deref if ares_getaddrinfo() is terminated with ares_destroy()
27731cb0ef41Sopenharmony_ci  
27741cb0ef41Sopenharmony_ci  ares_freeaddrinfo() was not checking for a Null ptr during cleanup of
27751cb0ef41Sopenharmony_ci  an aborted query.
27761cb0ef41Sopenharmony_ci  
27771cb0ef41Sopenharmony_ci  Once that was resolved it uncovered another possible issue with
27781cb0ef41Sopenharmony_ci  multiple simultaneous underlying queries being outstanding and
27791cb0ef41Sopenharmony_ci  possibly prematurely cleaning up the handle.
27801cb0ef41Sopenharmony_ci  
27811cb0ef41Sopenharmony_ci  Reported By: Michael Kourlas
27821cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
27831cb0ef41Sopenharmony_ci
27841cb0ef41Sopenharmony_ciGitHub (18 Feb 2021)
27851cb0ef41Sopenharmony_ci- [Brad House brought this change]
27861cb0ef41Sopenharmony_ci
27871cb0ef41Sopenharmony_ci  CMake: RANDOM_FILE not defined #397
27881cb0ef41Sopenharmony_ci  
27891cb0ef41Sopenharmony_ci  RANDOM_FILE was never defined by cmake, causing RC4 key generation to use the less secure rand() method.
27901cb0ef41Sopenharmony_ci  
27911cb0ef41Sopenharmony_ci  Also, due to clashes with chain-building from other projects (e.g. curl) that may define RANDOM_FILE, this was renamed to CARES_RANDOM_FILE.
27921cb0ef41Sopenharmony_ci  
27931cb0ef41Sopenharmony_ci  This is the proposed change for #396
27941cb0ef41Sopenharmony_ci  
27951cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
27961cb0ef41Sopenharmony_ci
27971cb0ef41Sopenharmony_ci- [Anton Danielsson brought this change]
27981cb0ef41Sopenharmony_ci
27991cb0ef41Sopenharmony_ci  CMake: fix Make install for iOS/MacOS (#395)
28001cb0ef41Sopenharmony_ci  
28011cb0ef41Sopenharmony_ci  INSTALL TARGETS were missing the BUNDLE DESTINATION
28021cb0ef41Sopenharmony_ci  
28031cb0ef41Sopenharmony_ci  Fix By: Anton Danielsson (@anton-danielsson)
28041cb0ef41Sopenharmony_ci
28051cb0ef41Sopenharmony_ci- [František Dvořák brought this change]
28061cb0ef41Sopenharmony_ci
28071cb0ef41Sopenharmony_ci  Fix build with autotools out of source tree (#394)
28081cb0ef41Sopenharmony_ci  
28091cb0ef41Sopenharmony_ci  Add missing include directory, which fixes the build with autotools in separated build directory.
28101cb0ef41Sopenharmony_ci  
28111cb0ef41Sopenharmony_ci  Fix By: František Dvořák (@valtri)
28121cb0ef41Sopenharmony_ci
28131cb0ef41Sopenharmony_cibradh352 (15 Jan 2021)
28141cb0ef41Sopenharmony_ci- fuzzing: HAVE_CONFIG_H may not be defined so cannot include ares_setup.h.  Its not needed even though we include ares_nameser.h
28151cb0ef41Sopenharmony_ci
28161cb0ef41Sopenharmony_ci- remove redundant header checks
28171cb0ef41Sopenharmony_ci
28181cb0ef41Sopenharmony_ci- properly detect netinet/tcp.h on openbsd
28191cb0ef41Sopenharmony_ci
28201cb0ef41Sopenharmony_ci- more portability updates
28211cb0ef41Sopenharmony_ci
28221cb0ef41Sopenharmony_ci- renamed nameser.h to ares_nameser.h requires Makefile.inc update for distributed files
28231cb0ef41Sopenharmony_ci
28241cb0ef41Sopenharmony_ci- more portability updates
28251cb0ef41Sopenharmony_ci
28261cb0ef41Sopenharmony_ci- remove bad files
28271cb0ef41Sopenharmony_ci
28281cb0ef41Sopenharmony_ci- portability updates for test cases
28291cb0ef41Sopenharmony_ci
28301cb0ef41Sopenharmony_ci- Portability Updates for arpa/nameser.h (#388)
28311cb0ef41Sopenharmony_ci  
28321cb0ef41Sopenharmony_ci  There is too much inconsistency between platforms for arpa/nameser.h and arpa/nameser_compat.h for the way the current files are structured.  Still load the respective system files but make our private nameser.h more forgiving.
28331cb0ef41Sopenharmony_ci  
28341cb0ef41Sopenharmony_ci  Fixes: #388
28351cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
28361cb0ef41Sopenharmony_ci
28371cb0ef41Sopenharmony_ci- ares_parse_ptr_reply() handle NULL for addr/addr_len. Fixes #392
28381cb0ef41Sopenharmony_ci  
28391cb0ef41Sopenharmony_ci  NodeJS passes NULL for addr and 0 for addrlen parameters to ares_parse_ptr_reply().  On systems where malloc(0) returned NULL, this would cause the function to return ARES_ENOMEM, but the cleanup wasn't handled properly and would crash.
28401cb0ef41Sopenharmony_ci  
28411cb0ef41Sopenharmony_ci  This patche fixes that bug, and also hardens ares_free_hostent() to not leak memory during cleanup.
28421cb0ef41Sopenharmony_ci  
28431cb0ef41Sopenharmony_ci  Fixes: #392
28441cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
28451cb0ef41Sopenharmony_ci
28461cb0ef41Sopenharmony_ci- Define behavior of malloc(0)
28471cb0ef41Sopenharmony_ci  
28481cb0ef41Sopenharmony_ci  Some systems may return either NULL or a valid pointer on malloc(0).  c-ares should never call malloc(0) so lets return NULL so we're more likely to find an issue if it were to occur.
28491cb0ef41Sopenharmony_ci
28501cb0ef41Sopenharmony_ciGitHub (24 Dec 2020)
28511cb0ef41Sopenharmony_ci- [dhrumilrana brought this change]
28521cb0ef41Sopenharmony_ci
28531cb0ef41Sopenharmony_ci  z/OS: port (#390)
28541cb0ef41Sopenharmony_ci  
28551cb0ef41Sopenharmony_ci  Port c-ares to z/OS.
28561cb0ef41Sopenharmony_ci  
28571cb0ef41Sopenharmony_ci  Fix By: Dhrumil Rana (@dhrumilrana)
28581cb0ef41Sopenharmony_ci
28591cb0ef41Sopenharmony_ci- [vburdo brought this change]
28601cb0ef41Sopenharmony_ci
28611cb0ef41Sopenharmony_ci  Use unbuffered stdio for /dev/urandom to read only requested data (#391)
28621cb0ef41Sopenharmony_ci  
28631cb0ef41Sopenharmony_ci  Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
28641cb0ef41Sopenharmony_ci  I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.
28651cb0ef41Sopenharmony_ci  
28661cb0ef41Sopenharmony_ci  Fix By: @vburdo
28671cb0ef41Sopenharmony_ci
28681cb0ef41Sopenharmony_ci- [Jay Freeman (saurik) brought this change]
28691cb0ef41Sopenharmony_ci
28701cb0ef41Sopenharmony_ci  This relative header #include needs to use quotes. (#386)
28711cb0ef41Sopenharmony_ci  
28721cb0ef41Sopenharmony_ci  Fix By: Jay Freeman (@saurik)
28731cb0ef41Sopenharmony_ci
28741cb0ef41Sopenharmony_cibradh352 (23 Nov 2020)
28751cb0ef41Sopenharmony_ci- Win32: Fix tools build with autotools static library
28761cb0ef41Sopenharmony_ci  When c-ares is being built as static on Win32, CARES_STATICLIB must
28771cb0ef41Sopenharmony_ci  be defined, but it wasn't being pulled in for the tools.
28781cb0ef41Sopenharmony_ci  
28791cb0ef41Sopenharmony_ci  Fixes: #384
28801cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
28811cb0ef41Sopenharmony_ci
28821cb0ef41Sopenharmony_ci- Loosen requirements for static c-ares library when building tests
28831cb0ef41Sopenharmony_ci  
28841cb0ef41Sopenharmony_ci  It appears that when building tests, it would hardcode enabling building
28851cb0ef41Sopenharmony_ci  of the c-ares static library.  This was probably due to Windows limitations
28861cb0ef41Sopenharmony_ci  in symbol visibility.
28871cb0ef41Sopenharmony_ci  
28881cb0ef41Sopenharmony_ci  This change will use the static library if it exists for tests, always.
28891cb0ef41Sopenharmony_ci  Otherwise, it will only forcibly enable static libraries for tests on
28901cb0ef41Sopenharmony_ci  Windows.
28911cb0ef41Sopenharmony_ci  
28921cb0ef41Sopenharmony_ci  Fixes: #380
28931cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
28941cb0ef41Sopenharmony_ci
28951cb0ef41Sopenharmony_ci- Remove legacy comment about ahost/acountry/adig targets
28961cb0ef41Sopenharmony_ci
28971cb0ef41Sopenharmony_ci- Distribute fuzzinput/fuzznames for fuzz tests
28981cb0ef41Sopenharmony_ci  
28991cb0ef41Sopenharmony_ci  The fuzz test files were not being distributed.  This doesn't appear to be
29001cb0ef41Sopenharmony_ci  a regression, it looks like they have never been distributed.
29011cb0ef41Sopenharmony_ci  
29021cb0ef41Sopenharmony_ci  Fixes: #379
29031cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
29041cb0ef41Sopenharmony_ci
29051cb0ef41Sopenharmony_ciVersion 1.17.1 (19 Nov 2020)
29061cb0ef41Sopenharmony_ci
29071cb0ef41Sopenharmony_ciGitHub (19 Nov 2020)
29081cb0ef41Sopenharmony_ci- [Brad House brought this change]
29091cb0ef41Sopenharmony_ci
29101cb0ef41Sopenharmony_ci  Travis: add iOS target built with CMake (#378)
29111cb0ef41Sopenharmony_ci  
29121cb0ef41Sopenharmony_ci  Issue #377 suggested that CMake builds for iOS with c-ares were broken. This PR adds an automatic Travis build for iOS CMake.
29131cb0ef41Sopenharmony_ci  
29141cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
29151cb0ef41Sopenharmony_ci
29161cb0ef41Sopenharmony_cibradh352 (18 Nov 2020)
29171cb0ef41Sopenharmony_ci- fix build
29181cb0ef41Sopenharmony_ci
29191cb0ef41Sopenharmony_ciGitHub (18 Nov 2020)
29201cb0ef41Sopenharmony_ci- [Fabrice Fontaine brought this change]
29211cb0ef41Sopenharmony_ci
29221cb0ef41Sopenharmony_ci  External projects were using non-public header ares_dns.h, make public again (#376)
29231cb0ef41Sopenharmony_ci  
29241cb0ef41Sopenharmony_ci  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.
29251cb0ef41Sopenharmony_ci  
29261cb0ef41Sopenharmony_ci  Fix By: Fabrice Fontaine (@ffontaine)
29271cb0ef41Sopenharmony_ci
29281cb0ef41Sopenharmony_cibradh352 (17 Nov 2020)
29291cb0ef41Sopenharmony_ci- note that so versioning has moved to configure.ac
29301cb0ef41Sopenharmony_ci
29311cb0ef41Sopenharmony_ci- note about 1.17.1
29321cb0ef41Sopenharmony_ci
29331cb0ef41Sopenharmony_ci- fix sed gone wrong
29341cb0ef41Sopenharmony_ci
29351cb0ef41Sopenharmony_ciGitHub (17 Nov 2020)
29361cb0ef41Sopenharmony_ci- [Daniel Stenberg brought this change]
29371cb0ef41Sopenharmony_ci
29381cb0ef41Sopenharmony_ci  autotools cleanup (#372)
29391cb0ef41Sopenharmony_ci  
29401cb0ef41Sopenharmony_ci  * remove: install-sh mkinstalldirs
29411cb0ef41Sopenharmony_ci  
29421cb0ef41Sopenharmony_ci  They're generated when needed, no need to store in it.
29431cb0ef41Sopenharmony_ci  
29441cb0ef41Sopenharmony_ci  * buildconf: remove custom logic with autoreconf
29451cb0ef41Sopenharmony_ci  
29461cb0ef41Sopenharmony_ci  Fix By: Daniel Stenberg (@bagder)
29471cb0ef41Sopenharmony_ci
29481cb0ef41Sopenharmony_cibradh352 (17 Nov 2020)
29491cb0ef41Sopenharmony_ci- attempt to fix 1.17.0 release distribution issues
29501cb0ef41Sopenharmony_ci
29511cb0ef41Sopenharmony_ciVersion 1.17.0 (16 Nov 2020)
29521cb0ef41Sopenharmony_ci
29531cb0ef41Sopenharmony_cibradh352 (16 Nov 2020)
29541cb0ef41Sopenharmony_ci- 1.17.0 release prep
29551cb0ef41Sopenharmony_ci
29561cb0ef41Sopenharmony_ci- ares_getaddrinfo(): duplicate hints ai_socktype and ai_protocol into output
29571cb0ef41Sopenharmony_ci  
29581cb0ef41Sopenharmony_ci  ai_socktype and ai_protocol were ignored from the hints input.  They are now
29591cb0ef41Sopenharmony_ci  duplicated into the output as expected.  Currently no sanity checks on
29601cb0ef41Sopenharmony_ci  proper values are taking place.
29611cb0ef41Sopenharmony_ci  
29621cb0ef41Sopenharmony_ci  Fixes: #317
29631cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
29641cb0ef41Sopenharmony_ci
29651cb0ef41Sopenharmony_ci- ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in
29661cb0ef41Sopenharmony_ci  
29671cb0ef41Sopenharmony_ci  If there are more ttls returned than the maximum provided by the requestor, then
29681cb0ef41Sopenharmony_ci  the *naddrttls response would be larger than the actual number of elements in
29691cb0ef41Sopenharmony_ci  the addrttls array.
29701cb0ef41Sopenharmony_ci  
29711cb0ef41Sopenharmony_ci  This bug could lead to invalid memory accesses in applications using c-ares.
29721cb0ef41Sopenharmony_ci  
29731cb0ef41Sopenharmony_ci  This behavior appeared to break with PR #257
29741cb0ef41Sopenharmony_ci  
29751cb0ef41Sopenharmony_ci  Fixes: #371
29761cb0ef41Sopenharmony_ci  Reported By: Momtchil Momtchev (@mmomtchev)
29771cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
29781cb0ef41Sopenharmony_ci
29791cb0ef41Sopenharmony_ciGitHub (5 Nov 2020)
29801cb0ef41Sopenharmony_ci- [Dustin Lundquist brought this change]
29811cb0ef41Sopenharmony_ci
29821cb0ef41Sopenharmony_ci  docs: ares_set_local_ip4() uses host byte order (#368)
29831cb0ef41Sopenharmony_ci  
29841cb0ef41Sopenharmony_ci  Properly document brain-dead behavior of ares_set_local_ip4() using host byte order instead of expected network byte order.
29851cb0ef41Sopenharmony_ci  
29861cb0ef41Sopenharmony_ci  Fix By: Dustin Lundquist <d.lundquist@tempered.io>
29871cb0ef41Sopenharmony_ci
29881cb0ef41Sopenharmony_ci- [Łukasz Marszał brought this change]
29891cb0ef41Sopenharmony_ci
29901cb0ef41Sopenharmony_ci  empty hquery->name could lead to invalid memory access (#367)
29911cb0ef41Sopenharmony_ci  
29921cb0ef41Sopenharmony_ci  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.
29931cb0ef41Sopenharmony_ci  
29941cb0ef41Sopenharmony_ci  Fix By: Łukasz Marszał (@lmarszal)
29951cb0ef41Sopenharmony_ci
29961cb0ef41Sopenharmony_cibradh352 (28 Sep 2020)
29971cb0ef41Sopenharmony_ci- Fix OSSFuzz reported issue in CAA reply parsing
29981cb0ef41Sopenharmony_ci  
29991cb0ef41Sopenharmony_ci  OSS-Fuzz is reporting a use-of-uninitialized-value:
30001cb0ef41Sopenharmony_ci  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26012
30011cb0ef41Sopenharmony_ci  
30021cb0ef41Sopenharmony_ci  Reported By: David Drysdale (@daviddrysdale)
30031cb0ef41Sopenharmony_ci
30041cb0ef41Sopenharmony_ciGitHub (26 Sep 2020)
30051cb0ef41Sopenharmony_ci- [David Hotham brought this change]
30061cb0ef41Sopenharmony_ci
30071cb0ef41Sopenharmony_ci  fuzz CAA parsing (#363)
30081cb0ef41Sopenharmony_ci  
30091cb0ef41Sopenharmony_ci  Add fuzz support for CAA parsing
30101cb0ef41Sopenharmony_ci  
30111cb0ef41Sopenharmony_ci  Fix By: David Hotham (@dimbleby)
30121cb0ef41Sopenharmony_ci
30131cb0ef41Sopenharmony_ci- [Daniela Sonnenschein brought this change]
30141cb0ef41Sopenharmony_ci
30151cb0ef41Sopenharmony_ci  Allow parsing of CAA Resource Record (#360)
30161cb0ef41Sopenharmony_ci  
30171cb0ef41Sopenharmony_ci  CAA (Certification Authority Authorization) was introduced in RFC 6844.
30181cb0ef41Sopenharmony_ci  This has been obsoleted by RFC 8659. This commit added the possibility
30191cb0ef41Sopenharmony_ci  to query CAA resource records with adig and adds a parser for CAA
30201cb0ef41Sopenharmony_ci  records, that can be used in conjunction with ares_query(3).
30211cb0ef41Sopenharmony_ci  
30221cb0ef41Sopenharmony_ci  Closes Bug: #292
30231cb0ef41Sopenharmony_ci  Fix By: Daniela Sonnenschein (@lxdicted)
30241cb0ef41Sopenharmony_ci
30251cb0ef41Sopenharmony_ciDaniel Stenberg (17 Sep 2020)
30261cb0ef41Sopenharmony_ci- docs: remove the html and pdf make targets
30271cb0ef41Sopenharmony_ci  
30281cb0ef41Sopenharmony_ci  They're rarely used in our daily work flow and mostly just add friction,
30291cb0ef41Sopenharmony_ci  
30301cb0ef41Sopenharmony_ci  Closes #362
30311cb0ef41Sopenharmony_ci
30321cb0ef41Sopenharmony_cibradh352 (14 Sep 2020)
30331cb0ef41Sopenharmony_ci- ares_process needs to always include nameser.h as it has compat
30341cb0ef41Sopenharmony_ci
30351cb0ef41Sopenharmony_ci- Define T_OPT if system doesn't provide it
30361cb0ef41Sopenharmony_ci
30371cb0ef41Sopenharmony_ciGitHub (12 Sep 2020)
30381cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
30391cb0ef41Sopenharmony_ci
30401cb0ef41Sopenharmony_ci  Change the mailman links (#358)
30411cb0ef41Sopenharmony_ci  
30421cb0ef41Sopenharmony_ci  Links when wrapping become misleading.  Insert newline to prevent wrapping.
30431cb0ef41Sopenharmony_ci  
30441cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
30451cb0ef41Sopenharmony_ci
30461cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
30471cb0ef41Sopenharmony_ci
30481cb0ef41Sopenharmony_ci  [adig] Update man-page for the '-x' option (#357)
30491cb0ef41Sopenharmony_ci  
30501cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
30511cb0ef41Sopenharmony_ci
30521cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
30531cb0ef41Sopenharmony_ci
30541cb0ef41Sopenharmony_ci  [adig] add '-x' option. (#356)
30551cb0ef41Sopenharmony_ci  
30561cb0ef41Sopenharmony_ci  Added a 'dig-style' '-x' option. Also support '-xx' for a
30571cb0ef41Sopenharmony_ci  IPv6 bit-string PTR query.
30581cb0ef41Sopenharmony_ci  
30591cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
30601cb0ef41Sopenharmony_ci
30611cb0ef41Sopenharmony_cibradh352 (12 Sep 2020)
30621cb0ef41Sopenharmony_ci- fix indentation
30631cb0ef41Sopenharmony_ci
30641cb0ef41Sopenharmony_ci- ns_t_opt -> T_OPT
30651cb0ef41Sopenharmony_ci
30661cb0ef41Sopenharmony_ciGitHub (12 Sep 2020)
30671cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
30681cb0ef41Sopenharmony_ci
30691cb0ef41Sopenharmony_ci  Fixes for Watt-32 on djgpp + Windows (#355)
30701cb0ef41Sopenharmony_ci  
30711cb0ef41Sopenharmony_ci  No longer any relation to libcurl since '<libcurl-root>/packages/DOS/common.dj' is dropped.
30721cb0ef41Sopenharmony_ci  This Makefile.dj has been tested on Win-10 only (using the Windows hosted djgpp cross compiler).
30731cb0ef41Sopenharmony_ci  
30741cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
30751cb0ef41Sopenharmony_ci
30761cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
30771cb0ef41Sopenharmony_ci
30781cb0ef41Sopenharmony_ci  Fixes for Watt-32 on Windows and MSDOS (#354)
30791cb0ef41Sopenharmony_ci  
30801cb0ef41Sopenharmony_ci  Move the prototype to 'ares_private.h'.
30811cb0ef41Sopenharmony_ci  
30821cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
30831cb0ef41Sopenharmony_ci
30841cb0ef41Sopenharmony_cibradh352 (11 Sep 2020)
30851cb0ef41Sopenharmony_ci- update path for include
30861cb0ef41Sopenharmony_ci
30871cb0ef41Sopenharmony_ci- remove stale information
30881cb0ef41Sopenharmony_ci
30891cb0ef41Sopenharmony_ci- remove stale information
30901cb0ef41Sopenharmony_ci
30911cb0ef41Sopenharmony_ciBrad House (9 Sep 2020)
30921cb0ef41Sopenharmony_ci- silence compiler warnings
30931cb0ef41Sopenharmony_ci
30941cb0ef41Sopenharmony_ci- Remove stale msvc files from makefile
30951cb0ef41Sopenharmony_ci
30961cb0ef41Sopenharmony_ciGitHub (9 Sep 2020)
30971cb0ef41Sopenharmony_ci- [Brad House brought this change]
30981cb0ef41Sopenharmony_ci
30991cb0ef41Sopenharmony_ci  Reorganize source tree (#349)
31001cb0ef41Sopenharmony_ci  
31011cb0ef41Sopenharmony_ci  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.
31021cb0ef41Sopenharmony_ci  
31031cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
31041cb0ef41Sopenharmony_ci
31051cb0ef41Sopenharmony_ciBrad House (1 Sep 2020)
31061cb0ef41Sopenharmony_ci- remove CURLDEBUG as per #82
31071cb0ef41Sopenharmony_ci
31081cb0ef41Sopenharmony_ciGitHub (1 Sep 2020)
31091cb0ef41Sopenharmony_ci- [Erik Lax brought this change]
31101cb0ef41Sopenharmony_ci
31111cb0ef41Sopenharmony_ci  Detect remote DNS server does not support EDNS as per RFC 6891 (#244)
31121cb0ef41Sopenharmony_ci  
31131cb0ef41Sopenharmony_ci  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.
31141cb0ef41Sopenharmony_ci  
31151cb0ef41Sopenharmony_ci  Fix By: Erik Lax (@eriklax)
31161cb0ef41Sopenharmony_ci
31171cb0ef41Sopenharmony_ciBrad House (27 Aug 2020)
31181cb0ef41Sopenharmony_ci- Fix for #345, don't use 'true' use 1
31191cb0ef41Sopenharmony_ci
31201cb0ef41Sopenharmony_ciGitHub (27 Aug 2020)
31211cb0ef41Sopenharmony_ci- [Seraphime Kirkovski brought this change]
31221cb0ef41Sopenharmony_ci
31231cb0ef41Sopenharmony_ci  ares_gethostbyname: Fix AF_UNSPEC support when using an ip address (#204)
31241cb0ef41Sopenharmony_ci  
31251cb0ef41Sopenharmony_ci  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.
31261cb0ef41Sopenharmony_ci  
31271cb0ef41Sopenharmony_ci  Fix By: Seraphime Kirkovski (@Seraphime)
31281cb0ef41Sopenharmony_ci
31291cb0ef41Sopenharmony_ci- [apenn-msft brought this change]
31301cb0ef41Sopenharmony_ci
31311cb0ef41Sopenharmony_ci  Tests should use dynamic system-assigned ports rather than static port (#346)
31321cb0ef41Sopenharmony_ci  
31331cb0ef41Sopenharmony_ci  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.
31341cb0ef41Sopenharmony_ci  
31351cb0ef41Sopenharmony_ci  Fix By: Anthony Penniston (@apenn-msft)
31361cb0ef41Sopenharmony_ci
31371cb0ef41Sopenharmony_ciBrad House (25 Aug 2020)
31381cb0ef41Sopenharmony_ci- Unset members of the addr struct contain garbage values (#343)
31391cb0ef41Sopenharmony_ci  
31401cb0ef41Sopenharmony_ci  When generating the ares_sockaddr data by getaddrinfo() it was only filling
31411cb0ef41Sopenharmony_ci  in certain members while leaving others uninitialized.  This left garbage
31421cb0ef41Sopenharmony_ci  data if a user tried to use the unset values.  memset() the ares_sockaddr
31431cb0ef41Sopenharmony_ci  to 0 prior to filling in the values to prevent this.
31441cb0ef41Sopenharmony_ci  
31451cb0ef41Sopenharmony_ci  Reported By: @SmorkalovG
31461cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
31471cb0ef41Sopenharmony_ci
31481cb0ef41Sopenharmony_ciGitHub (24 Aug 2020)
31491cb0ef41Sopenharmony_ci- [Jonathan Maye-Hobbs brought this change]
31501cb0ef41Sopenharmony_ci
31511cb0ef41Sopenharmony_ci  FQDN with trailing period should be queried first with larger ndot value (#345)
31521cb0ef41Sopenharmony_ci  
31531cb0ef41Sopenharmony_ci  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.
31541cb0ef41Sopenharmony_ci  
31551cb0ef41Sopenharmony_ci  We may need to determine if we should abort any further searching, however as is probably intended.
31561cb0ef41Sopenharmony_ci  
31571cb0ef41Sopenharmony_ci  Fix by: Jonathan Maye-Hobbs (@wheelpharoah)
31581cb0ef41Sopenharmony_ci
31591cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
31601cb0ef41Sopenharmony_ci
31611cb0ef41Sopenharmony_ci  Update acountry.c country code list (#341)
31621cb0ef41Sopenharmony_ci  
31631cb0ef41Sopenharmony_ci  Updated country_list[]:
31641cb0ef41Sopenharmony_ci   * 2-letter ISO-3166 country-codes.
31651cb0ef41Sopenharmony_ci   * Add, rename some names + codes in accordance with latest table at https://en.wikipedia.org/wiki/ISO_3166-1.
31661cb0ef41Sopenharmony_ci  
31671cb0ef41Sopenharmony_ci  Fix By: Gisle Vanem (@gvanem)
31681cb0ef41Sopenharmony_ci
31691cb0ef41Sopenharmony_ci- [Bulat Gaifullin brought this change]
31701cb0ef41Sopenharmony_ci
31711cb0ef41Sopenharmony_ci  Test case should honor flag HAVE_WRITEV rather than WIN32 (#344)
31721cb0ef41Sopenharmony_ci  
31731cb0ef41Sopenharmony_ci  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.
31741cb0ef41Sopenharmony_ci  
31751cb0ef41Sopenharmony_ci  Fix By: Bulat Gaifullin (@bgaifullin)
31761cb0ef41Sopenharmony_ci
31771cb0ef41Sopenharmony_ciBrad House (18 Jul 2020)
31781cb0ef41Sopenharmony_ci- Ensure c89 support
31791cb0ef41Sopenharmony_ci  
31801cb0ef41Sopenharmony_ci  A couple of for loops in Mac-specific code were using integer declarations
31811cb0ef41Sopenharmony_ci  inside a for loop.  Move the declaration to the top of the preceding
31821cb0ef41Sopenharmony_ci  code block to retain c89 compliance.
31831cb0ef41Sopenharmony_ci  
31841cb0ef41Sopenharmony_ci  Reported By: Jeffrey Walton
31851cb0ef41Sopenharmony_ci
31861cb0ef41Sopenharmony_ciGitHub (2 Jul 2020)
31871cb0ef41Sopenharmony_ci- [Fionn Fitzmaurice brought this change]
31881cb0ef41Sopenharmony_ci
31891cb0ef41Sopenharmony_ci  Avoid buffer overflow in RC4 loop comparison (#336)
31901cb0ef41Sopenharmony_ci  
31911cb0ef41Sopenharmony_ci  The rc4 function iterates over a buffer of size buffer_len who's maximum
31921cb0ef41Sopenharmony_ci  value is INT_MAX with a counter of type short that is not guaranteed to
31931cb0ef41Sopenharmony_ci  have maximum size INT_MAX.
31941cb0ef41Sopenharmony_ci  
31951cb0ef41Sopenharmony_ci  In circumstances where short is narrower than int and where buffer_len
31961cb0ef41Sopenharmony_ci  is larger than the maximum value of a short, it may be possible to loop
31971cb0ef41Sopenharmony_ci  infinitely as counter will overflow and never be greater than or equal
31981cb0ef41Sopenharmony_ci  to buffer_len.
31991cb0ef41Sopenharmony_ci  
32001cb0ef41Sopenharmony_ci  The solution is to make the comparison be between types of equal width.
32011cb0ef41Sopenharmony_ci  This commit defines counter as an int.
32021cb0ef41Sopenharmony_ci  
32031cb0ef41Sopenharmony_ci  Fix By: Fionn Fitzmaurice (@fionn)
32041cb0ef41Sopenharmony_ci
32051cb0ef41Sopenharmony_ci- [anonymoushelpishere brought this change]
32061cb0ef41Sopenharmony_ci
32071cb0ef41Sopenharmony_ci  Updated help information for adig, acountry, and ahost. (#334)
32081cb0ef41Sopenharmony_ci  
32091cb0ef41Sopenharmony_ci  Provide more descriptive help information for various utilities.
32101cb0ef41Sopenharmony_ci  
32111cb0ef41Sopenharmony_ci  Fix By: @anonymoushelpishere
32121cb0ef41Sopenharmony_ci
32131cb0ef41Sopenharmony_ci- [lutianxiong brought this change]
32141cb0ef41Sopenharmony_ci
32151cb0ef41Sopenharmony_ci  avoid read-heap-buffer-overflow (#332)
32161cb0ef41Sopenharmony_ci  
32171cb0ef41Sopenharmony_ci  Fix invalid read in ares_parse_soa_reply.c found during fuzzing
32181cb0ef41Sopenharmony_ci  
32191cb0ef41Sopenharmony_ci  Fixes Bug: #333
32201cb0ef41Sopenharmony_ci  Fix By: lutianxiong (@ltx2018)
32211cb0ef41Sopenharmony_ci
32221cb0ef41Sopenharmony_ci- [Ivan Baidakou brought this change]
32231cb0ef41Sopenharmony_ci
32241cb0ef41Sopenharmony_ci  Fix: sizeof(sizeof(addr.saX)) -> sizeof(addr.saX) in readaddrinfo (#331)
32251cb0ef41Sopenharmony_ci  
32261cb0ef41Sopenharmony_ci  Looks like a sed-gone-wrong, a sizeof inside of a sizeof.
32271cb0ef41Sopenharmony_ci  
32281cb0ef41Sopenharmony_ci  Fix By: Ivan Baidakou (@basiliscos)
32291cb0ef41Sopenharmony_ci
32301cb0ef41Sopenharmony_ciVersion 1.16.1 (11 May 2020)
32311cb0ef41Sopenharmony_ci
32321cb0ef41Sopenharmony_ciBrad House (11 May 2020)
32331cb0ef41Sopenharmony_ci- c-ares 1.16.1 release prep
32341cb0ef41Sopenharmony_ci
32351cb0ef41Sopenharmony_ci- update travis to use xcode11.4
32361cb0ef41Sopenharmony_ci
32371cb0ef41Sopenharmony_ci- Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
32381cb0ef41Sopenharmony_ci  
32391cb0ef41Sopenharmony_ci  In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
32401cb0ef41Sopenharmony_ci  it would result in an invalid read and double-free due to calling end_hquery() twice.
32411cb0ef41Sopenharmony_ci  
32421cb0ef41Sopenharmony_ci  Reported By: Jann Horn @ Google Project Zero
32431cb0ef41Sopenharmony_ci
32441cb0ef41Sopenharmony_ciGitHub (30 Apr 2020)
32451cb0ef41Sopenharmony_ci- [shelley vohr brought this change]
32461cb0ef41Sopenharmony_ci
32471cb0ef41Sopenharmony_ci  fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328)
32481cb0ef41Sopenharmony_ci  
32491cb0ef41Sopenharmony_ci  Fixes the following compatibility issues:
32501cb0ef41Sopenharmony_ci  * Use RegQueryValueExA instead of RegQueryValueEx
32511cb0ef41Sopenharmony_ci  * Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings
32521cb0ef41Sopenharmony_ci  * Use RegOpenKeyExA instead of RegOpenKeyExA
32531cb0ef41Sopenharmony_ci  * Use GetWindowsDirectoryA instead of GetWindowsDirectoryA
32541cb0ef41Sopenharmony_ci  
32551cb0ef41Sopenharmony_ci  Fix By: Shelley Vohr (@codebytere)
32561cb0ef41Sopenharmony_ci  Closes: #327
32571cb0ef41Sopenharmony_ci
32581cb0ef41Sopenharmony_ciBrad House (13 Apr 2020)
32591cb0ef41Sopenharmony_ci- travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail.  Disable.
32601cb0ef41Sopenharmony_ci
32611cb0ef41Sopenharmony_ci- travis: bump macos image to the latest
32621cb0ef41Sopenharmony_ci
32631cb0ef41Sopenharmony_ci- cast-align warnings are false for struct sockaddr, silence
32641cb0ef41Sopenharmony_ci  
32651cb0ef41Sopenharmony_ci  Create a macro to silence false cast-align warnings when casting
32661cb0ef41Sopenharmony_ci  struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *.
32671cb0ef41Sopenharmony_ci  
32681cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
32691cb0ef41Sopenharmony_ci
32701cb0ef41Sopenharmony_ci- MacOS: Enable libresolv support for retrieving DNS servers like iOS does.
32711cb0ef41Sopenharmony_ci
32721cb0ef41Sopenharmony_ciGitHub (10 Apr 2020)
32731cb0ef41Sopenharmony_ci- [Dmitry Igrishin brought this change]
32741cb0ef41Sopenharmony_ci
32751cb0ef41Sopenharmony_ci  CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)
32761cb0ef41Sopenharmony_ci  
32771cb0ef41Sopenharmony_ci  Populate the INCLUDE_DIRECTORIES property of installed targets
32781cb0ef41Sopenharmony_ci  
32791cb0ef41Sopenharmony_ci  Fix By: Dmitry Igrishin (@dmitigr)
32801cb0ef41Sopenharmony_ci
32811cb0ef41Sopenharmony_ciBrad House (10 Apr 2020)
32821cb0ef41Sopenharmony_ci- travis: make valgrind use cmake for tests
32831cb0ef41Sopenharmony_ci
32841cb0ef41Sopenharmony_ci- dont try to use libtool to run valgrind
32851cb0ef41Sopenharmony_ci
32861cb0ef41Sopenharmony_ci- valgrind requires libtool installed to wrap tests
32871cb0ef41Sopenharmony_ci
32881cb0ef41Sopenharmony_ci- scan build 7
32891cb0ef41Sopenharmony_ci
32901cb0ef41Sopenharmony_ci- fix travis live test
32911cb0ef41Sopenharmony_ci
32921cb0ef41Sopenharmony_ci- add debug for travis
32931cb0ef41Sopenharmony_ci
32941cb0ef41Sopenharmony_ci- try without sudo
32951cb0ef41Sopenharmony_ci
32961cb0ef41Sopenharmony_ci- attempt to modernize travis build environment
32971cb0ef41Sopenharmony_ci
32981cb0ef41Sopenharmony_ciGitHub (6 Apr 2020)
32991cb0ef41Sopenharmony_ci- [Teemu R brought this change]
33001cb0ef41Sopenharmony_ci
33011cb0ef41Sopenharmony_ci  Allow TXT records on CHAOS qclass (#321)
33021cb0ef41Sopenharmony_ci  
33031cb0ef41Sopenharmony_ci  Some DNS servers intentionally "misuse" the obsoleted CHAOS (CH) qclass to provide things like `version.bind`, `version.server`, `authors.bind`, `hostname.bind` and `id.server`.
33041cb0ef41Sopenharmony_ci  
33051cb0ef41Sopenharmony_ci  C-ares was not allowing such use cases.
33061cb0ef41Sopenharmony_ci  
33071cb0ef41Sopenharmony_ci  Fix By: Teemu R. (@rytilahti)
33081cb0ef41Sopenharmony_ci
33091cb0ef41Sopenharmony_ciBrad House (5 Apr 2020)
33101cb0ef41Sopenharmony_ci- Remove warnings from ares_getaddrinfo.3 man page
33111cb0ef41Sopenharmony_ci  
33121cb0ef41Sopenharmony_ci  As reported in #319, non-standard macros of .IN were used.
33131cb0ef41Sopenharmony_ci  Replace with .RS/.RE.
33141cb0ef41Sopenharmony_ci  
33151cb0ef41Sopenharmony_ci  Fixes: #319
33161cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
33171cb0ef41Sopenharmony_ci
33181cb0ef41Sopenharmony_ci- ares_getaddrinfo man page render better for man2html
33191cb0ef41Sopenharmony_ci
33201cb0ef41Sopenharmony_ci- update man pages to render better for man2html
33211cb0ef41Sopenharmony_ci
33221cb0ef41Sopenharmony_ciVersion 1.16.0 (12 Mar 2020)
33231cb0ef41Sopenharmony_ci
33241cb0ef41Sopenharmony_ciBrad House (12 Mar 2020)
33251cb0ef41Sopenharmony_ci- 1.16.0 release notes draft
33261cb0ef41Sopenharmony_ci
33271cb0ef41Sopenharmony_ci- attempt to fix double-free introduced in e0517f9
33281cb0ef41Sopenharmony_ci
33291cb0ef41Sopenharmony_ciGitHub (12 Mar 2020)
33301cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
33311cb0ef41Sopenharmony_ci
33321cb0ef41Sopenharmony_ci  test: fuzzer input triggering double free (#315)
33331cb0ef41Sopenharmony_ci  
33341cb0ef41Sopenharmony_ci  OSS-Fuzz has reported a double-free with the fuzzer input file
33351cb0ef41Sopenharmony_ci  included here; run with:
33361cb0ef41Sopenharmony_ci    ./test/aresfuzz test/fuzzinput/clusterfuzz-5637790584012800
33371cb0ef41Sopenharmony_ci  
33381cb0ef41Sopenharmony_ci  Bisecting the failure points to commit e0517f97d988 ("Parse SOA records
33391cb0ef41Sopenharmony_ci  from ns_t_any response (#103)")
33401cb0ef41Sopenharmony_ci
33411cb0ef41Sopenharmony_ci- [Brad House brought this change]
33421cb0ef41Sopenharmony_ci
33431cb0ef41Sopenharmony_ci  CMake: Install Manpages (#314)
33441cb0ef41Sopenharmony_ci  
33451cb0ef41Sopenharmony_ci  CMake wasn't installing manpages.
33461cb0ef41Sopenharmony_ci  
33471cb0ef41Sopenharmony_ci  Fixes #297
33481cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
33491cb0ef41Sopenharmony_ci
33501cb0ef41Sopenharmony_ci- [Brad House brought this change]
33511cb0ef41Sopenharmony_ci
33521cb0ef41Sopenharmony_ci  Enable cmake tests for AppVeyor (#313)
33531cb0ef41Sopenharmony_ci  
33541cb0ef41Sopenharmony_ci  Tests require linking against the static library on Windows otherwise the symbols are not exported for internals being tested.
33551cb0ef41Sopenharmony_ci  
33561cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
33571cb0ef41Sopenharmony_ci
33581cb0ef41Sopenharmony_ciBrad House (11 Mar 2020)
33591cb0ef41Sopenharmony_ci- Add AppVeyor badge
33601cb0ef41Sopenharmony_ci
33611cb0ef41Sopenharmony_ci- bump c-ares version to 1.16.0. test AppVeyor integration.
33621cb0ef41Sopenharmony_ci
33631cb0ef41Sopenharmony_ciGitHub (11 Mar 2020)
33641cb0ef41Sopenharmony_ci- [Brad House brought this change]
33651cb0ef41Sopenharmony_ci
33661cb0ef41Sopenharmony_ci  replace all usages of inet_addr() with ares_inet_pton() which is more proper (#312)
33671cb0ef41Sopenharmony_ci  
33681cb0ef41Sopenharmony_ci  Replace usage of inet_addr() with ares_inet_pton() which is more appropriate and fixes issues with legitimate addresses like 255.255.255.0. IPv6 already used this.
33691cb0ef41Sopenharmony_ci  
33701cb0ef41Sopenharmony_ci  Fixes #309
33711cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
33721cb0ef41Sopenharmony_ci
33731cb0ef41Sopenharmony_ci- [Brad House brought this change]
33741cb0ef41Sopenharmony_ci
33751cb0ef41Sopenharmony_ci  CMake: Generate WinPDB files during build (#311)
33761cb0ef41Sopenharmony_ci  
33771cb0ef41Sopenharmony_ci  Build and Install PDB (Windows Debug Symbol) files if supported by underlying system.
33781cb0ef41Sopenharmony_ci  
33791cb0ef41Sopenharmony_ci  Also update AppVeyor to test cmake builds.
33801cb0ef41Sopenharmony_ci  
33811cb0ef41Sopenharmony_ci  Fixes #245
33821cb0ef41Sopenharmony_ci  Fix By: Piotr Pietraszkiewicz (@ppietrasa) and Brad House (@bradh352)
33831cb0ef41Sopenharmony_ci
33841cb0ef41Sopenharmony_ci- [Brad House brought this change]
33851cb0ef41Sopenharmony_ci
33861cb0ef41Sopenharmony_ci  CMake: Rework library function checking (#310)
33871cb0ef41Sopenharmony_ci  
33881cb0ef41Sopenharmony_ci  CHECK_LIBRARY_EXISTS(), while it takes a function name, does not actually verify the function exists in the library being evaluated. Instead, if the function is found in any dependent library, and the referenced library also exists, it returns true. This is not desirable.
33891cb0ef41Sopenharmony_ci  
33901cb0ef41Sopenharmony_ci  Wrap with a Macro to change the behavior.
33911cb0ef41Sopenharmony_ci  
33921cb0ef41Sopenharmony_ci  Fixes: #307
33931cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
33941cb0ef41Sopenharmony_ci
33951cb0ef41Sopenharmony_ci- [Dron Rathore brought this change]
33961cb0ef41Sopenharmony_ci
33971cb0ef41Sopenharmony_ci  Parse SOA records from ns_t_any response (#103)
33981cb0ef41Sopenharmony_ci  
33991cb0ef41Sopenharmony_ci  Added the capability of parsing SOA record from a response buffer of ns_t_any type query, this implementation doesn't interfere with existing T_SOA query's response as that too is treated as a list of records. The function returns ARES_EBADRESP if no SOA record is found(as per RFC).
34001cb0ef41Sopenharmony_ci  
34011cb0ef41Sopenharmony_ci  The basic idea of sticking to RFC that a ns_t_any too should return an SOA record is something open for discussion but I have kept the functionality intact as it was previously i.e the function returns ARES_EBADRESP if it doesn't find a SOA record regardless of which response it is parsing i.e. T_SOA or T_ANY.
34021cb0ef41Sopenharmony_ci  
34031cb0ef41Sopenharmony_ci  Note that asking for T_ANY is generally a bad idea:
34041cb0ef41Sopenharmony_ci  - https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/
34051cb0ef41Sopenharmony_ci  - https://tools.ietf.org/html/draft-ietf-dnsop-refuse-any
34061cb0ef41Sopenharmony_ci  
34071cb0ef41Sopenharmony_ci  Bug: #102
34081cb0ef41Sopenharmony_ci  Fix By: Dron Rathore (@DronRathore)
34091cb0ef41Sopenharmony_ci
34101cb0ef41Sopenharmony_ci- [Stephen Bryant brought this change]
34111cb0ef41Sopenharmony_ci
34121cb0ef41Sopenharmony_ci  Added CPack functionality for generating RPM or DEB packages (#283)
34131cb0ef41Sopenharmony_ci  
34141cb0ef41Sopenharmony_ci  Added CPack functionality for generating RPM or DEB packages
34151cb0ef41Sopenharmony_ci  
34161cb0ef41Sopenharmony_ci  ie: run `cpack -G RPM` (or "DEB") after building with CMake.
34171cb0ef41Sopenharmony_ci  
34181cb0ef41Sopenharmony_ci  The current configuration creates 3 separate packages for the shared library,
34191cb0ef41Sopenharmony_ci  the development files and the tools.
34201cb0ef41Sopenharmony_ci  
34211cb0ef41Sopenharmony_ci  Fix By: Stephen Bryant (@bf-bryants)
34221cb0ef41Sopenharmony_ci
34231cb0ef41Sopenharmony_ci- [tjwalton brought this change]
34241cb0ef41Sopenharmony_ci
34251cb0ef41Sopenharmony_ci  ares_gethostbyname: Return ENODATA if no valid A or AAAA record found (#304)
34261cb0ef41Sopenharmony_ci  
34271cb0ef41Sopenharmony_ci  ares_gethostbyname() was returning ESUCCESS when no A or AAAA record was found but a CNAME pointing nowhere was present.  ENODATA should be returned instead, however the hosts pointer will still be present to provide the alias list.
34281cb0ef41Sopenharmony_ci  
34291cb0ef41Sopenharmony_ci  * Return ENODATA if no valid A or AAAA record found
34301cb0ef41Sopenharmony_ci  * Fix and update test ParseAReplyNoData.
34311cb0ef41Sopenharmony_ci  * Add test for new ENODATA behaviour in ares_gethostbyname.
34321cb0ef41Sopenharmony_ci  
34331cb0ef41Sopenharmony_ci  Fixes Bug #303
34341cb0ef41Sopenharmony_ci  Fix By: @tjwalton
34351cb0ef41Sopenharmony_ci
34361cb0ef41Sopenharmony_ci- [Michal Rostecki brought this change]
34371cb0ef41Sopenharmony_ci
34381cb0ef41Sopenharmony_ci  test: Separate live tests from SetServers* tests (#299)
34391cb0ef41Sopenharmony_ci  
34401cb0ef41Sopenharmony_ci  Before this change, SetServers, SetServersPorts and SetServersCSV
34411cb0ef41Sopenharmony_ci  contained test cases trying to make DNS queries with the google.com
34421cb0ef41Sopenharmony_ci  hostname, which requires Internet connectivity. Tests with that
34431cb0ef41Sopenharmony_ci  requirement should be defined in the ares-test-live.cc file and contain
34441cb0ef41Sopenharmony_ci  "Live" prefix to filter them out with `--gtest_filter=-*.Live*` on
34451cb0ef41Sopenharmony_ci  machines without Internet connectivity.
34461cb0ef41Sopenharmony_ci  
34471cb0ef41Sopenharmony_ci  Fix By: Michal Rostecki (@mrostecki)
34481cb0ef41Sopenharmony_ci
34491cb0ef41Sopenharmony_ci- [Adam Majer brought this change]
34501cb0ef41Sopenharmony_ci
34511cb0ef41Sopenharmony_ci  Only count valid addresses when response parsing (#302)
34521cb0ef41Sopenharmony_ci  
34531cb0ef41Sopenharmony_ci  When ares_parse_a_reply or ares_parse_aaaa_reply is called in case
34541cb0ef41Sopenharmony_ci  where another AAAA and A responses exist, the resulting ares_addrttl
34551cb0ef41Sopenharmony_ci  count is invalid and the structure points to gibberish.
34561cb0ef41Sopenharmony_ci  
34571cb0ef41Sopenharmony_ci  This is a regression since 1.15.
34581cb0ef41Sopenharmony_ci  
34591cb0ef41Sopenharmony_ci  Issue: https://github.com/c-ares/c-ares/issues/300
34601cb0ef41Sopenharmony_ci  Fix By: Adam Majer (@AdamMajer)
34611cb0ef41Sopenharmony_ci
34621cb0ef41Sopenharmony_ciBrad House (24 Dec 2019)
34631cb0ef41Sopenharmony_ci- [Kyle Edwards brought this change]
34641cb0ef41Sopenharmony_ci
34651cb0ef41Sopenharmony_ci  CMake: Provide c-ares version in package export file (#296)
34661cb0ef41Sopenharmony_ci  
34671cb0ef41Sopenharmony_ci  The CMake package export file should provide version information.
34681cb0ef41Sopenharmony_ci  
34691cb0ef41Sopenharmony_ci  Fix By: Kyle Edwards (@KyleFromKitware)
34701cb0ef41Sopenharmony_ci
34711cb0ef41Sopenharmony_ci- [Ben Noordhuis brought this change]
34721cb0ef41Sopenharmony_ci
34731cb0ef41Sopenharmony_ci  Accept invalid /etc/resolv.conf lookup values, ability to build container tests (#274)
34741cb0ef41Sopenharmony_ci  
34751cb0ef41Sopenharmony_ci  * Add CARES_BUILD_CONTAINER_TESTS CMake option to add ability to build the Linux-only containerized tests.
34761cb0ef41Sopenharmony_ci  * Accept invalid /etc/resolv.conf lookup values
34771cb0ef41Sopenharmony_ci  
34781cb0ef41Sopenharmony_ci  Before this commit invalid `lookup` values resulted in c-ares not using
34791cb0ef41Sopenharmony_ci  any lookups without any clear indication why. After this commit it uses
34801cb0ef41Sopenharmony_ci  the default "fb".
34811cb0ef41Sopenharmony_ci  
34821cb0ef41Sopenharmony_ci  Fix By: Ben Noordhuis (@bnoordhuis)
34831cb0ef41Sopenharmony_ci
34841cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
34851cb0ef41Sopenharmony_ci
34861cb0ef41Sopenharmony_ci  Parallel A and AAAA lookups in `ares_getaddrinfo` (#290)
34871cb0ef41Sopenharmony_ci  
34881cb0ef41Sopenharmony_ci  A and AAAA lookups for ares_getaddrinfo() are now performed in parallel.
34891cb0ef41Sopenharmony_ci  
34901cb0ef41Sopenharmony_ci  For this change `ares_search` was removed from `ares_getaddrinfo`.
34911cb0ef41Sopenharmony_ci  Instead `ares_query` in combination with `next_dns_lookup` are
34921cb0ef41Sopenharmony_ci  doing the suffix search.
34931cb0ef41Sopenharmony_ci  
34941cb0ef41Sopenharmony_ci  Adding support for `.onion` addresses which are tested by
34951cb0ef41Sopenharmony_ci  `TEST_F(DefaultChannelTest, GetAddrinfoOnionDomain)`
34961cb0ef41Sopenharmony_ci  
34971cb0ef41Sopenharmony_ci  Fix By: Christian Ammer (@ChristianAmmer)
34981cb0ef41Sopenharmony_ci
34991cb0ef41Sopenharmony_ci- [Vy Nguyen brought this change]
35001cb0ef41Sopenharmony_ci
35011cb0ef41Sopenharmony_ci  Move variables into the block where it is used to avoid unused-vars (#281)
35021cb0ef41Sopenharmony_ci  
35031cb0ef41Sopenharmony_ci  Warning uncovered with [-Werror, -Wunused-variables]
35041cb0ef41Sopenharmony_ci  
35051cb0ef41Sopenharmony_ci  Fix By: Vy Nguyen (@oontvoo)
35061cb0ef41Sopenharmony_ci
35071cb0ef41Sopenharmony_ci- [Vy Nguyen brought this change]
35081cb0ef41Sopenharmony_ci
35091cb0ef41Sopenharmony_ci  Rename local macros to avoid conflicting with system ones and remove unsed variables. (Otherwise code will break once compiled with [-Werror,-Wmacro-redefined,-Wunused-variable] ) (#280)
35101cb0ef41Sopenharmony_ci  
35111cb0ef41Sopenharmony_ci  Fix new getaddrinfo code to not redefine macros on some systems.
35121cb0ef41Sopenharmony_ci  
35131cb0ef41Sopenharmony_ci  Fix By: Vy Nguyen (@oontvoo)
35141cb0ef41Sopenharmony_ci
35151cb0ef41Sopenharmony_ci- [Egor Pugin brought this change]
35161cb0ef41Sopenharmony_ci
35171cb0ef41Sopenharmony_ci  [ares_getenv] Return NULL in all cases. (#279)
35181cb0ef41Sopenharmony_ci  
35191cb0ef41Sopenharmony_ci  if ares_getenv is defined, it must return a value on all platforms.
35201cb0ef41Sopenharmony_ci  
35211cb0ef41Sopenharmony_ci  Fix By: Egor Pugin (@egorpugin)
35221cb0ef41Sopenharmony_ci
35231cb0ef41Sopenharmony_ci- [Abhishek Arya brought this change]
35241cb0ef41Sopenharmony_ci
35251cb0ef41Sopenharmony_ci  Add OSS-Fuzz fuzzing badge (#278)
35261cb0ef41Sopenharmony_ci  
35271cb0ef41Sopenharmony_ci  Adds based on instructions at
35281cb0ef41Sopenharmony_ci  https://google.github.io/oss-fuzz/getting-started/new-project-guide/#status-badge
35291cb0ef41Sopenharmony_ci  
35301cb0ef41Sopenharmony_ci  Patch By: Abhishek Arya (@inferno-chromium)
35311cb0ef41Sopenharmony_ci
35321cb0ef41Sopenharmony_ci- [Peter Eisentraut brought this change]
35331cb0ef41Sopenharmony_ci
35341cb0ef41Sopenharmony_ci  ares_init_options.3: Fix layout (#275)
35351cb0ef41Sopenharmony_ci  
35361cb0ef41Sopenharmony_ci  7e6af8e inserted the documentation of resolvconf_path in the middle of
35371cb0ef41Sopenharmony_ci  the item for ednspsz, leading to broken layout.  Fix that.
35381cb0ef41Sopenharmony_ci  
35391cb0ef41Sopenharmony_ci  Fix By: Peter Eisentraut (@petere)
35401cb0ef41Sopenharmony_ci
35411cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
35421cb0ef41Sopenharmony_ci
35431cb0ef41Sopenharmony_ci  manpages: Fix typos detected by lintian (#269)
35441cb0ef41Sopenharmony_ci  
35451cb0ef41Sopenharmony_ci  
35461cb0ef41Sopenharmony_ci  Fix By: Gregor Jasny (@gjasny)
35471cb0ef41Sopenharmony_ci
35481cb0ef41Sopenharmony_ci- [lifenjoiner brought this change]
35491cb0ef41Sopenharmony_ci
35501cb0ef41Sopenharmony_ci  keep command line usage up to date (#256)
35511cb0ef41Sopenharmony_ci  
35521cb0ef41Sopenharmony_ci  adig and ahost built-in help did not match args taken.
35531cb0ef41Sopenharmony_ci  
35541cb0ef41Sopenharmony_ci  Fix-By: @lifenjoiner
35551cb0ef41Sopenharmony_ci
35561cb0ef41Sopenharmony_ci- [Dan Noé brought this change]
35571cb0ef41Sopenharmony_ci
35581cb0ef41Sopenharmony_ci  ares-test.cc: Handle nullptr in AddrInfo ostream. (#268)
35591cb0ef41Sopenharmony_ci  
35601cb0ef41Sopenharmony_ci  The const AddrInfo& argument to operator<< overload for AddrInfo can be
35611cb0ef41Sopenharmony_ci  a nullptr unique_ptr. Handle this explicitly by printing {nullptr} if
35621cb0ef41Sopenharmony_ci  the rest of the function cannot be safely executed.
35631cb0ef41Sopenharmony_ci  
35641cb0ef41Sopenharmony_ci  Fix-by: Dan Noé <dpn@google.com>
35651cb0ef41Sopenharmony_ci
35661cb0ef41Sopenharmony_ci- [Dan Noé brought this change]
35671cb0ef41Sopenharmony_ci
35681cb0ef41Sopenharmony_ci  Add missing limits.h include from ares_getaddrinfo.c (#267)
35691cb0ef41Sopenharmony_ci  
35701cb0ef41Sopenharmony_ci  This files references INT_MAX, but does not include limits.h. This can
35711cb0ef41Sopenharmony_ci  cause a build failure on some platforms. Include limits.h if we have it.
35721cb0ef41Sopenharmony_ci  
35731cb0ef41Sopenharmony_ci  Fix-by: Dan Noé <dpn@google.com>
35741cb0ef41Sopenharmony_ci
35751cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
35761cb0ef41Sopenharmony_ci
35771cb0ef41Sopenharmony_ci  fix fuzzer docs and add missing getaddrinfo docs (#265)
35781cb0ef41Sopenharmony_ci  
35791cb0ef41Sopenharmony_ci  There is a fix for a bit outdated clang fuzzer docs and ares_getaddrinfo docs.
35801cb0ef41Sopenharmony_ci  
35811cb0ef41Sopenharmony_ci  Fix By: Andrew Selivanov (@ki11roy)
35821cb0ef41Sopenharmony_ci
35831cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
35841cb0ef41Sopenharmony_ci
35851cb0ef41Sopenharmony_ci  Fix leak and crash in ares_parse_a/aaaa_reply (#264)
35861cb0ef41Sopenharmony_ci  
35871cb0ef41Sopenharmony_ci  * fix leak if naddress of particular type found
35881cb0ef41Sopenharmony_ci  * fix segfault when wanted ttls count lesser than count of result records
35891cb0ef41Sopenharmony_ci  * add fuzzer input files that trigger problems (from #263)
35901cb0ef41Sopenharmony_ci  
35911cb0ef41Sopenharmony_ci  Reported-By: David Drysdale (@daviddrysdale)
35921cb0ef41Sopenharmony_ci  Fix-By: Andrew Selivanov (@ki11roy)
35931cb0ef41Sopenharmony_ci
35941cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
35951cb0ef41Sopenharmony_ci
35961cb0ef41Sopenharmony_ci  fix segfault when parsing wrong type of record (#262)
35971cb0ef41Sopenharmony_ci  
35981cb0ef41Sopenharmony_ci  Fixes segfault when trying to ares_parse_aaaa with AF_INET and vise versa.
35991cb0ef41Sopenharmony_ci  
36001cb0ef41Sopenharmony_ci  Fix By: Andrew Selivanov (@ki11roy)
36011cb0ef41Sopenharmony_ci
36021cb0ef41Sopenharmony_ci- work around mingw compile failure
36031cb0ef41Sopenharmony_ci
36041cb0ef41Sopenharmony_ci- c++ requires explicit casts
36051cb0ef41Sopenharmony_ci
36061cb0ef41Sopenharmony_ci- support EnvValue on Windows by implementing setenv/unsetenv
36071cb0ef41Sopenharmony_ci
36081cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
36091cb0ef41Sopenharmony_ci
36101cb0ef41Sopenharmony_ci  getaddrinfo enhancements (#257)
36111cb0ef41Sopenharmony_ci  
36121cb0ef41Sopenharmony_ci  * Service support has been added to getaddrinfo.
36131cb0ef41Sopenharmony_ci  * ares_parse_a/aaaa_record now share code with the addrinfo parser.
36141cb0ef41Sopenharmony_ci  * Private ares_addrinfo structure with useful extensions such as ttls (including cname ttls),
36151cb0ef41Sopenharmony_ci    as well as the ability to list multiple cnames in chain of lookups
36161cb0ef41Sopenharmony_ci  
36171cb0ef41Sopenharmony_ci  Work By: Andrew Selivanov @ki11roy
36181cb0ef41Sopenharmony_ci
36191cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
36201cb0ef41Sopenharmony_ci
36211cb0ef41Sopenharmony_ci  fix ares__sortaddrinfo, use wrappers for sock_funcs (#258)
36221cb0ef41Sopenharmony_ci  
36231cb0ef41Sopenharmony_ci  Some socket functions weren't exposed for use by other areas of the library.  Expose
36241cb0ef41Sopenharmony_ci  those and make use of them in ares__sortaddrinfo().
36251cb0ef41Sopenharmony_ci  
36261cb0ef41Sopenharmony_ci  Fix By: Andrew Selivanov (@ki11roy)
36271cb0ef41Sopenharmony_ci
36281cb0ef41Sopenharmony_ci- Fix c89 compilation support broken by .onion rejection changes
36291cb0ef41Sopenharmony_ci  
36301cb0ef41Sopenharmony_ci  Move .onion check lower after all variables have been declared.
36311cb0ef41Sopenharmony_ci  
36321cb0ef41Sopenharmony_ci  Bug: #246
36331cb0ef41Sopenharmony_ci
36341cb0ef41Sopenharmony_ci- [kedixa brought this change]
36351cb0ef41Sopenharmony_ci
36361cb0ef41Sopenharmony_ci  getaddrinfo: callback must be called on bad domain (#249)
36371cb0ef41Sopenharmony_ci  
36381cb0ef41Sopenharmony_ci  Due to an order of incrementing the remaining queries and calling ares_query, on a bad domain
36391cb0ef41Sopenharmony_ci  the registered callback wouldn't be called.
36401cb0ef41Sopenharmony_ci  
36411cb0ef41Sopenharmony_ci  Bug: #248
36421cb0ef41Sopenharmony_ci  Fixed-By: @kedixa
36431cb0ef41Sopenharmony_ci
36441cb0ef41Sopenharmony_ci- [Darrin W. Cullop brought this change]
36451cb0ef41Sopenharmony_ci
36461cb0ef41Sopenharmony_ci  Windows ARM/ARM64 requires AdvApi32 (#252)
36471cb0ef41Sopenharmony_ci  
36481cb0ef41Sopenharmony_ci  Fix link issues caused by missing library that appears to only be required on ARM (though
36491cb0ef41Sopenharmony_ci  docs don't list this restriction). Doesn't hurt to require it everywhere.
36501cb0ef41Sopenharmony_ci  
36511cb0ef41Sopenharmony_ci  Bug: #251
36521cb0ef41Sopenharmony_ci  Fixed-By: Darrin Cullop (@dwcullop)
36531cb0ef41Sopenharmony_ci
36541cb0ef41Sopenharmony_ci- [kedixa brought this change]
36551cb0ef41Sopenharmony_ci
36561cb0ef41Sopenharmony_ci  getaddrinfo: avoid infinite loop in case of NXDOMAIN(#240) (#242)
36571cb0ef41Sopenharmony_ci  
36581cb0ef41Sopenharmony_ci  There are two possible causes for infinite loops fo NXDOMAIN, based on how many dots are in the domain name (one for < ARES_OPT_NDOTS and one for >= ARES_OPT_NDOTS), where it will repeat the same query over and over as the hquery->next_domain doesn't increment.
36591cb0ef41Sopenharmony_ci  
36601cb0ef41Sopenharmony_ci  Fix By: @kedixa
36611cb0ef41Sopenharmony_ci
36621cb0ef41Sopenharmony_ci- Portability fix for ares__sortaddrinfo()
36631cb0ef41Sopenharmony_ci  
36641cb0ef41Sopenharmony_ci  replace uint32_t with unsigned int and socklen_t with ares_socklen_t
36651cb0ef41Sopenharmony_ci  
36661cb0ef41Sopenharmony_ci  By: Brad House
36671cb0ef41Sopenharmony_ci
36681cb0ef41Sopenharmony_ci- [Khaidi Chu brought this change]
36691cb0ef41Sopenharmony_ci
36701cb0ef41Sopenharmony_ci  fix: init bufp before reject .onion to make it can be free correctly (#241)
36711cb0ef41Sopenharmony_ci  
36721cb0ef41Sopenharmony_ci  When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault.
36731cb0ef41Sopenharmony_ci  
36741cb0ef41Sopenharmony_ci  Fix By: Khaidi Chu (@XadillaX)
36751cb0ef41Sopenharmony_ci
36761cb0ef41Sopenharmony_ci- [Andrew Selivanov brought this change]
36771cb0ef41Sopenharmony_ci
36781cb0ef41Sopenharmony_ci  Add ares__sortaddrinfo() to support getaddrinfo() sorted results (#239)
36791cb0ef41Sopenharmony_ci  
36801cb0ef41Sopenharmony_ci  This is a port of RFC 6724 compliant sorting function from Android Bionic project:
36811cb0ef41Sopenharmony_ci  https://android.googlesource.com/platform/bionic/+/e919b116d35aa7deb24ddece69c491e24c3b0d6f/libc/netbsd/net/getaddrinfo.c
36821cb0ef41Sopenharmony_ci  
36831cb0ef41Sopenharmony_ci  The latest version is essentially the same, except two additional parameters to test connection with (mark/uid):
36841cb0ef41Sopenharmony_ci  https://android.googlesource.com/platform/bionic/+/master/libc/dns/net/getaddrinfo.c
36851cb0ef41Sopenharmony_ci  
36861cb0ef41Sopenharmony_ci  Please note that even that version has some restrictions. It doesn't support some rules from RFC 6724:
36871cb0ef41Sopenharmony_ci  
36881cb0ef41Sopenharmony_ci  Rule 3 (Avoid deprecated addresses)
36891cb0ef41Sopenharmony_ci  Rule 4 (Prefer home addresses)
36901cb0ef41Sopenharmony_ci  Rule 7 (Prefer native transport)
36911cb0ef41Sopenharmony_ci  
36921cb0ef41Sopenharmony_ci  Submitted By: Andrew Selivanov (@ki11roy)
36931cb0ef41Sopenharmony_ci
36941cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
36951cb0ef41Sopenharmony_ci
36961cb0ef41Sopenharmony_ci  Increase portability of `ares-test-mock-ai.cc` (#235)
36971cb0ef41Sopenharmony_ci  
36981cb0ef41Sopenharmony_ci  * using portable ares_inet_pton and updated includes in ares-test-mock-ai
36991cb0ef41Sopenharmony_ci  * forgot to remove deleted ares-test-ai.cc in Makefile.inc
37001cb0ef41Sopenharmony_ci  
37011cb0ef41Sopenharmony_ci  Fix By: Christian Ammer (@ChristianAmmer)
37021cb0ef41Sopenharmony_ci
37031cb0ef41Sopenharmony_ci- [Fabrice Fontaine brought this change]
37041cb0ef41Sopenharmony_ci
37051cb0ef41Sopenharmony_ci  m4/xc-cc-check.m4: use XC_CHECK_BUILD_FLAGS (#236)
37061cb0ef41Sopenharmony_ci  
37071cb0ef41Sopenharmony_ci  Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
37081cb0ef41Sopenharmony_ci  Otherwise it complains of CPPFLAGS in CFLAGS.
37091cb0ef41Sopenharmony_ci  [Retrieved from:
37101cb0ef41Sopenharmony_ci  https://git.buildroot.net/buildroot/tree/package/c-ares/0001-use_check_build_instead_of_check_user.patch]
37111cb0ef41Sopenharmony_ci  
37121cb0ef41Sopenharmony_ci  Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
37131cb0ef41Sopenharmony_ci  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
37141cb0ef41Sopenharmony_ci  Submitted by: Fabrice Fontaine
37151cb0ef41Sopenharmony_ci
37161cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
37171cb0ef41Sopenharmony_ci
37181cb0ef41Sopenharmony_ci  Bugfix for `ares_getaddrinfo` and additional unit tests (#234)
37191cb0ef41Sopenharmony_ci  
37201cb0ef41Sopenharmony_ci  This PullRequest fixes a bug in the function add_to_addrinfo which task is to add new addrinfo items to the ai_next linked list. Also additional unit tests for testing ares_getaddrinfo will be added:
37211cb0ef41Sopenharmony_ci  
37221cb0ef41Sopenharmony_ci  Additional mock server test classes (ares-test-mock-ai.cc):
37231cb0ef41Sopenharmony_ci  MockTCPChannelTestAI
37241cb0ef41Sopenharmony_ci  MockExtraOptsTestAI
37251cb0ef41Sopenharmony_ci  MockNoCheckRespChannelTestAI
37261cb0ef41Sopenharmony_ci  MockEDNSChannelTestAI
37271cb0ef41Sopenharmony_ci  RotateMultiMockTestAI
37281cb0ef41Sopenharmony_ci  NoRotateMultiMockTestAI
37291cb0ef41Sopenharmony_ci  
37301cb0ef41Sopenharmony_ci  Additional live tests (ares-test-live-ai.cc):
37311cb0ef41Sopenharmony_ci  LiveGetHostByNameV4
37321cb0ef41Sopenharmony_ci  LiveGetHostByNameV6
37331cb0ef41Sopenharmony_ci  LiveGetHostByNameV4AndV6
37341cb0ef41Sopenharmony_ci  
37351cb0ef41Sopenharmony_ci  Fix By: Christian Ammer (@ChristianAmmer)
37361cb0ef41Sopenharmony_ci
37371cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
37381cb0ef41Sopenharmony_ci
37391cb0ef41Sopenharmony_ci  Remaining queries counter fix, additional unit tests for `ares_getaddrinfo` (#233)
37401cb0ef41Sopenharmony_ci  
37411cb0ef41Sopenharmony_ci  Remaining queries counter fix, added tests (ParallelLookups,
37421cb0ef41Sopenharmony_ci  SearchDomains, SearchDomainsServFailOnAAAA).  Removed unnecessary
37431cb0ef41Sopenharmony_ci  if and commented code in test.
37441cb0ef41Sopenharmony_ci  
37451cb0ef41Sopenharmony_ci  Fix By: Christian Ammer (@ChristianAmmer)
37461cb0ef41Sopenharmony_ci
37471cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
37481cb0ef41Sopenharmony_ci
37491cb0ef41Sopenharmony_ci  Add initial implementation for ares_getaddrinfo (#112)
37501cb0ef41Sopenharmony_ci  
37511cb0ef41Sopenharmony_ci  Initial implementation for ares_getaddrinfo().  It is NOT compliant with RFC6724, though
37521cb0ef41Sopenharmony_ci  it is expected to come closer to conformance prior to the next release.
37531cb0ef41Sopenharmony_ci  
37541cb0ef41Sopenharmony_ci  Features not supported include sorted addresses and honoring of service and hints
37551cb0ef41Sopenharmony_ci  parameters.
37561cb0ef41Sopenharmony_ci  
37571cb0ef41Sopenharmony_ci  Implementation by: Christian Ammer (@ChristianAmmer)
37581cb0ef41Sopenharmony_ci
37591cb0ef41Sopenharmony_ci- [Ben Noordhuis brought this change]
37601cb0ef41Sopenharmony_ci
37611cb0ef41Sopenharmony_ci  test: fix bad expectation in ipv6 localhost test (#227)
37621cb0ef41Sopenharmony_ci  
37631cb0ef41Sopenharmony_ci  The LiveGetLocalhostByAddrV6 test expected to see "localhost" in the
37641cb0ef41Sopenharmony_ci  result when doing an address-to-name lookup for ::1 but on my system
37651cb0ef41Sopenharmony_ci  that resolves to "ip6-loopback" because of this stanza in /etc/hosts:
37661cb0ef41Sopenharmony_ci  
37671cb0ef41Sopenharmony_ci      $ grep ^::1 /etc/hosts
37681cb0ef41Sopenharmony_ci      ::1     ip6-localhost ip6-loopback
37691cb0ef41Sopenharmony_ci  
37701cb0ef41Sopenharmony_ci  Fix By: Ben Noordhuis (@bnoordhuis)
37711cb0ef41Sopenharmony_ci  Bug: #85
37721cb0ef41Sopenharmony_ci
37731cb0ef41Sopenharmony_ci- [Ben Noordhuis brought this change]
37741cb0ef41Sopenharmony_ci
37751cb0ef41Sopenharmony_ci  ares_version.h: bump version (#230)
37761cb0ef41Sopenharmony_ci  
37771cb0ef41Sopenharmony_ci  Version change not committed from maketgz.sh
37781cb0ef41Sopenharmony_ci  
37791cb0ef41Sopenharmony_ci  Bug: #229
37801cb0ef41Sopenharmony_ci
37811cb0ef41Sopenharmony_ciDaniel Stenberg (24 Oct 2018)
37821cb0ef41Sopenharmony_ci- ares_library_init_android.3: minor syntax edits, fixed AVAILABILITY
37831cb0ef41Sopenharmony_ci
37841cb0ef41Sopenharmony_ciVersion 1.15.0 (23 Oct 2018)
37851cb0ef41Sopenharmony_ci
37861cb0ef41Sopenharmony_ciBrad House (23 Oct 2018)
37871cb0ef41Sopenharmony_ci- last minute 1.15.0 addition
37881cb0ef41Sopenharmony_ci
37891cb0ef41Sopenharmony_ci- [Ben Noordhuis brought this change]
37901cb0ef41Sopenharmony_ci
37911cb0ef41Sopenharmony_ci  Report ARES_ENOTFOUND for .onion domain names as per RFC7686. (#228)
37921cb0ef41Sopenharmony_ci  
37931cb0ef41Sopenharmony_ci  Quoting RFC 7686:
37941cb0ef41Sopenharmony_ci  
37951cb0ef41Sopenharmony_ci      Name Resolution APIs and Libraries (...) MUST either respond
37961cb0ef41Sopenharmony_ci      to requests for .onion names by resolving them according to
37971cb0ef41Sopenharmony_ci      [tor-rendezvous] or by responding with NXDOMAIN.
37981cb0ef41Sopenharmony_ci  
37991cb0ef41Sopenharmony_ci      A legacy client may inadvertently attempt to resolve a .onion
38001cb0ef41Sopenharmony_ci      name through the DNS. This causes a disclosure that the client
38011cb0ef41Sopenharmony_ci      is attempting to use Tor to reach a specific service. Malicious
38021cb0ef41Sopenharmony_ci      resolvers could be engineered to capture and record such leaks,
38031cb0ef41Sopenharmony_ci      which might have very adverse consequences for the well-being
38041cb0ef41Sopenharmony_ci      of the user.
38051cb0ef41Sopenharmony_ci  
38061cb0ef41Sopenharmony_ci  Bug: #196
38071cb0ef41Sopenharmony_ci  Fix By: Ben Noordhuis @bnoordhuis
38081cb0ef41Sopenharmony_ci
38091cb0ef41Sopenharmony_ci- prepare for c-ares 1.15.0 release
38101cb0ef41Sopenharmony_ci
38111cb0ef41Sopenharmony_ci- AIX Build Fix
38121cb0ef41Sopenharmony_ci  
38131cb0ef41Sopenharmony_ci  AIX attempts to include both nameser_compat.h and onameser_compat.h.  It appears
38141cb0ef41Sopenharmony_ci  the proper fix is to define _USE_IRS so that only nameser_compat.h is used.
38151cb0ef41Sopenharmony_ci  
38161cb0ef41Sopenharmony_ci  Bug: #224
38171cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
38181cb0ef41Sopenharmony_ci
38191cb0ef41Sopenharmony_ci- Fix crash in ares_dup() due to new ARES_OPT_RESOLVCONF
38201cb0ef41Sopenharmony_ci  
38211cb0ef41Sopenharmony_ci  ares_dup() calls ares_init_options() by making its own fake option
38221cb0ef41Sopenharmony_ci  mask since the original mask isn't stored but ARES_OPT_RESOLVCONF
38231cb0ef41Sopenharmony_ci  was always set, instead of conditionally set.  This caused a crash
38241cb0ef41Sopenharmony_ci  because ares_strdup() isn't NULL-safe if no custom path was set.
38251cb0ef41Sopenharmony_ci  
38261cb0ef41Sopenharmony_ci  Made ares_dup() set ARES_OPT_RESOLVCONF conditionally.
38271cb0ef41Sopenharmony_ci  
38281cb0ef41Sopenharmony_ci  Fix By: Brad House (@bradh352)
38291cb0ef41Sopenharmony_ci
38301cb0ef41Sopenharmony_ci- [Sarat Addepalli brought this change]
38311cb0ef41Sopenharmony_ci
38321cb0ef41Sopenharmony_ci  Add ares_init_options() configurability for path to resolv.conf file
38331cb0ef41Sopenharmony_ci  
38341cb0ef41Sopenharmony_ci  Add resolvconf_path to end of struct ares_options with ARES_OPT_RESOLVCONF option
38351cb0ef41Sopenharmony_ci  so on Unix-like systems a custom path can be specified.  If no path is specified,
38361cb0ef41Sopenharmony_ci  /etc/resolv.conf is used like normal.
38371cb0ef41Sopenharmony_ci  
38381cb0ef41Sopenharmony_ci  Fix By: Sarat Addepalli @SirR4T
38391cb0ef41Sopenharmony_ci  Fixes Bug: #220
38401cb0ef41Sopenharmony_ci  Review By: Brad House @bradh352
38411cb0ef41Sopenharmony_ci
38421cb0ef41Sopenharmony_ci- remove stale variables
38431cb0ef41Sopenharmony_ci
38441cb0ef41Sopenharmony_ci- fix prototype name for ares_strsplit_free()
38451cb0ef41Sopenharmony_ci
38461cb0ef41Sopenharmony_ci- add missing prototype
38471cb0ef41Sopenharmony_ci
38481cb0ef41Sopenharmony_ci- simplify ares_strsplit() and create ares_strsplit_free() helper function
38491cb0ef41Sopenharmony_ci
38501cb0ef41Sopenharmony_ci- missing ares_strsplit.h from HHEADERS for inclusion in distribution
38511cb0ef41Sopenharmony_ci
38521cb0ef41Sopenharmony_ci- [Ruslan Baratov brought this change]
38531cb0ef41Sopenharmony_ci
38541cb0ef41Sopenharmony_ci  Add CARES_BUILD_TOOLS CMake option (#214)
38551cb0ef41Sopenharmony_ci  
38561cb0ef41Sopenharmony_ci  Add ability to exclude building of tools (adig, ahost, acountry) in CMake.  This should also close #200.
38571cb0ef41Sopenharmony_ci  
38581cb0ef41Sopenharmony_ci  Fix By: Ruslan Baratov (@ruslo)
38591cb0ef41Sopenharmony_ci  Bug: #200
38601cb0ef41Sopenharmony_ci
38611cb0ef41Sopenharmony_ci- [flyingdutchman23 brought this change]
38621cb0ef41Sopenharmony_ci
38631cb0ef41Sopenharmony_ci  Style. Whitespace cleanup. (#213)
38641cb0ef41Sopenharmony_ci  
38651cb0ef41Sopenharmony_ci  Small whitespace cleanups.
38661cb0ef41Sopenharmony_ci  
38671cb0ef41Sopenharmony_ci  Fix By: @flyingdutchman23
38681cb0ef41Sopenharmony_ci
38691cb0ef41Sopenharmony_ci- [John Schember brought this change]
38701cb0ef41Sopenharmony_ci
38711cb0ef41Sopenharmony_ci  Android: Support for domain search suffix (#211)
38721cb0ef41Sopenharmony_ci  
38731cb0ef41Sopenharmony_ci  Fixes issue #207. Uses LinkProperties.getDomains() to get a list of search domains and adds them to the suffix list.  This also adds a new helper function to split strings into an array based on multiple delimiters replacing multiple other functions for dealing with string splitting.
38741cb0ef41Sopenharmony_ci  
38751cb0ef41Sopenharmony_ci  Submitter: John Schember (@user-none)
38761cb0ef41Sopenharmony_ci  Fixes: #207
38771cb0ef41Sopenharmony_ci  Approved-by: Brad House (@bradh352)
38781cb0ef41Sopenharmony_ci
38791cb0ef41Sopenharmony_ci- [afalin brought this change]
38801cb0ef41Sopenharmony_ci
38811cb0ef41Sopenharmony_ci  Improve DNS suffixes extracting from WinNT registry (#202)
38821cb0ef41Sopenharmony_ci  
38831cb0ef41Sopenharmony_ci  Join all global and connection specific suffix lists. Use 'HKLM\Software\Policies\Microsoft\Windows NT\DNSClient\SearchList', 'HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Domain' as global suffix lists.
38841cb0ef41Sopenharmony_ci  
38851cb0ef41Sopenharmony_ci  Fix By: @afalin
38861cb0ef41Sopenharmony_ci
38871cb0ef41Sopenharmony_ci- Be consistent with indention in CMakeLists.txt
38881cb0ef41Sopenharmony_ci  
38891cb0ef41Sopenharmony_ci  The imported TRANSFORM_MAKEFILE_INC function from curl used space indention
38901cb0ef41Sopenharmony_ci  but the rest of the file used tabs.  Go ahead and make it tabs for
38911cb0ef41Sopenharmony_ci  consistency as well.
38921cb0ef41Sopenharmony_ci  
38931cb0ef41Sopenharmony_ci  Committed By: Brad House
38941cb0ef41Sopenharmony_ci
38951cb0ef41Sopenharmony_ci- [flyingdutchman23 brought this change]
38961cb0ef41Sopenharmony_ci
38971cb0ef41Sopenharmony_ci  Fix modern gcc warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source
38981cb0ef41Sopenharmony_ci  
38991cb0ef41Sopenharmony_ci  Silence warning about using src to determine number of bytes to copy.
39001cb0ef41Sopenharmony_ci  In this case it doesn't matter whether it is `src` or `dest`. So there
39011cb0ef41Sopenharmony_ci  is no functionality change.
39021cb0ef41Sopenharmony_ci  
39031cb0ef41Sopenharmony_ci  Bug: #210
39041cb0ef41Sopenharmony_ci  Fix By: @flyingdutchman23
39051cb0ef41Sopenharmony_ci
39061cb0ef41Sopenharmony_ci- [Andi Schnebinger brought this change]
39071cb0ef41Sopenharmony_ci
39081cb0ef41Sopenharmony_ci  fix stringop-overflow warning of GCC (#201)
39091cb0ef41Sopenharmony_ci  
39101cb0ef41Sopenharmony_ci  When using a modern GCC to compile c-ares, there is a stringop-overflow warning.
39111cb0ef41Sopenharmony_ci  This patch simply silences the false-positive warning, there is no actual code flaw.
39121cb0ef41Sopenharmony_ci  
39131cb0ef41Sopenharmony_ci  Bug: https://github.com/c-ares/c-ares/pull/201
39141cb0ef41Sopenharmony_ci  Fixed By: Andi Schnebinger @Iniesta8
39151cb0ef41Sopenharmony_ci
39161cb0ef41Sopenharmony_ciGitHub (18 May 2018)
39171cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
39181cb0ef41Sopenharmony_ci
39191cb0ef41Sopenharmony_ci  travis: do coverage in "coverage" build (#195)
39201cb0ef41Sopenharmony_ci  
39211cb0ef41Sopenharmony_ci  Fixes #194, a mistake from commit a255081f2c3c ("travis: Only do
39221cb0ef41Sopenharmony_ci  coverage/distcheck on normal build")
39231cb0ef41Sopenharmony_ci
39241cb0ef41Sopenharmony_ciBrad House (17 May 2018)
39251cb0ef41Sopenharmony_ci- [Brad Spencer brought this change]
39261cb0ef41Sopenharmony_ci
39271cb0ef41Sopenharmony_ci  Apply the IPv6 server blacklist to all nameserver sources, not just Windows (#193)
39281cb0ef41Sopenharmony_ci  
39291cb0ef41Sopenharmony_ci  For #164, I mentioned that it seemed like the IPv6 nameserver blacklist should apply to all OSes. In a mailing list post, @bradh352 agreed and suggested that I file a PR to make it so.
39301cb0ef41Sopenharmony_ci  
39311cb0ef41Sopenharmony_ci  This moves the blacklist check from being Windows-specific to being a general feature of config_nameservers(), no matter the nameserver source. It also simplifies the ares_ipv6_server_blacklisted() implementation to not parse and re-parse the blacklisted IPv6 addresses from strings on every check. I think they're almost as easy to read as a sequence of hex bytes in an array initializer, and it's definitely less work on each trip through the code.
39321cb0ef41Sopenharmony_ci  
39331cb0ef41Sopenharmony_ci  Fix By: Brad Spencer @b-spencer
39341cb0ef41Sopenharmony_ci  PR: https://github.com/c-ares/c-ares/pull/193
39351cb0ef41Sopenharmony_ci
39361cb0ef41Sopenharmony_ci- [Brad Spencer brought this change]
39371cb0ef41Sopenharmony_ci
39381cb0ef41Sopenharmony_ci  Fix warnings emitted by MSVC when using -W4 (#192)
39391cb0ef41Sopenharmony_ci  
39401cb0ef41Sopenharmony_ci  These changes fix a few warnings emitted by recent versions of MSVC when compiling with -W4. Half of the changes are in Windows-specific code, and the other half should be safe no matter the compiler or OS.
39411cb0ef41Sopenharmony_ci  
39421cb0ef41Sopenharmony_ci  The allocation function change is probably the only one that needs explanation. MSVC gives warnings about the function pointers not being stable across DLL boundaries or something to that effect, so for Windows, I've made them be called indirectly, which at least made the compiler happy. I can't say I've tested every linking combination on Windows with them before or after the change, but it seems harmless.
39431cb0ef41Sopenharmony_ci  
39441cb0ef41Sopenharmony_ci  Fix By: Brad Spencer @b-spencer
39451cb0ef41Sopenharmony_ci  PR: https://github.com/c-ares/c-ares/pull/192
39461cb0ef41Sopenharmony_ci
39471cb0ef41Sopenharmony_ci- [David Hotham brought this change]
39481cb0ef41Sopenharmony_ci
39491cb0ef41Sopenharmony_ci  Prevent changing name servers while queries are outstanding (#191)
39501cb0ef41Sopenharmony_ci  
39511cb0ef41Sopenharmony_ci  Changing name servers doesn't work, per #41.  Better to return an error code than to crash.
39521cb0ef41Sopenharmony_ci  
39531cb0ef41Sopenharmony_ci  Fix-by: David Hotham @dimbleby
39541cb0ef41Sopenharmony_ci
39551cb0ef41Sopenharmony_ciDavid Drysdale (15 May 2018)
39561cb0ef41Sopenharmony_ci- [Tobias Nießen brought this change]
39571cb0ef41Sopenharmony_ci
39581cb0ef41Sopenharmony_ci  Fix comment in ares_rules.h (#189)
39591cb0ef41Sopenharmony_ci
39601cb0ef41Sopenharmony_ciBrad House (6 May 2018)
39611cb0ef41Sopenharmony_ci- [Brad Spencer brought this change]
39621cb0ef41Sopenharmony_ci
39631cb0ef41Sopenharmony_ci  Harden and rationalize c-ares timeout computation (#187)
39641cb0ef41Sopenharmony_ci  
39651cb0ef41Sopenharmony_ci  * Harden and rationalize c-ares timeout computation
39661cb0ef41Sopenharmony_ci  * Remove the rand() part of the timeout calculation completely.
39671cb0ef41Sopenharmony_ci  
39681cb0ef41Sopenharmony_ci  When c-ares sends a DNS query, it computes the timeout for that request as follows:
39691cb0ef41Sopenharmony_ci  
39701cb0ef41Sopenharmony_ci  timeplus = channel->timeout << (query->try_count / channel->nservers);
39711cb0ef41Sopenharmony_ci  timeplus = (timeplus * (9 + (rand () & 7))) / 16;
39721cb0ef41Sopenharmony_ci  I see two issues with this code. Firstly, when either try_count or channel->timeout are large enough, this can end up as an illegal shift.
39731cb0ef41Sopenharmony_ci  
39741cb0ef41Sopenharmony_ci  Secondly, the algorithm for adding the random timeout (added in 2009) is surprising. The original commit that introduced this algorithm says it was done to avoid a "packet storm". But, the algorithm appears to only reduce the timeout by an amount proportional to the scaled timeout's magnitude. It isn't clear to me that, for example, cutting a 30 second timeout almost in half to roughly 17 seconds is appropriate. Even with the default timeout of 5000 ms, this algorithm computes values between 2812 ms and 5000 ms, which is enough to cause a slightly latent DNS response to get spuriously dropped.
39751cb0ef41Sopenharmony_ci  
39761cb0ef41Sopenharmony_ci  If preventing the timers from all expiring at the same time really is desirable, then it seems better to extend the timeout by a small factor so that the application gets at least the timeout it asked for, and maybe a little more. In my experience, this is common practice for timeouts: applications expect that a timeout will happen at or after the designated time (but not before), allowing for delay in detecting and reporting the timeout. Furthermore, it seems like the timeout shouldn't be extended by very much (we don't want a 30 second timeout changing into a 45 second timeout, either).
39771cb0ef41Sopenharmony_ci  
39781cb0ef41Sopenharmony_ci  Consider also the documentation of channel->timeout in ares_init_options():
39791cb0ef41Sopenharmony_ci  
39801cb0ef41Sopenharmony_ci  The number of milliseconds each name server is given to respond to a query on the first try. (After the first try, the timeout algorithm becomes more complicated, but scales linearly with the value of timeout.) The default is five seconds.
39811cb0ef41Sopenharmony_ci  
39821cb0ef41Sopenharmony_ci  In the current implementation, even the first try does not use the value that the user supplies; it will use anywhere between 56% and 100% of that value.
39831cb0ef41Sopenharmony_ci  
39841cb0ef41Sopenharmony_ci  The attached patch attempts to address all of these concerns without trying to make the algorithm much more sophisticated. After performing a safe shift, this patch simply adds a small random timeout to the computed value of between 0 ms and 511 ms. I could see limiting the random amount to be no greater than a proportion of the configured magnitude, but I can't see scaling the random with the overall computed timeout. As far as I understand, the goal is just to schedule retries "not at the same exact time", so a small difference seems sufficient.
39851cb0ef41Sopenharmony_ci  
39861cb0ef41Sopenharmony_ci  UPDATE: randomization removed.
39871cb0ef41Sopenharmony_ci  
39881cb0ef41Sopenharmony_ci  Closes PR #187
39891cb0ef41Sopenharmony_ci  Fix by: Brad Spencer
39901cb0ef41Sopenharmony_ci
39911cb0ef41Sopenharmony_ci- distribute ares_android.h
39921cb0ef41Sopenharmony_ci  
39931cb0ef41Sopenharmony_ci  Distribute ares_android.h when a release distribution package is
39941cb0ef41Sopenharmony_ci  created.
39951cb0ef41Sopenharmony_ci  
39961cb0ef41Sopenharmony_ci  Reported By: Andrey Khranovsky
39971cb0ef41Sopenharmony_ci  Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-04/0000.shtml
39981cb0ef41Sopenharmony_ci
39991cb0ef41Sopenharmony_ci- ares_set_servers_csv() on failure should not leave channel in a bad state
40001cb0ef41Sopenharmony_ci  
40011cb0ef41Sopenharmony_ci  If bad data is passed to ares_set_servers_csv() or
40021cb0ef41Sopenharmony_ci  ares_set_servers_ports_csv() it will clear the existing channel
40031cb0ef41Sopenharmony_ci  configured DNS servers, then a call to ares_send() will fail due
40041cb0ef41Sopenharmony_ci  to a bad malloc which may have undefined behavior.
40051cb0ef41Sopenharmony_ci  
40061cb0ef41Sopenharmony_ci  The fix now only clears existing servers on success.  An additional
40071cb0ef41Sopenharmony_ci  sanity check was added in ares_send() to ensure nservers >= 1 or
40081cb0ef41Sopenharmony_ci  will result in ARES_ESERVFAIL.
40091cb0ef41Sopenharmony_ci  
40101cb0ef41Sopenharmony_ci  Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml
40111cb0ef41Sopenharmony_ci  Reported-by: Francisco Sedano Crippa
40121cb0ef41Sopenharmony_ci
40131cb0ef41Sopenharmony_ci- docs: Not all manpages are listed
40141cb0ef41Sopenharmony_ci  
40151cb0ef41Sopenharmony_ci  Some docs aren't installed or not showing up on
40161cb0ef41Sopenharmony_ci  https://c-ares.haxx.se/docs.html
40171cb0ef41Sopenharmony_ci  due to not being listed in Makefile.inc.  Add missing docs and
40181cb0ef41Sopenharmony_ci  ensure docs are alphabetized.
40191cb0ef41Sopenharmony_ci
40201cb0ef41Sopenharmony_ciVersion 1.14.0 (16 Feb 2018)
40211cb0ef41Sopenharmony_ci
40221cb0ef41Sopenharmony_ciDaniel Stenberg (16 Feb 2018)
40231cb0ef41Sopenharmony_ci- ares_android.c: fix warning: ISO C forbids an empty translation unit
40241cb0ef41Sopenharmony_ci
40251cb0ef41Sopenharmony_ci- RELEASE-NOTES: some more work we did and people who helped
40261cb0ef41Sopenharmony_ci
40271cb0ef41Sopenharmony_ciBrad House (16 Feb 2018)
40281cb0ef41Sopenharmony_ci- travis: skip Autotools style testing for cmake
40291cb0ef41Sopenharmony_ci  
40301cb0ef41Sopenharmony_ci  Fix cmake test build by skipping autotools portion of test script.
40311cb0ef41Sopenharmony_ci
40321cb0ef41Sopenharmony_ci- travis: standardize CMake test off of Autotools tests
40331cb0ef41Sopenharmony_ci  
40341cb0ef41Sopenharmony_ci  Instead of running 'make test', run the tests directly like autotools
40351cb0ef41Sopenharmony_ci  does.  It provides more verbose output.
40361cb0ef41Sopenharmony_ci
40371cb0ef41Sopenharmony_ci- travis: Enable building tests for CMake
40381cb0ef41Sopenharmony_ci  
40391cb0ef41Sopenharmony_ci  Travis should auto-build and run tests for cmake builds now that
40401cb0ef41Sopenharmony_ci  PR #168 is merged.
40411cb0ef41Sopenharmony_ci
40421cb0ef41Sopenharmony_ci- fix version in pkgconfig
40431cb0ef41Sopenharmony_ci
40441cb0ef41Sopenharmony_ci- Add version update to CMakeLists in maketgz
40451cb0ef41Sopenharmony_ci
40461cb0ef41Sopenharmony_ci- Release prep.  Add support for pkgconfig in cmake, set versions appropriately
40471cb0ef41Sopenharmony_ci
40481cb0ef41Sopenharmony_ciGregor Jasny (15 Feb 2018)
40491cb0ef41Sopenharmony_ci- CMake: Add tests
40501cb0ef41Sopenharmony_ci
40511cb0ef41Sopenharmony_ciBrad House (14 Feb 2018)
40521cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
40531cb0ef41Sopenharmony_ci
40541cb0ef41Sopenharmony_ci  Use cmake3 package provided by Ubuntu (#182)
40551cb0ef41Sopenharmony_ci
40561cb0ef41Sopenharmony_ci- Cmake 3.1 instead of 3.2.1 should be the minimum
40571cb0ef41Sopenharmony_ci
40581cb0ef41Sopenharmony_ci- Update RELEASE-NOTES and RELEASE-PROCEDURE.md to prepare for next release
40591cb0ef41Sopenharmony_ci
40601cb0ef41Sopenharmony_ci- get rid of c++ style comments
40611cb0ef41Sopenharmony_ci
40621cb0ef41Sopenharmony_ci- Use trusty for all builds, precise is EOL.  Update clang and cmake versions.
40631cb0ef41Sopenharmony_ci
40641cb0ef41Sopenharmony_ci- Current CMakeLists.txt doesn't support 2.8.12 anymore, we need to bump the version to 3.2.1 minimum
40651cb0ef41Sopenharmony_ci
40661cb0ef41Sopenharmony_ci- Re-organize sections in INSTALL.md and add CMake section
40671cb0ef41Sopenharmony_ci
40681cb0ef41Sopenharmony_ci- [Sergey Kolomenkin brought this change]
40691cb0ef41Sopenharmony_ci
40701cb0ef41Sopenharmony_ci  remove compilation warnings in MSVC (#47)
40711cb0ef41Sopenharmony_ci
40721cb0ef41Sopenharmony_ci- document handling of timeouts for ares_process and ares_process_fd to close PR #57
40731cb0ef41Sopenharmony_ci
40741cb0ef41Sopenharmony_ci- As per Issue #155, since we do not require gethostname() during init, if it fails, there's no reason for init to fail as it is only used to populate the domain
40751cb0ef41Sopenharmony_ci
40761cb0ef41Sopenharmony_ciGitHub (7 Feb 2018)
40771cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
40781cb0ef41Sopenharmony_ci
40791cb0ef41Sopenharmony_ci  Document WSAStartup requirement (#180)
40801cb0ef41Sopenharmony_ci
40811cb0ef41Sopenharmony_ciDavid Drysdale (6 Feb 2018)
40821cb0ef41Sopenharmony_ci- [Antonio Tajuelo brought this change]
40831cb0ef41Sopenharmony_ci
40841cb0ef41Sopenharmony_ci  Added coderelease.io badge to readme.md for letting people subscribe to new versions (#174)
40851cb0ef41Sopenharmony_ci
40861cb0ef41Sopenharmony_ci- [Sheel Bedi brought this change]
40871cb0ef41Sopenharmony_ci
40881cb0ef41Sopenharmony_ci  Update year in LICENSE.md to 2018 (#170)
40891cb0ef41Sopenharmony_ci
40901cb0ef41Sopenharmony_ciGitHub (4 Feb 2018)
40911cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
40921cb0ef41Sopenharmony_ci
40931cb0ef41Sopenharmony_ci  travis: use VM not container for {L,A}SAN builds (#177)
40941cb0ef41Sopenharmony_ci  
40951cb0ef41Sopenharmony_ci  As per https://github.com/travis-ci/travis-ci/issues/9033, container
40961cb0ef41Sopenharmony_ci  based builds do not currently allow ptrace, which is used by LSAN and
40971cb0ef41Sopenharmony_ci  ASAN.
40981cb0ef41Sopenharmony_ci
40991cb0ef41Sopenharmony_ciBrad House (3 Feb 2018)
41001cb0ef41Sopenharmony_ci- [acthompson-google-com brought this change]
41011cb0ef41Sopenharmony_ci
41021cb0ef41Sopenharmony_ci  Android JNI code leaks local references in some cases (#175)
41031cb0ef41Sopenharmony_ci  
41041cb0ef41Sopenharmony_ci  * Add Google LLC to AUTHORS.
41051cb0ef41Sopenharmony_ci  
41061cb0ef41Sopenharmony_ci  * android: Explicitly delete all JNI local references, and cache JNI method IDs at initialization.
41071cb0ef41Sopenharmony_ci  
41081cb0ef41Sopenharmony_ci  * android: Only return ARES_ENOTINITIALIZED on failures in initialization code.
41091cb0ef41Sopenharmony_ci
41101cb0ef41Sopenharmony_ciGregor Jasny (2 Jan 2018)
41111cb0ef41Sopenharmony_ci- Embed fused Google Test 1.8.0
41121cb0ef41Sopenharmony_ci
41131cb0ef41Sopenharmony_ciBrad House (21 Dec 2017)
41141cb0ef41Sopenharmony_ci- [John Schember brought this change]
41151cb0ef41Sopenharmony_ci
41161cb0ef41Sopenharmony_ci  android: Check returns for obj and classes are not NULL. Document API levels for various Android functions and objects used. (#166)
41171cb0ef41Sopenharmony_ci
41181cb0ef41Sopenharmony_ci- CARES_CHECK_TYPE should reference variable so a warning is not produced for -Werror compatibility
41191cb0ef41Sopenharmony_ci
41201cb0ef41Sopenharmony_ci- [Brad Spencer brought this change]
41211cb0ef41Sopenharmony_ci
41221cb0ef41Sopenharmony_ci  Fix computation of IPv6 blacklist mask for values of netmask > 8. (#164)
41231cb0ef41Sopenharmony_ci
41241cb0ef41Sopenharmony_ciDavid Drysdale (14 Dec 2017)
41251cb0ef41Sopenharmony_ci- travis: Only do coverage/distcheck on normal build
41261cb0ef41Sopenharmony_ci
41271cb0ef41Sopenharmony_ci- travis: only do pip install on Linux
41281cb0ef41Sopenharmony_ci
41291cb0ef41Sopenharmony_ci- travis: only test in IPv4 mode
41301cb0ef41Sopenharmony_ci  
41311cb0ef41Sopenharmony_ci  Travis' Trusty environment does not support IPv6.
41321cb0ef41Sopenharmony_ci
41331cb0ef41Sopenharmony_ci- test: allow restriction to one IP address family
41341cb0ef41Sopenharmony_ci
41351cb0ef41Sopenharmony_ci- [Roman Teterin brought this change]
41361cb0ef41Sopenharmony_ci
41371cb0ef41Sopenharmony_ci  Fix a typo in init_by_resolv_conf (#160)
41381cb0ef41Sopenharmony_ci
41391cb0ef41Sopenharmony_ciBrad House (11 Dec 2017)
41401cb0ef41Sopenharmony_ci- @gvanem says MSVC -RTCc option fails, looks erroneous to me, but the additional mask is harmless
41411cb0ef41Sopenharmony_ci
41421cb0ef41Sopenharmony_ci- Fix some other mingw warnings
41431cb0ef41Sopenharmony_ci
41441cb0ef41Sopenharmony_ci- Issue #143, get rid of windows build warning due to passing 'char **' to argument expecting 'const char **'
41451cb0ef41Sopenharmony_ci
41461cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
41471cb0ef41Sopenharmony_ci
41481cb0ef41Sopenharmony_ci  Distribute CMake files (#130)
41491cb0ef41Sopenharmony_ci
41501cb0ef41Sopenharmony_ci- Android variants may not have __system_property_get
41511cb0ef41Sopenharmony_ci  
41521cb0ef41Sopenharmony_ci  Some android systems like ARM64 may not have the __system_property_get
41531cb0ef41Sopenharmony_ci  symbol in libc (but still have it in the public headers).  Detect this
41541cb0ef41Sopenharmony_ci  condition at build time.  The __system_property_get method of retrieving
41551cb0ef41Sopenharmony_ci  name servers is deprecated as of Oreo so should strictly be a fallback
41561cb0ef41Sopenharmony_ci  mechanism anyhow.
41571cb0ef41Sopenharmony_ci
41581cb0ef41Sopenharmony_ciDavid Drysdale (9 Nov 2017)
41591cb0ef41Sopenharmony_ci- [David Hotham brought this change]
41601cb0ef41Sopenharmony_ci
41611cb0ef41Sopenharmony_ci  Wrong function name throughout man page (#154)
41621cb0ef41Sopenharmony_ci
41631cb0ef41Sopenharmony_ci- ares_data.c: iterate through substructs when freeing
41641cb0ef41Sopenharmony_ci  
41651cb0ef41Sopenharmony_ci  Previous code recursed into substructures, which makes it more likely
41661cb0ef41Sopenharmony_ci  that large/heavily-nested responses could use up lots of stack.
41671cb0ef41Sopenharmony_ci
41681cb0ef41Sopenharmony_ci- test: test ares_free_data on long chain of structs
41691cb0ef41Sopenharmony_ci
41701cb0ef41Sopenharmony_ci- [Felix Yan brought this change]
41711cb0ef41Sopenharmony_ci
41721cb0ef41Sopenharmony_ci  Fix a typo in inet_ntop.c (#151)
41731cb0ef41Sopenharmony_ci
41741cb0ef41Sopenharmony_ciDaniel Stenberg (29 Sep 2017)
41751cb0ef41Sopenharmony_ci- ares_gethostbyname.3: fix callback status values
41761cb0ef41Sopenharmony_ci  
41771cb0ef41Sopenharmony_ci  - ARES_ENOTFOUND means the _name_ wasn't found
41781cb0ef41Sopenharmony_ci  
41791cb0ef41Sopenharmony_ci  - ARES_ENODATA can be returned when a resolve fails
41801cb0ef41Sopenharmony_ci  
41811cb0ef41Sopenharmony_ci  Reported-by: Jakub Hrozek
41821cb0ef41Sopenharmony_ci  Bug: https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
41831cb0ef41Sopenharmony_ci
41841cb0ef41Sopenharmony_ciBrad House (28 Sep 2017)
41851cb0ef41Sopenharmony_ci- [John Schember brought this change]
41861cb0ef41Sopenharmony_ci
41871cb0ef41Sopenharmony_ci  Fix DNS server lookup breaking with Android O due to Android removing access to net.dns# system properties. (#148)
41881cb0ef41Sopenharmony_ci  
41891cb0ef41Sopenharmony_ci  As of Android 8 (Oreo) access to net.dns# has been removed (https://developer.android.com/about/versions/oreo/android-8.0-changes.html). The reasoning given is that it, "improves privacy on the platform". Currently c-ares uses this to get the list of DNS servers.
41901cb0ef41Sopenharmony_ci  
41911cb0ef41Sopenharmony_ci  Now the only way to access the DNS server list is by using the Connectivity Manager though Java. This adds the necessary JNI code to use the Connectivity Manager and pull the DNS server list. The old way using __system_property_get with net.dns# remains for compatibilty.
41921cb0ef41Sopenharmony_ci  
41931cb0ef41Sopenharmony_ci  Using the Connectivity Manager requires the ACCESS_NETWORK_STATE permission to be set on the app. Existing applications most likely are not setting this and keeping the previous method as a fallback will at the very least ensure those apps don't break on older versions of Android. They will need to add this permission for Android 8 compatibility.
41941cb0ef41Sopenharmony_ci  
41951cb0ef41Sopenharmony_ci  Included in the patch are two initalization functions which are required. The JVM must be registered as well as the Connectivity Manager itself. There is no way to get the Connectivity Manager except though Java. Either being passed down to C directly or by passing in an Android Context which can be used to get the Connectivity Manager. Examples are provided in the documentation.
41961cb0ef41Sopenharmony_ci
41971cb0ef41Sopenharmony_ci- [Konstantinos Sofokleous brought this change]
41981cb0ef41Sopenharmony_ci
41991cb0ef41Sopenharmony_ci  allow linking against the static msvc runtime library (#133)
42001cb0ef41Sopenharmony_ci  
42011cb0ef41Sopenharmony_ci  allow linking against the static msvc runtime library
42021cb0ef41Sopenharmony_ci
42031cb0ef41Sopenharmony_ci- [Gergely Nagy brought this change]
42041cb0ef41Sopenharmony_ci
42051cb0ef41Sopenharmony_ci  Force using the ANSI versions of WinAPI functions (#142)
42061cb0ef41Sopenharmony_ci  
42071cb0ef41Sopenharmony_ci  When compiling c-ares with a build system that defines UNICODE,
42081cb0ef41Sopenharmony_ci  bad versions of WinAPI functions are used causing failures or even
42091cb0ef41Sopenharmony_ci  crashes. When windows.h is included in MBCS mode (like in the default
42101cb0ef41Sopenharmony_ci  build system), the ..A versions are the same as using the one without
42111cb0ef41Sopenharmony_ci  any suffix.
42121cb0ef41Sopenharmony_ci
42131cb0ef41Sopenharmony_ci- [cmake] build fix on Solaris
42141cb0ef41Sopenharmony_ci
42151cb0ef41Sopenharmony_ciGitHub (11 Sep 2017)
42161cb0ef41Sopenharmony_ci- [Brad House brought this change]
42171cb0ef41Sopenharmony_ci
42181cb0ef41Sopenharmony_ci  Win32 exclude legacy ipv6 subnets (#144)
42191cb0ef41Sopenharmony_ci  
42201cb0ef41Sopenharmony_ci  win32 ipv6: add infrastructure to exclude ipv6 subnets that are known to cause issues
42211cb0ef41Sopenharmony_ci
42221cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
42231cb0ef41Sopenharmony_ci
42241cb0ef41Sopenharmony_ci  windows: only look for ancient compilers (#146)
42251cb0ef41Sopenharmony_ci  
42261cb0ef41Sopenharmony_ci  Also drop the use of a versioned output directory; just use
42271cb0ef41Sopenharmony_ci  .\msvc
42281cb0ef41Sopenharmony_ci
42291cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
42301cb0ef41Sopenharmony_ci
42311cb0ef41Sopenharmony_ci  ares_init_options.3: match up sock_state_cb args (#141)
42321cb0ef41Sopenharmony_ci  
42331cb0ef41Sopenharmony_ci  Fixes #140
42341cb0ef41Sopenharmony_ci
42351cb0ef41Sopenharmony_ciDaniel Stenberg (25 Aug 2017)
42361cb0ef41Sopenharmony_ci- [Anna Henningsen brought this change]
42371cb0ef41Sopenharmony_ci
42381cb0ef41Sopenharmony_ci  gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
42391cb0ef41Sopenharmony_ci  
42401cb0ef41Sopenharmony_ci  When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
42411cb0ef41Sopenharmony_ci  queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
42421cb0ef41Sopenharmony_ci  
42431cb0ef41Sopenharmony_ci  It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
42441cb0ef41Sopenharmony_ci  but I would appreciate review of the correctness of this change.
42451cb0ef41Sopenharmony_ci  
42461cb0ef41Sopenharmony_ci  Ref: https://github.com/nodejs/node/issues/14814
42471cb0ef41Sopenharmony_ci  
42481cb0ef41Sopenharmony_ci  Closes #138
42491cb0ef41Sopenharmony_ci
42501cb0ef41Sopenharmony_ciDavid Drysdale (18 Aug 2017)
42511cb0ef41Sopenharmony_ci- [David Hotham brought this change]
42521cb0ef41Sopenharmony_ci
42531cb0ef41Sopenharmony_ci  support most recent Visual Studio 2017
42541cb0ef41Sopenharmony_ci
42551cb0ef41Sopenharmony_ciBrad House (26 Jul 2017)
42561cb0ef41Sopenharmony_ci- Preserve original DNS server order on Windows for equal metrics.
42571cb0ef41Sopenharmony_ci  
42581cb0ef41Sopenharmony_ci  qsort is not stable, in order to make it stable we need to record
42591cb0ef41Sopenharmony_ci  the original index and add it as a secondary sort value when the
42601cb0ef41Sopenharmony_ci  metrics are equal to prevent using DNS servers that may not work
42611cb0ef41Sopenharmony_ci  at all as reported by some users.
42621cb0ef41Sopenharmony_ci
42631cb0ef41Sopenharmony_ciDavid Drysdale (15 Jul 2017)
42641cb0ef41Sopenharmony_ci- [Anna Henningsen brought this change]
42651cb0ef41Sopenharmony_ci
42661cb0ef41Sopenharmony_ci  ares_parse_naptr_reply: make buffer length check more accurate
42671cb0ef41Sopenharmony_ci  
42681cb0ef41Sopenharmony_ci  9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
42691cb0ef41Sopenharmony_ci  for records parsed by `ares_parse_naptr_reply()`. However, that
42701cb0ef41Sopenharmony_ci  function is designed to parse replies which also contain non-NAPTR
42711cb0ef41Sopenharmony_ci  records; for A records, the `rr_len > 7` check will fail as there
42721cb0ef41Sopenharmony_ci  are only 4 bytes of payload.
42731cb0ef41Sopenharmony_ci  In particular, parsing ANY replies for NAPTR records was broken
42741cb0ef41Sopenharmony_ci  by that patch.
42751cb0ef41Sopenharmony_ci  
42761cb0ef41Sopenharmony_ci  Fix that by moving the check into the case in which it is already
42771cb0ef41Sopenharmony_ci  known that the record is a NAPTR record.
42781cb0ef41Sopenharmony_ci
42791cb0ef41Sopenharmony_ci- appveyor: run dnsdump as a sanity check
42801cb0ef41Sopenharmony_ci
42811cb0ef41Sopenharmony_ci- travis: run dnsdump as a sanity check
42821cb0ef41Sopenharmony_ci
42831cb0ef41Sopenharmony_ci- test: use ares_free_string() throughout
42841cb0ef41Sopenharmony_ci  
42851cb0ef41Sopenharmony_ci  As pointed out by Gisle Vanem in #125.
42861cb0ef41Sopenharmony_ci
42871cb0ef41Sopenharmony_ciDaniel Stenberg (3 Jul 2017)
42881cb0ef41Sopenharmony_ci- RELEASE-PROCEDURE.md: how to release
42891cb0ef41Sopenharmony_ci  
42901cb0ef41Sopenharmony_ci  Fixes #115
42911cb0ef41Sopenharmony_ci  Closes #116
42921cb0ef41Sopenharmony_ci
42931cb0ef41Sopenharmony_ciDavid Drysdale (2 Jul 2017)
42941cb0ef41Sopenharmony_ci- test: Build dnsdump on Windows too
42951cb0ef41Sopenharmony_ci  
42961cb0ef41Sopenharmony_ci  Thanks to Gisle Vanem for showing the way:
42971cb0ef41Sopenharmony_ci  https://github.com/c-ares/c-ares/commit/b701af8a24cf9d173b1dbe5faedcea34642e92da#commitcomment-22830845
42981cb0ef41Sopenharmony_ci
42991cb0ef41Sopenharmony_ciBrad House (26 Jun 2017)
43001cb0ef41Sopenharmony_ci- [Christian Ammer brought this change]
43011cb0ef41Sopenharmony_ci
43021cb0ef41Sopenharmony_ci  fix statement like #define - ares ssize_t define had a trailing semicolon (#120)
43031cb0ef41Sopenharmony_ci
43041cb0ef41Sopenharmony_ciDavid Drysdale (21 Jun 2017)
43051cb0ef41Sopenharmony_ci- test: distribute the fuzzcheck.sh script
43061cb0ef41Sopenharmony_ci  
43071cb0ef41Sopenharmony_ci  The TESTS target runs fuzzcheck.sh so make sure it is included
43081cb0ef41Sopenharmony_ci  in the distributed tarball.
43091cb0ef41Sopenharmony_ci  
43101cb0ef41Sopenharmony_ci  (The test itself will be pointless when run on a distribution, because
43111cb0ef41Sopenharmony_ci  the fuzzing corpus directories are not shipped, but at least this
43121cb0ef41Sopenharmony_ci  means that `make -C test test` should work.)
43131cb0ef41Sopenharmony_ci
43141cb0ef41Sopenharmony_ci- test: run the name-parsing corpus check too
43151cb0ef41Sopenharmony_ci
43161cb0ef41Sopenharmony_ciDaniel Stenberg (21 Jun 2017)
43171cb0ef41Sopenharmony_ci- dist: don't build/ship PDF versions in release archives
43181cb0ef41Sopenharmony_ci  
43191cb0ef41Sopenharmony_ci  ... experience says very few read them and they can still get build by
43201cb0ef41Sopenharmony_ci  those who want them.a
43211cb0ef41Sopenharmony_ci
43221cb0ef41Sopenharmony_ci- ares_version.h: bump version
43231cb0ef41Sopenharmony_ci
43241cb0ef41Sopenharmony_ciVersion 1.13.0 (20 Jun 2017)
43251cb0ef41Sopenharmony_ci
43261cb0ef41Sopenharmony_ciDaniel Stenberg (20 Jun 2017)
43271cb0ef41Sopenharmony_ci- RELEASE-NOTES: 1.13.0
43281cb0ef41Sopenharmony_ci
43291cb0ef41Sopenharmony_ci- ares_set_socket_functions.3: added in 1.13.0
43301cb0ef41Sopenharmony_ci
43311cb0ef41Sopenharmony_ciDavid Drysdale (18 Jun 2017)
43321cb0ef41Sopenharmony_ci- ares_parse_naptr_reply: check sufficient data
43331cb0ef41Sopenharmony_ci  
43341cb0ef41Sopenharmony_ci  Check that there is enough data for the required elements
43351cb0ef41Sopenharmony_ci  of an NAPTR record (2 int16, 3 bytes for string lengths)
43361cb0ef41Sopenharmony_ci  before processing a record.
43371cb0ef41Sopenharmony_ci
43381cb0ef41Sopenharmony_ci- test: Feed in short NAPTR
43391cb0ef41Sopenharmony_ci
43401cb0ef41Sopenharmony_ci- test: Add fuzz input with short NAPTR
43411cb0ef41Sopenharmony_ci
43421cb0ef41Sopenharmony_ci- test: add ares_parse_naptr_reply to fuzzer
43431cb0ef41Sopenharmony_ci
43441cb0ef41Sopenharmony_ci- [noiz brought this change]
43451cb0ef41Sopenharmony_ci
43461cb0ef41Sopenharmony_ci  Update ares.h to support compiling with QNX
43471cb0ef41Sopenharmony_ci
43481cb0ef41Sopenharmony_ci- [Dionna Glaze brought this change]
43491cb0ef41Sopenharmony_ci
43501cb0ef41Sopenharmony_ci  Simple changes to appease stricter compilers.
43511cb0ef41Sopenharmony_ci  
43521cb0ef41Sopenharmony_ci  ares_process.c uses htonl, which needs <arpa/inet.h> included.
43531cb0ef41Sopenharmony_ci  ares_getnameinfo.c uses a dynamically selected format string for
43541cb0ef41Sopenharmony_ci  sprintf, which -Wformat-literal doesn't like. Usually one would use
43551cb0ef41Sopenharmony_ci  inttypes.h and a format string "%" PRIu32, but C99 is too new for some
43561cb0ef41Sopenharmony_ci  supported platforms.
43571cb0ef41Sopenharmony_ci
43581cb0ef41Sopenharmony_ciGitHub (16 Jun 2017)
43591cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
43601cb0ef41Sopenharmony_ci
43611cb0ef41Sopenharmony_ci  CMake: Emulate interface library on import (#108)
43621cb0ef41Sopenharmony_ci  
43631cb0ef41Sopenharmony_ci  Closes: #104
43641cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
43651cb0ef41Sopenharmony_ci
43661cb0ef41Sopenharmony_ciBrad House (6 Jun 2017)
43671cb0ef41Sopenharmony_ci- [ChristianAmmer brought this change]
43681cb0ef41Sopenharmony_ci
43691cb0ef41Sopenharmony_ci  Added support for Windows DNS Suffix Search List (#93)
43701cb0ef41Sopenharmony_ci  
43711cb0ef41Sopenharmony_ci  This change solves issue #53.
43721cb0ef41Sopenharmony_ci  
43731cb0ef41Sopenharmony_ci  Support for suffix search lists was already built in for Linux. The search list could be set via set_search. With this change the suffix search list from Windows is read from the registry and then set into the ares configuration via set_search. There are two sources for the search list:
43741cb0ef41Sopenharmony_ci  
43751cb0ef41Sopenharmony_ci  The global DNS suffix search list.
43761cb0ef41Sopenharmony_ci  The primary and connection specific DNS suffixes if the global is not available.
43771cb0ef41Sopenharmony_ci  
43781cb0ef41Sopenharmony_ci  Contributed by @ChristianAmmer
43791cb0ef41Sopenharmony_ci
43801cb0ef41Sopenharmony_ciDaniel Stenberg (25 May 2017)
43811cb0ef41Sopenharmony_ci- [Thomas Köckerbauer brought this change]
43821cb0ef41Sopenharmony_ci
43831cb0ef41Sopenharmony_ci  configure: do not heck for ar if specified manually
43841cb0ef41Sopenharmony_ci  
43851cb0ef41Sopenharmony_ci  Closes #62
43861cb0ef41Sopenharmony_ci
43871cb0ef41Sopenharmony_ciDavid Drysdale (23 May 2017)
43881cb0ef41Sopenharmony_ci- ares_expand_name: limit number of indirections
43891cb0ef41Sopenharmony_ci
43901cb0ef41Sopenharmony_ci- test: fuzz input file that takes a while to process
43911cb0ef41Sopenharmony_ci
43921cb0ef41Sopenharmony_ci- test: copy data in fuzz regression driver
43931cb0ef41Sopenharmony_ci  
43941cb0ef41Sopenharmony_ci  Oops.
43951cb0ef41Sopenharmony_ci
43961cb0ef41Sopenharmony_ciGitHub (23 May 2017)
43971cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
43981cb0ef41Sopenharmony_ci
43991cb0ef41Sopenharmony_ci  Convert char from ISO-8859-1 to UTF-8 (#99)
44001cb0ef41Sopenharmony_ci  
44011cb0ef41Sopenharmony_ci  Fixes #97
44021cb0ef41Sopenharmony_ci
44031cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
44041cb0ef41Sopenharmony_ci
44051cb0ef41Sopenharmony_ci  travis: Use trusty for cmake builds (#109)
44061cb0ef41Sopenharmony_ci  
44071cb0ef41Sopenharmony_ci  kubuntu-backports dropped the CMake package for Precise
44081cb0ef41Sopenharmony_ci
44091cb0ef41Sopenharmony_ciDavid Drysdale (2 May 2017)
44101cb0ef41Sopenharmony_ci- [David Hotham brought this change]
44111cb0ef41Sopenharmony_ci
44121cb0ef41Sopenharmony_ci  msvc_ver.inc support most recent Visual Studio 2017 (#101)
44131cb0ef41Sopenharmony_ci
44141cb0ef41Sopenharmony_ci- test: use io.h not unistd.h for Windows
44151cb0ef41Sopenharmony_ci
44161cb0ef41Sopenharmony_ci- test: try building fuzz binaries on Windows
44171cb0ef41Sopenharmony_ci
44181cb0ef41Sopenharmony_ci- test: stick to int in ares-fuzz.c
44191cb0ef41Sopenharmony_ci  
44201cb0ef41Sopenharmony_ci  Using int rather than ares_ssize_t means this file
44211cb0ef41Sopenharmony_ci  needs no c-ares dependency - it's a general driver for
44221cb0ef41Sopenharmony_ci  any libFuzzer-style entrypoint.
44231cb0ef41Sopenharmony_ci
44241cb0ef41Sopenharmony_ci- test: force ARES_OPT_NOROTATE for no-rotate tests
44251cb0ef41Sopenharmony_ci
44261cb0ef41Sopenharmony_ci- test: check expected NOROTATE value
44271cb0ef41Sopenharmony_ci
44281cb0ef41Sopenharmony_ci- ares_create_query: use ares_free not naked free
44291cb0ef41Sopenharmony_ci  
44301cb0ef41Sopenharmony_ci  Accidentally added in commit 65c71be1cbe5
44311cb0ef41Sopenharmony_ci  ("ares_create_query: avoid single-byte buffer overwrite")
44321cb0ef41Sopenharmony_ci
44331cb0ef41Sopenharmony_ciBrad House (17 Mar 2017)
44341cb0ef41Sopenharmony_ci- Need ares.h for ares_ssize_t
44351cb0ef41Sopenharmony_ci
44361cb0ef41Sopenharmony_ci- tests should not use ssize_t, use ares_ssize_t
44371cb0ef41Sopenharmony_ci
44381cb0ef41Sopenharmony_ciGitHub (16 Mar 2017)
44391cb0ef41Sopenharmony_ci- [Brad House brought this change]
44401cb0ef41Sopenharmony_ci
44411cb0ef41Sopenharmony_ci  Portability updates for legacy systems. (#92)
44421cb0ef41Sopenharmony_ci  
44431cb0ef41Sopenharmony_ci  Socklen_t should not be used in code, instead ares_socklen_t should be used.
44441cb0ef41Sopenharmony_ci  Convert ssize_t to ares_ssize_t for portability since the public API now exposes this.
44451cb0ef41Sopenharmony_ci
44461cb0ef41Sopenharmony_ciDavid Drysdale (14 Mar 2017)
44471cb0ef41Sopenharmony_ci- [Michael Osei brought this change]
44481cb0ef41Sopenharmony_ci
44491cb0ef41Sopenharmony_ci  Update msvc_ver.inc (#91)
44501cb0ef41Sopenharmony_ci  
44511cb0ef41Sopenharmony_ci  For Visual Studio 2017 builds
44521cb0ef41Sopenharmony_ci
44531cb0ef41Sopenharmony_ciDaniel Stenberg (13 Mar 2017)
44541cb0ef41Sopenharmony_ci- [Brad House brought this change]
44551cb0ef41Sopenharmony_ci
44561cb0ef41Sopenharmony_ci  Windows DNS server sorting (#81)
44571cb0ef41Sopenharmony_ci  
44581cb0ef41Sopenharmony_ci  Original Patch From Brad Spencer:
44591cb0ef41Sopenharmony_ci  https://c-ares.haxx.se/mail/c-ares-archive-2016-04/0000.shtml
44601cb0ef41Sopenharmony_ci  
44611cb0ef41Sopenharmony_ci  My modifications include:
44621cb0ef41Sopenharmony_ci   * Dynamically find GetBestRoute2 since it is a Windows Vista+ symbol, and will fall back to prior behavior when not available.
44631cb0ef41Sopenharmony_ci   * Prefer get_DNS_AdaptersAddresses as the modifications should alleviate the concerns which caused us to prefer get_DNS_NetworkParams
44641cb0ef41Sopenharmony_ci   * Update AppVeyor to use MinGW-w64 instead of the legacy MinGW
44651cb0ef41Sopenharmony_ci   * Fix compile error in test suite for Windows.
44661cb0ef41Sopenharmony_ci  
44671cb0ef41Sopenharmony_ci  Original message from patch below:
44681cb0ef41Sopenharmony_ci  
44691cb0ef41Sopenharmony_ci  From: Brad Spencer <bspencer@blackberry.com>
44701cb0ef41Sopenharmony_ci  Date: Fri, 29 Apr 2016 14:26:23 -0300
44711cb0ef41Sopenharmony_ci  
44721cb0ef41Sopenharmony_ci  On Windows, the c-ares DNS resolver tries first to get a full list of
44731cb0ef41Sopenharmony_ci  DNS server addresses by enumerating the system's IPv4/v6 interfaces and
44741cb0ef41Sopenharmony_ci  then getting the per-interface DNS server lists from those interfaces
44751cb0ef41Sopenharmony_ci  and joining them together. The OS, at least in the way the c-ares
44761cb0ef41Sopenharmony_ci  prefers to query them (which also may be the only or best way in some
44771cb0ef41Sopenharmony_ci  environments), does not provide a unified list of DNS servers ordered
44781cb0ef41Sopenharmony_ci  according to "current network conditions". Currently, c-ares will then
44791cb0ef41Sopenharmony_ci  try to use them in whatever order the nested enumeration produces, which
44801cb0ef41Sopenharmony_ci  may result in DNS requests being sent to servers on one interface
44811cb0ef41Sopenharmony_ci  (hosting the current default route, for example) that are only intended
44821cb0ef41Sopenharmony_ci  to be used via another interface (intended to be used when the first
44831cb0ef41Sopenharmony_ci  interface is not available, for example). This, in turn, can lead to
44841cb0ef41Sopenharmony_ci  spurious failures and timeouts simply because of the server address
44851cb0ef41Sopenharmony_ci  order that resulted because of the enumeration process.
44861cb0ef41Sopenharmony_ci  
44871cb0ef41Sopenharmony_ci  This patch makes the (safe?) assumption that there is no other better
44881cb0ef41Sopenharmony_ci  rule to chose which interface's DNS server list should be prioritized.
44891cb0ef41Sopenharmony_ci  After all, a DNS lookup isn't something "per network"; applications
44901cb0ef41Sopenharmony_ci  don't look up "these DNS names on this interface and those DNS names on
44911cb0ef41Sopenharmony_ci  that interface". There is a single resource pool of DNS servers and the
44921cb0ef41Sopenharmony_ci  application should presume that any server will give it the "right"
44931cb0ef41Sopenharmony_ci  answer. However, even if all DNS servers are assumed to give equally
44941cb0ef41Sopenharmony_ci  useful responses, it is reasonable to expect that some DNS servers will
44951cb0ef41Sopenharmony_ci  not accept requests on all interfaces. This patch avoids the problem by
44961cb0ef41Sopenharmony_ci  sorting the DNS server addresses using the Windows IPv4/v6 routing tables.
44971cb0ef41Sopenharmony_ci  
44981cb0ef41Sopenharmony_ci  For example, a request to DNS server C on interface 2 that is actually
44991cb0ef41Sopenharmony_ci  sent over interface 1 (which may happen to have the default route) may
45001cb0ef41Sopenharmony_ci  be rejected by or not delivered to DNS server C. So, better to use DNS
45011cb0ef41Sopenharmony_ci  servers A and B associated with interface 1, at least as a first try.
45021cb0ef41Sopenharmony_ci  
45031cb0ef41Sopenharmony_ci  By using the metric of the route to the DNS server itself as a proxy for
45041cb0ef41Sopenharmony_ci  priority of the DNS server in the list, this patch is able to adapt
45051cb0ef41Sopenharmony_ci  dynamically to changes in the interface list, the DNS server lists per
45061cb0ef41Sopenharmony_ci  interface, which interfaces are active, the routing table, and so on,
45071cb0ef41Sopenharmony_ci  while always picking a good "best" DNS server first.
45081cb0ef41Sopenharmony_ci  
45091cb0ef41Sopenharmony_ci  In cases where any DNS server on any interface will do, this patch still
45101cb0ef41Sopenharmony_ci  seems useful because it will prioritize a lower-metric route's (and thus
45111cb0ef41Sopenharmony_ci  interface's) servers.
45121cb0ef41Sopenharmony_ci
45131cb0ef41Sopenharmony_ciDavid Drysdale (22 Feb 2017)
45141cb0ef41Sopenharmony_ci- [Sergii Pylypenko brought this change]
45151cb0ef41Sopenharmony_ci
45161cb0ef41Sopenharmony_ci  docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
45171cb0ef41Sopenharmony_ci
45181cb0ef41Sopenharmony_ci- [Calle Wilund brought this change]
45191cb0ef41Sopenharmony_ci
45201cb0ef41Sopenharmony_ci  ares test: fix win32 build errors with virtual socket function tests
45211cb0ef41Sopenharmony_ci  
45221cb0ef41Sopenharmony_ci  The added api requires both some typedefs not previously imported
45231cb0ef41Sopenharmony_ci  into the test build + the test code did not fully deal with
45241cb0ef41Sopenharmony_ci  socket differences on windows.
45251cb0ef41Sopenharmony_ci
45261cb0ef41Sopenharmony_ci- [Calle Wilund brought this change]
45271cb0ef41Sopenharmony_ci
45281cb0ef41Sopenharmony_ci  ares_process: fix return type of socket_create function (win32 warning)
45291cb0ef41Sopenharmony_ci
45301cb0ef41Sopenharmony_ciDaniel Stenberg (31 Jan 2017)
45311cb0ef41Sopenharmony_ci- [Calle Wilund brought this change]
45321cb0ef41Sopenharmony_ci
45331cb0ef41Sopenharmony_ci  ares_set_socket_functions: Add man page
45341cb0ef41Sopenharmony_ci  
45351cb0ef41Sopenharmony_ci  Providing some rudimentary documentation for the added functionality
45361cb0ef41Sopenharmony_ci  
45371cb0ef41Sopenharmony_ci  Closes #72
45381cb0ef41Sopenharmony_ci
45391cb0ef41Sopenharmony_ci- [Calle Wilund brought this change]
45401cb0ef41Sopenharmony_ci
45411cb0ef41Sopenharmony_ci  ares-test: Add test helpers and cases for virtual socket IO
45421cb0ef41Sopenharmony_ci  
45431cb0ef41Sopenharmony_ci  * Added test case macro to automatically run tests twice, once "normal",
45441cb0ef41Sopenharmony_ci    once with virtual IO.
45451cb0ef41Sopenharmony_ci  * Changed most "live" query tests to run in dual mode to verify
45461cb0ef41Sopenharmony_ci    at least simple socket IO via virtual functions
45471cb0ef41Sopenharmony_ci  * Added test case for settings/duping socket functions & callback data
45481cb0ef41Sopenharmony_ci
45491cb0ef41Sopenharmony_ci- [elcallio brought this change]
45501cb0ef41Sopenharmony_ci
45511cb0ef41Sopenharmony_ci  Implement using virtual socket IO functions when set
45521cb0ef41Sopenharmony_ci  
45531cb0ef41Sopenharmony_ci  Uses virtual socket IO functions when set on a channel.
45541cb0ef41Sopenharmony_ci  Note that no socket options are set, nor is any binding
45551cb0ef41Sopenharmony_ci  done by the library in this case, since the client defining
45561cb0ef41Sopenharmony_ci  these is probably more suited to deal with this.
45571cb0ef41Sopenharmony_ci
45581cb0ef41Sopenharmony_ci- [elcallio brought this change]
45591cb0ef41Sopenharmony_ci
45601cb0ef41Sopenharmony_ci  Add virtual function set for socket IO
45611cb0ef41Sopenharmony_ci  
45621cb0ef41Sopenharmony_ci  Defines a structure of basic create, close, read/write
45631cb0ef41Sopenharmony_ci  functions as virtual function calls, settable for individual
45641cb0ef41Sopenharmony_ci  c-ares channels.
45651cb0ef41Sopenharmony_ci
45661cb0ef41Sopenharmony_ciDavid Drysdale (30 Jan 2017)
45671cb0ef41Sopenharmony_ci- test: ignore aresfuzzname binary
45681cb0ef41Sopenharmony_ci
45691cb0ef41Sopenharmony_ciGregor Jasny (14 Jan 2017)
45701cb0ef41Sopenharmony_ci- [Stephen Sorley brought this change]
45711cb0ef41Sopenharmony_ci
45721cb0ef41Sopenharmony_ci  Always use check_symbol_exists instead of check_function_exists.
45731cb0ef41Sopenharmony_ci
45741cb0ef41Sopenharmony_ci- Also add includes to TARGETS_INST_DEST
45751cb0ef41Sopenharmony_ci
45761cb0ef41Sopenharmony_ci- [Stephen Sorley brought this change]
45771cb0ef41Sopenharmony_ci
45781cb0ef41Sopenharmony_ci  Windows build fixes
45791cb0ef41Sopenharmony_ci
45801cb0ef41Sopenharmony_ci- CMake: Export targets
45811cb0ef41Sopenharmony_ci
45821cb0ef41Sopenharmony_ci- CMake: Use GNUInstallDirs for install location defaults
45831cb0ef41Sopenharmony_ci
45841cb0ef41Sopenharmony_ciDavid Drysdale (11 Jan 2017)
45851cb0ef41Sopenharmony_ci- Update Makefile.am for renamed INSTALL.md
45861cb0ef41Sopenharmony_ci
45871cb0ef41Sopenharmony_ciGitHub (11 Jan 2017)
45881cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
45891cb0ef41Sopenharmony_ci
45901cb0ef41Sopenharmony_ci  docs: convert INSTALL to MarkDown & tweak (#83)
45911cb0ef41Sopenharmony_ci
45921cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
45931cb0ef41Sopenharmony_ci
45941cb0ef41Sopenharmony_ci  Merge pull request #77 from stephen-sorley/cmake_modernize
45951cb0ef41Sopenharmony_ci  
45961cb0ef41Sopenharmony_ci  Updated CMake minimum version to 2.8.12.
45971cb0ef41Sopenharmony_ci
45981cb0ef41Sopenharmony_ciStephen Sorley (4 Jan 2017)
45991cb0ef41Sopenharmony_ci- Changed executables to depend directly on internal libcares target, instead of against
46001cb0ef41Sopenharmony_ci  the external-facing alias targets.
46011cb0ef41Sopenharmony_ci
46021cb0ef41Sopenharmony_ci- Updated Travis to pull CMake 2.8.12 from kubuntu-backports ppa.
46031cb0ef41Sopenharmony_ci
46041cb0ef41Sopenharmony_ci- Updated CMake minimum version to 2.8.12.
46051cb0ef41Sopenharmony_ci  
46061cb0ef41Sopenharmony_ci  Changed the way usage requirements (include dirs, compile defs, dependent libraries) are specified, to match the recommended standard practice for modern CMake. This involves using target-specific functions (target_include_directories, target_compile_definitions, etc.), along with the PUBLIC, PRIVATE or INTERFACE modifiers.
46071cb0ef41Sopenharmony_ci  
46081cb0ef41Sopenharmony_ci  Updated chain-building support to imitate new-style Find modules (import libs), instead of old-style Find modules (cache variables).
46091cb0ef41Sopenharmony_ci
46101cb0ef41Sopenharmony_ciDavid Drysdale (26 Dec 2016)
46111cb0ef41Sopenharmony_ci- [Chris Araman brought this change]
46121cb0ef41Sopenharmony_ci
46131cb0ef41Sopenharmony_ci  configure: clock_gettime workaround (#75)
46141cb0ef41Sopenharmony_ci  
46151cb0ef41Sopenharmony_ci  Commits 7518c26, c41726b, and bc14ee7 brought this workaround to the CMake build system. This expands it to the autoconf build system.
46161cb0ef41Sopenharmony_ci  
46171cb0ef41Sopenharmony_ci  Fixes #71
46181cb0ef41Sopenharmony_ci
46191cb0ef41Sopenharmony_ci- test: add fuzz entrypoint for ares_create_query()
46201cb0ef41Sopenharmony_ci
46211cb0ef41Sopenharmony_ci- test: Add gTest/gMock files to SOURCES
46221cb0ef41Sopenharmony_ci  
46231cb0ef41Sopenharmony_ci  Built tarballs are not including all of the files needed
46241cb0ef41Sopenharmony_ci  to build the test suite because they are missing from the
46251cb0ef41Sopenharmony_ci  <target>_SOURCES variable in Makefile.am.
46261cb0ef41Sopenharmony_ci
46271cb0ef41Sopenharmony_ci- travis: Move build scripts under travis/
46281cb0ef41Sopenharmony_ci  
46291cb0ef41Sopenharmony_ci  Travis doesn't always propagate errors in inline multi-line
46301cb0ef41Sopenharmony_ci  scripts, so move them all to be explicit shell scripts, each
46311cb0ef41Sopenharmony_ci  with set -e.
46321cb0ef41Sopenharmony_ci
46331cb0ef41Sopenharmony_ci- travis: check distributed tarball builds
46341cb0ef41Sopenharmony_ci
46351cb0ef41Sopenharmony_ciDaniel Stenberg (25 Oct 2016)
46361cb0ef41Sopenharmony_ci- dist: ship msvc_ver.inc too
46371cb0ef41Sopenharmony_ci  
46381cb0ef41Sopenharmony_ci  Reported-by: Bruce Stephens
46391cb0ef41Sopenharmony_ci  
46401cb0ef41Sopenharmony_ci  Fixes #69
46411cb0ef41Sopenharmony_ci
46421cb0ef41Sopenharmony_ci- [Aaron Bieber brought this change]
46431cb0ef41Sopenharmony_ci
46441cb0ef41Sopenharmony_ci  fix build on OpenBSD
46451cb0ef41Sopenharmony_ci
46461cb0ef41Sopenharmony_ci- ares_version.h: bump, working on 1.12.1 now
46471cb0ef41Sopenharmony_ci
46481cb0ef41Sopenharmony_ciGitHub (18 Oct 2016)
46491cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
46501cb0ef41Sopenharmony_ci
46511cb0ef41Sopenharmony_ci  Merge pull request #64 from bradh352/master
46521cb0ef41Sopenharmony_ci  
46531cb0ef41Sopenharmony_ci  Add CMake build system support to C-Ares.
46541cb0ef41Sopenharmony_ci
46551cb0ef41Sopenharmony_ciBrad House (5 Oct 2016)
46561cb0ef41Sopenharmony_ci- suggested PROJECT_NAME change broke chain building as it needs the magic PROJECT_NAME set in the ADD_LIBRARY for matching. Fix to make both goals work
46571cb0ef41Sopenharmony_ci
46581cb0ef41Sopenharmony_ci- update MacOSX 10.12 detection
46591cb0ef41Sopenharmony_ci
46601cb0ef41Sopenharmony_ci- Expand XCode clock_gettime fix to include MacOS 10.12, not just iOS10
46611cb0ef41Sopenharmony_ci
46621cb0ef41Sopenharmony_ciDavid Drysdale (4 Oct 2016)
46631cb0ef41Sopenharmony_ci- Revert "travis: work around bug in PyCParser"
46641cb0ef41Sopenharmony_ci  
46651cb0ef41Sopenharmony_ci  This reverts commit a24a10a348fc00b8cfd684d91894a1df14880ea9.
46661cb0ef41Sopenharmony_ci
46671cb0ef41Sopenharmony_ci- travis: work around bug in PyCParser
46681cb0ef41Sopenharmony_ci  
46691cb0ef41Sopenharmony_ci  See https://github.com/pyca/cryptography/issues/3187
46701cb0ef41Sopenharmony_ci
46711cb0ef41Sopenharmony_ciBrad House (3 Oct 2016)
46721cb0ef41Sopenharmony_ci- PROJECT_SOURCE_DIR instead of CMAKE_CURRENT_SOURCE_DIR as per @gjasny
46731cb0ef41Sopenharmony_ci
46741cb0ef41Sopenharmony_ci- use a project name of c-ares as per @gjasny
46751cb0ef41Sopenharmony_ci
46761cb0ef41Sopenharmony_ci- Import curl conversion of Makefile.inc to cmake form dynamically as per bdoetsch@ameritech.net to make maintaining multiple build systems easier
46771cb0ef41Sopenharmony_ci
46781cb0ef41Sopenharmony_ciDaniel Stenberg (30 Sep 2016)
46791cb0ef41Sopenharmony_ci- dist: add ares_library_initialized.* to the tarball
46801cb0ef41Sopenharmony_ci
46811cb0ef41Sopenharmony_ciDavid Drysdale (30 Sep 2016)
46821cb0ef41Sopenharmony_ci- test: check ares_create_query with too-long name
46831cb0ef41Sopenharmony_ci
46841cb0ef41Sopenharmony_ciDaniel Stenberg (30 Sep 2016)
46851cb0ef41Sopenharmony_ci- man pages: minor formatting edits
46861cb0ef41Sopenharmony_ci
46871cb0ef41Sopenharmony_ciBrad House (29 Sep 2016)
46881cb0ef41Sopenharmony_ci- merge fc7917e from @daviddrysdale ... travis build updates for cmake
46891cb0ef41Sopenharmony_ci
46901cb0ef41Sopenharmony_ci- cleanups as per @gjasny ... Use naked IF statements and use NOT DEFINED
46911cb0ef41Sopenharmony_ci
46921cb0ef41Sopenharmony_ciVersion 1.12.0 (29 Sep 2016)
46931cb0ef41Sopenharmony_ci
46941cb0ef41Sopenharmony_ciDaniel Stenberg (29 Sep 2016)
46951cb0ef41Sopenharmony_ci- RELEASE-NOTES: 1.12.0
46961cb0ef41Sopenharmony_ci
46971cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
46981cb0ef41Sopenharmony_ci
46991cb0ef41Sopenharmony_ci  ares-test-misc: test ares_create_query with escaped trailing dot
47001cb0ef41Sopenharmony_ci
47011cb0ef41Sopenharmony_ci- ares_create_query: avoid single-byte buffer overwrite
47021cb0ef41Sopenharmony_ci  
47031cb0ef41Sopenharmony_ci  ... when the name ends with an escaped dot.
47041cb0ef41Sopenharmony_ci  
47051cb0ef41Sopenharmony_ci  CVE-2016-5180
47061cb0ef41Sopenharmony_ci  
47071cb0ef41Sopenharmony_ci  Bug: https://c-ares.haxx.se/adv_20160929.html
47081cb0ef41Sopenharmony_ci
47091cb0ef41Sopenharmony_ciBrad House (29 Sep 2016)
47101cb0ef41Sopenharmony_ci- CMake: Unify library versioning with the libtool methodology to make keeping library versions in sync easier with the autotools build system
47111cb0ef41Sopenharmony_ci
47121cb0ef41Sopenharmony_ciDaniel Stenberg (29 Sep 2016)
47131cb0ef41Sopenharmony_ci- ares_library_initialized.3: added
47141cb0ef41Sopenharmony_ci
47151cb0ef41Sopenharmony_ci- make: bump CARES_VERSION_INFO for release
47161cb0ef41Sopenharmony_ci
47171cb0ef41Sopenharmony_ciDavid Drysdale (29 Sep 2016)
47181cb0ef41Sopenharmony_ci- man: update ares_init_options.3
47191cb0ef41Sopenharmony_ci
47201cb0ef41Sopenharmony_ciDaniel Stenberg (29 Sep 2016)
47211cb0ef41Sopenharmony_ci- ares_library_init.3: corrected the ares_library_init_mem proto
47221cb0ef41Sopenharmony_ci
47231cb0ef41Sopenharmony_ciBrad House (28 Sep 2016)
47241cb0ef41Sopenharmony_ci- XCode v8 introduced clock_gettime() for iOS v10.  However, it is a weak symbol, which means when earlier iOS versions try to use clock_gettime() it results in a crash due to the missing symbol.  Detect this condition and do not set HAVE_CLOCK_GETTIME_MONOTONIC.
47251cb0ef41Sopenharmony_ci
47261cb0ef41Sopenharmony_ci- Adds cmake build system support to C-Ares.
47271cb0ef41Sopenharmony_ci  
47281cb0ef41Sopenharmony_ci  The patch does not modify any source files, it only adds 3 new files
47291cb0ef41Sopenharmony_ci  (CMakelists.txt, ares_build.h.cmake, ares_config.h.cmake) which form the
47301cb0ef41Sopenharmony_ci  build system.  I've tried to go through as much of the autotools tests and
47311cb0ef41Sopenharmony_ci  extracted what I thought was appropriate, though many of the tests aren't
47321cb0ef41Sopenharmony_ci  as in-depth in CMake as they are for autotools ... it is unclear why some
47331cb0ef41Sopenharmony_ci  of them exist at all, I'm guessing for legacy systems that CMake probably
47341cb0ef41Sopenharmony_ci  doesn't support anyhow.
47351cb0ef41Sopenharmony_ci  
47361cb0ef41Sopenharmony_ci  Building the library, and examples (adig, ahost, acountry) plus installation
47371cb0ef41Sopenharmony_ci  should work across a large number of tested platforms.  The tests have not
47381cb0ef41Sopenharmony_ci  yet been integrated.
47391cb0ef41Sopenharmony_ci
47401cb0ef41Sopenharmony_ciDaniel Stenberg (27 Sep 2016)
47411cb0ef41Sopenharmony_ci- README.md: remove space from link
47421cb0ef41Sopenharmony_ci
47431cb0ef41Sopenharmony_ci- README: link to the correct c-ares badge!
47441cb0ef41Sopenharmony_ci  
47451cb0ef41Sopenharmony_ci  Reported-by: David Hotham
47461cb0ef41Sopenharmony_ci  
47471cb0ef41Sopenharmony_ci  Fixes #63
47481cb0ef41Sopenharmony_ci
47491cb0ef41Sopenharmony_ci- docs: minor formatting edits
47501cb0ef41Sopenharmony_ci
47511cb0ef41Sopenharmony_ci- ares_destroy.3: formatting polish
47521cb0ef41Sopenharmony_ci
47531cb0ef41Sopenharmony_ci- ares_init.3: split the init docs into two separate man pages
47541cb0ef41Sopenharmony_ci
47551cb0ef41Sopenharmony_ci- SECURITY: point to the vulnerabilities page now
47561cb0ef41Sopenharmony_ci
47571cb0ef41Sopenharmony_ci- RELEASE-NOTES: synced with daa7235b1a5
47581cb0ef41Sopenharmony_ci
47591cb0ef41Sopenharmony_ci- ares_create_query.3: edit language
47601cb0ef41Sopenharmony_ci  
47611cb0ef41Sopenharmony_ci  Tried to make the man page more readable.
47621cb0ef41Sopenharmony_ci
47631cb0ef41Sopenharmony_ciDavid Drysdale (26 Sep 2016)
47641cb0ef41Sopenharmony_ci- test: fix gMock to work with gcc >= 6.x
47651cb0ef41Sopenharmony_ci  
47661cb0ef41Sopenharmony_ci  Taken from:
47671cb0ef41Sopenharmony_ci  https://github.com/google/googletest/issues/705#issuecomment-235067917
47681cb0ef41Sopenharmony_ci
47691cb0ef41Sopenharmony_ciDaniel Stenberg (26 Sep 2016)
47701cb0ef41Sopenharmony_ci- [Brad House brought this change]
47711cb0ef41Sopenharmony_ci
47721cb0ef41Sopenharmony_ci  headers: remove checks for and defines of variable sizes
47731cb0ef41Sopenharmony_ci  
47741cb0ef41Sopenharmony_ci  ... they're not really used and by avoiding them in the ares_build.h
47751cb0ef41Sopenharmony_ci  output we make the public header less dependent on data sizes.
47761cb0ef41Sopenharmony_ci
47771cb0ef41Sopenharmony_ciDavid Drysdale (24 Sep 2016)
47781cb0ef41Sopenharmony_ci- api: add ARES_OPT_NOROTATE optmask value
47791cb0ef41Sopenharmony_ci  
47801cb0ef41Sopenharmony_ci  Fix up a couple of problems with configuring whether c-ares rotates
47811cb0ef41Sopenharmony_ci  between different name servers between requests.
47821cb0ef41Sopenharmony_ci  
47831cb0ef41Sopenharmony_ci  Firstly, ares_save_options() returns (in *optmask) the value of
47841cb0ef41Sopenharmony_ci  (channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily
47851cb0ef41Sopenharmony_ci  indicate whether the channel is or is not actually doing rotation.
47861cb0ef41Sopenharmony_ci  This can be confusing/incorrect if:
47871cb0ef41Sopenharmony_ci   - the channel was originally configured without ARES_OPT_ROTATE
47881cb0ef41Sopenharmony_ci     (so it appears that the channel is not rotating)
47891cb0ef41Sopenharmony_ci   - the /etc/resolv.conf file includes the 'rotate' option
47901cb0ef41Sopenharmony_ci     (so the channel is actually performing rotation).
47911cb0ef41Sopenharmony_ci  
47921cb0ef41Sopenharmony_ci  Secondly, it is not possible to reliably configure a channel
47931cb0ef41Sopenharmony_ci  to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since
47941cb0ef41Sopenharmony_ci  a 'rotate' option in /etc/resolv.conf will turn it on again.
47951cb0ef41Sopenharmony_ci  
47961cb0ef41Sopenharmony_ci  Therefore:
47971cb0ef41Sopenharmony_ci   - add an ARES_OPT_NOROTATE optmask value to allow explicit
47981cb0ef41Sopenharmony_ci     configuration of no-rotate behaviour
47991cb0ef41Sopenharmony_ci   - in ares_save_options(), report the value of channel->rotate
48001cb0ef41Sopenharmony_ci     as exactly one of (optmask & ARES_OPT_ROTATE) or
48011cb0ef41Sopenharmony_ci     (optmask & ARES_OPT_NOROTATE).
48021cb0ef41Sopenharmony_ci  
48031cb0ef41Sopenharmony_ci  In terms of back-compatibility:
48041cb0ef41Sopenharmony_ci   - existing apps that set ARES_OPT_ROTATE will continue to rotate,
48051cb0ef41Sopenharmony_ci     and to have ARES_OPT_ROTATE reported back from ares_save_options()
48061cb0ef41Sopenharmony_ci   - existing apps that don't set ARES_OPT_ROTATE will continue to
48071cb0ef41Sopenharmony_ci     use local config/defaults to decide whether to rotate, and will
48081cb0ef41Sopenharmony_ci     now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from
48091cb0ef41Sopenharmony_ci     ares_save_options() rather than 0.
48101cb0ef41Sopenharmony_ci
48111cb0ef41Sopenharmony_ci- ares_init_options: only propagate init failures from options
48121cb0ef41Sopenharmony_ci  
48131cb0ef41Sopenharmony_ci  Commit 46bb820be3a8 ("ares_init_options: don't lose init failure")
48141cb0ef41Sopenharmony_ci  changed init behaviour so that earlier errors in initialization
48151cb0ef41Sopenharmony_ci  weren't lost.  In particular, if the user passes in specific
48161cb0ef41Sopenharmony_ci  options but they are not applied (e.g. because of an allocation
48171cb0ef41Sopenharmony_ci  failure), that failure needs to be reported back to the user; this
48181cb0ef41Sopenharmony_ci  also applies when duplicating a channel with ares_dup().
48191cb0ef41Sopenharmony_ci  
48201cb0ef41Sopenharmony_ci  However, other initialization failures can be ignored and
48211cb0ef41Sopenharmony_ci  overridden -- in particular, if init_by_resolv_conf() or
48221cb0ef41Sopenharmony_ci  init_by_environment() fail, then falling back to default values
48231cb0ef41Sopenharmony_ci  is OK.
48241cb0ef41Sopenharmony_ci  
48251cb0ef41Sopenharmony_ci  So only preserve failures from the init_by_options() stage, not
48261cb0ef41Sopenharmony_ci  from all initialization stages.
48271cb0ef41Sopenharmony_ci  
48281cb0ef41Sopenharmony_ci  Fixes issue 60.
48291cb0ef41Sopenharmony_ci
48301cb0ef41Sopenharmony_ci- test: Force reinstall of libtool on OSX
48311cb0ef41Sopenharmony_ci  
48321cb0ef41Sopenharmony_ci  Travis build environment appears to have changed.
48331cb0ef41Sopenharmony_ci
48341cb0ef41Sopenharmony_ci- test: Add valgrind build variant
48351cb0ef41Sopenharmony_ci
48361cb0ef41Sopenharmony_ci- test: Add null pointer to gtest args
48371cb0ef41Sopenharmony_ci  
48381cb0ef41Sopenharmony_ci  GoogleTest assumes that there is a null pointer in argv[argc],
48391cb0ef41Sopenharmony_ci  so make it look like that. Without this change, tests run with
48401cb0ef41Sopenharmony_ci  command-line arguments get memory errors under valgrind/ASAN.
48411cb0ef41Sopenharmony_ci
48421cb0ef41Sopenharmony_ciDaniel Stenberg (21 Aug 2016)
48431cb0ef41Sopenharmony_ci- AUTHOR: maybe gitgub isn't really an author =)
48441cb0ef41Sopenharmony_ci
48451cb0ef41Sopenharmony_ci- AUTHORS: added contributors from the git log
48461cb0ef41Sopenharmony_ci
48471cb0ef41Sopenharmony_ci- LICENSE.md: add a stand-alone license file
48481cb0ef41Sopenharmony_ci  
48491cb0ef41Sopenharmony_ci  Just the MIT license used in the top the source files moved out to a
48501cb0ef41Sopenharmony_ci  stand-alone file for easier reference and discovery.
48511cb0ef41Sopenharmony_ci
48521cb0ef41Sopenharmony_ci- README: added "CII best practices" badge
48531cb0ef41Sopenharmony_ci
48541cb0ef41Sopenharmony_ci- SECURITY.md: suggested "security process" for the project
48551cb0ef41Sopenharmony_ci
48561cb0ef41Sopenharmony_ciDavid Drysdale (17 Aug 2016)
48571cb0ef41Sopenharmony_ci- test: Add Clang static analysis build to Travis
48581cb0ef41Sopenharmony_ci  
48591cb0ef41Sopenharmony_ci  Run scan-build over the library source code, but skip the
48601cb0ef41Sopenharmony_ci  tests.  Needs a later Clang install in Travis
48611cb0ef41Sopenharmony_ci
48621cb0ef41Sopenharmony_ci- test: more info on how to run fuzz testing
48631cb0ef41Sopenharmony_ci
48641cb0ef41Sopenharmony_ci- test: make fuzzer driver code C not C++
48651cb0ef41Sopenharmony_ci
48661cb0ef41Sopenharmony_ci- test: fuzzer mode for AFL's persistent mode
48671cb0ef41Sopenharmony_ci  
48681cb0ef41Sopenharmony_ci  When fuzzing with AFL, if the LLVM-based instrumentation is
48691cb0ef41Sopenharmony_ci  used (via the afl-clang-fast wrapper), then it is possible to
48701cb0ef41Sopenharmony_ci  have a single execution of the fuzzer program iterate multiple
48711cb0ef41Sopenharmony_ci  times over the fuzzing entrypoint (similar to libFuzzer's normal
48721cb0ef41Sopenharmony_ci  mode of execution) with different data.  This is much (e.g. 10x)
48731cb0ef41Sopenharmony_ci  faster.
48741cb0ef41Sopenharmony_ci  
48751cb0ef41Sopenharmony_ci  Add code to support this, by checking whether __AFL_LOOP is
48761cb0ef41Sopenharmony_ci  defined at compile-time.
48771cb0ef41Sopenharmony_ci  
48781cb0ef41Sopenharmony_ci  Also, shift the code to effectively be C rather than C++.
48791cb0ef41Sopenharmony_ci
48801cb0ef41Sopenharmony_ci- test: simplify deps for fuzzer entrypoint
48811cb0ef41Sopenharmony_ci  
48821cb0ef41Sopenharmony_ci  No need to depend on the rest of the test code (ares-test.h) for
48831cb0ef41Sopenharmony_ci  the fuzzer entrypoint; this makes the entrypoint slightly simpler
48841cb0ef41Sopenharmony_ci  to build with LLVM's libFuzzer.
48851cb0ef41Sopenharmony_ci  
48861cb0ef41Sopenharmony_ci  Also shift the code to effectively be C rather than C++
48871cb0ef41Sopenharmony_ci
48881cb0ef41Sopenharmony_ci- test: disable MinGW tests
48891cb0ef41Sopenharmony_ci  
48901cb0ef41Sopenharmony_ci  The test binary built in the MinGW build is failing for some
48911cb0ef41Sopenharmony_ci  reason.  It works for me when I build locally, so I'm guessing
48921cb0ef41Sopenharmony_ci  it's down to some sort of AppVeyor environment issue.
48931cb0ef41Sopenharmony_ci  
48941cb0ef41Sopenharmony_ci  Disable for now.
48951cb0ef41Sopenharmony_ci
48961cb0ef41Sopenharmony_ciDaniel Stenberg (16 Aug 2016)
48971cb0ef41Sopenharmony_ci- read_tcp_data: remove superfluous NULL check
48981cb0ef41Sopenharmony_ci  
48991cb0ef41Sopenharmony_ci  CID 56884 by Coverity. The pointer is already derefenced before this
49001cb0ef41Sopenharmony_ci  point so it can't be NULL here anyway.
49011cb0ef41Sopenharmony_ci
49021cb0ef41Sopenharmony_ci- web: http => https
49031cb0ef41Sopenharmony_ci
49041cb0ef41Sopenharmony_ciGitHub (20 Jul 2016)
49051cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
49061cb0ef41Sopenharmony_ci
49071cb0ef41Sopenharmony_ci  Merge pull request #59 from fuze/master
49081cb0ef41Sopenharmony_ci  
49091cb0ef41Sopenharmony_ci  Update msvc_ver.inc for VS2015 Update 3
49101cb0ef41Sopenharmony_ci
49111cb0ef41Sopenharmony_ci- [Chris Araman brought this change]
49121cb0ef41Sopenharmony_ci
49131cb0ef41Sopenharmony_ci  Update msvc_ver.inc
49141cb0ef41Sopenharmony_ci  
49151cb0ef41Sopenharmony_ci  support Visual Studio 2015 Update 3
49161cb0ef41Sopenharmony_ci
49171cb0ef41Sopenharmony_ciDavid Drysdale (2 May 2016)
49181cb0ef41Sopenharmony_ci- Fix trailing comment for #endif
49191cb0ef41Sopenharmony_ci
49201cb0ef41Sopenharmony_ciDaniel Stenberg (30 Apr 2016)
49211cb0ef41Sopenharmony_ci- email: use Gisle's "new" address
49221cb0ef41Sopenharmony_ci
49231cb0ef41Sopenharmony_ciDavid Drysdale (18 Apr 2016)
49241cb0ef41Sopenharmony_ci- test: drop superfluous fuzz inputs
49251cb0ef41Sopenharmony_ci  
49261cb0ef41Sopenharmony_ci  Where there are multiple fuzz input files that only differ in
49271cb0ef41Sopenharmony_ci  the first two bytes (the query ID), just keep the first such
49281cb0ef41Sopenharmony_ci  file.
49291cb0ef41Sopenharmony_ci
49301cb0ef41Sopenharmony_cisvante karlsson (15 Apr 2016)
49311cb0ef41Sopenharmony_ci- Update msvc_ver.inc
49321cb0ef41Sopenharmony_ci  
49331cb0ef41Sopenharmony_ci  support Visual Studio 2015 Update 2
49341cb0ef41Sopenharmony_ci
49351cb0ef41Sopenharmony_ciDavid Drysdale (31 Mar 2016)
49361cb0ef41Sopenharmony_ci- test: Run fuzzcheck.sh in Travis build
49371cb0ef41Sopenharmony_ci
49381cb0ef41Sopenharmony_ci- test: add fuzzing check script to tests
49391cb0ef41Sopenharmony_ci  
49401cb0ef41Sopenharmony_ci  Add a test script that runs the fuzzing command over the
49411cb0ef41Sopenharmony_ci  corpus of DNS packets.  This doesn't actually do any fuzzing
49421cb0ef41Sopenharmony_ci  (it just runs them as inputs without generating any variations)
49431cb0ef41Sopenharmony_ci  but it does ensure that the fuzzing entrypoint is still working.
49441cb0ef41Sopenharmony_ci
49451cb0ef41Sopenharmony_ci- test: allow multiple files in aresfuzz command line
49461cb0ef41Sopenharmony_ci  
49471cb0ef41Sopenharmony_ci  If no arguments are specified, use stdin as input.
49481cb0ef41Sopenharmony_ci  Otherwise treat each argument as a filename and feed
49491cb0ef41Sopenharmony_ci  its contents to the fuzz entrypoint.
49501cb0ef41Sopenharmony_ci
49511cb0ef41Sopenharmony_ci- test: Add corpus of DNS packets
49521cb0ef41Sopenharmony_ci  
49531cb0ef41Sopenharmony_ci  For fuzz testing it is useful to start from a corpus of valid
49541cb0ef41Sopenharmony_ci  packets, so fill out the test/fuzzinput/ directory with a bunch
49551cb0ef41Sopenharmony_ci  of inputs.
49561cb0ef41Sopenharmony_ci  
49571cb0ef41Sopenharmony_ci  These packets were generated by temporarily modifying the c-ares
49581cb0ef41Sopenharmony_ci  process_answer() function to save off any incoming response messages.
49591cb0ef41Sopenharmony_ci
49601cb0ef41Sopenharmony_ci- test: Add utility to show DNS packet from file
49611cb0ef41Sopenharmony_ci
49621cb0ef41Sopenharmony_ci- [nordsturm brought this change]
49631cb0ef41Sopenharmony_ci
49641cb0ef41Sopenharmony_ci  Fix nsort initialization
49651cb0ef41Sopenharmony_ci  
49661cb0ef41Sopenharmony_ci  Author: Alexander Drachevskiy
49671cb0ef41Sopenharmony_ci  http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml
49681cb0ef41Sopenharmony_ci  http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml
49691cb0ef41Sopenharmony_ci
49701cb0ef41Sopenharmony_ci- test: Check setting nsort=0 option is respected
49711cb0ef41Sopenharmony_ci
49721cb0ef41Sopenharmony_ci- test: Update fuzzing function prototype
49731cb0ef41Sopenharmony_ci  
49741cb0ef41Sopenharmony_ci  libFuzzer changed expected return type from void to int
49751cb0ef41Sopenharmony_ci  in LLVM 3.8.
49761cb0ef41Sopenharmony_ci
49771cb0ef41Sopenharmony_ci- Explicitly clear struct servent before use
49781cb0ef41Sopenharmony_ci  
49791cb0ef41Sopenharmony_ci  On a build where MSAN has been manually set up (which involves
49801cb0ef41Sopenharmony_ci  using an MSAN-instrumented version of the standard C++ library, see
49811cb0ef41Sopenharmony_ci  https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo)
49821cb0ef41Sopenharmony_ci  there's a warning about use of uninitialized memory here.  It
49831cb0ef41Sopenharmony_ci  might be a false positive, but the fix is trivial so include it.
49841cb0ef41Sopenharmony_ci
49851cb0ef41Sopenharmony_ci- test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record
49861cb0ef41Sopenharmony_ci  
49871cb0ef41Sopenharmony_ci  Also shuffle expected responses rsp6/rsp4 into the order they will occur.
49881cb0ef41Sopenharmony_ci
49891cb0ef41Sopenharmony_ci- [Chris Araman brought this change]
49901cb0ef41Sopenharmony_ci
49911cb0ef41Sopenharmony_ci  msvc_ver.inc: support Visual Studio 2015 Update 1
49921cb0ef41Sopenharmony_ci
49931cb0ef41Sopenharmony_ci- build: commonize MSVC version detection
49941cb0ef41Sopenharmony_ci  
49951cb0ef41Sopenharmony_ci  Remove the need to copy/paste version number mapping between
49961cb0ef41Sopenharmony_ci  Makefile.msvc and test/Makefile.msvc.
49971cb0ef41Sopenharmony_ci
49981cb0ef41Sopenharmony_ci- test: Use different name in live test
49991cb0ef41Sopenharmony_ci
50001cb0ef41Sopenharmony_ci- test: Only pass unused args to GoogleTest
50011cb0ef41Sopenharmony_ci
50021cb0ef41Sopenharmony_ci- ahost.c: add cast to fix C++ compile
50031cb0ef41Sopenharmony_ci  
50041cb0ef41Sopenharmony_ci  If ahost.c is force-compiled as C++ the missing cast from
50051cb0ef41Sopenharmony_ci  (void *) to (char **) is problematic.
50061cb0ef41Sopenharmony_ci
50071cb0ef41Sopenharmony_ci- ares_library_cleanup: reset ares_realloc too
50081cb0ef41Sopenharmony_ci  
50091cb0ef41Sopenharmony_ci  Otherwise a subsequent use of the library might use a previous
50101cb0ef41Sopenharmony_ci  incarnation's realloc() implementation.
50111cb0ef41Sopenharmony_ci
50121cb0ef41Sopenharmony_ciDaniel Stenberg (9 Mar 2016)
50131cb0ef41Sopenharmony_ci- [Brad House brought this change]
50141cb0ef41Sopenharmony_ci
50151cb0ef41Sopenharmony_ci  configure: check if tests can get built before enabled
50161cb0ef41Sopenharmony_ci  
50171cb0ef41Sopenharmony_ci  The current approach for disabling tests is not a good solution because
50181cb0ef41Sopenharmony_ci  it forces you to pass --disable-tests, rather than auto-detect if your
50191cb0ef41Sopenharmony_ci  system can support the tests in the first place.  Many (most?) systems
50201cb0ef41Sopenharmony_ci  do not have C++11.  This also causes issues when chain-building c-ares,
50211cb0ef41Sopenharmony_ci  the hosting system needs to be updated to support passing this
50221cb0ef41Sopenharmony_ci  additional flag if necessary, it doesn't seem reasonable to add this
50231cb0ef41Sopenharmony_ci  requirement which breaks compatibility.
50241cb0ef41Sopenharmony_ci  
50251cb0ef41Sopenharmony_ci  This change auto-detects if the system can build the tests and
50261cb0ef41Sopenharmony_ci  automatically disable them if it cannot.  If you pass --enable-tests to
50271cb0ef41Sopenharmony_ci  configure and the system cannot build them either due to lack of system
50281cb0ef41Sopenharmony_ci  support, or because cross-compilation is being used, it will throw an
50291cb0ef41Sopenharmony_ci  appropriate error since the user indicated they really did want the
50301cb0ef41Sopenharmony_ci  tests.
50311cb0ef41Sopenharmony_ci
50321cb0ef41Sopenharmony_ciDavid Drysdale (3 Mar 2016)
50331cb0ef41Sopenharmony_ci- [Viktor Szakats brought this change]
50341cb0ef41Sopenharmony_ci
50351cb0ef41Sopenharmony_ci  Makefile.m32: add support for CROSSPREFIX
50361cb0ef41Sopenharmony_ci
50371cb0ef41Sopenharmony_ci- [Viktor Szakats brought this change]
50381cb0ef41Sopenharmony_ci
50391cb0ef41Sopenharmony_ci  Makefile.m32: add support for extra flags
50401cb0ef41Sopenharmony_ci  
50411cb0ef41Sopenharmony_ci  Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars
50421cb0ef41Sopenharmony_ci  for mingw
50431cb0ef41Sopenharmony_ci
50441cb0ef41Sopenharmony_ci- test: Build with MinGW on AppVeyor
50451cb0ef41Sopenharmony_ci
50461cb0ef41Sopenharmony_ci- test: avoid in6addr_* constants
50471cb0ef41Sopenharmony_ci  
50481cb0ef41Sopenharmony_ci  These aren't available on MinGW, so use explicit addresses instead.
50491cb0ef41Sopenharmony_ci
50501cb0ef41Sopenharmony_ci- test: add missing #includes for dns-proto.cc
50511cb0ef41Sopenharmony_ci
50521cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
50531cb0ef41Sopenharmony_ci
50541cb0ef41Sopenharmony_ci  Fix man page typos detected by Lintian
50551cb0ef41Sopenharmony_ci
50561cb0ef41Sopenharmony_ciDaniel Stenberg (19 Feb 2016)
50571cb0ef41Sopenharmony_ci- configure: acknowledge --disable-tests
50581cb0ef41Sopenharmony_ci  
50591cb0ef41Sopenharmony_ci  Fixes #44
50601cb0ef41Sopenharmony_ci
50611cb0ef41Sopenharmony_ci- AUTHORS: added contributors from the 1.11.0 release
50621cb0ef41Sopenharmony_ci
50631cb0ef41Sopenharmony_ci- bump: start working on the next version
50641cb0ef41Sopenharmony_ci
50651cb0ef41Sopenharmony_ciVersion 1.11.0 (19 Feb 2016)
50661cb0ef41Sopenharmony_ci
50671cb0ef41Sopenharmony_ciDaniel Stenberg (19 Feb 2016)
50681cb0ef41Sopenharmony_ci- RELEASE-NOTES: final edits for 1.11.0
50691cb0ef41Sopenharmony_ci
50701cb0ef41Sopenharmony_ciDavid Drysdale (15 Feb 2016)
50711cb0ef41Sopenharmony_ci- ares_dup.3: remove mention of nonexistent function
50721cb0ef41Sopenharmony_ci  
50731cb0ef41Sopenharmony_ci  ares_dup_options() doesn't exist, so don't document it.
50741cb0ef41Sopenharmony_ci
50751cb0ef41Sopenharmony_ci- test: skip repeated build steps
50761cb0ef41Sopenharmony_ci  
50771cb0ef41Sopenharmony_ci  Top-level buildconf/configure now triggers for the
50781cb0ef41Sopenharmony_ci  test/ subdir too, so don't need to do explicitly.
50791cb0ef41Sopenharmony_ci
50801cb0ef41Sopenharmony_ci- test: namespaces unavailable when cross-compiling
50811cb0ef41Sopenharmony_ci
50821cb0ef41Sopenharmony_ciDaniel Stenberg (13 Feb 2016)
50831cb0ef41Sopenharmony_ci- configure: only run configure in test when NOT cross-compiling
50841cb0ef41Sopenharmony_ci  
50851cb0ef41Sopenharmony_ci  ... as the tests won't run cross-compiled anyway
50861cb0ef41Sopenharmony_ci
50871cb0ef41Sopenharmony_ciDavid Drysdale (13 Feb 2016)
50881cb0ef41Sopenharmony_ci- test: prefer ON_CALL to EXPECT_CALL to reduce flakes
50891cb0ef41Sopenharmony_ci  
50901cb0ef41Sopenharmony_ci  For UDP tests, there's a chance of a retry.  EXPECT_CALL only
50911cb0ef41Sopenharmony_ci  expects a single request to arrive at the server; ON_CALL allows
50921cb0ef41Sopenharmony_ci  for a UDP retry and repeats the same answer.
50931cb0ef41Sopenharmony_ci  
50941cb0ef41Sopenharmony_ci  Note that ON_CALL and EXPECT_CALL can't be mixed in the same
50951cb0ef41Sopenharmony_ci  test, and that tests that have a varied sequence of responses
50961cb0ef41Sopenharmony_ci  for the same repeated request still have to use EXPECT_CALL.
50971cb0ef41Sopenharmony_ci
50981cb0ef41Sopenharmony_ciDaniel Stenberg (13 Feb 2016)
50991cb0ef41Sopenharmony_ci- configure: run configure in 'test' too
51001cb0ef41Sopenharmony_ci  
51011cb0ef41Sopenharmony_ci  Having the test dir completely stand-alone causes too many issues for
51021cb0ef41Sopenharmony_ci  users and devs. It still needs to be built specifically.
51031cb0ef41Sopenharmony_ci
51041cb0ef41Sopenharmony_ci- configure: build silently by default
51051cb0ef41Sopenharmony_ci
51061cb0ef41Sopenharmony_ci- buildconf: run test/buildconf too if present
51071cb0ef41Sopenharmony_ci
51081cb0ef41Sopenharmony_ci- test/configure: build silently by default
51091cb0ef41Sopenharmony_ci
51101cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
51111cb0ef41Sopenharmony_ci
51121cb0ef41Sopenharmony_ci  dist: Distribute README.md
51131cb0ef41Sopenharmony_ci  
51141cb0ef41Sopenharmony_ci  Closes #42
51151cb0ef41Sopenharmony_ci
51161cb0ef41Sopenharmony_ciVersion 1.11.0 (11 Feb 2016)
51171cb0ef41Sopenharmony_ci
51181cb0ef41Sopenharmony_ciDaniel Stenberg (11 Feb 2016)
51191cb0ef41Sopenharmony_ci- Makefile.am: distribute the test dir too
51201cb0ef41Sopenharmony_ci
51211cb0ef41Sopenharmony_ci- RELEASE-NOTES: synced with 385582bd14b68a
51221cb0ef41Sopenharmony_ci
51231cb0ef41Sopenharmony_ci- [Nicolas \"Pixel\" Noble brought this change]
51241cb0ef41Sopenharmony_ci
51251cb0ef41Sopenharmony_ci  ares_win32_init: make LoadLibrary work when using UNICODE too
51261cb0ef41Sopenharmony_ci  
51271cb0ef41Sopenharmony_ci  Closes #17
51281cb0ef41Sopenharmony_ci
51291cb0ef41Sopenharmony_ciDavid Drysdale (11 Feb 2016)
51301cb0ef41Sopenharmony_ci- Use "resolve" as synonym of "dns" in nsswitch.conf
51311cb0ef41Sopenharmony_ci  
51321cb0ef41Sopenharmony_ci  Modern Linux systems may have libnss_resolve from systemd as the
51331cb0ef41Sopenharmony_ci  resolver, which is then configured in /etc/nsswitch.conf with
51341cb0ef41Sopenharmony_ci  the "resolve" keyword rather than "dns".
51351cb0ef41Sopenharmony_ci  
51361cb0ef41Sopenharmony_ci  Fixes #33
51371cb0ef41Sopenharmony_ci
51381cb0ef41Sopenharmony_ci- ares_set_socket_callback: make manpage match code
51391cb0ef41Sopenharmony_ci  
51401cb0ef41Sopenharmony_ci  The code in ares_process.c that invokes the socket creation/connection
51411cb0ef41Sopenharmony_ci  callback only checks for rc < 0, not for standard ares error codes.
51421cb0ef41Sopenharmony_ci
51431cb0ef41Sopenharmony_ci- Merge pull request #36 from AGWA-forks/master
51441cb0ef41Sopenharmony_ci  
51451cb0ef41Sopenharmony_ci  Add ares_set_socket_configure_callback()
51461cb0ef41Sopenharmony_ci
51471cb0ef41Sopenharmony_ci- test: Update init tests to match behaviour
51481cb0ef41Sopenharmony_ci  
51491cb0ef41Sopenharmony_ci  Unreadable config files are now treated the same way
51501cb0ef41Sopenharmony_ci  as absent config files.
51511cb0ef41Sopenharmony_ci
51521cb0ef41Sopenharmony_ci- [Fedor Indutny brought this change]
51531cb0ef41Sopenharmony_ci
51541cb0ef41Sopenharmony_ci  Ignore `fopen` errors to use default values
51551cb0ef41Sopenharmony_ci  
51561cb0ef41Sopenharmony_ci  After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf`
51571cb0ef41Sopenharmony_ci  errors are no longer swallowed in `ares_init_options`. This has exposed
51581cb0ef41Sopenharmony_ci  a previously unknown bug in `lookups` initialization code.
51591cb0ef41Sopenharmony_ci  
51601cb0ef41Sopenharmony_ci  If there is no lookup configuration in `resolv.conf`,
51611cb0ef41Sopenharmony_ci  `init_by_resolv_conf` will attempt to read it from other files available
51621cb0ef41Sopenharmony_ci  on the system. However, some of these files may have restricted
51631cb0ef41Sopenharmony_ci  permissions (like `600`), which will lead to `EACCESS` errno, which in
51641cb0ef41Sopenharmony_ci  turn is handled like a fatal error by `init_by_resolv_conf`.
51651cb0ef41Sopenharmony_ci  
51661cb0ef41Sopenharmony_ci  However, it sounds illogical that this error should be handled as a
51671cb0ef41Sopenharmony_ci  fatal. There is a `init_by_defaults` call that overrides `lookups` with
51681cb0ef41Sopenharmony_ci  default value, and certainly possible absence of lookup information is
51691cb0ef41Sopenharmony_ci  the reason why this function exists in a first place!
51701cb0ef41Sopenharmony_ci  
51711cb0ef41Sopenharmony_ci  I suggest handling any `fopen` errors as non-fatal ones, allowing to
51721cb0ef41Sopenharmony_ci  pick up the `lookups` value from different config files, or to pick up
51731cb0ef41Sopenharmony_ci  default value.
51741cb0ef41Sopenharmony_ci
51751cb0ef41Sopenharmony_ciAndrew Ayer (9 Feb 2016)
51761cb0ef41Sopenharmony_ci- Document callback type in man page for ares_set_socket_callback
51771cb0ef41Sopenharmony_ci
51781cb0ef41Sopenharmony_ci- Add ares_set_socket_configure_callback()
51791cb0ef41Sopenharmony_ci  
51801cb0ef41Sopenharmony_ci  This function sets a callback that is invoked after the socket is
51811cb0ef41Sopenharmony_ci  created, but before the connection is established.  This is an ideal
51821cb0ef41Sopenharmony_ci  time to customize various socket options.
51831cb0ef41Sopenharmony_ci
51841cb0ef41Sopenharmony_ciDavid Drysdale (9 Feb 2016)
51851cb0ef41Sopenharmony_ci- test: ares_set_socket_callback failure behaviour
51861cb0ef41Sopenharmony_ci
51871cb0ef41Sopenharmony_ci- test: Check ares_parse_txt_reply_ext() entrypoint
51881cb0ef41Sopenharmony_ci
51891cb0ef41Sopenharmony_ci- [Fedor Indutny brought this change]
51901cb0ef41Sopenharmony_ci
51911cb0ef41Sopenharmony_ci  txt: introduce `ares_parse_txt_reply_ext`
51921cb0ef41Sopenharmony_ci  
51931cb0ef41Sopenharmony_ci  Introduce `ares_txt_ext` structure with an extra `record_start`
51941cb0ef41Sopenharmony_ci  field, which indicates a start of a new TXT record, thus allowing to
51951cb0ef41Sopenharmony_ci  differentiate the chunks in the same record, from a chunks in a
51961cb0ef41Sopenharmony_ci  different record.
51971cb0ef41Sopenharmony_ci  
51981cb0ef41Sopenharmony_ci  Introduce a new API method: `ares_parse_txt_reply_ext` that works with
51991cb0ef41Sopenharmony_ci  this kind of struct.
52001cb0ef41Sopenharmony_ci
52011cb0ef41Sopenharmony_ci- doc: Update missed repo references
52021cb0ef41Sopenharmony_ci
52031cb0ef41Sopenharmony_ci- doc: Update docs on contributing
52041cb0ef41Sopenharmony_ci
52051cb0ef41Sopenharmony_ci- test: Run command line tools in Travis
52061cb0ef41Sopenharmony_ci  
52071cb0ef41Sopenharmony_ci  Do a quick execution of each of the command line tools
52081cb0ef41Sopenharmony_ci  in the continuous integration build, so that any (say)
52091cb0ef41Sopenharmony_ci  sanitizer failures show up.
52101cb0ef41Sopenharmony_ci
52111cb0ef41Sopenharmony_ci- acountry: drop inert test
52121cb0ef41Sopenharmony_ci  
52131cb0ef41Sopenharmony_ci  If ver_1 is true, then z0 and z1 must both be 'z', and so
52141cb0ef41Sopenharmony_ci  (z0 != 'z' && z1 != 'z') can never be true.
52151cb0ef41Sopenharmony_ci  
52161cb0ef41Sopenharmony_ci  CID 56879, pointed out by Coverity.
52171cb0ef41Sopenharmony_ci
52181cb0ef41Sopenharmony_ci- doc: update badge locations to master repo
52191cb0ef41Sopenharmony_ci
52201cb0ef41Sopenharmony_ci- test: Enable maintainer mode + debug in Travis
52211cb0ef41Sopenharmony_ci
52221cb0ef41Sopenharmony_ci- test: Add an iOS build target
52231cb0ef41Sopenharmony_ci
52241cb0ef41Sopenharmony_ci- test: Ignore SIGPIPE in tests
52251cb0ef41Sopenharmony_ci
52261cb0ef41Sopenharmony_ci- test: More initialization tests
52271cb0ef41Sopenharmony_ci
52281cb0ef41Sopenharmony_ci- test: Improve containerized test mechanism
52291cb0ef41Sopenharmony_ci  
52301cb0ef41Sopenharmony_ci  Aim is to ensure that code coverage information can escape the
52311cb0ef41Sopenharmony_ci  container.  To do this:
52321cb0ef41Sopenharmony_ci   - Enter a new mount namespace too, so that we can...
52331cb0ef41Sopenharmony_ci   - Bind mount the expected source directory into the container
52341cb0ef41Sopenharmony_ci   - Share memory with the sub-process so coverage information is
52351cb0ef41Sopenharmony_ci     shared too.
52361cb0ef41Sopenharmony_ci
52371cb0ef41Sopenharmony_ci- test: Make contained tests easier to write
52381cb0ef41Sopenharmony_ci
52391cb0ef41Sopenharmony_ci- test: Add framework for containerized testing
52401cb0ef41Sopenharmony_ci  
52411cb0ef41Sopenharmony_ci  On Linux we can potentially use user and UTS namespaces to run  a test
52421cb0ef41Sopenharmony_ci  in a pseudo-container with:
52431cb0ef41Sopenharmony_ci   - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
52441cb0ef41Sopenharmony_ci   - arbitrary hostname/domainname.
52451cb0ef41Sopenharmony_ci  
52461cb0ef41Sopenharmony_ci  Include a first pass at the framework code to allow this, along with a
52471cb0ef41Sopenharmony_ci  first test case that uses the container.
52481cb0ef41Sopenharmony_ci
52491cb0ef41Sopenharmony_ci- test: Use a longer timeout for less flakiness
52501cb0ef41Sopenharmony_ci  
52511cb0ef41Sopenharmony_ci  Having occasional test failures from timeout before multiple
52521cb0ef41Sopenharmony_ci  queries can complete, so up the default timeout for the test
52531cb0ef41Sopenharmony_ci  from 100ms to 1500ms.
52541cb0ef41Sopenharmony_ci
52551cb0ef41Sopenharmony_ci- test: Make failure tests more robust
52561cb0ef41Sopenharmony_ci  
52571cb0ef41Sopenharmony_ci  Different platforms will do different numbers of allocations
52581cb0ef41Sopenharmony_ci  in the processing of a given API call; just check that the
52591cb0ef41Sopenharmony_ci  return code is either success or ENOMEM, and free off any
52601cb0ef41Sopenharmony_ci  returned state in the former case.
52611cb0ef41Sopenharmony_ci  
52621cb0ef41Sopenharmony_ci  Also cope with ECONNREFUSED as well as ENOTFOUND.
52631cb0ef41Sopenharmony_ci
52641cb0ef41Sopenharmony_ci- test: Get test code building under Windows
52651cb0ef41Sopenharmony_ci  
52661cb0ef41Sopenharmony_ci   - Initial nmake file based off library nmake file
52671cb0ef41Sopenharmony_ci   - Cast socket call arguments to (char *)
52681cb0ef41Sopenharmony_ci   - Use wrapper sclose() that maps to closesocket() or close()
52691cb0ef41Sopenharmony_ci   - Build a config.h indicating presence of headers
52701cb0ef41Sopenharmony_ci   - Conditionally include netdb.h
52711cb0ef41Sopenharmony_ci   - Remove unnecessary include of sys/socket.h
52721cb0ef41Sopenharmony_ci   - Force longer bitmask for allocation failure tracking
52731cb0ef41Sopenharmony_ci   - Call WSAStartup() / WSACleanup() in main()
52741cb0ef41Sopenharmony_ci   - Set TCP_NODELAY for mock server
52751cb0ef41Sopenharmony_ci   - Turn on tests in AppVeyor build
52761cb0ef41Sopenharmony_ci
52771cb0ef41Sopenharmony_ci- test: Disable tests that manipulate env on Windows
52781cb0ef41Sopenharmony_ci
52791cb0ef41Sopenharmony_ci- test: Move file lists into Makefile.inc
52801cb0ef41Sopenharmony_ci  
52811cb0ef41Sopenharmony_ci  In preparation for a Win32 build of the test suite.
52821cb0ef41Sopenharmony_ci
52831cb0ef41Sopenharmony_ci- test: Add a simple multi-server test
52841cb0ef41Sopenharmony_ci  
52851cb0ef41Sopenharmony_ci  Check rotate option does something
52861cb0ef41Sopenharmony_ci
52871cb0ef41Sopenharmony_ci- test: Allow for multiple mock servers
52881cb0ef41Sopenharmony_ci  
52891cb0ef41Sopenharmony_ci   - Update the MockServer to allow separate specification of
52901cb0ef41Sopenharmony_ci     UDP and TCP ports
52911cb0ef41Sopenharmony_ci   - Have an array of mock servers listening on consecutive
52921cb0ef41Sopenharmony_ci     sets of ports.
52931cb0ef41Sopenharmony_ci   - Rename Process(fd) to ProcessFD(fd) to avoid confusion.
52941cb0ef41Sopenharmony_ci   - Initialize channel by using the new ares_set_servers_ports()
52951cb0ef41Sopenharmony_ci     entrypoint, so multiple ports on the same loopback address
52961cb0ef41Sopenharmony_ci     can be used.
52971cb0ef41Sopenharmony_ci
52981cb0ef41Sopenharmony_ci- test: Update test for set/get_servers variants
52991cb0ef41Sopenharmony_ci  
53001cb0ef41Sopenharmony_ci  Ports are significant in the _ports_ variant functions, so update test to cope.
53011cb0ef41Sopenharmony_ci
53021cb0ef41Sopenharmony_ci- test: Make GetNameServers() utility function port-aware
53031cb0ef41Sopenharmony_ci  
53041cb0ef41Sopenharmony_ci  Also make it generally available.
53051cb0ef41Sopenharmony_ci
53061cb0ef41Sopenharmony_ci- test: more testing, including of internal static functions
53071cb0ef41Sopenharmony_ci
53081cb0ef41Sopenharmony_ci- test: more tests, especially fallback processing
53091cb0ef41Sopenharmony_ci  
53101cb0ef41Sopenharmony_ci   - Make mock server listen on UDP + TCP in parallel.
53111cb0ef41Sopenharmony_ci   - Test UDP->TCP fallback on truncation
53121cb0ef41Sopenharmony_ci   - Test EDNS->no-EDNS fallback
53131cb0ef41Sopenharmony_ci   - Test some environment init options
53141cb0ef41Sopenharmony_ci   - Test nonsense reply
53151cb0ef41Sopenharmony_ci  
53161cb0ef41Sopenharmony_ci  test: short response
53171cb0ef41Sopenharmony_ci
53181cb0ef41Sopenharmony_ci- test: more tests, particularly of initialization
53191cb0ef41Sopenharmony_ci
53201cb0ef41Sopenharmony_ci- test: Run mock tests over both TCP and UDP
53211cb0ef41Sopenharmony_ci  
53221cb0ef41Sopenharmony_ci  With the exception of a few tests that make use of the timed
53231cb0ef41Sopenharmony_ci  retry aspect of UDP.
53241cb0ef41Sopenharmony_ci
53251cb0ef41Sopenharmony_ci- test: Run mock tests over both IPv4 and IPv6
53261cb0ef41Sopenharmony_ci
53271cb0ef41Sopenharmony_ci- test: Add more tests for edge cases
53281cb0ef41Sopenharmony_ci
53291cb0ef41Sopenharmony_ci- test: more nooks and crannies of pton functions
53301cb0ef41Sopenharmony_ci
53311cb0ef41Sopenharmony_ci- test: More tests for PTR parsing
53321cb0ef41Sopenharmony_ci
53331cb0ef41Sopenharmony_ci- test: Use of HOSTALIAS environment variable
53341cb0ef41Sopenharmony_ci
53351cb0ef41Sopenharmony_ci- test: Add RAII utility classes for testing
53361cb0ef41Sopenharmony_ci  
53371cb0ef41Sopenharmony_ci   - TempFile holds specific contents
53381cb0ef41Sopenharmony_ci   - EnvValue sets an environment variable
53391cb0ef41Sopenharmony_ci
53401cb0ef41Sopenharmony_ci- test: More search domain scenarios
53411cb0ef41Sopenharmony_ci
53421cb0ef41Sopenharmony_ci- test: Remove duplicate flags from Makefile.am
53431cb0ef41Sopenharmony_ci
53441cb0ef41Sopenharmony_ci- test: Make test code leak-free
53451cb0ef41Sopenharmony_ci
53461cb0ef41Sopenharmony_ci- test: More tests
53471cb0ef41Sopenharmony_ci  
53481cb0ef41Sopenharmony_ci   - test use of sortlist
53491cb0ef41Sopenharmony_ci   - test gethostbyname(AF_UNSPEC)
53501cb0ef41Sopenharmony_ci
53511cb0ef41Sopenharmony_ci- test: Test ares_gethostbyname_file()
53521cb0ef41Sopenharmony_ci
53531cb0ef41Sopenharmony_ci- test: Add more tests of ares_getnameinfo()
53541cb0ef41Sopenharmony_ci
53551cb0ef41Sopenharmony_ci- test: Tweak tests, add alloc failure test
53561cb0ef41Sopenharmony_ci
53571cb0ef41Sopenharmony_ci- test: Test init with options
53581cb0ef41Sopenharmony_ci
53591cb0ef41Sopenharmony_ci- test: More tests
53601cb0ef41Sopenharmony_ci  
53611cb0ef41Sopenharmony_ci   - ares_inet_net_pton() variants
53621cb0ef41Sopenharmony_ci   - ares_getsock() variants
53631cb0ef41Sopenharmony_ci
53641cb0ef41Sopenharmony_ci- test: Expose ProcessWork() function
53651cb0ef41Sopenharmony_ci
53661cb0ef41Sopenharmony_ci- test: More parsing tests
53671cb0ef41Sopenharmony_ci  
53681cb0ef41Sopenharmony_ci  Including:
53691cb0ef41Sopenharmony_ci   - Split each parse function test set out into separate files.
53701cb0ef41Sopenharmony_ci   - Add an allocation failure test for each parsing function.
53711cb0ef41Sopenharmony_ci   - Add error check test for each parsing function.
53721cb0ef41Sopenharmony_ci
53731cb0ef41Sopenharmony_ci- test: Add various additional tests
53741cb0ef41Sopenharmony_ci
53751cb0ef41Sopenharmony_ci- test: More tests
53761cb0ef41Sopenharmony_ci  
53771cb0ef41Sopenharmony_ci  Include tests of internal functions, based on the value of the
53781cb0ef41Sopenharmony_ci  CARES_SYMBOL_HIDING macro; need to configure the library with
53791cb0ef41Sopenharmony_ci  --disable-symbol-hiding to enable these tests.
53801cb0ef41Sopenharmony_ci
53811cb0ef41Sopenharmony_ci- test: Allow command line override of mock server port
53821cb0ef41Sopenharmony_ci
53831cb0ef41Sopenharmony_ci- test: Add README.md documentation
53841cb0ef41Sopenharmony_ci
53851cb0ef41Sopenharmony_ci- test: Temporarily avoid latest Python requests package
53861cb0ef41Sopenharmony_ci  
53871cb0ef41Sopenharmony_ci  Currently get error from Travis on this install step, and downgrading one
53881cb0ef41Sopenharmony_ci  version appears to fix the problem.
53891cb0ef41Sopenharmony_ci  
53901cb0ef41Sopenharmony_ci  "Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13
53911cb0ef41Sopenharmony_ci  (from requests[security])"
53921cb0ef41Sopenharmony_ci
53931cb0ef41Sopenharmony_ci- test: Add AppVeyor config file for Windows build
53941cb0ef41Sopenharmony_ci
53951cb0ef41Sopenharmony_ci- test: Add configuration for a Travis build
53961cb0ef41Sopenharmony_ci  
53971cb0ef41Sopenharmony_ci  Cover Linux & OSX on the container infrastructure, but install
53981cb0ef41Sopenharmony_ci  a later G++ to satisfy the tests' need for C++11.
53991cb0ef41Sopenharmony_ci  
54001cb0ef41Sopenharmony_ci  Use a build matrix to include a variety of build variants:
54011cb0ef41Sopenharmony_ci   - ASAN
54021cb0ef41Sopenharmony_ci   - UBSAN
54031cb0ef41Sopenharmony_ci   - LSAN
54041cb0ef41Sopenharmony_ci   - Coverage via coveralls.io
54051cb0ef41Sopenharmony_ci  
54061cb0ef41Sopenharmony_ci  test: invoke ASAN and coverage in Travis build
54071cb0ef41Sopenharmony_ci  
54081cb0ef41Sopenharmony_ci  Also shift to use explicit build matrix
54091cb0ef41Sopenharmony_ci  
54101cb0ef41Sopenharmony_ci  test: Use coveralls.io for coverage tracking
54111cb0ef41Sopenharmony_ci  
54121cb0ef41Sopenharmony_ci  test: Add a build with UBSAN
54131cb0ef41Sopenharmony_ci  
54141cb0ef41Sopenharmony_ci  Also expand and re-order the setting of environment variables
54151cb0ef41Sopenharmony_ci  for easier modification.
54161cb0ef41Sopenharmony_ci  
54171cb0ef41Sopenharmony_ci  test: Add LSAN build to Travis config
54181cb0ef41Sopenharmony_ci
54191cb0ef41Sopenharmony_ci- test: Add initial unit tests for c-ares library
54201cb0ef41Sopenharmony_ci  
54211cb0ef41Sopenharmony_ci  The tests are written in C++11, using the GoogleTest and GoogleMock
54221cb0ef41Sopenharmony_ci  frameworks.  They have their own independent autoconf setup, so that
54231cb0ef41Sopenharmony_ci  users of the library need not have a C++ compiler just to get c-ares
54241cb0ef41Sopenharmony_ci  working (however, the test/configure.ac file does assume the use of
54251cb0ef41Sopenharmony_ci  a shared top-level m4/ directory).  However, this autoconf setup has
54261cb0ef41Sopenharmony_ci  only been tested on Linux and OSX so far.
54271cb0ef41Sopenharmony_ci  
54281cb0ef41Sopenharmony_ci  Run with "./arestest", or "./arestest -v" to see extra debug info.
54291cb0ef41Sopenharmony_ci  The GoogleTest options for running specific tests are also
54301cb0ef41Sopenharmony_ci  available (e.g. "./arestest --gtest_filter=*Live*").
54311cb0ef41Sopenharmony_ci  
54321cb0ef41Sopenharmony_ci  The tests are nowhere near complete yet (currently hitting around
54331cb0ef41Sopenharmony_ci  60% coverage as reported by gcov), but they do include examples
54341cb0ef41Sopenharmony_ci  of a few different styles of testing:
54351cb0ef41Sopenharmony_ci  
54361cb0ef41Sopenharmony_ci   - There are live tests (ares-test-live.cc), which assume that the
54371cb0ef41Sopenharmony_ci     current machine has a valid DNS setup and connection to the
54381cb0ef41Sopenharmony_ci     internet; these tests issue queries for real domains but don't
54391cb0ef41Sopenharmony_ci     particularly check what gets returned.  The tests will fail on
54401cb0ef41Sopenharmony_ci     an offline machine.
54411cb0ef41Sopenharmony_ci  
54421cb0ef41Sopenharmony_ci   - There a few mock tests (ares-test-mock.cc) that set up a fake DNS
54431cb0ef41Sopenharmony_ci     server and inject its port into the c-ares library configuration.
54441cb0ef41Sopenharmony_ci     These tests allow specific response messages to be crafted and
54451cb0ef41Sopenharmony_ci     injected, and so are likely to be used for many more tests in
54461cb0ef41Sopenharmony_ci     future.
54471cb0ef41Sopenharmony_ci  
54481cb0ef41Sopenharmony_ci      - To make this generation/injection easier, the dns-proto.h file
54491cb0ef41Sopenharmony_ci        includes C++ helper classes for building DNS packets.
54501cb0ef41Sopenharmony_ci  
54511cb0ef41Sopenharmony_ci   - Other library entrypoints that don't require network activity
54521cb0ef41Sopenharmony_ci     (e.g. ares_parse_*_reply) are tested directly.
54531cb0ef41Sopenharmony_ci  
54541cb0ef41Sopenharmony_ci   - There are few tests of library-internal functions that are not
54551cb0ef41Sopenharmony_ci     normally visible to API users (in ares-test-internal.cc).
54561cb0ef41Sopenharmony_ci  
54571cb0ef41Sopenharmony_ci   - A couple of the tests use a helper method of the test fixture to
54581cb0ef41Sopenharmony_ci     inject memory allocation failures, using the earlier change to the
54591cb0ef41Sopenharmony_ci     library to allow override of malloc/realloc/free.
54601cb0ef41Sopenharmony_ci  
54611cb0ef41Sopenharmony_ci   - There is also an entrypoint to allow Clang's libfuzzer to drive
54621cb0ef41Sopenharmony_ci     the packet parsing code in ares_parse_*_reply, together with a
54631cb0ef41Sopenharmony_ci     standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz
54641cb0ef41Sopenharmony_ci     for further fuzz testing.
54651cb0ef41Sopenharmony_ci
54661cb0ef41Sopenharmony_ci- test: Add local copy of GoogleMock/GoogleTest 1.7.0
54671cb0ef41Sopenharmony_ci  
54681cb0ef41Sopenharmony_ci  Don't check in gtest/m4 files, as they are unused and interfere
54691cb0ef41Sopenharmony_ci  with the top-level configure process.
54701cb0ef41Sopenharmony_ci
54711cb0ef41Sopenharmony_ci- doc: Show build badges in README.md
54721cb0ef41Sopenharmony_ci  
54731cb0ef41Sopenharmony_ci  Note that these URLs will need to be updated if/when the test branch
54741cb0ef41Sopenharmony_ci  gets pulled into the master repo/branch.
54751cb0ef41Sopenharmony_ci
54761cb0ef41Sopenharmony_ci- doc: Convert README to README.md
54771cb0ef41Sopenharmony_ci  
54781cb0ef41Sopenharmony_ci  Gives better display on GitHub
54791cb0ef41Sopenharmony_ci
54801cb0ef41Sopenharmony_ci- doc: Update in preparation for next release
54811cb0ef41Sopenharmony_ci  
54821cb0ef41Sopenharmony_ci  Assume 1.11.0 is next (as there are various API additions).
54831cb0ef41Sopenharmony_ci  Also add myself to AUTHORS.
54841cb0ef41Sopenharmony_ci
54851cb0ef41Sopenharmony_ci- build: Allow header compilation by Windows C++ compiler
54861cb0ef41Sopenharmony_ci
54871cb0ef41Sopenharmony_ci- build: Expose whether symbol hiding is on
54881cb0ef41Sopenharmony_ci  
54891cb0ef41Sopenharmony_ci  Adding the CARES_SYMBOL_HIDING definition allows the test suite to
54901cb0ef41Sopenharmony_ci  detect whether internal symbols are available or not.
54911cb0ef41Sopenharmony_ci
54921cb0ef41Sopenharmony_ci- build: Add autoconf macros for C++11 code using pthreads
54931cb0ef41Sopenharmony_ci  
54941cb0ef41Sopenharmony_ci  Pull in testing macros from the GNU autoconf archive to allow
54951cb0ef41Sopenharmony_ci  configure scripts to test for and setup use of a C++11 compiler
54961cb0ef41Sopenharmony_ci  (AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD).
54971cb0ef41Sopenharmony_ci  
54981cb0ef41Sopenharmony_ci  Note that these macros are not used by the main library autoconf,
54991cb0ef41Sopenharmony_ci  just by the tests (which share the same m4/ directory).
55001cb0ef41Sopenharmony_ci
55011cb0ef41Sopenharmony_ci- build: Add a code coverage option
55021cb0ef41Sopenharmony_ci  
55031cb0ef41Sopenharmony_ci  Configure with:
55041cb0ef41Sopenharmony_ci    ./configure --enable-code-coverage
55051cb0ef41Sopenharmony_ci  Show coverage output with:
55061cb0ef41Sopenharmony_ci    make code-coverage-capture
55071cb0ef41Sopenharmony_ci  
55081cb0ef41Sopenharmony_ci  Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
55091cb0ef41Sopenharmony_ci  to provide the macros to check for presence of gcov + lcov;
55101cb0ef41Sopenharmony_ci  upstream macro modified to:
55111cb0ef41Sopenharmony_ci   - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
55121cb0ef41Sopenharmony_ci     autoconf (such as the one used by default on Travis) do not have this.
55131cb0ef41Sopenharmony_ci   - Rather than automatically defining CODE_COVERAGE_RULES to be a set
55141cb0ef41Sopenharmony_ci     of makefile rules that use ifeq/endif (which is GNU make-specific),
55151cb0ef41Sopenharmony_ci     instead only define CODE_COVERAGE_RULES if coverages is turned on,
55161cb0ef41Sopenharmony_ci     and in that case don't use conditionals in the makefile.
55171cb0ef41Sopenharmony_ci
55181cb0ef41Sopenharmony_ci- api: Add entrypoints to allow use of per-server ports
55191cb0ef41Sopenharmony_ci  
55201cb0ef41Sopenharmony_ci  Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
55211cb0ef41Sopenharmony_ci  take struct ares_addr_port_node rather than struct ares_addr_node.
55221cb0ef41Sopenharmony_ci  This structure includes a UDP and TCP port number; if this is set
55231cb0ef41Sopenharmony_ci  to zero, the channel-wide port values are used as before.
55241cb0ef41Sopenharmony_ci  
55251cb0ef41Sopenharmony_ci  Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
55261cb0ef41Sopenharmony_ci  is analogous to ares_set_servers(3) except it doesn't ignore any
55271cb0ef41Sopenharmony_ci  specified port information; instead, any per-server specified port
55281cb0ef41Sopenharmony_ci  is used as both the UDP and TCP port for that server.
55291cb0ef41Sopenharmony_ci  
55301cb0ef41Sopenharmony_ci  The internal struct ares_addr is extended to hold the UDP/TCP ports,
55311cb0ef41Sopenharmony_ci  stored in network order, with the convention that a value of zero
55321cb0ef41Sopenharmony_ci  indicates that the channel-wide UDP/TCP port should be used.
55331cb0ef41Sopenharmony_ci  
55341cb0ef41Sopenharmony_ci  For the internal implementation of ares_dup(3), shift to use the
55351cb0ef41Sopenharmony_ci  _ports() version of the get/set functions, so port information is
55361cb0ef41Sopenharmony_ci  transferred correctly to the new channel.
55371cb0ef41Sopenharmony_ci  
55381cb0ef41Sopenharmony_ci  Update manpages, and add missing ares_set_servers_csv to the lists
55391cb0ef41Sopenharmony_ci  while we're at it
55401cb0ef41Sopenharmony_ci
55411cb0ef41Sopenharmony_ci- api: Add ares_set_sortlist(3) entrypoint
55421cb0ef41Sopenharmony_ci  
55431cb0ef41Sopenharmony_ci  Allow explicit configuration of the channel's sortlist, by
55441cb0ef41Sopenharmony_ci  specifying a string in the same format as the equivalent
55451cb0ef41Sopenharmony_ci  /etc/resolv.conf option.
55461cb0ef41Sopenharmony_ci  
55471cb0ef41Sopenharmony_ci  This allows library users to perform the same configuration
55481cb0ef41Sopenharmony_ci  that is available via /etc/resolv.conf, but without needing
55491cb0ef41Sopenharmony_ci  to change that file.
55501cb0ef41Sopenharmony_ci
55511cb0ef41Sopenharmony_ci- api: Allow injection of user-specified malloc/free functions
55521cb0ef41Sopenharmony_ci  
55531cb0ef41Sopenharmony_ci  Add a new ares_library_init_mem() initialization function for the
55541cb0ef41Sopenharmony_ci  library which allows the library user to specify their own malloc,
55551cb0ef41Sopenharmony_ci  realloc & free equivalents for use library-wide.
55561cb0ef41Sopenharmony_ci  
55571cb0ef41Sopenharmony_ci  Store these function pointers in library-wide global variables,
55581cb0ef41Sopenharmony_ci  defaulting to libc's malloc(), realloc() and free().
55591cb0ef41Sopenharmony_ci  
55601cb0ef41Sopenharmony_ci  Change all calls to malloc, realloc and free to use the function pointer
55611cb0ef41Sopenharmony_ci  instead.  Also ensure that ares_strdup() is always available
55621cb0ef41Sopenharmony_ci  (even if the local environment includes strdup(3)), and change the
55631cb0ef41Sopenharmony_ci  library code to always use it.
55641cb0ef41Sopenharmony_ci  
55651cb0ef41Sopenharmony_ci  Convert calls to calloc() to use ares_malloc() + memset
55661cb0ef41Sopenharmony_ci
55671cb0ef41Sopenharmony_ci- api: Add option to expose some internal functions
55681cb0ef41Sopenharmony_ci  
55691cb0ef41Sopenharmony_ci  Purely for testing, add --enable-expose-statics option to configure
55701cb0ef41Sopenharmony_ci  which converts some static internal functions to be externally visible.
55711cb0ef41Sopenharmony_ci
55721cb0ef41Sopenharmony_ci- api: Expose the ares_library_initialized() function
55731cb0ef41Sopenharmony_ci
55741cb0ef41Sopenharmony_ci- ahost: Allow repeated -s <domain> options
55751cb0ef41Sopenharmony_ci  
55761cb0ef41Sopenharmony_ci  This also removes a potential leak where later -s options would
55771cb0ef41Sopenharmony_ci  replace earlier ones without freeing the relevant string.
55781cb0ef41Sopenharmony_ci
55791cb0ef41Sopenharmony_ci- Mark unhittable lines
55801cb0ef41Sopenharmony_ci  
55811cb0ef41Sopenharmony_ci  Add comments for the benefit of the lcov tool, marking
55821cb0ef41Sopenharmony_ci  lines that cannot be hit.  Typically these are fall-back
55831cb0ef41Sopenharmony_ci  protection arms that are already covered by earlier checks,
55841cb0ef41Sopenharmony_ci  and so it's not worth taking out the unhittable code (in case
55851cb0ef41Sopenharmony_ci  someone changes the code between the two places in future).
55861cb0ef41Sopenharmony_ci
55871cb0ef41Sopenharmony_ci- ares_set_servers_csv.3: make return type match code
55881cb0ef41Sopenharmony_ci
55891cb0ef41Sopenharmony_ci- bitncmp: update comment to match code behaviour
55901cb0ef41Sopenharmony_ci
55911cb0ef41Sopenharmony_ci- ares_striendstr: fix so non-NULL return can happen
55921cb0ef41Sopenharmony_ci  
55931cb0ef41Sopenharmony_ci  This looks to have been broken since it was first introduced in 2005 in
55941cb0ef41Sopenharmony_ci  commit aba0b775ea30 ("Added ares_getnameinfo which mimics the
55951cb0ef41Sopenharmony_ci  getnameinfo API")
55961cb0ef41Sopenharmony_ci
55971cb0ef41Sopenharmony_ci- config_sortlist: free any existing sortlist on (re)alloc failure
55981cb0ef41Sopenharmony_ci  
55991cb0ef41Sopenharmony_ci  If we get an allocation failure on 2nd or later entry in the sortlist, the
56001cb0ef41Sopenharmony_ci  code would return ENOMEM but still leave the initial entries allocated.
56011cb0ef41Sopenharmony_ci  Ensure that *sortlist is set to NULL whenever ENOMEM is returned.
56021cb0ef41Sopenharmony_ci
56031cb0ef41Sopenharmony_ci- ares_dup: clear new channel on failure
56041cb0ef41Sopenharmony_ci  
56051cb0ef41Sopenharmony_ci  If the attempt to transfer IPv6 servers from the old to the new channel
56061cb0ef41Sopenharmony_ci  fails, the previous code would still return a channel to the user even though
56071cb0ef41Sopenharmony_ci  an error return code was generated.  This makes it likely that users would
56081cb0ef41Sopenharmony_ci  leak the channel, so explicitly clear the channel in this case.
56091cb0ef41Sopenharmony_ci
56101cb0ef41Sopenharmony_ci- ares_init_options: don't lose init failure
56111cb0ef41Sopenharmony_ci  
56121cb0ef41Sopenharmony_ci  If (say) init_by_options() fails, the subsequent call to
56131cb0ef41Sopenharmony_ci  init_by_defaults() was overwriting the return code with
56141cb0ef41Sopenharmony_ci  success.  Still call init_by_defaults() regardless, but track
56151cb0ef41Sopenharmony_ci  its return value separately
56161cb0ef41Sopenharmony_ci
56171cb0ef41Sopenharmony_ci- ares_gethostbyname: don't leak valid-but-empty hostent
56181cb0ef41Sopenharmony_ci  
56191cb0ef41Sopenharmony_ci  If an AF_UNSPEC query gets a valid response to its AAAA query,
56201cb0ef41Sopenharmony_ci  but which has no IPv6 addresses in it, then the code chains on to
56211cb0ef41Sopenharmony_ci  a A record query.  However, the hostent from the AAAA response
56221cb0ef41Sopenharmony_ci  was being leaked along the way (because it gets replaced before
56231cb0ef41Sopenharmony_ci  the follow-on end_hquery() invocation).
56241cb0ef41Sopenharmony_ci
56251cb0ef41Sopenharmony_ci- ares_parse_txt_reply: propagate errors from per-substring loop
56261cb0ef41Sopenharmony_ci  
56271cb0ef41Sopenharmony_ci  If we get an allocation failure when processing a particular substring in a
56281cb0ef41Sopenharmony_ci  TXT record, that failure is silently lost; fix that by propagating errors from
56291cb0ef41Sopenharmony_ci  the inner loop to the outer loop.
56301cb0ef41Sopenharmony_ci
56311cb0ef41Sopenharmony_ci- process_answer: fix things up correctly when removing EDNS option
56321cb0ef41Sopenharmony_ci  
56331cb0ef41Sopenharmony_ci  When a server rejects an EDNS-equipped request, we retry without
56341cb0ef41Sopenharmony_ci  the EDNS option.  However, in TCP mode, the 2-byte length prefix was
56351cb0ef41Sopenharmony_ci  being calculated wrong -- it was built from the answer length rather than
56361cb0ef41Sopenharmony_ci  the length of the original request.
56371cb0ef41Sopenharmony_ci  
56381cb0ef41Sopenharmony_ci  Also, it is theoretically possible that the call to realloc() might change
56391cb0ef41Sopenharmony_ci  the data pointed to; to allow for this, qbuf also needs updating.
56401cb0ef41Sopenharmony_ci  
56411cb0ef41Sopenharmony_ci  (Both these fixes were actually included in a patchset sent on the mailing
56421cb0ef41Sopenharmony_ci  list in Oct 2012, but were included with other functional changes that
56431cb0ef41Sopenharmony_ci  didn't get merged:
56441cb0ef41Sopenharmony_ci  http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml)
56451cb0ef41Sopenharmony_ci
56461cb0ef41Sopenharmony_ci- ares__read_line: clear buf pointer on realloc failure
56471cb0ef41Sopenharmony_ci
56481cb0ef41Sopenharmony_ci- ares_expand_name: check for valid bits in label length
56491cb0ef41Sopenharmony_ci  
56501cb0ef41Sopenharmony_ci  The top two bits of the label length indicate whether this is a
56511cb0ef41Sopenharmony_ci  label length (00) or an index to a name elsewhere in the message
56521cb0ef41Sopenharmony_ci  (11).  RFC1035 4.1.4 says that the other possible values for the
56531cb0ef41Sopenharmony_ci  top two bits (01, 10) are reserved for future use.
56541cb0ef41Sopenharmony_ci
56551cb0ef41Sopenharmony_ciDaniel Stenberg (23 Jan 2016)
56561cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
56571cb0ef41Sopenharmony_ci
56581cb0ef41Sopenharmony_ci  Fix typos detected by lintian
56591cb0ef41Sopenharmony_ci  
56601cb0ef41Sopenharmony_ci  Closes #32
56611cb0ef41Sopenharmony_ci
56621cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
56631cb0ef41Sopenharmony_ci
56641cb0ef41Sopenharmony_ci  Distribute all man pages
56651cb0ef41Sopenharmony_ci
56661cb0ef41Sopenharmony_ci- README.cares: s/I/Daniel
56671cb0ef41Sopenharmony_ci  
56681cb0ef41Sopenharmony_ci  ... and add a pointer to an existing version of the original area 1.1.1
56691cb0ef41Sopenharmony_ci  package.a
56701cb0ef41Sopenharmony_ci
56711cb0ef41Sopenharmony_ci- read_tcp_data: don't try to use NULL pointer after malloc failure
56721cb0ef41Sopenharmony_ci  
56731cb0ef41Sopenharmony_ci  CID 56884, pointed out by Coverity. We really should make this function
56741cb0ef41Sopenharmony_ci  return an error code so that a malloc() failure can return back a major
56751cb0ef41Sopenharmony_ci  failure.
56761cb0ef41Sopenharmony_ci
56771cb0ef41Sopenharmony_ci- configure_socket: explicitly ignore return code
56781cb0ef41Sopenharmony_ci  
56791cb0ef41Sopenharmony_ci  CID 56889 in Coverity pointed out the return code from setsocknonblock()
56801cb0ef41Sopenharmony_ci  is ignored, and this added typecast to (void) makes it explicit.
56811cb0ef41Sopenharmony_ci
56821cb0ef41Sopenharmony_ci- ahost: check the select() return code
56831cb0ef41Sopenharmony_ci  
56841cb0ef41Sopenharmony_ci  Fixes CID 137189, pointed out by Coverity
56851cb0ef41Sopenharmony_ci
56861cb0ef41Sopenharmony_ciDavid Drysdale (18 Jan 2016)
56871cb0ef41Sopenharmony_ci- Fix buildconf on platforms using glibtoolize
56881cb0ef41Sopenharmony_ci  
56891cb0ef41Sopenharmony_ci  Commit c49a87eea538 changed buildconf to only check for
56901cb0ef41Sopenharmony_ci  libtoolize, but missed a line
56911cb0ef41Sopenharmony_ci
56921cb0ef41Sopenharmony_ci- Don't exit loop early leaving uninitialized entries
56931cb0ef41Sopenharmony_ci  
56941cb0ef41Sopenharmony_ci  Update for commit affc63cba875d.
56951cb0ef41Sopenharmony_ci  
56961cb0ef41Sopenharmony_ci  The original patch from Gregor Jasny did not have the break
56971cb0ef41Sopenharmony_ci  statement; I incorrectly added it to prevent continuing the loop.
56981cb0ef41Sopenharmony_ci  However, the later entries in the array would then be left
56991cb0ef41Sopenharmony_ci  uninitialized, causing problems for later cleanup.
57001cb0ef41Sopenharmony_ci  
57011cb0ef41Sopenharmony_ci  So fix to match Gregor's original patch, with apologies.
57021cb0ef41Sopenharmony_ci
57031cb0ef41Sopenharmony_ciDaniel Stenberg (18 Jan 2016)
57041cb0ef41Sopenharmony_ci- buildconf: remove check for libtool, it only requires libtoolize
57051cb0ef41Sopenharmony_ci
57061cb0ef41Sopenharmony_ciDavid Drysdale (17 Jan 2016)
57071cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
57081cb0ef41Sopenharmony_ci
57091cb0ef41Sopenharmony_ci  Use libresolv to initialize cares on iPhone targets
57101cb0ef41Sopenharmony_ci  
57111cb0ef41Sopenharmony_ci  On iPhone targets like iOS, watchOS or tvOS the file
57121cb0ef41Sopenharmony_ci  /etc/resolv.conf cannot be used to configure cares.
57131cb0ef41Sopenharmony_ci  
57141cb0ef41Sopenharmony_ci  Instead the resolver library is queried for configuration
57151cb0ef41Sopenharmony_ci  values.
57161cb0ef41Sopenharmony_ci  
57171cb0ef41Sopenharmony_ci  CC: Yury Kirpichev <ykirpichev@yandex-team.ru>
57181cb0ef41Sopenharmony_ci
57191cb0ef41Sopenharmony_ciDaniel Stenberg (17 Jan 2016)
57201cb0ef41Sopenharmony_ci- README: updated to new repo URL
57211cb0ef41Sopenharmony_ci
57221cb0ef41Sopenharmony_ciDavid Drysdale (14 Jan 2016)
57231cb0ef41Sopenharmony_ci- [Lei Shi brought this change]
57241cb0ef41Sopenharmony_ci
57251cb0ef41Sopenharmony_ci  Fixing slow DNS lookup issue
57261cb0ef41Sopenharmony_ci  
57271cb0ef41Sopenharmony_ci  This patch is fixing the dns lookup issue due to dummy dns information
57281cb0ef41Sopenharmony_ci  of a disconnected adapter(in my case is a bluetooth adapter). I changed
57291cb0ef41Sopenharmony_ci  the dns lookup policy to try GetNetworkParams first because the
57301cb0ef41Sopenharmony_ci  GetNetworkParams provides the most reliable dns information (lots of
57311cb0ef41Sopenharmony_ci  checks were done by system). I also filter out inoperable adapter in
57321cb0ef41Sopenharmony_ci  DNS_AdaptersAddresses in case GetNetworkParams fail.
57331cb0ef41Sopenharmony_ci
57341cb0ef41Sopenharmony_ci- Merge pull request #30 from p-push/vs-2015
57351cb0ef41Sopenharmony_ci  
57361cb0ef41Sopenharmony_ci  Support Visual Studio 2015
57371cb0ef41Sopenharmony_ci
57381cb0ef41Sopenharmony_ciOleg Pudeyev (3 Jan 2016)
57391cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
57401cb0ef41Sopenharmony_ci
57411cb0ef41Sopenharmony_ci  Support Visual Studio 2015
57421cb0ef41Sopenharmony_ci
57431cb0ef41Sopenharmony_ciDavid Drysdale (11 Nov 2015)
57441cb0ef41Sopenharmony_ci- [Andrew Andkjar brought this change]
57451cb0ef41Sopenharmony_ci
57461cb0ef41Sopenharmony_ci  added another version case to Makefile.msvc
57471cb0ef41Sopenharmony_ci  
57481cb0ef41Sopenharmony_ci  nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
57491cb0ef41Sopenharmony_ci
57501cb0ef41Sopenharmony_ci- Merge pull request #26 from bitbouncer/vs-2013
57511cb0ef41Sopenharmony_ci  
57521cb0ef41Sopenharmony_ci  added define for visual studio 2013
57531cb0ef41Sopenharmony_ci
57541cb0ef41Sopenharmony_cisvante karlsson (25 Jun 2015)
57551cb0ef41Sopenharmony_ci- added define for visual studio 2013
57561cb0ef41Sopenharmony_ci
57571cb0ef41Sopenharmony_ciJakub Hrozek (6 Nov 2014)
57581cb0ef41Sopenharmony_ci- ares__read_line: free buf on realloc failure
57591cb0ef41Sopenharmony_ci
57601cb0ef41Sopenharmony_ci- Destroy options if ares_save_options fails
57611cb0ef41Sopenharmony_ci  
57621cb0ef41Sopenharmony_ci  It's possible that, if ares_save_options failed, the opts structure
57631cb0ef41Sopenharmony_ci  would contain some allocated memory. Calling ares_destroy_options in
57641cb0ef41Sopenharmony_ci  this case is safe, because ares_save_options zeroes out the memory
57651cb0ef41Sopenharmony_ci  initially.
57661cb0ef41Sopenharmony_ci
57671cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
57681cb0ef41Sopenharmony_ci
57691cb0ef41Sopenharmony_ci  Continue loop if space for hostname not large enough
57701cb0ef41Sopenharmony_ci  
57711cb0ef41Sopenharmony_ci  When attempting to build a search domain from the local hostname
57721cb0ef41Sopenharmony_ci  (used as a fallback when no other methods have given a search
57731cb0ef41Sopenharmony_ci  domain), the code doubles the buffer size on each loop iteration.
57741cb0ef41Sopenharmony_ci  
57751cb0ef41Sopenharmony_ci  However, the loop previously had a WHILE_FALSE terminator so the continue
57761cb0ef41Sopenharmony_ci  statement exited the loop rather than going round again.
57771cb0ef41Sopenharmony_ci
57781cb0ef41Sopenharmony_ciDaniel Stenberg (30 Oct 2014)
57791cb0ef41Sopenharmony_ci- ares_getnameinfo.3: there is no ares_getaddrinfo
57801cb0ef41Sopenharmony_ci
57811cb0ef41Sopenharmony_ciDavid Drysdale (30 Sep 2014)
57821cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
57831cb0ef41Sopenharmony_ci
57841cb0ef41Sopenharmony_ci  Prevent tmpbuf from overrunning
57851cb0ef41Sopenharmony_ci  
57861cb0ef41Sopenharmony_ci  Fix Coverity error CID 56886.
57871cb0ef41Sopenharmony_ci  
57881cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
57891cb0ef41Sopenharmony_ci
57901cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
57911cb0ef41Sopenharmony_ci
57921cb0ef41Sopenharmony_ci  Re-start loop if select fails
57931cb0ef41Sopenharmony_ci  
57941cb0ef41Sopenharmony_ci  Fix Coverity error CID 56882
57951cb0ef41Sopenharmony_ci  
57961cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
57971cb0ef41Sopenharmony_ci
57981cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
57991cb0ef41Sopenharmony_ci
58001cb0ef41Sopenharmony_ci  Free temporary variable in error path
58011cb0ef41Sopenharmony_ci  
58021cb0ef41Sopenharmony_ci  Fix Coverity CID 56890
58031cb0ef41Sopenharmony_ci  
58041cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
58051cb0ef41Sopenharmony_ci
58061cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
58071cb0ef41Sopenharmony_ci
58081cb0ef41Sopenharmony_ci  Fix integer shift overflow if both tcp_socket and udp_socket are set
58091cb0ef41Sopenharmony_ci  
58101cb0ef41Sopenharmony_ci  The problem occurs if at the start of the loop the sockindex is at the
58111cb0ef41Sopenharmony_ci  last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
58121cb0ef41Sopenharmony_ci  tcp_socket are valid, sockindex gets incremented for UDP first and
58131cb0ef41Sopenharmony_ci  points one entry behind the array for the tcp block.
58141cb0ef41Sopenharmony_ci  So the fix is to check after every increment of sockindex if it is still
58151cb0ef41Sopenharmony_ci  valid.
58161cb0ef41Sopenharmony_ci  
58171cb0ef41Sopenharmony_ci  Fix Coverity error CID 56878
58181cb0ef41Sopenharmony_ci  
58191cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
58201cb0ef41Sopenharmony_ci
58211cb0ef41Sopenharmony_ci- [Gregor Jasny brought this change]
58221cb0ef41Sopenharmony_ci
58231cb0ef41Sopenharmony_ci  Null check before dereference
58241cb0ef41Sopenharmony_ci  
58251cb0ef41Sopenharmony_ci  Fix Coverity error CID 56880
58261cb0ef41Sopenharmony_ci  
58271cb0ef41Sopenharmony_ci  Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
58281cb0ef41Sopenharmony_ci
58291cb0ef41Sopenharmony_ciJakub Hrozek (28 Jul 2014)
58301cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
58311cb0ef41Sopenharmony_ci
58321cb0ef41Sopenharmony_ci  Comment in ares_ipv6.h
58331cb0ef41Sopenharmony_ci
58341cb0ef41Sopenharmony_ciDavid Drysdale (25 Jul 2014)
58351cb0ef41Sopenharmony_ci- CONTRIBUTING: add file to indicate mailing list is preferred
58361cb0ef41Sopenharmony_ci
58371cb0ef41Sopenharmony_ci- Add -t u option to ahost
58381cb0ef41Sopenharmony_ci  
58391cb0ef41Sopenharmony_ci  Add an option to allow specification of the AF_UNSPEC
58401cb0ef41Sopenharmony_ci  address family.
58411cb0ef41Sopenharmony_ci
58421cb0ef41Sopenharmony_ciJakub Hrozek (24 Jul 2014)
58431cb0ef41Sopenharmony_ci- host_callback: Fall back to AF_INET on searching with AF_UNSPEC
58441cb0ef41Sopenharmony_ci  
58451cb0ef41Sopenharmony_ci  Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
58461cb0ef41Sopenharmony_ci  first AF_INET6 call only returned CNAMEs, the host_callback never
58471cb0ef41Sopenharmony_ci  retried AF_INET.
58481cb0ef41Sopenharmony_ci  
58491cb0ef41Sopenharmony_ci  This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
58501cb0ef41Sopenharmony_ci  taken as authoritative only if the result contains some addresses.
58511cb0ef41Sopenharmony_ci
58521cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
58531cb0ef41Sopenharmony_ci
58541cb0ef41Sopenharmony_ci  Move memset call below platform-specific declarations
58551cb0ef41Sopenharmony_ci  
58561cb0ef41Sopenharmony_ci  A GitHub commenter [1] says that my recent change to ahost.c has
58571cb0ef41Sopenharmony_ci  problems compiling on Windows + C89 platforms.
58581cb0ef41Sopenharmony_ci  
58591cb0ef41Sopenharmony_ci  [1]  https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
58601cb0ef41Sopenharmony_ci
58611cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
58621cb0ef41Sopenharmony_ci
58631cb0ef41Sopenharmony_ci  Update ahost man page to describe -s option.
58641cb0ef41Sopenharmony_ci  
58651cb0ef41Sopenharmony_ci  Commit ee22246507c9 added the -s <domain> option to the
58661cb0ef41Sopenharmony_ci  ahost command, but neglected to update the man page to
58671cb0ef41Sopenharmony_ci  describe it.
58681cb0ef41Sopenharmony_ci  
58691cb0ef41Sopenharmony_ci  Also fix typo in description of -t option.
58701cb0ef41Sopenharmony_ci
58711cb0ef41Sopenharmony_ci- ares_parse_soa_reply: Do not leak rr_name on allocation failure
58721cb0ef41Sopenharmony_ci  
58731cb0ef41Sopenharmony_ci  If ares_malloc_data failed, already allocated rr_name would go out of
58741cb0ef41Sopenharmony_ci  scope.
58751cb0ef41Sopenharmony_ci
58761cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
58771cb0ef41Sopenharmony_ci
58781cb0ef41Sopenharmony_ci  Don't override explicitly specified search domains
58791cb0ef41Sopenharmony_ci  
58801cb0ef41Sopenharmony_ci  Only set search domains from /etc/resolv.conf if there isn't a value
58811cb0ef41Sopenharmony_ci  already present in the channel.
58821cb0ef41Sopenharmony_ci
58831cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
58841cb0ef41Sopenharmony_ci
58851cb0ef41Sopenharmony_ci  Allow specification of search domain in ahost
58861cb0ef41Sopenharmony_ci  
58871cb0ef41Sopenharmony_ci  Add the "-s domain" command line option to override the search
58881cb0ef41Sopenharmony_ci  domains.
58891cb0ef41Sopenharmony_ci
58901cb0ef41Sopenharmony_ciDaniel Stenberg (12 May 2014)
58911cb0ef41Sopenharmony_ci- Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
58921cb0ef41Sopenharmony_ci  
58931cb0ef41Sopenharmony_ci  This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451.
58941cb0ef41Sopenharmony_ci
58951cb0ef41Sopenharmony_ci- [Frederic Germain brought this change]
58961cb0ef41Sopenharmony_ci
58971cb0ef41Sopenharmony_ci  ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address
58981cb0ef41Sopenharmony_ci
58991cb0ef41Sopenharmony_ci- [Doug Kwan brought this change]
59001cb0ef41Sopenharmony_ci
59011cb0ef41Sopenharmony_ci  ares_build.h: fix building on 64-bit powerpc
59021cb0ef41Sopenharmony_ci  
59031cb0ef41Sopenharmony_ci  There are two issues.
59041cb0ef41Sopenharmony_ci  
59051cb0ef41Sopenharmony_ci  1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
59061cb0ef41Sopenharmony_ci  __PPC64__.  The tests of __ILP32__ and __LP64__ are sufficient for gcc.
59071cb0ef41Sopenharmony_ci  
59081cb0ef41Sopenharmony_ci  2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
59091cb0ef41Sopenharmony_ci  targeting ppc64.  This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
59101cb0ef41Sopenharmony_ci  when building with clang.
59111cb0ef41Sopenharmony_ci  
59121cb0ef41Sopenharmony_ci  My patch is two change the order of the checks so that we check the
59131cb0ef41Sopenharmony_ci  64-bit case first.
59141cb0ef41Sopenharmony_ci
59151cb0ef41Sopenharmony_ci- refresh: updated now with automake 1.14
59161cb0ef41Sopenharmony_ci
59171cb0ef41Sopenharmony_ci- [David Drysdale brought this change]
59181cb0ef41Sopenharmony_ci
59191cb0ef41Sopenharmony_ci  single_domain: Invalid memory access for empty string input
59201cb0ef41Sopenharmony_ci  
59211cb0ef41Sopenharmony_ci  We noticed a small buglet in ares_search() when it gets an empty string
59221cb0ef41Sopenharmony_ci  as input -- the single_domain() utility function in ares_search.c
59231cb0ef41Sopenharmony_ci  accesses invalid memory (before the start of the string).
59241cb0ef41Sopenharmony_ci
59251cb0ef41Sopenharmony_ciGuenter Knauf (31 Aug 2013)
59261cb0ef41Sopenharmony_ci- Fixed warning 'type specifier missing'.
59271cb0ef41Sopenharmony_ci
59281cb0ef41Sopenharmony_ciDaniel Stenberg (30 Aug 2013)
59291cb0ef41Sopenharmony_ci- [Tor Arntsen brought this change]
59301cb0ef41Sopenharmony_ci
59311cb0ef41Sopenharmony_ci  ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
59321cb0ef41Sopenharmony_ci  
59331cb0ef41Sopenharmony_ci  It was removed in f19387dd72432
59341cb0ef41Sopenharmony_ci
59351cb0ef41Sopenharmony_ci- nowarn: use <limits.h> instead of configure for size of long
59361cb0ef41Sopenharmony_ci  
59371cb0ef41Sopenharmony_ci  This makes the header file much more multi-arch friendly and can be used
59381cb0ef41Sopenharmony_ci  as-is with both 32 bit and 64 bit builds.
59391cb0ef41Sopenharmony_ci
59401cb0ef41Sopenharmony_ci- timeoffset: made static and private
59411cb0ef41Sopenharmony_ci  
59421cb0ef41Sopenharmony_ci  ares__timeoffset() was only used once within this single source file
59431cb0ef41Sopenharmony_ci
59441cb0ef41Sopenharmony_ci- timeadd: make static
59451cb0ef41Sopenharmony_ci  
59461cb0ef41Sopenharmony_ci  ares__timeadd() was only ever used from within the same source
59471cb0ef41Sopenharmony_ci
59481cb0ef41Sopenharmony_ciYang Tse (18 Jul 2013)
59491cb0ef41Sopenharmony_ci- xc-am-iface.m4: comments refinement
59501cb0ef41Sopenharmony_ci
59511cb0ef41Sopenharmony_ci- configure: fix 'subdir-objects' distclean related issue
59521cb0ef41Sopenharmony_ci  
59531cb0ef41Sopenharmony_ci  See XC_AMEND_DISTCLEAN comments for details.
59541cb0ef41Sopenharmony_ci
59551cb0ef41Sopenharmony_ci- configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)
59561cb0ef41Sopenharmony_ci
59571cb0ef41Sopenharmony_ci- xc-am-iface.m4: provide XC_AUTOMAKE macro
59581cb0ef41Sopenharmony_ci
59591cb0ef41Sopenharmony_ciDaniel Stenberg (12 May 2013)
59601cb0ef41Sopenharmony_ci- gitignore: ignore all ares_*pdf but also CHANGES.dist
59611cb0ef41Sopenharmony_ci
59621cb0ef41Sopenharmony_ci- bump: start working towards 1.10.1
59631cb0ef41Sopenharmony_ci
59641cb0ef41Sopenharmony_ciVersion 1.10.0 (12 May 2013)
59651cb0ef41Sopenharmony_ci
59661cb0ef41Sopenharmony_ciDaniel Stenberg (12 May 2013)
59671cb0ef41Sopenharmony_ci- RELEASE-NOTES: two more bug fixes
59681cb0ef41Sopenharmony_ci
59691cb0ef41Sopenharmony_ci- [Keith Shaw brought this change]
59701cb0ef41Sopenharmony_ci
59711cb0ef41Sopenharmony_ci  ares_set_servers_csv: fixed IPv6 address parsing
59721cb0ef41Sopenharmony_ci  
59731cb0ef41Sopenharmony_ci  Fixed bug that caused the last part of an IPv6 address to be parsed as
59741cb0ef41Sopenharmony_ci  the port number when the last part is all numeric.
59751cb0ef41Sopenharmony_ci
59761cb0ef41Sopenharmony_ci- nroff: fix two syntax mistakes
59771cb0ef41Sopenharmony_ci  
59781cb0ef41Sopenharmony_ci  ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of
59791cb0ef41Sopenharmony_ci  \fP
59801cb0ef41Sopenharmony_ci  
59811cb0ef41Sopenharmony_ci  Reported-by: Alexander Klauer
59821cb0ef41Sopenharmony_ci  Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml
59831cb0ef41Sopenharmony_ci
59841cb0ef41Sopenharmony_ci- [Alex Loukissas brought this change]
59851cb0ef41Sopenharmony_ci
59861cb0ef41Sopenharmony_ci  build: fix build on msvc11
59871cb0ef41Sopenharmony_ci
59881cb0ef41Sopenharmony_ci- Makefile.am: increment -version-info for 1.10.0 release
59891cb0ef41Sopenharmony_ci
59901cb0ef41Sopenharmony_ci- README: remove unnecessary comment
59911cb0ef41Sopenharmony_ci
59921cb0ef41Sopenharmony_ci- ares_version.h: copyright end range year is now 2013
59931cb0ef41Sopenharmony_ci
59941cb0ef41Sopenharmony_ci- RELEASE-NOTES: synced with fb0737f3a0a1c37
59951cb0ef41Sopenharmony_ci
59961cb0ef41Sopenharmony_ci- [Paul Saab brought this change]
59971cb0ef41Sopenharmony_ci
59981cb0ef41Sopenharmony_ci  ares_parse_aaaa_reply: Plug memory leak
59991cb0ef41Sopenharmony_ci  
60001cb0ef41Sopenharmony_ci  This change is similar to ares_parse_a_reply.c in commit
60011cb0ef41Sopenharmony_ci  bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6
60021cb0ef41Sopenharmony_ci
60031cb0ef41Sopenharmony_ci- [Patrick Valsecchi brought this change]
60041cb0ef41Sopenharmony_ci
60051cb0ef41Sopenharmony_ci  ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
60061cb0ef41Sopenharmony_ci  
60071cb0ef41Sopenharmony_ci  Previously, the function would wrongly return all substrings merged into
60081cb0ef41Sopenharmony_ci  one.
60091cb0ef41Sopenharmony_ci
60101cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60111cb0ef41Sopenharmony_ci
60121cb0ef41Sopenharmony_ci  library init: documentation update
60131cb0ef41Sopenharmony_ci  
60141cb0ef41Sopenharmony_ci  This commit updates the documentation of ares_library_init() and
60151cb0ef41Sopenharmony_ci  ares_library_cleanup() with regard to the newly introduced reference
60161cb0ef41Sopenharmony_ci  counting of initializations and deinitializations.
60171cb0ef41Sopenharmony_ci
60181cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60191cb0ef41Sopenharmony_ci
60201cb0ef41Sopenharmony_ci  library init: be recursive
60211cb0ef41Sopenharmony_ci  
60221cb0ef41Sopenharmony_ci  Previously, a single call to ares_library_cleanup() would deinitialise
60231cb0ef41Sopenharmony_ci  the c-ares library, regardless of how many times ares_library_init() was
60241cb0ef41Sopenharmony_ci  called. This behaviour may cause problems in programs linking two or
60251cb0ef41Sopenharmony_ci  more libraries which, in turn, use c-ares. The present commit fixes this
60261cb0ef41Sopenharmony_ci  problem, deinitializing the library only after a number of calls to
60271cb0ef41Sopenharmony_ci  ares_library_cleanup() matching the number of calls to
60281cb0ef41Sopenharmony_ci  ares_library_init().
60291cb0ef41Sopenharmony_ci
60301cb0ef41Sopenharmony_ci- [Patrick Valsecchi brought this change]
60311cb0ef41Sopenharmony_ci
60321cb0ef41Sopenharmony_ci  protocol parsing: check input data stricter
60331cb0ef41Sopenharmony_ci  
60341cb0ef41Sopenharmony_ci  ... so that bad length fields aren't blindly accepted
60351cb0ef41Sopenharmony_ci  
60361cb0ef41Sopenharmony_ci  Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml
60371cb0ef41Sopenharmony_ci
60381cb0ef41Sopenharmony_ciGuenter Knauf (11 Apr 2013)
60391cb0ef41Sopenharmony_ci- Create ares_build.h when buidling from Git.
60401cb0ef41Sopenharmony_ci
60411cb0ef41Sopenharmony_ci- Added -DCARES_STATICLIB to CFLAGS.
60421cb0ef41Sopenharmony_ci  
60431cb0ef41Sopenharmony_ci  Currently this static makefile does only support building the
60441cb0ef41Sopenharmony_ci  static library libcares.a.
60451cb0ef41Sopenharmony_ci
60461cb0ef41Sopenharmony_ciDaniel Stenberg (8 Apr 2013)
60471cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60481cb0ef41Sopenharmony_ci
60491cb0ef41Sopenharmony_ci  .gitignore: ignore patch files
60501cb0ef41Sopenharmony_ci  
60511cb0ef41Sopenharmony_ci  This commit adds a line to .gitignore to the effect that patch files
60521cb0ef41Sopenharmony_ci  generated by 'git format-patch' are excluded from the repository.
60531cb0ef41Sopenharmony_ci
60541cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60551cb0ef41Sopenharmony_ci
60561cb0ef41Sopenharmony_ci  ares_destroy() documentation: no new requests
60571cb0ef41Sopenharmony_ci  
60581cb0ef41Sopenharmony_ci  Clarify that no new requests may be added to a resolver channel that is
60591cb0ef41Sopenharmony_ci  currently being destroyed.
60601cb0ef41Sopenharmony_ci
60611cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60621cb0ef41Sopenharmony_ci
60631cb0ef41Sopenharmony_ci  Documentation: properly document ARES_ECANCELLED
60641cb0ef41Sopenharmony_ci  
60651cb0ef41Sopenharmony_ci  This commit clarifies the behaviour of ares_cancel() with respect to
60661cb0ef41Sopenharmony_ci  callbacks and adds missing documentation of ARES_ECANCELLED to the man
60671cb0ef41Sopenharmony_ci  pages of the affected functions.
60681cb0ef41Sopenharmony_ci
60691cb0ef41Sopenharmony_ci- [Alexander Klauer brought this change]
60701cb0ef41Sopenharmony_ci
60711cb0ef41Sopenharmony_ci  ares_cancel(): cancel requests safely
60721cb0ef41Sopenharmony_ci  
60731cb0ef41Sopenharmony_ci  An invocation of ares_cancel() walks through the request list, calling
60741cb0ef41Sopenharmony_ci  the callbacks of all pending requests on a channel. Previously, if such
60751cb0ef41Sopenharmony_ci  a callback added a new request to the channel, the request list might
60761cb0ef41Sopenharmony_ci  not end up empty, causing an abort by assertion failure. The present
60771cb0ef41Sopenharmony_ci  commit ensures that precisely all requests present upon entry of
60781cb0ef41Sopenharmony_ci  ares_cancel() are cancelled, and that adding new requests through
60791cb0ef41Sopenharmony_ci  callbacks is safe.
60801cb0ef41Sopenharmony_ci
60811cb0ef41Sopenharmony_ciYang Tse (10 Mar 2013)
60821cb0ef41Sopenharmony_ci- ares.h: stricter CARES_EXTERN linkage decorations logic
60831cb0ef41Sopenharmony_ci  
60841cb0ef41Sopenharmony_ci  No API change involved.
60851cb0ef41Sopenharmony_ci
60861cb0ef41Sopenharmony_ci- ares_build.h.dist: enhance non-configure GCC ABI detection logic
60871cb0ef41Sopenharmony_ci  
60881cb0ef41Sopenharmony_ci  GCC specific adjustments:
60891cb0ef41Sopenharmony_ci  
60901cb0ef41Sopenharmony_ci  - check __ILP32__ before 32 and 64bit processor architectures in
60911cb0ef41Sopenharmony_ci    order to detect ILP32 programming model on 64 bit processors
60921cb0ef41Sopenharmony_ci    which, of course, also support LP64 programming model, when using
60931cb0ef41Sopenharmony_ci    gcc 4.7 or newer.
60941cb0ef41Sopenharmony_ci  
60951cb0ef41Sopenharmony_ci  - keep 32bit processor architecture checks in order to support gcc
60961cb0ef41Sopenharmony_ci    versions older than 4.7 which don't define __ILP32__
60971cb0ef41Sopenharmony_ci  
60981cb0ef41Sopenharmony_ci  - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
60991cb0ef41Sopenharmony_ci    architecture checks for older versions which don't define __LP64__
61001cb0ef41Sopenharmony_ci
61011cb0ef41Sopenharmony_ciDaniel Stenberg (9 Mar 2013)
61021cb0ef41Sopenharmony_ci- ares.h: there is no ares_free_soa function
61031cb0ef41Sopenharmony_ci
61041cb0ef41Sopenharmony_ciYang Tse (9 Mar 2013)
61051cb0ef41Sopenharmony_ci- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
61061cb0ef41Sopenharmony_ci
61071cb0ef41Sopenharmony_ci- ares_inet_ntop.3: s/socklen_t/ares_socklen_t
61081cb0ef41Sopenharmony_ci
61091cb0ef41Sopenharmony_ci- configure: use XC_LIBTOOL for portability across libtool versions
61101cb0ef41Sopenharmony_ci
61111cb0ef41Sopenharmony_ci- xc-lt-iface.m4: provide XC_LIBTOOL macro
61121cb0ef41Sopenharmony_ci
61131cb0ef41Sopenharmony_ci- Makefile.am: use AM_CPPFLAGS instead of INCLUDES
61141cb0ef41Sopenharmony_ci
61151cb0ef41Sopenharmony_ci- inet_ntop.c: s/socklen_t/ares_socklen_t
61161cb0ef41Sopenharmony_ci
61171cb0ef41Sopenharmony_ci- inet_ntop.c: s/socklen_t/ares_socklen_t for portability
61181cb0ef41Sopenharmony_ci
61191cb0ef41Sopenharmony_ciDaniel Stenberg (19 Feb 2013)
61201cb0ef41Sopenharmony_ci- ares.h: s/socklen_t/ares_socklen_t for portability
61211cb0ef41Sopenharmony_ci
61221cb0ef41Sopenharmony_ci- ares_inet_ntop.3: 4th argument is socklen_t!
61231cb0ef41Sopenharmony_ci
61241cb0ef41Sopenharmony_ci- spell inet correctly!
61251cb0ef41Sopenharmony_ci
61261cb0ef41Sopenharmony_ci- ares_inet_pton/ntop: cleanup
61271cb0ef41Sopenharmony_ci  
61281cb0ef41Sopenharmony_ci  Make sure that the symbols are always exported and present in c-ares.
61291cb0ef41Sopenharmony_ci  
61301cb0ef41Sopenharmony_ci  Make the headers prefixed with 'ares'.
61311cb0ef41Sopenharmony_ci  
61321cb0ef41Sopenharmony_ci  Removed the inet_ntop.h version as it no longer features any content.
61331cb0ef41Sopenharmony_ci
61341cb0ef41Sopenharmony_ci- ares_inet_ntop/ares_inet_pton: added man pages
61351cb0ef41Sopenharmony_ci
61361cb0ef41Sopenharmony_ciYang Tse (15 Feb 2013)
61371cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
61381cb0ef41Sopenharmony_ci
61391cb0ef41Sopenharmony_ci  curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
61401cb0ef41Sopenharmony_ci
61411cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
61421cb0ef41Sopenharmony_ci
61431cb0ef41Sopenharmony_ci  config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
61441cb0ef41Sopenharmony_ci
61451cb0ef41Sopenharmony_ci- [Gisle Vanem brought this change]
61461cb0ef41Sopenharmony_ci
61471cb0ef41Sopenharmony_ci  config-dos.h: define strerror() to strerror_s_() for High-C
61481cb0ef41Sopenharmony_ci
61491cb0ef41Sopenharmony_ciDaniel Stenberg (13 Feb 2013)
61501cb0ef41Sopenharmony_ci- ares_get_datatype: removed unused function
61511cb0ef41Sopenharmony_ci  
61521cb0ef41Sopenharmony_ci  it was also wrongly named as internal functions require two underscores
61531cb0ef41Sopenharmony_ci
61541cb0ef41Sopenharmony_ci- ares__bitncmp: use two underscores for private functions
61551cb0ef41Sopenharmony_ci  
61561cb0ef41Sopenharmony_ci  It used a single one previously making it look like a public one
61571cb0ef41Sopenharmony_ci
61581cb0ef41Sopenharmony_ci- ares__generate_new_id: moved to ares_query.c
61591cb0ef41Sopenharmony_ci  
61601cb0ef41Sopenharmony_ci  ... and ares__rc4 is turned into a local static function.
61611cb0ef41Sopenharmony_ci
61621cb0ef41Sopenharmony_ci- ares__swap_lists: make private and static
61631cb0ef41Sopenharmony_ci  
61641cb0ef41Sopenharmony_ci  ... since there's only one user, make it static within ares_process.c
61651cb0ef41Sopenharmony_ci
61661cb0ef41Sopenharmony_ciYang Tse (13 Feb 2013)
61671cb0ef41Sopenharmony_ci- Makefile.msvc: add four VS version strings
61681cb0ef41Sopenharmony_ci
61691cb0ef41Sopenharmony_ciDaniel Stenberg (13 Feb 2013)
61701cb0ef41Sopenharmony_ci- ares_expand_name.3: clarify how to free the data
61711cb0ef41Sopenharmony_ci
61721cb0ef41Sopenharmony_ciYang Tse (30 Jan 2013)
61731cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
61741cb0ef41Sopenharmony_ci  
61751cb0ef41Sopenharmony_ci  - Fix a pair of single quotes to double quotes.
61761cb0ef41Sopenharmony_ci  
61771cb0ef41Sopenharmony_ci  URL: http://curl.haxx.se/mail/lib-2013-01/0355.html
61781cb0ef41Sopenharmony_ci  Reported by: Tor Arntsen
61791cb0ef41Sopenharmony_ci
61801cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: fix 'wc' detection - follow-up
61811cb0ef41Sopenharmony_ci  
61821cb0ef41Sopenharmony_ci  - Take into account that 'wc' may return leading spaces and/or tabs.
61831cb0ef41Sopenharmony_ci  
61841cb0ef41Sopenharmony_ci  - Set initial IFS to space, tab and newline.
61851cb0ef41Sopenharmony_ci
61861cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: fix 'wc' detection
61871cb0ef41Sopenharmony_ci  
61881cb0ef41Sopenharmony_ci  - Take into account that 'wc' may return leading spaces.
61891cb0ef41Sopenharmony_ci  
61901cb0ef41Sopenharmony_ci  - Set internationalization behavior variables.
61911cb0ef41Sopenharmony_ci  
61921cb0ef41Sopenharmony_ci  Tor Arntsen analyzed and reported the issue.
61931cb0ef41Sopenharmony_ci  
61941cb0ef41Sopenharmony_ci  URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
61951cb0ef41Sopenharmony_ci
61961cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: check another three basic utilities
61971cb0ef41Sopenharmony_ci
61981cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: 1.0 interface stabilization
61991cb0ef41Sopenharmony_ci  
62001cb0ef41Sopenharmony_ci  - Stabilization results in 4 public interface m4 macros:
62011cb0ef41Sopenharmony_ci    XC_CONFIGURE_PREAMBLE
62021cb0ef41Sopenharmony_ci    XC_CONFIGURE_PREAMBLE_VER_MAJOR
62031cb0ef41Sopenharmony_ci    XC_CONFIGURE_PREAMBLE_VER_MINOR
62041cb0ef41Sopenharmony_ci    XC_CHECK_PATH_SEPARATOR
62051cb0ef41Sopenharmony_ci  - Avoid one level of internal indirection
62061cb0ef41Sopenharmony_ci  - Update comments
62071cb0ef41Sopenharmony_ci  - Drop XC_OVR_ZZ40 macro
62081cb0ef41Sopenharmony_ci
62091cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: emit witness message in configure BODY
62101cb0ef41Sopenharmony_ci  
62111cb0ef41Sopenharmony_ci  This avoids witness message in output when running configure --help,
62121cb0ef41Sopenharmony_ci  while sending the message to config.log for other configure runs.
62131cb0ef41Sopenharmony_ci
62141cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: truly do version conditional overriding
62151cb0ef41Sopenharmony_ci  
62161cb0ef41Sopenharmony_ci  - version conditional overriding
62171cb0ef41Sopenharmony_ci  - catch unexpanded XC macros
62181cb0ef41Sopenharmony_ci  - fix double words in comments
62191cb0ef41Sopenharmony_ci
62201cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
62211cb0ef41Sopenharmony_ci  
62221cb0ef41Sopenharmony_ci  Tor Arntsen analyzed and reported the issue.
62231cb0ef41Sopenharmony_ci  
62241cb0ef41Sopenharmony_ci  URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
62251cb0ef41Sopenharmony_ci
62261cb0ef41Sopenharmony_ci- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
6227