Skip to content

Commit 38343c4

Browse files
nodejs-github-botrichardlau
authored andcommitted
deps: update c-ares to 1.27.0
PR-URL: #51846 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent d16b235 commit 38343c4

File tree

87 files changed

+811
-925
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+811
-925
lines changed

deps/cares/CHANGES

+189-110
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,194 @@
11
Changelog for the c-ares project. Generated with git2changes.pl
22

3+
Version 1.27.0 (22 Feb 2024)
4+
5+
GitHub (22 Feb 2024)
6+
- [Brad House brought this change]
7+
8+
Release 1.27.0 (#715)
9+
10+
release prep for 1.27.0 release
11+
12+
- [Brad House brought this change]
13+
14+
Merge pull request from GHSA-mg26-v6qh-x48q
15+
16+
- [Oliver Welsh brought this change]
17+
18+
Add flag to not use a default local named server on channel initialization (#713)
19+
20+
Hello, I work on an application for Microsoft which uses c-ares to
21+
perform DNS lookups. We have made some minor changes to the library over
22+
time, and would like to contribute these back to the project in case
23+
they are useful more widely. This PR adds a new channel init flag,
24+
described below.
25+
26+
Please let me know if I can include any more information to make this PR
27+
better/easier for you to review. Thanks!
28+
29+
**Summary**
30+
When initializing a channel with `ares_init_options()`, if there are no
31+
nameservers available (because `ARES_OPT_SERVERS` is not used and
32+
`/etc/resolv.conf` is either empty or not available) then a default
33+
local named server will be added to the channel.
34+
35+
However in some applications a local named server will never be
36+
available. In this case, all subsequent queries on the channel will
37+
fail.
38+
39+
If we know this ahead of time, then it may be preferred to fail channel
40+
initialization directly rather than wait for the queries to fail. This
41+
gives better visibility, since we know that the failure is due to
42+
missing servers rather than something going wrong with the queries.
43+
44+
This PR adds a new flag `ARES_FLAG_NO_DFLT_SVR`, to indicate that a
45+
default local named server should not be added to a channel in this
46+
scenario. Instead, a new error `ARES_EINITNOSERVER` is returned and
47+
initialization fails.
48+
49+
**Testing**
50+
I have added 2 new FV tests:
51+
- `ContainerNoDfltSvrEmptyInit` to test that initialization fails when
52+
no nameservers are available and the flag is set.
53+
- `ContainerNoDfltSvrFullInit` to test that initialization still
54+
succeeds when the flag is set but other nameservers are available.
55+
56+
Existing FVs are all passing.
57+
58+
**Documentation**
59+
I have had a go at manually updating the docs to describe the new
60+
flag/error, but couldn't see any contributing guidance about testing
61+
this. Please let me know if you'd like anything more here.
62+
63+
---------
64+
65+
Fix By: Oliver Welsh (@oliverwelsh)
66+
67+
Brad House (18 Feb 2024)
68+
- badge should be only main branch
69+
70+
- put logo in readme
71+
72+
- clang-format
73+
74+
GitHub (17 Feb 2024)
75+
- [Brad House brought this change]
76+
77+
Add ares_queue_active_queries() (#712)
78+
79+
Add a function to request the number of active queries from an ares
80+
channel. This will return the number of inflight requests to dns
81+
servers. Some functions like `ares_getaddrinfo()` when using `AF_UNSPEC`
82+
may enqueue multiple queries which will be reflected in this count.
83+
84+
In the future, if we implement support for queuing (e.g. for throttling
85+
purposes), and/or implement support for tracking user-requested queries
86+
(e.g. for cancelation), we can provide additional functions for
87+
inspecting those queues.
88+
89+
Fix By: Brad House (@bradh352)
90+
91+
- [Vojtěch Vobr brought this change]
92+
93+
fix leaking DNS suffix search list on Windows (#711)
94+
95+
ares__strsplit provides a newly allocated buffer, so suffix list in
96+
line variable isn't referenced anymore. Related ares_free seems to
97+
have gone missing during refactoring made in #594
98+
99+
Fix By: Vojtěch Vobr (@vojtechvobr)
100+
101+
- [Brad House brought this change]
102+
103+
Add ares_queue_wait_empty() for use with EventThreads (#710)
104+
105+
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.
106+
107+
Fix By: Brad House (@bradh352)
108+
109+
- [Cheng Zhao brought this change]
110+
111+
Fix warning about ignoring result of write (#709)
112+
113+
Fix the compiler warning from clang:
114+
115+
```
116+
ares_event_wake_pipe.c:120:3: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
117+
120 | write(p->filedes[1], "1", 1);
118+
| ^~~~~ ~~~~~~~~~~~~~~~~~~~~~
119+
1 error generated.
120+
```
121+
122+
Fix By: Cheng Zhao (@zcbenz)
123+
124+
Brad House (5 Feb 2024)
125+
- CMake: don't override target output locations if not top-level
126+
127+
CMake was unconditionally setting output locations globally, but
128+
it should not do that if it is not the top-level project (e.g.
129+
during chain building). Detect this fact and only set the output
130+
location when top level.
131+
132+
Fixes Issue: #708
133+
Fix By: Anthony Alayo (@anthonyalayo)
134+
135+
- make docs match PR #705
136+
137+
GitHub (31 Jan 2024)
138+
- [Cristian Rodríguez brought this change]
139+
140+
lower EDNSPACKETSZ to 1232 (#705)
141+
142+
In 2020, it was agreed this is optimal maximum size and all
143+
major server software was updated to reflect this.
144+
145+
see https://www.dnsflagday.net/2020/#faq
146+
147+
Fix By: Cristian Rodríguez (@crrodriguez)
148+
149+
Brad House (30 Jan 2024)
150+
- fix version
151+
152+
- fix typo
153+
154+
- bad symlink
155+
156+
- attempt to fix pkgconfig on windows for static builds
157+
158+
GitHub (28 Jan 2024)
159+
- [Andriy Utkin brought this change]
160+
161+
docs/ares_init_options.3: fix args in analogy (#701)
162+
163+
Fix By: Andriy Utkin <[email protected]>
164+
165+
- [Brad House brought this change]
166+
167+
sonarcloud: fix minor codesmells (#702)
168+
169+
Fix minor codesmells, mostly related to missing 'const' in the new event system.
170+
171+
Fix By: Brad House (@bradh352)
172+
173+
Brad House (26 Jan 2024)
174+
- remove outdated copyright text
175+
176+
- spelling
177+
178+
- sanity check GTest includes GMock component
179+
180+
GitHub (26 Jan 2024)
181+
- [Brad House brought this change]
182+
183+
build-time disabled threads breaks c-ares (#700)
184+
185+
Regression introduced in 1.26.0, building c-ares with threading disabled results in ares_init{_options}() failing.
186+
187+
Also adds a new CI test case to prevent this regression in the future.
188+
189+
Fixes Bug: #699
190+
Fix By: Brad House (@bradh352)
191+
3192
Version 1.26.0 (25 Jan 2024)
4193

5194
Brad House (25 Jan 2024)
@@ -6035,113 +6224,3 @@ Yang Tse (30 Jan 2013)
60356224
URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
60366225

60376226
- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
6038-
6039-
- zz40-xc-ovr.m4: avoid double single-quote usage
6040-
6041-
- zz40-xc-ovr.m4: parentheses balancing of 'case' statements
6042-
6043-
m4 quadrigraph shell comment technique allows proper autoconf
6044-
parentheses balancing in shell 'case' statements. The presence
6045-
of unbalanced parentheses may otherwise trigger expansion bugs.
6046-
6047-
- zz40-xc-ovr.m4: internals overhauling
6048-
6049-
- Update comments
6050-
- Execute commands in subshells
6051-
- Faster path separator check
6052-
- Fix missing 'test' command
6053-
- Rename private macros
6054-
- Minimize AC_REQUIRE usage
6055-
6056-
- zz40-xc-ovr.m4: redirect errors and warnings to stderr
6057-
6058-
- configure: use XC_CONFIGURE_PREAMBLE early checks
6059-
6060-
Some basic checks we make were placed early enough in generated
6061-
configure script when using autoconf 2.5X versions. Newer autoconf
6062-
versions expand these checks much further into the configure script,
6063-
rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement
6064-
of early intended checks across all our autoconf supported versions.
6065-
6066-
- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
6067-
6068-
- configure: autotools compatibility fixes - step I
6069-
6070-
Fix proper macro expansion order across autotools versions for
6071-
C compiler and preprocessor program checks.
6072-
6073-
- configure: fix automake 1.13 compatibility
6074-
6075-
Tested with:
6076-
6077-
buildconf: autoconf version 2.69
6078-
buildconf: autom4te version 2.69
6079-
buildconf: autoheader version 2.69
6080-
buildconf: automake version 1.13.1
6081-
buildconf: aclocal version 1.13.1
6082-
buildconf: libtool version 2.4
6083-
buildconf: GNU m4 version 1.4.16
6084-
6085-
- ares_private.h: use again memdebug.h instead of curl_memdebug.h
6086-
6087-
- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
6088-
6089-
automake 1.13 errors if AM_CONFIG_HEADER is used in configure script.
6090-
6091-
- cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
6092-
6093-
Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
6094-
an autoconf version that does not provide it, instead of what we were
6095-
doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
6096-
all autoconf versions.
6097-
6098-
- ares_private.h: use curl_memdebug.h instead of memdebug.h
6099-
6100-
- vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c
6101-
6102-
- cares-functions.m4: improve gethostname arg 2 data type check
6103-
6104-
- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
6105-
6106-
Also reverts commit bceb40095a
6107-
6108-
- configure: check if compiler halts on function prototype mismatch
6109-
6110-
- cares-functions.m4: add gethostname arg 2 data type check and definition
6111-
6112-
- cares-functions.m4: update thread-safeness detection of getaddrinfo()
6113-
6114-
Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
6115-
consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
6116-
(_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.
6117-
6118-
Take in account that h_errno might be a modifiable lvalue not defined as
6119-
a C preprocessor macro.
6120-
6121-
- setup_once.h: HP-UX <sys/socket.h> issue workaround
6122-
6123-
Issue: When building a 32bit target with large file support HP-UX
6124-
<sys/socket.h> header file may simultaneously provide two different
6125-
sets of declarations for sendfile and sendpath functions, one with
6126-
static and another with external linkage. Given that we do not use
6127-
mentioned functions we really don't care which linkage is the
6128-
appropriate one, but on the other hand, the double declaration emmits
6129-
warnings when using the HP-UX compiler and errors when using modern
6130-
gcc versions resulting in fatal compilation errors.
6131-
6132-
Mentioned issue is now fixed as long as we don't use sendfile nor
6133-
sendpath functions.
6134-
6135-
- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
6136-
6137-
Inclusion of these two header files now done in setup_once.h
6138-
6139-
- Header inclusion clean-up
6140-
6141-
Remove header inclusions already done in setup_once.h
6142-
6143-
- setup_once.h: HP-UX specific TRUE and FALSE definitions
6144-
6145-
Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
6146-
6147-
- ares_timeout.c: fix compiler warning

deps/cares/CMakeLists.txt

+12-8
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ INCLUDE (CheckCSourceCompiles)
1212
INCLUDE (CheckStructHasMember)
1313
INCLUDE (CheckLibraryExists)
1414

15-
PROJECT (c-ares LANGUAGES C VERSION "1.26.0" )
15+
PROJECT (c-ares LANGUAGES C VERSION "1.27.0" )
1616

1717
# Set this version before release
18-
SET (CARES_VERSION "1.26.0")
18+
SET (CARES_VERSION "1.27.0")
1919

2020
INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong.
2121

@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
3030
# For example, a version of 4:0:2 would generate output such as:
3131
# libname.so -> libname.so.2
3232
# libname.so.2 -> libname.so.2.2.0
33-
SET (CARES_LIB_VERSIONINFO "13:0:11")
33+
SET (CARES_LIB_VERSIONINFO "14:0:12")
3434

3535

3636
OPTION (CARES_STATIC "Build as a static library" OFF)
@@ -91,11 +91,15 @@ IF (CARES_SYMBOL_HIDING)
9191
CMAKE_POLICY (SET CMP0063 NEW)
9292
ENDIF ()
9393

94-
# Keep build organized.
95-
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
96-
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
97-
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
98-
SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package)
94+
# Keep build organized, but only if it is the top-level project.
95+
# CMake 3.21 or later has PROJECT_IS_TOP_LEVEL, but we aren't yet depending on
96+
# that version.
97+
IF (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
98+
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}")
99+
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
100+
SET (CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR}")
101+
SET (PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/package)
102+
ENDIF ()
99103

100104
# Destinations for installing different kinds of targets (pass to install command).
101105
SET (TARGETS_INST_DEST

deps/cares/README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
c-ares
2-
======
1+
# [![c-ares logo](https://c-ares.org/art/c-ares-logo.svg)](https://c-ares.org/)
32

4-
[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg)](https://cirrus-ci.com/github/c-ares/c-ares)
3+
[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg?branch=main)](https://cirrus-ci.com/github/c-ares/c-ares)
54
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/aevgc5914tm72pvs/branch/master?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares/branch/master)
65
[![Coverage Status](https://coveralls.io/repos/github/c-ares/c-ares/badge.svg)](https://coveralls.io/github/c-ares/c-ares)
76
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
@@ -29,8 +28,7 @@ You'll find all c-ares details and news here:
2928
https://c-ares.org/
3029

3130

32-
Notes for c-ares hackers
33-
------------------------
31+
## Notes for c-ares hackers
3432

3533
* The distributed `ares_build.h` file is only intended to be used on systems
3634
which can not run the also distributed configure script.

0 commit comments

Comments
 (0)