Skip to content

Commit

Permalink
deps: update c-ares to 1.19.0
Browse files Browse the repository at this point in the history
Refs: https://c-ares.org/changelog.html#1_19_0
PR-URL: #46415
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
targos authored and BethGriggs committed Mar 27, 2023
1 parent de6dd67 commit b4ebe6d
Show file tree
Hide file tree
Showing 91 changed files with 4,381 additions and 3,659 deletions.
607 changes: 443 additions & 164 deletions deps/cares/CHANGES

Large diffs are not rendered by default.

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

PROJECT (c-ares LANGUAGES C VERSION "1.18.0" )
PROJECT (c-ares LANGUAGES C VERSION "1.19.0" )

# Set this version before release
SET (CARES_VERSION "1.18.1")
SET (CARES_VERSION "1.19.0")

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

Expand All @@ -26,7 +26,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 "7:1:5")
SET (CARES_LIB_VERSIONINFO "8:0:6")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down Expand Up @@ -82,9 +82,14 @@ SET (TARGETS_INST_DEST

# Function in Library
# CHECK_LIBRARY_EXISTS can't be used as it will return true if the function
# is found in a different dependent library.
# is found in a different required/dependent library.
MACRO (CARES_FUNCTION_IN_LIBRARY func lib var)

SET (_ORIG_CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES}")
SET (CMAKE_REQUIRED_LIBRARIES )
CHECK_FUNCTION_EXISTS ("${func}" "_CARES_FUNC_IN_LIB_GLOBAL_${func}")
SET (CMAKE_REQUIRED_LIBRARIES "${_ORIG_CMAKE_REQUIRED_LIBRARIES}")

IF ("${_CARES_FUNC_IN_LIB_GLOBAL_${func}}")
SET (${var} FALSE)
ELSE ()
Expand Down Expand Up @@ -689,6 +694,12 @@ IF (CARES_INSTALL)
if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )

if ( "${CPACK_PACKAGE_ARCHITECTURE}" STREQUAL "" )
set( CPACK_PACKAGE_ARCHITECTURE "${CMAKE_SYSTEM_PROCESSOR}" )
endif()
if ( "${CPACK_PACKAGE_ARCHITECTURE}" STREQUAL "" )
if ( "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows" )
message( FATAL_ERROR "Failed to determine CPACK_PACKAGE_ARCHITECTURE. Is CMAKE_SYSTEM_PROCESSOR set?" )
endif()
# Note: the architecture should default to the local architecture, but it
# in fact comes up empty. We call `uname -m` to ask the kernel instead.
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE CPACK_PACKAGE_ARCHITECTURE )
Expand Down
14 changes: 14 additions & 0 deletions deps/cares/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,20 @@ sure that the var `OSTYPE` contains the string 'linux'; set the var
`NDKBASE` to point to the base of your Novell NDK; and then type
`make -f Makefile.netware` from the top source directory;

VCPKG
=====

You can build and install c-ares using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:

```sh or powershell
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install c-ares
```

The c-ares port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.

PORTS
=====
Expand Down
1 change: 1 addition & 0 deletions deps/cares/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ EGREP = @EGREP@
ETAGS = @ETAGS@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
FILECMD = @FILECMD@
GCOV = @GCOV@
GENHTML = @GENHTML@
GREP = @GREP@
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ c-ares

[![Build Status](https://api.cirrus-ci.com/github/c-ares/c-ares.svg)](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)
[![Coverage Status](https://coveralls.io/repos/c-ares/c-ares/badge.svg?branch=master&service=github)](https://coveralls.io/github/c-ares/c-ares?branch=master)
[![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)
[![Releases](https://coderelease.io/badge/c-ares/c-ares)](https://coderelease.io/github/repository/c-ares/c-ares)
Expand Down
150 changes: 78 additions & 72 deletions deps/cares/RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -1,85 +1,91 @@
c-ares version 1.18.1

This is an urgent bugfix release for a regression made in 1.18.0.

Bug fixes:
o ares_getaddrinfo() would return ai_addrlen of 16 for ipv6
adddresses rather than the sizeof(struct sockaddr_in6)



c-ares version 1.18.0
c-ares version 1.19.0

This is a feature and bugfix release. It addresses a couple of new feature
requests as well as a couple of bug fixes.

Security:
o Low. Stack overflow in ares_set_sortlist() which is used during c-ares
initialization and typically provided by an administrator and not an
end user. [24]

Changes:
o Add support for URI(Uniform Resource Identifier) records via
ares_parse_uri_reply() [1]
o Provide ares_nameser.h as a public interface as needed by NodeJS [5]
o Update URLs from c-ares.haxx.se to c-ares.org [9]
o During a domain search, treat ARES_ENODATA as ARES_NXDOMAIN so that the
search process will continue to the next domain in the search. [11]
o Turn ares_gethostbyname() into a wrapper for ares_getaddrinfo() as they
followed very similar code paths and ares_gethostbyaddr() has some more
desirable features such as priority sorting and parallel queries for
AF_UNSPEC. [12]
o ares_getaddrinfo() now contains a name element in the address info
structure as the last element. This is not an API or ABI break due to
the structure always being internally allocated and it being the last
element. [12]
o ares_parse_a_reply() and ares_parse_aaaa_reply() were nearly identical, those
now use the same helper functions for parsing rather than having their own
code. [12]
o RFC6761 Section 6.3 says "localhost" lookups need to be special cased to
return loopback addresses, and not forward queries to recursive dns servers.
On Windows this now returns all loopback addresses, on other systems it
returns 127.0.0.1 or ::1 always, and will never forward a request for
"localhost" to outside DNS servers. [13]
o Haiki: port [14]
o Windows: Drop support for XP and derivatives which greatly cleans up
initialization code. [3]
o Add ARES_OPT_HOSTS_FILE similar to ARES_OPT_RESOLVCONF for specifying a
custom hosts file location. [10]
o Add vcpkg installation instructions [13]

Bug fixes:
o add build to .gitignore [2]
o z/OS minor update, add missing semicolon in ares_init.c [3]
o Fix building when latest ax_code_coverage.m4 is imported [4]
o Work around autotools 'error: too many loops' and other newer autotools
import related bugs.
o MinGW cross builds need advapi32 link as lower case [6]
o Cygwin build fix due to containing both socket.h and winsock2.h [7]
o ares_expand_name should allow underscores (_) as SRV records legitimately use
them [8]
o Allow '/' as a valid character for a returned name for CNAME in-addr.arpa
delegation [10]
o ares_getaddrinfo() was not honoring HOSTALIASES [12]
o ares_getaddrinfo() had some test cases disabled due to a bug in the test
framework itself which has now been resolved [12]
o Due to Travis-CI becoming unfriendly to open-source, Cirrus-CI has now been
brought online for automated unit testing.
o Fix cross-compilation from Windows to Linux due to CPACK logic. [1]
o Fix memory leak in reading /etc/hosts when using localhost fallback. [2]
o Fix chain building c-ares when libresolv is already included by another
project [4]
o File lookup should not immediately abort as there may be other tries due to
search criteria.
o Asterisks should be allowed in host validation as CNAMEs may reference
wildcard domains [5]
o AutoTools build system referenced bad STDC_HEADERS macro [6]
o Even if one address class returns a failure for ares_getaddrinfo() we should
still return the results we have
o CMake Windows: DLLs did not include resource file to include versions [7] [8]
o CMake: Guard target creation in exported config [9]
o Fix ares_getaddrinfo() numerical address resolution with AF_UNSPEC [11]
o Apple: fix libresolv configured query times. [12]
o Fix tools and help information [14] [15]
o Various documentation fixes and cleanups [16] [22] [25]
o Add include guards to ares_data.h [17]
o c-ares could try to exceed maximum number of iovec entries supported by
system [18]
o CMake package config generation allow for absolute install paths [19]
o Intel compiler fixes [20]
o ares_strsplit bugs [21] [23]
o The RFC6761 6.3 states localhost subdomains must be offline too. [26]

Thanks go to these friendly people for their efforts and contributions:
Biswapriyo Nath (@Biswa96)
Boby Reynolds (@reynoldsbd)
Brad House (@bradh352)
Daniel Bevenius (@danbev)
Brad Spencer (@b-spencer)
@bsergean
Daniel Stenberg (@bagder)
Dhrumil Rana (@dhrumilrana)
Felix Yan (@felixonmars)
Jérôme Duval (@korli)
Martin Holeš (@martin-256)
Sinan Kaya
(9 contributors)
Dmitry Karpov
@FrankXie05
@hopper-vul
Jonathan Ringer (@jonringer)
Kai Pastor (@dg0yt)
@lifenjoiner
Manish Mehra (@mmehra)
@marc-groundctl
Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
Ridge Kennedy (@ridgek)
Sam James (@thesamesam)
Stephen Sachs (@stephenmsachs)
Thomas Dreibholz (@dreibh)
(18 contributors)

References to bug reports and discussions on issues:
[1] = https://github.com/c-ares/c-ares/pull/411
[2] = https://github.com/c-ares/c-ares/pull/410
[3] = https://github.com/c-ares/c-ares/pull/414
[4] = https://github.com/c-ares/c-ares/pull/418
[5] = https://github.com/c-ares/c-ares/pull/417
[6] = https://github.com/c-ares/c-ares/pull/420
[7] = https://github.com/c-ares/c-ares/pull/422
[8] = https://github.com/c-ares/c-ares/issues/424
[9] = https://github.com/c-ares/c-ares/issues/423
[10] = https://github.com/c-ares/c-ares/issues/427
[11] = https://github.com/c-ares/c-ares/issues/426
[12] = https://github.com/c-ares/c-ares/pull/428
[13] = https://github.com/c-ares/c-ares/pull/430
[14] = https://github.com/c-ares/c-ares/pull/431
[1] = https://github.com/c-ares/c-ares/pull/436
[2] = https://github.com/c-ares/c-ares/issues/439
[3] = https://github.com/c-ares/c-ares/pull/445
[4] = https://github.com/c-ares/c-ares/pull/451
[5] = https://github.com/c-ares/c-ares/issues/457
[6] = https://github.com/c-ares/c-ares/pull/459
[7] = https://github.com/c-ares/c-ares/issues/460
[8] = https://github.com/c-ares/c-ares/pull/468
[9] = https://github.com/c-ares/c-ares/pull/464
[10] = https://github.com/c-ares/c-ares/pull/465
[11] = https://github.com/c-ares/c-ares/pull/469
[12] = https://github.com/c-ares/c-ares/pull/467
[13] = https://github.com/c-ares/c-ares/pull/478
[14] = https://github.com/c-ares/c-ares/pull/479
[15] = https://github.com/c-ares/c-ares/pull/481
[16] = https://github.com/c-ares/c-ares/pull/490
[17] = https://github.com/c-ares/c-ares/pull/491
[18] = https://github.com/c-ares/c-ares/pull/489
[19] = https://github.com/c-ares/c-ares/pull/486
[20] = https://github.com/c-ares/c-ares/pull/485
[21] = https://github.com/c-ares/c-ares/pull/492
[22] = https://github.com/c-ares/c-ares/pull/494
[23] = https://github.com/c-ares/c-ares/pull/495
[24] = https://github.com/c-ares/c-ares/pull/497
[25] = https://github.com/c-ares/c-ares/issues/487
[26] = https://github.com/c-ares/c-ares/issues/477
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 Wed Oct 27 08:06:13 CEST 2021
# from AX_AM_MACROS_STATIC on Sat Jan 28 22:07:59 CET 2023


# Code coverage
Expand Down
13 changes: 8 additions & 5 deletions deps/cares/c-ares-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ include("${CMAKE_CURRENT_LIST_DIR}/c-ares-targets.cmake")
set(c-ares_LIBRARY c-ares::cares)

if(@CARES_SHARED@)
add_library(c-ares::cares_shared INTERFACE IMPORTED)
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
if(NOT TARGET c-ares::cares_shared)
add_library(c-ares::cares_shared INTERFACE IMPORTED)
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
endif()
set(c-ares_SHARED_LIBRARY c-ares::cares_shared)
elseif(@CARES_STATIC@)
add_library(c-ares::cares_static INTERFACE IMPORTED)
set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
endif()

if(@CARES_STATIC@)
if(NOT TARGET c-ares::cares_static)
add_library(c-ares::cares_static INTERFACE IMPORTED)
set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
endif()
set(c-ares_STATIC_LIBRARY c-ares::cares_static)
endif()
Loading

0 comments on commit b4ebe6d

Please sign in to comment.