Skip to content

Commit

Permalink
deps: update c-ares to 1.29.0
Browse files Browse the repository at this point in the history
PR-URL: nodejs#53155
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
  • Loading branch information
nodejs-github-bot authored and bmeck committed Jun 22, 2024
1 parent 2445d8d commit 778f633
Show file tree
Hide file tree
Showing 107 changed files with 13,333 additions and 11,610 deletions.
449 changes: 293 additions & 156 deletions deps/cares/CHANGES

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions deps/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.28.1" )
PROJECT (c-ares LANGUAGES C VERSION "1.29.0" )

# Set this version before release
SET (CARES_VERSION "1.28.1")
SET (CARES_VERSION "1.29.0")

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

Expand All @@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
# For example, a version of 4:0:2 would generate output such as:
# libname.so -> libname.so.2
# libname.so.2 -> libname.so.2.2.0
SET (CARES_LIB_VERSIONINFO "15:1:13")
SET (CARES_LIB_VERSIONINFO "16:0:14")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down Expand Up @@ -172,7 +172,7 @@ return 0;
MACOS_V1012)
ENDIF ()

IF ((IOS OR APPLE OR ZOS) AND HAVE_LIBRESOLV)
IF (ZOS AND HAVE_LIBRESOLV)
SET (CARES_USE_LIBRESOLV 1)
ENDIF()

Expand Down Expand Up @@ -227,7 +227,6 @@ CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H)
CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H)
CHECK_INCLUDE_FILES (sys/time.h HAVE_SYS_TIME_H)
CHECK_INCLUDE_FILES (sys/uio.h HAVE_SYS_UIO_H)
CHECK_INCLUDE_FILES (sys/random.h HAVE_SYS_RANDOM_H)
CHECK_INCLUDE_FILES (sys/event.h HAVE_SYS_EVENT_H)
CHECK_INCLUDE_FILES (sys/epoll.h HAVE_SYS_EPOLL_H)
CHECK_INCLUDE_FILES (ifaddrs.h HAVE_IFADDRS_H)
Expand Down Expand Up @@ -341,7 +340,6 @@ CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_SOCKIO_H sys/sockio.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_TIME_H sys/time.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_STAT_H sys/stat.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_UIO_H sys/uio.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_RANDOM_H sys/random.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_EVENT_H sys/event.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_EPOLL_H sys/epoll.h)
CARES_EXTRAINCLUDE_IFSET (HAVE_TIME_H time.h)
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# [![c-ares logo](https://c-ares.org/art/c-ares-logo.svg)](https://c-ares.org/)

[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg?branch=main)](https://cirrus-ci.com/github/c-ares/c-ares)
[![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)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/aevgc5914tm72pvs/branch/main?svg=true)](https://ci.appveyor.com/project/c-ares/c-ares/branch/main)
[![Coverage Status](https://coveralls.io/repos/github/c-ares/c-ares/badge.svg)](https://coveralls.io/github/c-ares/c-ares)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/291/badge)](https://bestpractices.coreinfrastructure.org/projects/291)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/c-ares.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:c-ares)
Expand Down
59 changes: 26 additions & 33 deletions deps/cares/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
## c-ares version 1.28.1 - Mar 30 2024

This release contains a fix for a single significant regression introduced
in c-ares 1.28.0.

* `ares_search()` and `ares_getaddrinfo()` resolution fails if no search domains
are specified. [Issue #737](https://github.com/c-ares/c-ares/issues/737)


## c-ares version 1.28.0 - Mar 29 2024
## c-ares version 1.29.0 - May 24 2024

This is a feature and bugfix release.

Features:

* Emit warnings when deprecated c-ares functions are used. This can be
disabled by passing a compiler definition of `CARES_NO_DEPRECATED`. [PR #732](https://github.com/c-ares/c-ares/pull/732)
* Add function `ares_search_dnsrec()` to search for records using the new DNS
record data structures. [PR #719](https://github.com/c-ares/c-ares/pull/719)
* Rework internals to pass around `ares_dns_record_t` instead of binary data,
this introduces new public functions of `ares_query_dnsrec()` and
`ares_send_dnsrec()`. [PR #730](https://github.com/c-ares/c-ares/pull/730)
* When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration
when network conditions change. [PR #759](https://github.com/c-ares/c-ares/pull/759)
* Apple: reimplement DNS configuration reading to more accurately pull DNS
settings. [PR #750](https://github.com/c-ares/c-ares/pull/750)
* Add observability into DNS server health via a server state callback, invoked
whenever a query finishes. [PR #744](https://github.com/c-ares/c-ares/pull/744)
* Add server failover retry behavior, where failed servers are retried with
small probability after a minimum delay. [PR #731](https://github.com/c-ares/c-ares/pull/731)

Changes:

* tests: when performing simulated queries, reduce timeouts to make tests run
faster
* Replace configuration file parsers with memory-safe parser. [PR #725](https://github.com/c-ares/c-ares/pull/725)
* Remove `acountry` completely, the manpage might still get installed otherwise. [Issue #718](https://github.com/c-ares/c-ares/pull/718)
* Mark `ares_channel_t *` as const in more places in the public API. [PR #758](https://github.com/c-ares/c-ares/pull/758)

Bugfixes:

* CMake: don't overwrite global required libraries/definitions/includes which
could cause build errors for projects chain building c-ares. [Issue #729](https://github.com/c-ares/c-ares/issues/729)
* On some platforms, `netinet6/in6.h` is not included by `netinet/in.h`
and needs to be included separately. [PR #728](https://github.com/c-ares/c-ares/pull/728)
* Fix a potential memory leak in `ares_init()`. [Issue #724](https://github.com/c-ares/c-ares/issues/724)
* Some platforms don't have the `isascii()` function. Implement as a macro. [PR #721](https://github.com/c-ares/c-ares/pull/721)
* CMake: Fix Chain building if CMAKE runtime paths not set
* NDots configuration should allow a value of zero. [PR #735](https://github.com/c-ares/c-ares/pull/735)
* Due to a logic flaw dns name compression writing was not properly implemented
which would result in the name prefix not being written for a partial match.
This could cause issues in various record types such as MX records when using
the deprecated API. Regression introduced in 1.28.0. [Issue #757](https://github.com/c-ares/c-ares/issues/757)
* Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and
causes c-ares to become non-functional. [PR #754](https://github.com/c-ares/c-ares/pull/754)
* `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752](https://github.com/c-ares/c-ares/issues/752)
* cmake: Android requires C99. [PR #748](https://github.com/c-ares/c-ares/pull/748)
* `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742](https://github.com/c-ares/c-ares/pull/742)

Thanks go to these friendly people for their efforts and contributions for this release:
Thanks go to these friendly people for their efforts and contributions for this
release:

* Brad House (@bradh352)
* Cristian Rodríguez (@crrodriguez)
* Daniel Stenberg (@bagder)
* Faraz (@farazrbx)
* Faraz Fallahi (@fffaraz)
* David Hotham (@dimbleby)
* Jiwoo Park (@jimmy-park)
* Oliver Welsh (@oliverwelsh)
* Volker Schlecht (@VlkrS)


2 changes: 1 addition & 1 deletion deps/cares/SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ announcement.

- If the report is rejected, the team writes to the reporter to explain why.

- If the report is accepted, the team writes to the reporter to let him/her
- If the report is accepted, the team writes to the reporter to let them
know it is accepted and that they are working on a fix.

- The security team discusses the problem, works out a fix, considers the
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/aminclude_static.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Sat Mar 30 16:17:17 CET 2024
# from AX_AM_MACROS_STATIC on Fri May 24 08:50:03 CEST 2024


# Code coverage
Expand Down
12 changes: 11 additions & 1 deletion deps/cares/cares.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
'src/lib/ares__htable_strvp.h',
'src/lib/ares__htable_szvp.c',
'src/lib/ares__htable_szvp.h',
'src/lib/ares__htable_vpvp.c',
'src/lib/ares__htable_vpvp.h',
'src/lib/ares__iface_ips.c',
'src/lib/ares__iface_ips.h',
'src/lib/ares__llist.c',
Expand All @@ -46,6 +48,7 @@
'src/lib/ares_dns_record.c',
'src/lib/ares_dns_private.h',
'src/lib/ares_dns_write.c',
'src/lib/ares_event_configchg.c',
'src/lib/ares_event.h',
'src/lib/ares_event_win32.h',
'src/lib/ares_event_epoll.c',
Expand Down Expand Up @@ -113,6 +116,11 @@
'src/tools/ares_getopt.c',
'src/tools/ares_getopt.h',
],
'cares_sources_mac': [
'config/darwin/ares_config.h',
'src/lib/ares_sysconfig_mac.c',
'src/lib/thirdparty/apple/dnsinfo.h',
],
'cares_sources_win': [
'src/lib/config-win32.h',
'src/lib/windows_port.c',
Expand Down Expand Up @@ -206,7 +214,9 @@
}],
[ 'OS=="mac" or OS=="ios"', {
'include_dirs': [ 'config/darwin' ],
'sources': [ 'config/darwin/ares_config.h' ]
'sources': [
'<@(cares_sources_mac)',
]
}],
[ 'OS=="freebsd" or OS=="dragonflybsd"', {
'include_dirs': [ 'config/freebsd' ],
Expand Down
95 changes: 11 additions & 84 deletions deps/cares/configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for c-ares 1.28.1.
# Generated by GNU Autoconf 2.71 for c-ares 1.29.0.
#
# Report bugs to <c-ares mailing list: http://lists.haxx.se/listinfo/c-ares>.
#
Expand Down Expand Up @@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='c-ares'
PACKAGE_TARNAME='c-ares'
PACKAGE_VERSION='1.28.1'
PACKAGE_STRING='c-ares 1.28.1'
PACKAGE_VERSION='1.29.0'
PACKAGE_STRING='c-ares 1.29.0'
PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares'
PACKAGE_URL=''

Expand Down Expand Up @@ -1420,7 +1420,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures c-ares 1.28.1 to adapt to many kinds of systems.
\`configure' configures c-ares 1.29.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1491,7 +1491,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of c-ares 1.28.1:";;
short | recursive ) echo "Configuration of c-ares 1.29.0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1627,7 +1627,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
c-ares configure 1.28.1
c-ares configure 1.29.0
generated by GNU Autoconf 2.71

Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2251,7 +2251,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by c-ares $as_me 1.28.1, which was
It was created by c-ares $as_me 1.29.0, which was
generated by GNU Autoconf 2.71. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3225,7 +3225,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu



CARES_VERSION_INFO="15:1:13"
CARES_VERSION_INFO="16:0:14"



Expand Down Expand Up @@ -5907,7 +5907,7 @@ fi

# Define the identity of the package.
PACKAGE='c-ares'
VERSION='1.28.1'
VERSION='1.29.0'


printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
Expand Down Expand Up @@ -20946,79 +20946,6 @@ esac
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $need_xnet" >&5
printf "%s\n" "$need_xnet" >&6; }

if test "x$host_vendor" = "xapple"
then :

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing res_servicename" >&5
printf %s "checking for library containing res_servicename... " >&6; }
if test ${ac_cv_search_res_servicename+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char res_servicename ();
int
main (void)
{
return res_servicename ();
;
return 0;
}
_ACEOF
for ac_lib in '' resolv
do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_search_res_servicename=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext
if test ${ac_cv_search_res_servicename+y}
then :
break
fi
done
if test ${ac_cv_search_res_servicename+y}
then :

else $as_nop
ac_cv_search_res_servicename=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_servicename" >&5
printf "%s\n" "$ac_cv_search_res_servicename" >&6; }
ac_res=$ac_cv_search_res_servicename
if test "$ac_res" != no
then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"


printf "%s\n" "#define CARES_USE_LIBRESOLV 1" >>confdefs.h


else $as_nop

as_fn_error $? "Unable to find libresolv which is required for iPhone targets" "$LINENO" 5

fi


fi

if test "x$host_vendor" = "xibm" -a "x$host_os" = "xopenedition"
then :

Expand Down Expand Up @@ -25956,7 +25883,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by c-ares $as_me 1.28.1, which was
This file was extended by c-ares $as_me 1.29.0, which was
generated by GNU Autoconf 2.71. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -26024,7 +25951,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
c-ares config.status 1.28.1
c-ares config.status 1.29.0
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

Expand Down
13 changes: 2 additions & 11 deletions deps/cares/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors
dnl SPDX-License-Identifier: MIT
AC_PREREQ([2.69])

AC_INIT([c-ares], [1.28.1],
AC_INIT([c-ares], [1.29.0],
[c-ares mailing list: http://lists.haxx.se/listinfo/c-ares])

CARES_VERSION_INFO="15:1:13"
CARES_VERSION_INFO="16:0:14"
dnl This flag accepts an argument of the form current[:revision[:age]]. So,
dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to
dnl 1.
Expand Down Expand Up @@ -334,15 +334,6 @@ case $host_os in
esac
AC_MSG_RESULT($need_xnet)

dnl resolv lib for Apple (MacOS and iOS)
AS_IF([test "x$host_vendor" = "xapple"], [
AC_SEARCH_LIBS([res_servicename], [resolv], [
AC_DEFINE([CARES_USE_LIBRESOLV], [1], [Use resolver library to configure cares])
], [
AC_MSG_ERROR([Unable to find libresolv which is required for iPhone targets])
])
])

dnl resolv lib for z/OS
AS_IF([test "x$host_vendor" = "xibm" -a "x$host_os" = "xopenedition" ], [
AC_SEARCH_LIBS([res_init], [resolv], [
Expand Down
1 change: 1 addition & 0 deletions deps/cares/docs/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ MANPAGES = ares_cancel.3 \
ares_set_local_dev.3 \
ares_set_local_ip4.3 \
ares_set_local_ip6.3 \
ares_set_server_state_callback.3 \
ares_set_servers.3 \
ares_set_servers_csv.3 \
ares_set_servers_ports.3 \
Expand Down
Loading

0 comments on commit 778f633

Please sign in to comment.