Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update c-ares to v1.34.1 #55369

Merged
merged 2 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions deps/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.33.1" )
PROJECT (c-ares LANGUAGES C VERSION "1.34.1" )

# Set this version before release
SET (CARES_VERSION "${PROJECT_VERSION}")
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 "20:1:18")
SET (CARES_LIB_VERSIONINFO "21:1:19")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down Expand Up @@ -406,7 +406,7 @@ ENDIF ()

CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_scope_id "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID LANGUAGE C)


CHECK_SYMBOL_EXISTS (memmem "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_MEMMEM)
CHECK_SYMBOL_EXISTS (closesocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET)
CHECK_SYMBOL_EXISTS (CloseSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET_CAMEL)
CHECK_SYMBOL_EXISTS (connect "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CONNECT)
Expand Down Expand Up @@ -443,6 +443,7 @@ CHECK_SYMBOL_EXISTS (IoctlSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_IOCTLSO
CHECK_SYMBOL_EXISTS (recv "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_RECV)
CHECK_SYMBOL_EXISTS (recvfrom "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_RECVFROM)
CHECK_SYMBOL_EXISTS (send "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SEND)
CHECK_SYMBOL_EXISTS (sendto "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SENDTO)
CHECK_SYMBOL_EXISTS (setsockopt "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SETSOCKOPT)
CHECK_SYMBOL_EXISTS (socket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SOCKET)
CHECK_SYMBOL_EXISTS (strcasecmp "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRCASECMP)
Expand Down Expand Up @@ -500,7 +501,10 @@ IF (CARES_THREADS)
CARES_EXTRAINCLUDE_IFSET (HAVE_PTHREAD_NP_H pthread_np.h)
CHECK_SYMBOL_EXISTS (pthread_init "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_PTHREAD_INIT)
# Make sure libcares.pc.cmake knows about thread libraries on static builds
LIST (APPEND CARES_DEPENDENT_LIBS ${CMAKE_THREAD_LIBS_INIT})
# The variable set by FIND_PACKAGE(Threads) has a -l prefix on it, we need
# to strip that first since CARES_DEPENDENT_LIBS doesn't expect that.
STRING (REPLACE "-l" "" CARES_THREAD_LIBRARY "${CMAKE_THREAD_LIBS_INIT}")
LIST (APPEND CARES_DEPENDENT_LIBS ${CARES_THREAD_LIBRARY})
ELSE ()
MESSAGE (WARNING "Threading support not found, disabling...")
SET (CARES_THREADS OFF)
Expand Down Expand Up @@ -688,7 +692,6 @@ IF (HAVE_ARPA_NAMESER_COMPAT_H)
SET (CARES_HAVE_ARPA_NAMESER_COMPAT_H 1)
ENDIF()


# Coverage
IF (CARES_COVERAGE)
# set compiler flags
Expand Down Expand Up @@ -755,9 +758,6 @@ IF (CARES_BUILD_TESTS OR CARES_BUILD_CONTAINER_TESTS)
ADD_SUBDIRECTORY (test)
ENDIF ()




# Export targets
IF (CARES_INSTALL)
SET (CMAKECONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}")
Expand All @@ -781,7 +781,6 @@ IF (CARES_INSTALL)
INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" COMPONENT Devel DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
ENDIF ()


# Legacy chain-building variables (provided for compatibility with old code).
# Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares).
SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND")
Expand Down
5 changes: 3 additions & 2 deletions deps/cares/Makefile.Watcom
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ CP = copy

CFLAGS = -3r -mf -hc -zff -zgf -zq -zm -zc -s -fr=con -w2 -fpi -oilrtfm -aa &
-wcd=201 -bt=nt -d+ -dCARES_BUILDING_LIBRARY &
-dNTDDI_VERSION=0x06020000 -I. -I.\include -I.\src\lib $(SYS_INCL)
-dNTDDI_VERSION=0x06020000 -I. -I.\include -I.\src\lib -I.\src\lib\include &
$(SYS_INCL)

LFLAGS = option quiet, map, caseexact, eliminate

Expand Down Expand Up @@ -124,7 +125,7 @@ $(LIBNAME).lib: $(OBJS_STAT) $(LIB_ARG)
$(OBJ_BASE)\tools\ares_getopt.obj:
$(CC) $(CFLAGS) -DCARES_STATICLIB .\src\tools\ares_getopt.c -fo=$^@

adig.exe: $(OBJ_BASE)\tools\ares_getopt.obj $(LIBNAME).lib
adig.exe: $(LIBNAME).lib
$(CC) $(CFLAGS) src\tools\adig.c -fo=$(OBJ_BASE)\tools\adig.obj
$(LD) name $^@ system nt $(LFLAGS) file { $(OBJ_BASE)\tools\adig.obj $[@ } library $]@, ws2_32.lib, iphlpapi.lib

Expand Down
2 changes: 1 addition & 1 deletion deps/cares/Makefile.dj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ VPATH = src/lib src/tools
WATT32_ROOT = $(realpath $(WATT_ROOT))
WATT32_LIB = $(WATT32_ROOT)/lib/libwatt.a

CFLAGS = -g -O2 -I./include -I./src/lib \
CFLAGS = -g -O2 -I./include -I./src/lib -I./src/lib/include \
-I$(WATT32_ROOT)/inc \
-Wall \
-Wextra \
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/Makefile.m32
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RANLIB = $(CROSSPREFIX)ranlib
#RM = rm -f
CP = cp -afv

CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -D_WIN32_WINNT=0x0602
CFLAGS = $(CARES_CFLAG_EXTRAS) -O2 -Wall -I./include -I./src/lib -I./src/lib/include -D_WIN32_WINNT=0x0602
CFLAGS += -DCARES_STATICLIB
LDFLAGS = $(CARES_LDFLAG_EXTRAS) -s
LIBS = -lws2_32 -liphlpapi
Expand Down
11 changes: 1 addition & 10 deletions deps/cares/Makefile.msvc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ EX_LIBS_DBG = ws2_32.lib advapi32.lib kernel32.lib iphlpapi.lib

CC_CMD_REL = cl.exe /nologo $(RTLIB) /DNDEBUG /O2
CC_CMD_DBG = cl.exe /nologo $(RTLIBD) /D_DEBUG /Od /Zi /RTCsu
CC_CFLAGS = $(CFLAGS) /D_REENTRANT /I.\src\lib /I.\include /W3 /EHsc /FD
CC_CFLAGS = $(CFLAGS) /D_REENTRANT /I.\src\lib /I.\include /I.\src\lib\include /W3 /EHsc /FD

RC_CMD_REL = rc.exe /l 0x409 /d "NDEBUG"
RC_CMD_DBG = rc.exe /l 0x409 /d "_DEBUG"
Expand Down Expand Up @@ -344,15 +344,6 @@ PROG3_OBJS = $(PROG3_OBJS) $(PROG3_OBJDIR)\ahost.obj
{$(SRCDIR)\src\tools}.c{$(PROG3_OBJDIR)}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$@ /Fd$(PROG3_OBJDIR)\ /c $<

# Hack Alert! we reference ../lib/str files in the Makefile.inc for tools as they
# share some files with the library itself. We need to hack around that here.

{$(SRCDIR)\src\lib\str}.c{$(PROG2_OBJDIR)\..\lib\str}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG2_OBJDIR)\str\$(@F) /Fd$(PROG2_OBJDIR)\str\ /c $<

{$(SRCDIR)\src\lib\str}.c{$(PROG3_OBJDIR)\..\lib\str}.obj:
$(CC_CMD) $(CC_CFLAGS) $(SPROG_CFLAGS) /Fo$(PROG3_OBJDIR)\str\$(@F) /Fd$(PROG3_OBJDIR)\str\ /c $<

# ------------------------------------------------------------- #
# ------------------------------------------------------------- #
# Default target when no CFG library type has been specified, #
Expand Down
9 changes: 7 additions & 2 deletions deps/cares/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ to sign releases):

```bash
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 # Daniel Stenberg
gpg --keyserver hkps://keys.openpgp.org --recv-keys DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA # Brad House
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA # Brad House
```

### Verifying signatures
Expand All @@ -109,8 +109,11 @@ gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048
```

## Features

See [Features](FEATURES.md)

### Supported RFCs and Proposals
- [RFC1035](https://datatracker.ietf.org/doc/html/rfc7873).
- [RFC1035](https://datatracker.ietf.org/doc/html/rfc1035).
Initial/Base DNS RFC
- [RFC2671](https://datatracker.ietf.org/doc/html/rfc2671),
[RFC6891](https://datatracker.ietf.org/doc/html/rfc6891).
Expand Down Expand Up @@ -151,3 +154,5 @@ gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048
IPv6 address sorting as used by `ares_getaddrinfo()`.
- [RFC7413](https://datatracker.ietf.org/doc/html/rfc7413).
TCP FastOpen (TFO) for 0-RTT TCP Connection Resumption.
- [RFC3986](https://datatracker.ietf.org/doc/html/rfc3986).
Uniform Resource Identifier (URI). Used for server configuration.
89 changes: 42 additions & 47 deletions deps/cares/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,60 @@
## c-ares version 1.33.1 - August 23 2024
## c-ares version 1.34.1 - Octover 9 2024

This is a bugfix release.
This release fixes a packaging issue.

Bugfixes:
* Work around systemd-resolved quirk that returns unexpected codes for single
label names. Also adds test cases to validate the work around works and
will continue to work in future releases.
[PR #863](https://github.com/c-ares/c-ares/pull/863),
See Also https://github.com/systemd/systemd/issues/34101
* Fix sysconfig ndots default value, also adds containerized test case to
prevent future regressions.
[PR #862](https://github.com/c-ares/c-ares/pull/862)
* Fix blank DNS name returning error code rather than valid record for
commands like: `adig -t SOA .`. Also adds test case to prevent future
regressions.
[9e574af](https://github.com/c-ares/c-ares/commit/9e574af)
* Fix calculation of query times > 1s.
[2b2eae7](https://github.com/c-ares/c-ares/commit/2b2eae7)
* Fix building on old Linux releases that don't have `TCP_FASTOPEN_CONNECT`.
[b7a89b9](https://github.com/c-ares/c-ares/commit/b7a89b9)
* Fix minor Android build warnings.
[PR #848](https://github.com/c-ares/c-ares/pull/848)

Thanks go to these friendly people for their efforts and contributions for this
release:
* Brad House (@bradh352)
* Erik Lax (@eriklax)
* Hans-Christian Egtvedt (@egtvedt)
* Mikael Lindemann (@mikaellindemann)
* Nodar Chkuaselidze (@nodech)

## c-ares version 1.33.0 - August 2 2024
## c-ares version 1.34.0 - October 9 2024

This is a feature and bugfix release.

Features:
* Add DNS cookie support (RFC7873 + RFC9018) to help prevent off-path cache
poisoning attacks. [PR #833](https://github.com/c-ares/c-ares/pull/833)
* Implement TCP FastOpen (TFO) RFC7413, which will make TCP reconnects 0-RTT
on supported systems. [PR #840](https://github.com/c-ares/c-ares/pull/840)
* adig: read arguments from adigrc.
[PR #856](https://github.com/c-ares/c-ares/pull/856)
* Add new pending write callback optimization via `ares_set_pending_write_cb`.
[PR #857](https://github.com/c-ares/c-ares/pull/857)
* New function `ares_process_fds()`.
[PR #875](https://github.com/c-ares/c-ares/pull/875)
* Failed servers should be probed rather than redirecting queries which could
cause unexpected latency.
[PR #877](https://github.com/c-ares/c-ares/pull/877)
* adig: rework command line arguments to mimic dig from bind.
[PR #890](https://github.com/c-ares/c-ares/pull/890)
* Add new method for overriding network functions
`ares_set_socket_function_ex()` to properly support all new functionality.
[PR #894](https://github.com/c-ares/c-ares/pull/894)
* Fix regression with custom socket callbacks due to DNS cookie support.
[PR #895](https://github.com/c-ares/c-ares/pull/895)
* ares_socket: set IP_BIND_ADDRESS_NO_PORT on ares_set_local_ip* tcp sockets
[PR #887](https://github.com/c-ares/c-ares/pull/887)
* URI parser/writer for ares_set_servers_csv()/ares_get_servers_csv().
[PR #882](https://github.com/c-ares/c-ares/pull/882)

Changes:
* Reorganize source tree. [PR #822](https://github.com/c-ares/c-ares/pull/822)
* Refactoring of connection handling to prevent code duplication.
[PR #839](https://github.com/c-ares/c-ares/pull/839)
* New dynamic array data structure to prevent simple logic flaws in array
handling in various code paths.
[PR #841](https://github.com/c-ares/c-ares/pull/841)
* Connection handling modularization.
[PR #857](https://github.com/c-ares/c-ares/pull/857),
[PR #876](https://github.com/c-ares/c-ares/pull/876)
* Expose library/utility functions to tools.
[PR #860](https://github.com/c-ares/c-ares/pull/860)
* Remove `ares__` prefix, just use `ares_` for internal functions.
[PR #872](https://github.com/c-ares/c-ares/pull/872)


Bugfixes:
* `ares_destroy()` race condition during shutdown due to missing lock.
[PR #831](https://github.com/c-ares/c-ares/pull/831)
* Android: Preserve thread name after attaching it to JVM.
[PR #838](https://github.com/c-ares/c-ares/pull/838)
* Windows UWP (Store) support fix.
[PR #845](https://github.com/c-ares/c-ares/pull/845)
* fix: potential WIN32_LEAN_AND_MEAN redefinition.
[PR #869](https://github.com/c-ares/c-ares/pull/869)
* Fix googletest v1.15 compatibility.
[PR #874](https://github.com/c-ares/c-ares/pull/874)
* Fix pkgconfig thread dependencies.
[PR #884](https://github.com/c-ares/c-ares/pull/884)


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

* Brad House (@bradh352)
* Yauheni Khnykin (@Hsilgos)
* Cristian Rodríguez (@crrodriguez)
* Georg (@tacerus)
* @lifenjoiner
* Shelley Vohr (@codebytere)
* 前进,前进,进 (@leleliu008)

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 Fri Aug 23 09:37:25 EDT 2024
# from AX_AM_MACROS_STATIC on Wed Oct 9 20:58:25 EDT 2024


# Code coverage
Expand Down
Loading
Loading