| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles) | |||
| 12 | 12 | INCLUDE (CheckStructHasMember) | |
| 13 | 13 | INCLUDE (CheckLibraryExists) | |
| 14 | 14 | ||
| 15 | - PROJECT (c-ares LANGUAGES C VERSION "1.34.6" ) | ||
| 15 | + PROJECT (c-ares LANGUAGES C VERSION "1.34.8" ) | ||
| 16 | 16 | ||
| 17 | 17 | # Set this version before release | |
| 18 | 18 | SET (CARES_VERSION "${PROJECT_VERSION}") | |
@@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w | |||
| 30 | 30 | # For example, a version of 4:0:2 would generate output such as: | |
| 31 | 31 | # libname.so -> libname.so.2 | |
| 32 | 32 | # libname.so.2 -> libname.so.2.2.0 | |
| 33 | - SET (CARES_LIB_VERSIONINFO "21:5:19") | ||
| 33 | + SET (CARES_LIB_VERSIONINFO "21:7:19") | ||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | 36 | OPTION (CARES_STATIC "Build as a static library" OFF) | |
@@ -43,6 +43,7 @@ OPTION (CARES_BUILD_TOOLS "Build tools" | |||
| 43 | 43 | OPTION (CARES_SYMBOL_HIDING "Hide private symbols in shared libraries" OFF) | |
| 44 | 44 | OPTION (CARES_THREADS "Build with thread-safety support" ON) | |
| 45 | 45 | OPTION (CARES_COVERAGE "Build for code coverage" OFF) | |
| 46 | + OPTION (CARES_WERROR "Treat compiler warnings on the c-ares library as errors" OFF) | ||
| 46 | 47 | SET (CARES_RANDOM_FILE "/dev/urandom" CACHE STRING "Suitable File / Device Path for entropy, such as /dev/urandom") | |
| 47 | 48 | ||
| 48 | 49 | # Tests require static to be enabled on Windows to be able to access otherwise hidden symbols | |
@@ -54,6 +55,30 @@ ENDIF () | |||
| 54 | 55 | ||
| 55 | 56 | INCLUDE (EnableWarnings) | |
| 56 | 57 | ||
| 58 | + # Optionally treat warnings as errors for the c-ares library itself. This is | ||
| 59 | + # applied per-target (see cares_set_werror() usage) rather than globally so it | ||
| 60 | + # does not affect the test/fuzz harnesses (which carry their own warnings) or | ||
| 61 | + # CMake's own compiler feature checks. Enabled in CI only on toolchains known | ||
| 62 | + # to be free of spurious warnings at our high warning levels. | ||
| 63 | + FUNCTION (cares_set_werror target) | ||
| 64 | + IF (NOT CARES_WERROR) | ||
| 65 | + RETURN () | ||
| 66 | + ENDIF () | ||
| 67 | + IF (MSVC) | ||
| 68 | + TARGET_COMPILE_OPTIONS (${target} PRIVATE /WX) | ||
| 69 | + ELSE () | ||
| 70 | + TARGET_COMPILE_OPTIONS (${target} PRIVATE -Werror) | ||
| 71 | + # Modern libc headers (e.g. glibc <string.h>) use the C11 _Generic | ||
| 72 | + # keyword for const-correctness of strchr()/memchr()/etc. Clang flags | ||
| 73 | + # that as a C11 extension under our C90 + -Wpedantic build even though it | ||
| 74 | + # originates in a system header at our call sites. It is not something | ||
| 75 | + # we can fix in our own code, so warn but do not fail on it. | ||
| 76 | + IF (CMAKE_C_COMPILER_ID MATCHES "Clang") | ||
| 77 | + TARGET_COMPILE_OPTIONS (${target} PRIVATE -Wno-error=c11-extensions) | ||
| 78 | + ENDIF () | ||
| 79 | + ENDIF () | ||
| 80 | + ENDFUNCTION () | ||
| 81 | + | ||
| 57 | 82 | IF (MSVC) | |
| 58 | 83 | # allow linking against the static runtime library in msvc | |
| 59 | 84 | OPTION (CARES_MSVC_STATIC_RUNTIME "Link against the static runtime library" OFF) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | # [](https://c-ares.org/) | |
| 2 | 2 | ||
| 3 | - [](https://cirrus-ci.com/github/c-ares/c-ares) | ||
| 4 | - [](https://ci.appveyor.com/project/c-ares/c-ares/branch/main) | ||
| 3 | + [](https://github.com/c-ares/c-ares/actions/workflows/ubuntu-latest.yml) | ||
| 4 | + [](https://github.com/c-ares/c-ares/actions/workflows/windows.yml) | ||
| 5 | 5 | [](https://coveralls.io/github/c-ares/c-ares?branch=main) | |
| 6 | 6 | [](https://bestpractices.coreinfrastructure.org/projects/291) | |
| 7 | 7 | [](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:c-ares) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,113 @@ | |||
| 1 | + ## c-ares version 1.34.8 - July 7 2026 | ||
| 2 | + | ||
| 3 | + This is a bugfix release. | ||
| 4 | + | ||
| 5 | + Bugfixes: | ||
| 6 | + * Revert "Mark parameters in callbacks as const" which shipped in 1.34.7. | ||
| 7 | + Changing the parameter types of the `ares_callback`, `ares_host_callback`, | ||
| 8 | + and `ares_nameinfo_callback` function pointer typedefs was an unintended | ||
| 9 | + API break: existing applications with the historical non-const callback | ||
| 10 | + signatures no longer compiled, particularly in C++ where function pointer | ||
| 11 | + types must match exactly. The read-only nature of the callback parameters | ||
| 12 | + is now documented instead. | ||
| 13 | + [PR #1244](https://github.com/c-ares/c-ares/pull/1244) | ||
| 14 | + | ||
| 15 | + Thanks go to these friendly people for their efforts and contributions for this | ||
| 16 | + release: | ||
| 17 | + | ||
| 18 | + * Brad House (@bradh352) | ||
| 19 | + | ||
| 20 | + | ||
| 21 | + ## c-ares version 1.34.7 - July 6 2026 | ||
| 22 | + | ||
| 23 | + This is a security release. | ||
| 24 | + | ||
| 25 | + Security: | ||
| 26 | + * CVE-2026-33630. Use-after-free / double-free in c-ares' query-completion | ||
| 27 | + handling, remotely triggerable via ares_getaddrinfo() over TCP. Please see | ||
| 28 | + https://github.com/c-ares/c-ares/security/advisories/GHSA-6wfj-rwm7-3542 | ||
| 29 | + * CPU-exhaustion denial of service via unbounded DNS name compression pointer | ||
| 30 | + chains. Please see | ||
| 31 | + https://github.com/c-ares/c-ares/security/advisories/GHSA-pjmc-gx33-gc76 | ||
| 32 | + * Memory-amplification denial of service via unvalidated DNS header record | ||
| 33 | + counts. Please see | ||
| 34 | + https://github.com/c-ares/c-ares/security/advisories/GHSA-jv8r-gqr9-68wj | ||
| 35 | + | ||
| 36 | + Changes: | ||
| 37 | + * `ares_getaddrinfo()`: handle a NULL node per POSIX and implement | ||
| 38 | + `ARES_AI_PASSIVE`. [PR #1186](https://github.com/c-ares/c-ares/pull/1186) | ||
| 39 | + * Mark parameters in callbacks as const. | ||
| 40 | + [PR #1060](https://github.com/c-ares/c-ares/pull/1060) | ||
| 41 | + * Correct `ARES_CLASS_HESOID` misspelling to `ARES_CLASS_HESIOD`. | ||
| 42 | + [PR #1092](https://github.com/c-ares/c-ares/pull/1092) | ||
| 43 | + | ||
| 44 | + Bugfixes: | ||
| 45 | + * Fix sticky server recovery when all servers have failures. [PR #1192](https://github.com/c-ares/c-ares/pull/1192) | ||
| 46 | + * Fix UDP socket exhaustion regression: retire connections per-connection, not via server failure count. [PR #1197](https://github.com/c-ares/c-ares/pull/1197) | ||
| 47 | + * Guard DNS record binary length overflow. [PR #1168](https://github.com/c-ares/c-ares/pull/1168) | ||
| 48 | + * Prevent integer overflow in allocation size calculations. [PR #1147](https://github.com/c-ares/c-ares/pull/1147) | ||
| 49 | + * Prevent overflow in ares_array allocation size calculations. [PR #1117](https://github.com/c-ares/c-ares/pull/1117) | ||
| 50 | + * Prevent integer overflow in buffer size calculation. [PR #1116](https://github.com/c-ares/c-ares/pull/1116) | ||
| 51 | + * Add overflow checks to ares_buf_ensure_space(). [PR #1094](https://github.com/c-ares/c-ares/pull/1094) | ||
| 52 | + * Skip name compression offsets beyond the 14-bit pointer limit. [PR #1159](https://github.com/c-ares/c-ares/pull/1159) | ||
| 53 | + * ares_dns_parse: reject name compression in RDATA where not permitted (RFC 3597). [PR #1190](https://github.com/c-ares/c-ares/pull/1190) | ||
| 54 | + * ares_dns_parse: reject responses with more than one OPT record (RFC 6891). [PR #1189](https://github.com/c-ares/c-ares/pull/1189) | ||
| 55 | + * Discard oversized UDP datagrams instead of truncating the length frame. [PR #1161](https://github.com/c-ares/c-ares/pull/1161) | ||
| 56 | + * Route numeric config parsing through range-checked ares_str_parse_uint. [PR #1158](https://github.com/c-ares/c-ares/pull/1158) | ||
| 57 | + * Replace atoi-based port parsing with validated helper. [PR #1097](https://github.com/c-ares/c-ares/pull/1097) | ||
| 58 | + * Defer TCP connection error handling until DNS responses are parsed. [PR #1138](https://github.com/c-ares/c-ares/pull/1138) | ||
| 59 | + * Prevent undefined-behavior left shift in ares_calc_query_timeout(). [PR #1151](https://github.com/c-ares/c-ares/pull/1151) | ||
| 60 | + * Use unsigned type for ares_round_up_pow2_u64 to avoid undefined behavior. [PR #1107](https://github.com/c-ares/c-ares/pull/1107) | ||
| 61 | + * Fix undefined behavior in ares_buf_replace() pointer arithmetic. [PR #1099](https://github.com/c-ares/c-ares/pull/1099) | ||
| 62 | + * ares_array: reset offset when array becomes empty. [PR #1165](https://github.com/c-ares/c-ares/pull/1165) | ||
| 63 | + * ares_iface_ips: add ARES_IFACE_IP_NONE zero enum value. [PR #1187](https://github.com/c-ares/c-ares/pull/1187) | ||
| 64 | + * ares_sysconfig_files: recognize AIX netsvc.conf bind4/local4 tokens. [PR #1188](https://github.com/c-ares/c-ares/pull/1188) | ||
| 65 | + * Use safe string construction in Windows sysconfig join path. [PR #1143](https://github.com/c-ares/c-ares/pull/1143) | ||
| 66 | + * Fix zero-length RAW_RR losing type metadata during parsing. [PR #1129](https://github.com/c-ares/c-ares/pull/1129) | ||
| 67 | + * Fix RAW_RR type tostr/fromstr roundtrip mismatch. [PR #1123](https://github.com/c-ares/c-ares/pull/1123) | ||
| 68 | + * Fix NULL dereference for ifa netmask. [PR #1120](https://github.com/c-ares/c-ares/pull/1120) | ||
| 69 | + * adig: fix negated option prefix parsing. [PR #1135](https://github.com/c-ares/c-ares/pull/1135) | ||
| 70 | + * Use UnregisterWaitEx to prevent use-after-free on Win32. [PR #1111](https://github.com/c-ares/c-ares/pull/1111) | ||
| 71 | + * Add NULL check after ares_malloc_zero in Windows UTF8 conversion. [PR #1121](https://github.com/c-ares/c-ares/pull/1121) | ||
| 72 | + * Fix NULL dereference after ares_malloc_zero in Win32 IOCP event add. [PR #1132](https://github.com/c-ares/c-ares/pull/1132) | ||
| 73 | + * Fix microsecond overflow in ares_queue_wait_empty timeout. [PR #1122](https://github.com/c-ares/c-ares/pull/1122) | ||
| 74 | + * Fix NULL dereference in ares_buf_replace() on NULL buf. [PR #1124](https://github.com/c-ares/c-ares/pull/1124) | ||
| 75 | + * Initialize *read_bytes in ares_socket_recvfrom(). [PR #1125](https://github.com/c-ares/c-ares/pull/1125) | ||
| 76 | + * Fix memory leak of binbuf in ares_buf_parse_dns_binstr_int. [PR #1126](https://github.com/c-ares/c-ares/pull/1126) | ||
| 77 | + * Fix memory leak of qcache entry on key allocation failure. [PR #1127](https://github.com/c-ares/c-ares/pull/1127) | ||
| 78 | + * Fix memory leak of buf in ares_dns_multistring_combined() on OOM. [PR #1110](https://github.com/c-ares/c-ares/pull/1110) | ||
| 79 | + * Fix memory leaks on error paths in two functions. [PR #1109](https://github.com/c-ares/c-ares/pull/1109) | ||
| 80 | + * Fix memory leak of buckets in ares_htable_dict_keys() error path. [PR #1108](https://github.com/c-ares/c-ares/pull/1108) | ||
| 81 | + * Fix memory leak of bucket->key in ares_htable_dict_insert error path. [PR #1105](https://github.com/c-ares/c-ares/pull/1105) | ||
| 82 | + * Fix additional memory leaks. [PR #1091](https://github.com/c-ares/c-ares/pull/1091) [PR #1078](https://github.com/c-ares/c-ares/pull/1078) | ||
| 83 | + * Prevent corrupt addrinfo nodes on sockaddr allocation failure. [PR #1112](https://github.com/c-ares/c-ares/pull/1112) | ||
| 84 | + * Fix two logic bugs in DNS cookie handling. [PR #1103](https://github.com/c-ares/c-ares/pull/1103) | ||
| 85 | + * Fix linked list INSERT_BEFORE corruption and array insertdata_first ordering. [PR #1101](https://github.com/c-ares/c-ares/pull/1101) | ||
| 86 | + * Fix HASH_IDX macro missing parentheses. [PR #1128](https://github.com/c-ares/c-ares/pull/1128) | ||
| 87 | + * Fix malloc(0) in ares_htable_all_buckets on empty table. [PR #1131](https://github.com/c-ares/c-ares/pull/1131) | ||
| 88 | + * Fix wrong sizeof in QNX confstr() call truncating domain names. [PR #1130](https://github.com/c-ares/c-ares/pull/1130) | ||
| 89 | + * Clear probe pending flag after timeout. [PR #1059](https://github.com/c-ares/c-ares/pull/1059) | ||
| 90 | + * Fix incorrect check for empty wide string. [PR #1064](https://github.com/c-ares/c-ares/pull/1064) | ||
| 91 | + * Handle strdup failure. [PR #1077](https://github.com/c-ares/c-ares/pull/1077) | ||
| 92 | + * doc: reference ares_free_string(), not ares_free(). [PR #1084](https://github.com/c-ares/c-ares/pull/1084) | ||
| 93 | + | ||
| 94 | + Thanks go to these friendly people for their efforts and contributions for this | ||
| 95 | + release: | ||
| 96 | + | ||
| 97 | + * (@Alb3e3) | ||
| 98 | + * Brad House (@bradh352) | ||
| 99 | + * (@dankmeme01) | ||
| 100 | + * David Hotham (@dimbleby) | ||
| 101 | + * Tom Flynn (@Flynnzaa) | ||
| 102 | + * (@jmestwa-coder) | ||
| 103 | + * (@kodareef5) | ||
| 104 | + * Kaixuan Li (@MarkLee131) | ||
| 105 | + * (@lifenjoiner) | ||
| 106 | + * (@metsw24-max) | ||
| 107 | + * Song Li (@SongTonyLi) | ||
| 108 | + * (@uwezkhan) | ||
| 109 | + | ||
| 110 | + | ||
| 1 | 111 | ## c-ares version 1.34.6 - December 8 2025 | |
| 2 | 112 | ||
| 3 | 113 | This is a security release. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | ||
| 2 | 2 | # aminclude_static.am generated automatically by Autoconf | |
| 3 | - # from AX_AM_MACROS_STATIC on Mon Dec 8 16:21:41 UTC 2025 | ||
| 3 | + # from AX_AM_MACROS_STATIC on Tue Jul 7 16:14:13 UTC 2026 | ||
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | 6 | # Code coverage | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | #! /bin/sh | |
| 2 | 2 | # Guess values for system-dependent variables and create Makefiles. | |
| 3 | - # Generated by GNU Autoconf 2.71 for c-ares 1.34.6. | ||
| 3 | + # Generated by GNU Autoconf 2.71 for c-ares 1.34.8. | ||
| 4 | 4 | # | |
| 5 | 5 | # Report bugs to <c-ares mailing list: http://lists.haxx.se/listinfo/c-ares>. | |
| 6 | 6 | # | |
@@ -621,8 +621,8 @@ MAKEFLAGS= | |||
| 621 | 621 | # Identity of this package. | |
| 622 | 622 | PACKAGE_NAME='c-ares' | |
| 623 | 623 | PACKAGE_TARNAME='c-ares' | |
| 624 | - PACKAGE_VERSION='1.34.6' | ||
| 625 | - PACKAGE_STRING='c-ares 1.34.6' | ||
| 624 | + PACKAGE_VERSION='1.34.8' | ||
| 625 | + PACKAGE_STRING='c-ares 1.34.8' | ||
| 626 | 626 | PACKAGE_BUGREPORT='c-ares mailing list: http://lists.haxx.se/listinfo/c-ares' | |
| 627 | 627 | PACKAGE_URL='' | |
| 628 | 628 | ||
@@ -1430,7 +1430,7 @@ if test "$ac_init_help" = "long"; then | |||
| 1430 | 1430 | # Omit some internal or obsolete options to make the list less imposing. | |
| 1431 | 1431 | # This message is too long to be a string in the A/UX 3.1 sh. | |
| 1432 | 1432 | cat <<_ACEOF | |
| 1433 | - \`configure' configures c-ares 1.34.6 to adapt to many kinds of systems. | ||
| 1433 | + \`configure' configures c-ares 1.34.8 to adapt to many kinds of systems. | ||
| 1434 | 1434 | ||
| 1435 | 1435 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
| 1436 | 1436 | ||
@@ -1501,7 +1501,7 @@ fi | |||
| 1501 | 1501 | ||
| 1502 | 1502 | if test -n "$ac_init_help"; then | |
| 1503 | 1503 | case $ac_init_help in | |
| 1504 | - short | recursive ) echo "Configuration of c-ares 1.34.6:";; | ||
| 1504 | + short | recursive ) echo "Configuration of c-ares 1.34.8:";; | ||
| 1505 | 1505 | esac | |
| 1506 | 1506 | cat <<\_ACEOF | |
| 1507 | 1507 | ||
@@ -1647,7 +1647,7 @@ fi | |||
| 1647 | 1647 | test -n "$ac_init_help" && exit $ac_status | |
| 1648 | 1648 | if $ac_init_version; then | |
| 1649 | 1649 | cat <<\_ACEOF | |
| 1650 | - c-ares configure 1.34.6 | ||
| 1650 | + c-ares configure 1.34.8 | ||
| 1651 | 1651 | generated by GNU Autoconf 2.71 | |
| 1652 | 1652 | ||
| 1653 | 1653 | Copyright (C) 2021 Free Software Foundation, Inc. | |
@@ -2271,7 +2271,7 @@ cat >config.log <<_ACEOF | |||
| 2271 | 2271 | This file contains any messages produced by compilers while | |
| 2272 | 2272 | running configure, to aid debugging if configure makes a mistake. | |
| 2273 | 2273 | ||
| 2274 | - It was created by c-ares $as_me 1.34.6, which was | ||
| 2274 | + It was created by c-ares $as_me 1.34.8, which was | ||
| 2275 | 2275 | generated by GNU Autoconf 2.71. Invocation command line was | |
| 2276 | 2276 | ||
| 2277 | 2277 | $ $0$ac_configure_args_raw | |
@@ -3245,7 +3245,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu | |||
| 3245 | 3245 | ||
| 3246 | 3246 | ||
| 3247 | 3247 | ||
| 3248 | - CARES_VERSION_INFO="21:5:19" | ||
| 3248 | + CARES_VERSION_INFO="21:7:19" | ||
| 3249 | 3249 | ||
| 3250 | 3250 | ||
| 3251 | 3251 | ||
@@ -6818,7 +6818,7 @@ fi | |||
| 6818 | 6818 | ||
| 6819 | 6819 | # Define the identity of the package. | |
| 6820 | 6820 | PACKAGE='c-ares' | |
| 6821 | - VERSION='1.34.6' | ||
| 6821 | + VERSION='1.34.8' | ||
| 6822 | 6822 | ||
| 6823 | 6823 | ||
| 6824 | 6824 | printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h | |
@@ -28238,7 +28238,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |||
| 28238 | 28238 | # report actual input values of CONFIG_FILES etc. instead of their | |
| 28239 | 28239 | # values after options handling. | |
| 28240 | 28240 | ac_log=" | |
| 28241 | - This file was extended by c-ares $as_me 1.34.6, which was | ||
| 28241 | + This file was extended by c-ares $as_me 1.34.8, which was | ||
| 28242 | 28242 | generated by GNU Autoconf 2.71. Invocation command line was | |
| 28243 | 28243 | ||
| 28244 | 28244 | CONFIG_FILES = $CONFIG_FILES | |
@@ -28306,7 +28306,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ | |||
| 28306 | 28306 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 28307 | 28307 | ac_cs_config='$ac_cs_config_escaped' | |
| 28308 | 28308 | ac_cs_version="\\ | |
| 28309 | - c-ares config.status 1.34.6 | ||
| 28309 | + c-ares config.status 1.34.8 | ||
| 28310 | 28310 | configured by $0, generated by GNU Autoconf 2.71, | |
| 28311 | 28311 | with options \\"\$ac_cs_config\\" | |
| 28312 | 28312 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,10 +2,10 @@ dnl Copyright (C) The c-ares project and its contributors | |||
| 2 | 2 | dnl SPDX-License-Identifier: MIT | |
| 3 | 3 | AC_PREREQ([2.69]) | |
| 4 | 4 | ||
| 5 | - AC_INIT([c-ares], [1.34.6], | ||
| 5 | + AC_INIT([c-ares], [1.34.8], | ||
| 6 | 6 | [c-ares mailing list: http://lists.haxx.se/listinfo/c-ares]) | |
| 7 | 7 | ||
| 8 | - CARES_VERSION_INFO="21:5:19" | ||
| 8 | + CARES_VERSION_INFO="21:7:19" | ||
| 9 | 9 | dnl This flag accepts an argument of the form current[:revision[:age]]. So, | |
| 10 | 10 | dnl passing -version-info 3:12:1 sets current to 3, revision to 12, and age to | |
| 11 | 11 | dnl 1. | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -140,7 +140,7 @@ DNS Classes for requests and responses: | |||
| 140 | 140 | .B ARES_CLASS_CHAOS | |
| 141 | 141 | - CHAOS | |
| 142 | 142 | .br | |
| 143 | - .B ARES_CLASS_HESOID | ||
| 143 | + .B ARES_CLASS_HESIOD | ||
| 144 | 144 | - Hesoid [Dyer 87] | |
| 145 | 145 | .br | |
| 146 | 146 | .B ARES_CLASS_NONE | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -27,6 +27,19 @@ The | |||
| 27 | 27 | and | |
| 28 | 28 | .I service | |
| 29 | 29 | parameters give the hostname and service as NULL-terminated C strings. | |
| 30 | + Either | ||
| 31 | + .I name | ||
| 32 | + or | ||
| 33 | + .I service | ||
| 34 | + may be NULL, but not both. If | ||
| 35 | + .I name | ||
| 36 | + is NULL, the returned addresses are synthesized from | ||
| 37 | + .IR service : | ||
| 38 | + the wildcard address (0.0.0.0 or ::) is returned when | ||
| 39 | + .B ARES_AI_PASSIVE | ||
| 40 | + is set in | ||
| 41 | + .IR ai_flags , | ||
| 42 | + otherwise the loopback address (127.0.0.1 or ::1) is returned. | ||
| 30 | 43 | The | |
| 31 | 44 | .I hints | |
| 32 | 45 | parameter is an | |
@@ -63,6 +76,16 @@ If this option is set | |||
| 63 | 76 | .I service | |
| 64 | 77 | field will be treated as a numeric value. | |
| 65 | 78 | .TP 19 | |
| 79 | + .B ARES_AI_PASSIVE | ||
| 80 | + If this option is set and | ||
| 81 | + .I name | ||
| 82 | + is NULL, the returned addresses will use the wildcard address (0.0.0.0 or ::), | ||
| 83 | + suitable for | ||
| 84 | + .BR bind (2)ing | ||
| 85 | + a socket that will accept connections. If not set and | ||
| 86 | + .I name | ||
| 87 | + is NULL, the loopback address (127.0.0.1 or ::1) is returned instead. | ||
| 88 | + .TP 19 | ||
| 66 | 89 | .B ARES_AI_CANONNAME | |
| 67 | 90 | The ares_addrinfo structure will return a canonical names list. | |
| 68 | 91 | .TP 19 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -80,7 +80,16 @@ points to a | |||
| 80 | 80 | containing the name of the host returned by the query. The callback | |
| 81 | 81 | need not and should not attempt to free the memory pointed to by | |
| 82 | 82 | .IR hostent ; | |
| 83 | - the ares library will free it when the callback returns. If the query | ||
| 83 | + the ares library will free it when the callback returns. The callback | ||
| 84 | + .B must not | ||
| 85 | + modify the | ||
| 86 | + .B struct hostent | ||
| 87 | + or retain a reference to it after returning; it is owned by c-ares and is only | ||
| 88 | + valid for the duration of the callback. The parameter is intentionally not | ||
| 89 | + declared | ||
| 90 | + .B const | ||
| 91 | + solely to preserve API/ABI compatibility with existing applications. | ||
| 92 | + If the query | ||
| 84 | 93 | did not complete successfully, | |
| 85 | 94 | .I hostent | |
| 86 | 95 | will be | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -88,7 +88,16 @@ points to a | |||
| 88 | 88 | containing the name of the host returned by the query. The callback | |
| 89 | 89 | need not and should not attempt to free the memory pointed to by | |
| 90 | 90 | .IR hostent ; | |
| 91 | - the ares library will free it when the callback returns. If the query | ||
| 91 | + the ares library will free it when the callback returns. The callback | ||
| 92 | + .B must not | ||
| 93 | + modify the | ||
| 94 | + .B struct hostent | ||
| 95 | + or retain a reference to it after returning; it is owned by c-ares and is only | ||
| 96 | + valid for the duration of the callback. The parameter is intentionally not | ||
| 97 | + declared | ||
| 98 | + .B const | ||
| 99 | + solely to preserve API/ABI compatibility with existing applications. | ||
| 100 | + If the query | ||
| 92 | 101 | did not complete successfully, | |
| 93 | 102 | .I hostent | |
| 94 | 103 | will be | |
| Back | FazBrowse Home | New Git URL |
0 commit comments