1 Changelog for the c-ares project. Generated with git2changes.pl
3 Version 1.18.1 (26 Oct 2021)
10 - ares_getaddrinfo() was returning the wrong size for ai_addrlen
12 ai_addrlen was erroneously returning 16 bytes instead of the
13 sizeof(struct sockaddr_in6). This is a regression introduced
16 Reported by: James Brown <jbrown@easypost.com>
17 Fix By: Brad House (@bradh352)
19 - Windows: autotools force linking to iphlpapi
22 - [Gregor Jasny brought this change]
24 Fix typo detected by lintian (#434)
26 typo in docs for ares_parse_uri_reply
28 Fix By: Gregor Jasny (@gjasny)
30 Version 1.18.0 (25 Oct 2021)
32 bradh352 (25 Oct 2021)
33 - replace Travis badge with Cirrus-CI badge
35 - c-ares 1.18.0 release prep
38 - [Jérôme Duval brought this change]
42 Port for Haiku. Slight CMake changes, header changes, and resolv.conf/hosts paths specific to Haiku.
44 Port By: Jérôme Duval (@korli)
46 bradh352 (19 Oct 2021)
47 - valgrind: fix reported invalid read
49 - make sure distcheck runs
51 - detect oddities and skip test if necessary
53 - fix null ptr deref in strlen
55 - bend over backwards for testing file access, something is weird on debian
57 - chmod(fn, 0) is failing on debian
59 - maybe process needs to be called
63 - clean up a couple of compiler warnings
65 - use helper function for addrinfo to simplify code
67 - INSTANTIATE_TEST_CASE_P -> INSTANTIATE_TEST_SUITE_P as new convention in googletest
69 - gmock: update from 1.8.0 to 1.11.0
71 - Cirrus-CI: fix debian arm build
73 - Cirrus-CI: more updates for proper testing
75 - install proper packages for asan and analyze
79 - try to disable container tests
81 - need g++ for tests on debian
87 - start bringing up cirrus-ci
89 - prep for adding new ci
91 - fix cut and paste error
94 - [Brad House brought this change]
96 RFC6761: special case "localhost" (#430)
98 As per RFC6761 Section 6.3, "localhost" lookups need to be special cased to return loopback addresses, and not forward queries to recursive dns servers.
100 We first look up via files (/etc/hosts or equivalent), and if that fails, we then attempt a system-specific address enumeration for loopback addresses (currently Windows-only), and finally fallback to ::1 and 127.0.0.1.
102 Fix By: Brad House (@bradh352)
105 - [Brad House brought this change]
107 Reimplement ares_gethostbyname() by wrapping ares_getaddrinfo() (#428)
109 ares_gethostbyname() and ares_getaddrinfo() do a lot of similar things, however ares_getaddrinfo() has some desirable behaviors that should be imported into ares_gethostbyname(). For one, it sorts the address lists for the most likely to succeed based on the current system routes. Next, when AF_UNSPEC is specified, it properly handles search lists instead of first searching all of AF_INET6 then AF_INET, since ares_gethostbyname() searches in parallel. Therefore, this PR should also resolve the issues attempted in #94.
111 A few things this PR does:
113 1. ares_parse_a_reply() and ares_parse_aaaa_reply() had very similar code to translate struct ares_addrinfo into a struct hostent as well as into struct ares_addrttl/ares_addr6ttl this has been split out into helper functions of ares__addrinfo2hostent() and ares__addrinfo2addrttl() to prevent this duplicative code.
115 2. ares_getaddrinfo() was apparently never honoring HOSTALIASES, and this was discovered once ares_gethostbyname() was turned into a wrapper, the affected test cases started failing.
117 3. A slight API modification to save the query hostname into struct ares_addrinfo as the last element of name. Since this is the last element, and all user-level instances of struct ares_addrinfo are allocated internally by c-ares, this is not an ABI-breaking change nor would it impact any API compatibility. This was needed since struct hostent has an h_name element.
119 4. Test Framework: MockServer tests via TCP would fail if more than 1 request was received at a time which is common when ares_getaddrinfo() queries for both A and AAAA records simultaneously. Infact, this was a long standing issue in which the ares_getaddrinfo() test were bypassing TCP alltogether. This has been corrected, the message is now processed in a loop.
121 5. Some tests had to be updated for overall correctness as they were invalid but somehow passing prior to this change.
123 Change By: Brad House (@bradh352)
125 bradh352 (9 Oct 2021)
126 - ares_getaddrinfo() missing sanity check to fix #426
128 - ares_getaddrinfo(): continue to next domain in search if query returns ARES_ENODATA
130 Some DNS servers may behave badly and return a valid response with no data, in this
131 case, continue on to the next search domain, but cache the result.
134 Fix By: Brad House (@bradh352)
136 - Allow '/' as a valid character for a returned name
138 As of c-ares 1.17.2, a CNAME an in-addr.arpa delegation broke due
139 to not allowing '/'. This needs to be allowed to not break valid
143 Reported By: Adrian (@leftshift)
144 Fix By: Brad House (@bradh352)
146 Daniel Stenberg (5 Oct 2021)
147 - libcares.pc.in: update the URL
149 bradh352 (8 Sep 2021)
150 - ares_expand_name should allow underscores (_) as SRV records legitimately use them
152 c-ares 1.17.2 introduced response validation to prevent a security issue, however
153 it did not have (_) listed as a valid character for domain name responses which
154 caused issues when a CNAME referenced a SRV record which contained underscores.
156 While RFC2181 section 11 does explicitly state not to do validation, that applies
157 to servers not clients.
160 Fix By: Brad House (@bradh352)
162 Daniel Stenberg (7 Sep 2021)
163 - domain: update to use c-ares.org
167 - mailing list: moved to lists.haxx.se
170 - [Biswapriyo Nath brought this change]
172 CMake: Fix build in cygwin (#422)
174 As cygwin environment has both socket.h and winsock2.h headers check WIN32 not to include the later one here
176 Fix By: Biswapriyo Nath (@Biswa96)
178 bradh352 (23 Aug 2021)
179 - make building more verbose
181 - add appveyor cmake/mingw static-only build
184 - [Sinan Kaya brought this change]
186 CMake: lower case advapi32 for cross-building with mingw (#420)
188 When cross compiling with yocto's meta-mingw layer, getting a dependency
191 This is caused by the fact that advapi32 is lower case in mingw builds.
193 Fix By: Sinan Kaya <sinan.kaya@microsoft.com>
195 bradh352 (17 Aug 2021)
196 - autotools: add ax_check_gnu_make.m4
198 - autotools: add ax_require_defined.m4
200 - autotools: dont use newer AC_CHECK_INCLUDES_DEFAULT, don't quote AC_ERROR_MSG
202 - import more files needed by newer ax_code_coverage.m4
204 - import more files needed by newer ax_code_coverage.m4
206 - work around autoreconf -fiv first call returning 'error: too many loops'
208 - restore zz40-xc-ovr.m4
210 - autotools: processed configure.ac through autoupdate
212 - autotools. update ax_code_coverage.m4 to latest. don't use deprecated AC_HELP_STRING
214 - pull out some old autotools cruft
217 - [Felix Yan brought this change]
219 Provide ares_nameser.h as a public interface (#417)
221 NodeJS needs ares_nameser.h as a pubic header.
224 Fix By: Felix Yan (@felixonmars)
226 - [Felix Yan brought this change]
228 Fix building when latest ax_code_coverage.m4 is imported (#418)
230 ax_code_coverage.m4 dropped the @CODE_COVERAGE_RULES@ macro, so we need to switch to the latest recommendation from the m4 file. This requires updates to Makefile.am.
232 Fix By: Felix Yan (@felixonmars)
234 bradh352 (12 Aug 2021)
235 - bump version to match current release
238 - [dhrumilrana brought this change]
240 z/OS minor update, add missing semicolon in ares_init.c (#414)
244 Fix by: Dhrumil Rana (@dhrumilrana)
246 - [Daniel Bevenius brought this change]
248 add build to .gitignore (#410)
250 This commit adds the build directory to be ignored by git.
252 The motivation for adding this to .gitignore as opposed to
253 .git/info/exclude is that the CMake example in INSTALL.md uses build
254 as the name of the directory to be used by CMake. This will cause
255 git to report build as an untracked file.
257 Fix By: Daniel Bevenius (@danbev)
259 - [Martin Holeš brought this change]
261 Add support for URI(Uniform Resource Identifier) records. (#411)
263 Add ares_parse_uri_reply() for parsing URI DNS replies.
265 Fix By: Martin Holeš (@martin-256)
267 Daniel Stenberg (10 Aug 2021)
268 - ares_getaddrinfo.3: available since 1.16.0
270 - README.md: use https:// links
272 Version 1.17.2 (24 Jul 2021)
274 bradh352 (24 Jul 2021)
277 - prep for 1.17.2 release
280 - [jeanpierrecartal brought this change]
282 Replace strdup() with ares_strdup() (#408)
284 strdup() is used in src/lib/ares_parse_a_reply.c and src/lib/ares_parse_aaaa_reply.c whereas allocated memory is freed using ares_free().
287 Fix By: Jean-pierre Cartal (@jeanpierrecartal)
289 - [Brad House brought this change]
291 Validate hostnames in DNS responses and discard from malicious servers (#406)
293 To prevent possible users having XSS issues due to intentionally malformed DNS replies, validate hostnames returned in responses and return EBADRESP if they are not valid.
295 It is not clear what legitimate issues this may cause at this point.
297 Bug Reported By: philipp.jeitner@sit.fraunhofer.de
298 Fix By: Brad House (@bradh352)
300 bradh352 (11 Jun 2021)
301 - ares_expand_name(): fix formatting and handling of root name response
303 Fixes issue introduced in prior commit with formatting and handling
304 of parsing a root name response which should not be escaped.
308 - ares_expand_name() should escape more characters
310 RFC1035 5.1 specifies some reserved characters and escaping sequences
311 that are allowed to be specified. Expand the list of reserved characters
312 and also escape non-printable characters using the \DDD format as
313 specified in the RFC.
315 Bug Reported By: philipp.jeitner@sit.fraunhofer.de
316 Fix By: Brad House (@bradh352)
319 - [HALX99 brought this change]
321 Fix can't get dns server on macos and ios (#401)
323 If DNS configuration didn't include search domains on MacOS (or iOS) it would throw an error instead of ignoring.
327 - [catalinh-bd brought this change]
329 Bugfix/crash in ares sortaddrinfo (#400)
331 The bug was generated because there was no check for the number
332 of items in the list and invalid memory was accesed when the list
333 was empty. There is a check for null after calling malloc but on
334 some systems it always returns a valid address for size equals 0.
335 Relates To: #392, 0903dcecabca283d0fa771632892dc7592b7a66d
339 bradh352 (2 Mar 2021)
340 - Null deref if ares_getaddrinfo() is terminated with ares_destroy()
342 ares_freeaddrinfo() was not checking for a Null ptr during cleanup of
345 Once that was resolved it uncovered another possible issue with
346 multiple simultaneous underlying queries being outstanding and
347 possibly prematurely cleaning up the handle.
349 Reported By: Michael Kourlas
350 Fix By: Brad House (@bradh352)
353 - [Brad House brought this change]
355 CMake: RANDOM_FILE not defined #397
357 RANDOM_FILE was never defined by cmake, causing RC4 key generation to use the less secure rand() method.
359 Also, due to clashes with chain-building from other projects (e.g. curl) that may define RANDOM_FILE, this was renamed to CARES_RANDOM_FILE.
361 This is the proposed change for #396
363 Fix By: Brad House (@bradh352)
365 - [Anton Danielsson brought this change]
367 CMake: fix Make install for iOS/MacOS (#395)
369 INSTALL TARGETS were missing the BUNDLE DESTINATION
371 Fix By: Anton Danielsson (@anton-danielsson)
373 - [František Dvořák brought this change]
375 Fix build with autotools out of source tree (#394)
377 Add missing include directory, which fixes the build with autotools in separated build directory.
379 Fix By: František Dvořák (@valtri)
381 bradh352 (15 Jan 2021)
382 - fuzzing: HAVE_CONFIG_H may not be defined so cannot include ares_setup.h. Its not needed even though we include ares_nameser.h
384 - remove redundant header checks
386 - properly detect netinet/tcp.h on openbsd
388 - more portability updates
390 - renamed nameser.h to ares_nameser.h requires Makefile.inc update for distributed files
392 - more portability updates
396 - portability updates for test cases
398 - Portability Updates for arpa/nameser.h (#388)
400 There is too much inconsistency between platforms for arpa/nameser.h and arpa/nameser_compat.h for the way the current files are structured. Still load the respective system files but make our private nameser.h more forgiving.
403 Fix By: Brad House (@bradh352)
405 - ares_parse_ptr_reply() handle NULL for addr/addr_len. Fixes #392
407 NodeJS passes NULL for addr and 0 for addrlen parameters to ares_parse_ptr_reply(). On systems where malloc(0) returned NULL, this would cause the function to return ARES_ENOMEM, but the cleanup wasn't handled properly and would crash.
409 This patche fixes that bug, and also hardens ares_free_hostent() to not leak memory during cleanup.
412 Fix By: Brad House (@bradh352)
414 - Define behavior of malloc(0)
416 Some systems may return either NULL or a valid pointer on malloc(0). c-ares should never call malloc(0) so lets return NULL so we're more likely to find an issue if it were to occur.
419 - [dhrumilrana brought this change]
425 Fix By: Dhrumil Rana (@dhrumilrana)
427 - [vburdo brought this change]
429 Use unbuffered stdio for /dev/urandom to read only requested data (#391)
431 Buffered fread() reads 4096 bytes which is completely unnecessary and potentially may cause problems.
432 I discovered this on private linux configuration where custom /dev/urandom implementation has poor performance.
436 - [Jay Freeman (saurik) brought this change]
438 This relative header #include needs to use quotes. (#386)
440 Fix By: Jay Freeman (@saurik)
442 bradh352 (23 Nov 2020)
443 - Win32: Fix tools build with autotools static library
444 When c-ares is being built as static on Win32, CARES_STATICLIB must
445 be defined, but it wasn't being pulled in for the tools.
448 Fix By: Brad House (@bradh352)
450 - Loosen requirements for static c-ares library when building tests
452 It appears that when building tests, it would hardcode enabling building
453 of the c-ares static library. This was probably due to Windows limitations
454 in symbol visibility.
456 This change will use the static library if it exists for tests, always.
457 Otherwise, it will only forcibly enable static libraries for tests on
461 Fix By: Brad House (@bradh352)
463 - Remove legacy comment about ahost/acountry/adig targets
465 - Distribute fuzzinput/fuzznames for fuzz tests
467 The fuzz test files were not being distributed. This doesn't appear to be
468 a regression, it looks like they have never been distributed.
471 Fix By: Brad House (@bradh352)
473 Version 1.17.1 (19 Nov 2020)
476 - [Brad House brought this change]
478 Travis: add iOS target built with CMake (#378)
480 Issue #377 suggested that CMake builds for iOS with c-ares were broken. This PR adds an automatic Travis build for iOS CMake.
482 Fix By: Brad House (@bradh352)
484 bradh352 (18 Nov 2020)
488 - [Fabrice Fontaine brought this change]
490 External projects were using non-public header ares_dns.h, make public again (#376)
492 It appears some outside projects were relying on macros in ares_dns.h, even though it doesn't appear that header was ever meant to be public. That said, we don't want to break external integrators so we should distribute this header again.
494 Fix By: Fabrice Fontaine (@ffontaine)
496 bradh352 (17 Nov 2020)
497 - note that so versioning has moved to configure.ac
504 - [Daniel Stenberg brought this change]
506 autotools cleanup (#372)
508 * remove: install-sh mkinstalldirs
510 They're generated when needed, no need to store in it.
512 * buildconf: remove custom logic with autoreconf
514 Fix By: Daniel Stenberg (@bagder)
516 bradh352 (17 Nov 2020)
517 - attempt to fix 1.17.0 release distribution issues
519 Version 1.17.0 (16 Nov 2020)
521 bradh352 (16 Nov 2020)
522 - 1.17.0 release prep
524 - ares_getaddrinfo(): duplicate hints ai_socktype and ai_protocol into output
526 ai_socktype and ai_protocol were ignored from the hints input. They are now
527 duplicated into the output as expected. Currently no sanity checks on
528 proper values are taking place.
531 Fix By: Brad House (@bradh352)
533 - ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in
535 If there are more ttls returned than the maximum provided by the requestor, then
536 the *naddrttls response would be larger than the actual number of elements in
539 This bug could lead to invalid memory accesses in applications using c-ares.
541 This behavior appeared to break with PR #257
544 Reported By: Momtchil Momtchev (@mmomtchev)
545 Fix By: Brad House (@bradh352)
548 - [Dustin Lundquist brought this change]
550 docs: ares_set_local_ip4() uses host byte order (#368)
552 Properly document brain-dead behavior of ares_set_local_ip4() using host byte order instead of expected network byte order.
554 Fix By: Dustin Lundquist <d.lundquist@tempered.io>
556 - [Łukasz Marszał brought this change]
558 empty hquery->name could lead to invalid memory access (#367)
560 If hquery->name is empty (=="\0"), &hquery->name[strlen(hquery->name)-1] would point to "random" place in memory. This is causing some of my address sanitizer tests to fail.
562 Fix By: Łukasz Marszał (@lmarszal)
564 bradh352 (28 Sep 2020)
565 - Fix OSSFuzz reported issue in CAA reply parsing
567 OSS-Fuzz is reporting a use-of-uninitialized-value:
568 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26012
570 Reported By: David Drysdale (@daviddrysdale)
573 - [David Hotham brought this change]
575 fuzz CAA parsing (#363)
577 Add fuzz support for CAA parsing
579 Fix By: David Hotham (@dimbleby)
581 - [Daniela Sonnenschein brought this change]
583 Allow parsing of CAA Resource Record (#360)
585 CAA (Certification Authority Authorization) was introduced in RFC 6844.
586 This has been obsoleted by RFC 8659. This commit added the possibility
587 to query CAA resource records with adig and adds a parser for CAA
588 records, that can be used in conjunction with ares_query(3).
591 Fix By: Daniela Sonnenschein (@lxdicted)
593 Daniel Stenberg (17 Sep 2020)
594 - docs: remove the html and pdf make targets
596 They're rarely used in our daily work flow and mostly just add friction,
600 bradh352 (14 Sep 2020)
601 - ares_process needs to always include nameser.h as it has compat
603 - Define T_OPT if system doesn't provide it
606 - [Gisle Vanem brought this change]
608 Change the mailman links (#358)
610 Links when wrapping become misleading. Insert newline to prevent wrapping.
612 Fix By: Gisle Vanem (@gvanem)
614 - [Gisle Vanem brought this change]
616 [adig] Update man-page for the '-x' option (#357)
618 Fix By: Gisle Vanem (@gvanem)
620 - [Gisle Vanem brought this change]
622 [adig] add '-x' option. (#356)
624 Added a 'dig-style' '-x' option. Also support '-xx' for a
625 IPv6 bit-string PTR query.
627 Fix By: Gisle Vanem (@gvanem)
629 bradh352 (12 Sep 2020)
635 - [Gisle Vanem brought this change]
637 Fixes for Watt-32 on djgpp + Windows (#355)
639 No longer any relation to libcurl since '<libcurl-root>/packages/DOS/common.dj' is dropped.
640 This Makefile.dj has been tested on Win-10 only (using the Windows hosted djgpp cross compiler).
642 Fix By: Gisle Vanem (@gvanem)
644 - [Gisle Vanem brought this change]
646 Fixes for Watt-32 on Windows and MSDOS (#354)
648 Move the prototype to 'ares_private.h'.
650 Fix By: Gisle Vanem (@gvanem)
652 bradh352 (11 Sep 2020)
653 - update path for include
655 - remove stale information
657 - remove stale information
659 Brad House (9 Sep 2020)
660 - silence compiler warnings
662 - Remove stale msvc files from makefile
665 - [Brad House brought this change]
667 Reorganize source tree (#349)
669 Originally started by Daniel Stenberg (@bagder) with #123, this patch reorganizes the c-ares source tree to have a more modern layout. It also fixes out of tree builds for autotools, and automatically builds the tests if tests are enabled. All tests are passing which tests each of the supported build systems (autotools, cmake, nmake, mingw gmake). There may be some edge cases that will have to be caught later on for things I'm not aware of.
671 Fix By: Brad House (@bradh352)
673 Brad House (1 Sep 2020)
674 - remove CURLDEBUG as per #82
677 - [Erik Lax brought this change]
679 Detect remote DNS server does not support EDNS as per RFC 6891 (#244)
681 EDNS retry should be based on FORMERR returned without an OPT RR record as per https://tools.ietf.org/html/rfc6891#section-7 rather than just treating any unexpected error condition as a reason to disable EDNS on the channel.
683 Fix By: Erik Lax (@eriklax)
685 Brad House (27 Aug 2020)
686 - Fix for #345, don't use 'true' use 1
689 - [Seraphime Kirkovski brought this change]
691 ares_gethostbyname: Fix AF_UNSPEC support when using an ip address (#204)
693 fake_hostent() was not supporting AF_UNSPEC, so when an ip address was specified when using AF_UNSPEC it would attempt to do a DNS lookup rather than returning a fake hostent using the ip address.
695 Fix By: Seraphime Kirkovski (@Seraphime)
697 - [apenn-msft brought this change]
699 Tests should use dynamic system-assigned ports rather than static port (#346)
701 The c-ares test suite was hardcoded to use port 5300 (and possibly 5301, 5302) for the test suite. Especially in containers, there may be no guarantee these ports are available and cause tests to fail when they could otherwise succeed. Instead, request the system to assign a port to use dynamically. This is now the default. To override, the test suite still takes the "-p <port>" option as it always has and will honor that.
703 Fix By: Anthony Penniston (@apenn-msft)
705 Brad House (25 Aug 2020)
706 - Unset members of the addr struct contain garbage values (#343)
708 When generating the ares_sockaddr data by getaddrinfo() it was only filling
709 in certain members while leaving others uninitialized. This left garbage
710 data if a user tried to use the unset values. memset() the ares_sockaddr
711 to 0 prior to filling in the values to prevent this.
713 Reported By: @SmorkalovG
714 Fix By: Brad House (@bradh352)
717 - [Jonathan Maye-Hobbs brought this change]
719 FQDN with trailing period should be queried first with larger ndot value (#345)
721 If a query is performed for dynamodb.us-east-1.amazonaws.com. with ndots=5, it was attempting to search the search domains rather than just attempting the FQDN that was passed it. This patch now at least attempts the FQDN first.
723 We may need to determine if we should abort any further searching, however as is probably intended.
725 Fix by: Jonathan Maye-Hobbs (@wheelpharoah)
727 - [Gisle Vanem brought this change]
729 Update acountry.c country code list (#341)
731 Updated country_list[]:
732 * 2-letter ISO-3166 country-codes.
733 * Add, rename some names + codes in accordance with latest table at https://en.wikipedia.org/wiki/ISO_3166-1.
735 Fix By: Gisle Vanem (@gvanem)
737 - [Bulat Gaifullin brought this change]
739 Test case should honor flag HAVE_WRITEV rather than WIN32 (#344)
741 Test cases where not honoring the HAVE_WRITEV flag but instead using WIN32 to determine if WRITEV was available or not. This patch fixes that.
743 Fix By: Bulat Gaifullin (@bgaifullin)
745 Brad House (18 Jul 2020)
748 A couple of for loops in Mac-specific code were using integer declarations
749 inside a for loop. Move the declaration to the top of the preceding
750 code block to retain c89 compliance.
752 Reported By: Jeffrey Walton
755 - [Fionn Fitzmaurice brought this change]
757 Avoid buffer overflow in RC4 loop comparison (#336)
759 The rc4 function iterates over a buffer of size buffer_len who's maximum
760 value is INT_MAX with a counter of type short that is not guaranteed to
761 have maximum size INT_MAX.
763 In circumstances where short is narrower than int and where buffer_len
764 is larger than the maximum value of a short, it may be possible to loop
765 infinitely as counter will overflow and never be greater than or equal
768 The solution is to make the comparison be between types of equal width.
769 This commit defines counter as an int.
771 Fix By: Fionn Fitzmaurice (@fionn)
773 - [anonymoushelpishere brought this change]
775 Updated help information for adig, acountry, and ahost. (#334)
777 Provide more descriptive help information for various utilities.
779 Fix By: @anonymoushelpishere
781 - [lutianxiong brought this change]
783 avoid read-heap-buffer-overflow (#332)
785 Fix invalid read in ares_parse_soa_reply.c found during fuzzing
788 Fix By: lutianxiong (@ltx2018)
790 - [Ivan Baidakou brought this change]
792 Fix: sizeof(sizeof(addr.saX)) -> sizeof(addr.saX) in readaddrinfo (#331)
794 Looks like a sed-gone-wrong, a sizeof inside of a sizeof.
796 Fix By: Ivan Baidakou (@basiliscos)
798 Version 1.16.1 (11 May 2020)
800 Brad House (11 May 2020)
801 - c-ares 1.16.1 release prep
803 - update travis to use xcode11.4
805 - Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
807 In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
808 it would result in an invalid read and double-free due to calling end_hquery() twice.
810 Reported By: Jann Horn @ Google Project Zero
813 - [shelley vohr brought this change]
815 fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328)
817 Fixes the following compatibility issues:
818 * Use RegQueryValueExA instead of RegQueryValueEx
819 * Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings
820 * Use RegOpenKeyExA instead of RegOpenKeyExA
821 * Use GetWindowsDirectoryA instead of GetWindowsDirectoryA
823 Fix By: Shelley Vohr (@codebytere)
826 Brad House (13 Apr 2020)
827 - travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail. Disable.
829 - travis: bump macos image to the latest
831 - cast-align warnings are false for struct sockaddr, silence
833 Create a macro to silence false cast-align warnings when casting
834 struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *.
836 Fix By: Brad House (@bradh352)
838 - MacOS: Enable libresolv support for retrieving DNS servers like iOS does.
841 - [Dmitry Igrishin brought this change]
843 CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)
845 Populate the INCLUDE_DIRECTORIES property of installed targets
847 Fix By: Dmitry Igrishin (@dmitigr)
849 Brad House (10 Apr 2020)
850 - travis: make valgrind use cmake for tests
852 - dont try to use libtool to run valgrind
854 - valgrind requires libtool installed to wrap tests
858 - fix travis live test
860 - add debug for travis
864 - attempt to modernize travis build environment
867 - [Teemu R brought this change]
869 Allow TXT records on CHAOS qclass (#321)
871 Some DNS servers intentionally "misuse" the obsoleted CHAOS (CH) qclass to provide things like `version.bind`, `version.server`, `authors.bind`, `hostname.bind` and `id.server`.
873 C-ares was not allowing such use cases.
875 Fix By: Teemu R. (@rytilahti)
877 Brad House (5 Apr 2020)
878 - Remove warnings from ares_getaddrinfo.3 man page
880 As reported in #319, non-standard macros of .IN were used.
881 Replace with .RS/.RE.
884 Fix By: Brad House (@bradh352)
886 - ares_getaddrinfo man page render better for man2html
888 - update man pages to render better for man2html
890 Version 1.16.0 (12 Mar 2020)
892 Brad House (12 Mar 2020)
893 - 1.16.0 release notes draft
895 - attempt to fix double-free introduced in e0517f9
898 - [David Drysdale brought this change]
900 test: fuzzer input triggering double free (#315)
902 OSS-Fuzz has reported a double-free with the fuzzer input file
903 included here; run with:
904 ./test/aresfuzz test/fuzzinput/clusterfuzz-5637790584012800
906 Bisecting the failure points to commit e0517f97d988 ("Parse SOA records
907 from ns_t_any response (#103)")
909 - [Brad House brought this change]
911 CMake: Install Manpages (#314)
913 CMake wasn't installing manpages.
916 Fix By: Brad House (@bradh352)
918 - [Brad House brought this change]
920 Enable cmake tests for AppVeyor (#313)
922 Tests require linking against the static library on Windows otherwise the symbols are not exported for internals being tested.
924 Fix By: Brad House (@bradh352)
926 Brad House (11 Mar 2020)
929 - bump c-ares version to 1.16.0. test AppVeyor integration.
932 - [Brad House brought this change]
934 replace all usages of inet_addr() with ares_inet_pton() which is more proper (#312)
936 Replace usage of inet_addr() with ares_inet_pton() which is more appropriate and fixes issues with legitimate addresses like 255.255.255.0. IPv6 already used this.
939 Fix By: Brad House (@bradh352)
941 - [Brad House brought this change]
943 CMake: Generate WinPDB files during build (#311)
945 Build and Install PDB (Windows Debug Symbol) files if supported by underlying system.
947 Also update AppVeyor to test cmake builds.
950 Fix By: Piotr Pietraszkiewicz (@ppietrasa) and Brad House (@bradh352)
952 - [Brad House brought this change]
954 CMake: Rework library function checking (#310)
956 CHECK_LIBRARY_EXISTS(), while it takes a function name, does not actually verify the function exists in the library being evaluated. Instead, if the function is found in any dependent library, and the referenced library also exists, it returns true. This is not desirable.
958 Wrap with a Macro to change the behavior.
961 Fix By: Brad House (@bradh352)
963 - [Dron Rathore brought this change]
965 Parse SOA records from ns_t_any response (#103)
967 Added the capability of parsing SOA record from a response buffer of ns_t_any type query, this implementation doesn't interfere with existing T_SOA query's response as that too is treated as a list of records. The function returns ARES_EBADRESP if no SOA record is found(as per RFC).
969 The basic idea of sticking to RFC that a ns_t_any too should return an SOA record is something open for discussion but I have kept the functionality intact as it was previously i.e the function returns ARES_EBADRESP if it doesn't find a SOA record regardless of which response it is parsing i.e. T_SOA or T_ANY.
971 Note that asking for T_ANY is generally a bad idea:
972 - https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/
973 - https://tools.ietf.org/html/draft-ietf-dnsop-refuse-any
976 Fix By: Dron Rathore (@DronRathore)
978 - [Stephen Bryant brought this change]
980 Added CPack functionality for generating RPM or DEB packages (#283)
982 Added CPack functionality for generating RPM or DEB packages
984 ie: run `cpack -G RPM` (or "DEB") after building with CMake.
986 The current configuration creates 3 separate packages for the shared library,
987 the development files and the tools.
989 Fix By: Stephen Bryant (@bf-bryants)
991 - [tjwalton brought this change]
993 ares_gethostbyname: Return ENODATA if no valid A or AAAA record found (#304)
995 ares_gethostbyname() was returning ESUCCESS when no A or AAAA record was found but a CNAME pointing nowhere was present. ENODATA should be returned instead, however the hosts pointer will still be present to provide the alias list.
997 * Return ENODATA if no valid A or AAAA record found
998 * Fix and update test ParseAReplyNoData.
999 * Add test for new ENODATA behaviour in ares_gethostbyname.
1004 - [Michal Rostecki brought this change]
1006 test: Separate live tests from SetServers* tests (#299)
1008 Before this change, SetServers, SetServersPorts and SetServersCSV
1009 contained test cases trying to make DNS queries with the google.com
1010 hostname, which requires Internet connectivity. Tests with that
1011 requirement should be defined in the ares-test-live.cc file and contain
1012 "Live" prefix to filter them out with `--gtest_filter=-*.Live*` on
1013 machines without Internet connectivity.
1015 Fix By: Michal Rostecki (@mrostecki)
1017 - [Adam Majer brought this change]
1019 Only count valid addresses when response parsing (#302)
1021 When ares_parse_a_reply or ares_parse_aaaa_reply is called in case
1022 where another AAAA and A responses exist, the resulting ares_addrttl
1023 count is invalid and the structure points to gibberish.
1025 This is a regression since 1.15.
1027 Issue: https://github.com/c-ares/c-ares/issues/300
1028 Fix By: Adam Majer (@AdamMajer)
1030 Brad House (24 Dec 2019)
1031 - [Kyle Edwards brought this change]
1033 CMake: Provide c-ares version in package export file (#296)
1035 The CMake package export file should provide version information.
1037 Fix By: Kyle Edwards (@KyleFromKitware)
1039 - [Ben Noordhuis brought this change]
1041 Accept invalid /etc/resolv.conf lookup values, ability to build container tests (#274)
1043 * Add CARES_BUILD_CONTAINER_TESTS CMake option to add ability to build the Linux-only containerized tests.
1044 * Accept invalid /etc/resolv.conf lookup values
1046 Before this commit invalid `lookup` values resulted in c-ares not using
1047 any lookups without any clear indication why. After this commit it uses
1050 Fix By: Ben Noordhuis (@bnoordhuis)
1052 - [Christian Ammer brought this change]
1054 Parallel A and AAAA lookups in `ares_getaddrinfo` (#290)
1056 A and AAAA lookups for ares_getaddrinfo() are now performed in parallel.
1058 For this change `ares_search` was removed from `ares_getaddrinfo`.
1059 Instead `ares_query` in combination with `next_dns_lookup` are
1060 doing the suffix search.
1062 Adding support for `.onion` addresses which are tested by
1063 `TEST_F(DefaultChannelTest, GetAddrinfoOnionDomain)`
1065 Fix By: Christian Ammer (@ChristianAmmer)
1067 - [Vy Nguyen brought this change]
1069 Move variables into the block where it is used to avoid unused-vars (#281)
1071 Warning uncovered with [-Werror, -Wunused-variables]
1073 Fix By: Vy Nguyen (@oontvoo)
1075 - [Vy Nguyen brought this change]
1077 Rename local macros to avoid conflicting with system ones and remove unsed variables. (Otherwise code will break once compiled with [-Werror,-Wmacro-redefined,-Wunused-variable] ) (#280)
1079 Fix new getaddrinfo code to not redefine macros on some systems.
1081 Fix By: Vy Nguyen (@oontvoo)
1083 - [Egor Pugin brought this change]
1085 [ares_getenv] Return NULL in all cases. (#279)
1087 if ares_getenv is defined, it must return a value on all platforms.
1089 Fix By: Egor Pugin (@egorpugin)
1091 - [Abhishek Arya brought this change]
1093 Add OSS-Fuzz fuzzing badge (#278)
1095 Adds based on instructions at
1096 https://google.github.io/oss-fuzz/getting-started/new-project-guide/#status-badge
1098 Patch By: Abhishek Arya (@inferno-chromium)
1100 - [Peter Eisentraut brought this change]
1102 ares_init_options.3: Fix layout (#275)
1104 7e6af8e inserted the documentation of resolvconf_path in the middle of
1105 the item for ednspsz, leading to broken layout. Fix that.
1107 Fix By: Peter Eisentraut (@petere)
1109 - [Gregor Jasny brought this change]
1111 manpages: Fix typos detected by lintian (#269)
1114 Fix By: Gregor Jasny (@gjasny)
1116 - [lifenjoiner brought this change]
1118 keep command line usage up to date (#256)
1120 adig and ahost built-in help did not match args taken.
1122 Fix-By: @lifenjoiner
1124 - [Dan Noé brought this change]
1126 ares-test.cc: Handle nullptr in AddrInfo ostream. (#268)
1128 The const AddrInfo& argument to operator<< overload for AddrInfo can be
1129 a nullptr unique_ptr. Handle this explicitly by printing {nullptr} if
1130 the rest of the function cannot be safely executed.
1132 Fix-by: Dan Noé <dpn@google.com>
1134 - [Dan Noé brought this change]
1136 Add missing limits.h include from ares_getaddrinfo.c (#267)
1138 This files references INT_MAX, but does not include limits.h. This can
1139 cause a build failure on some platforms. Include limits.h if we have it.
1141 Fix-by: Dan Noé <dpn@google.com>
1143 - [Andrew Selivanov brought this change]
1145 fix fuzzer docs and add missing getaddrinfo docs (#265)
1147 There is a fix for a bit outdated clang fuzzer docs and ares_getaddrinfo docs.
1149 Fix By: Andrew Selivanov (@ki11roy)
1151 - [Andrew Selivanov brought this change]
1153 Fix leak and crash in ares_parse_a/aaaa_reply (#264)
1155 * fix leak if naddress of particular type found
1156 * fix segfault when wanted ttls count lesser than count of result records
1157 * add fuzzer input files that trigger problems (from #263)
1159 Reported-By: David Drysdale (@daviddrysdale)
1160 Fix-By: Andrew Selivanov (@ki11roy)
1162 - [Andrew Selivanov brought this change]
1164 fix segfault when parsing wrong type of record (#262)
1166 Fixes segfault when trying to ares_parse_aaaa with AF_INET and vise versa.
1168 Fix By: Andrew Selivanov (@ki11roy)
1170 - work around mingw compile failure
1172 - c++ requires explicit casts
1174 - support EnvValue on Windows by implementing setenv/unsetenv
1176 - [Andrew Selivanov brought this change]
1178 getaddrinfo enhancements (#257)
1180 * Service support has been added to getaddrinfo.
1181 * ares_parse_a/aaaa_record now share code with the addrinfo parser.
1182 * Private ares_addrinfo structure with useful extensions such as ttls (including cname ttls),
1183 as well as the ability to list multiple cnames in chain of lookups
1185 Work By: Andrew Selivanov @ki11roy
1187 - [Andrew Selivanov brought this change]
1189 fix ares__sortaddrinfo, use wrappers for sock_funcs (#258)
1191 Some socket functions weren't exposed for use by other areas of the library. Expose
1192 those and make use of them in ares__sortaddrinfo().
1194 Fix By: Andrew Selivanov (@ki11roy)
1196 - Fix c89 compilation support broken by .onion rejection changes
1198 Move .onion check lower after all variables have been declared.
1202 - [kedixa brought this change]
1204 getaddrinfo: callback must be called on bad domain (#249)
1206 Due to an order of incrementing the remaining queries and calling ares_query, on a bad domain
1207 the registered callback wouldn't be called.
1212 - [Darrin W. Cullop brought this change]
1214 Windows ARM/ARM64 requires AdvApi32 (#252)
1216 Fix link issues caused by missing library that appears to only be required on ARM (though
1217 docs don't list this restriction). Doesn't hurt to require it everywhere.
1220 Fixed-By: Darrin Cullop (@dwcullop)
1222 - [kedixa brought this change]
1224 getaddrinfo: avoid infinite loop in case of NXDOMAIN(#240) (#242)
1226 There are two possible causes for infinite loops fo NXDOMAIN, based on how many dots are in the domain name (one for < ARES_OPT_NDOTS and one for >= ARES_OPT_NDOTS), where it will repeat the same query over and over as the hquery->next_domain doesn't increment.
1230 - Portability fix for ares__sortaddrinfo()
1232 replace uint32_t with unsigned int and socklen_t with ares_socklen_t
1236 - [Khaidi Chu brought this change]
1238 fix: init bufp before reject .onion to make it can be free correctly (#241)
1240 When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault.
1242 Fix By: Khaidi Chu (@XadillaX)
1244 - [Andrew Selivanov brought this change]
1246 Add ares__sortaddrinfo() to support getaddrinfo() sorted results (#239)
1248 This is a port of RFC 6724 compliant sorting function from Android Bionic project:
1249 https://android.googlesource.com/platform/bionic/+/e919b116d35aa7deb24ddece69c491e24c3b0d6f/libc/netbsd/net/getaddrinfo.c
1251 The latest version is essentially the same, except two additional parameters to test connection with (mark/uid):
1252 https://android.googlesource.com/platform/bionic/+/master/libc/dns/net/getaddrinfo.c
1254 Please note that even that version has some restrictions. It doesn't support some rules from RFC 6724:
1256 Rule 3 (Avoid deprecated addresses)
1257 Rule 4 (Prefer home addresses)
1258 Rule 7 (Prefer native transport)
1260 Submitted By: Andrew Selivanov (@ki11roy)
1262 - [Christian Ammer brought this change]
1264 Increase portability of `ares-test-mock-ai.cc` (#235)
1266 * using portable ares_inet_pton and updated includes in ares-test-mock-ai
1267 * forgot to remove deleted ares-test-ai.cc in Makefile.inc
1269 Fix By: Christian Ammer (@ChristianAmmer)
1271 - [Fabrice Fontaine brought this change]
1273 m4/xc-cc-check.m4: use XC_CHECK_BUILD_FLAGS (#236)
1275 Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
1276 Otherwise it complains of CPPFLAGS in CFLAGS.
1278 https://git.buildroot.net/buildroot/tree/package/c-ares/0001-use_check_build_instead_of_check_user.patch]
1280 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
1281 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
1282 Submitted by: Fabrice Fontaine
1284 - [Christian Ammer brought this change]
1286 Bugfix for `ares_getaddrinfo` and additional unit tests (#234)
1288 This PullRequest fixes a bug in the function add_to_addrinfo which task is to add new addrinfo items to the ai_next linked list. Also additional unit tests for testing ares_getaddrinfo will be added:
1290 Additional mock server test classes (ares-test-mock-ai.cc):
1291 MockTCPChannelTestAI
1293 MockNoCheckRespChannelTestAI
1294 MockEDNSChannelTestAI
1295 RotateMultiMockTestAI
1296 NoRotateMultiMockTestAI
1298 Additional live tests (ares-test-live-ai.cc):
1301 LiveGetHostByNameV4AndV6
1303 Fix By: Christian Ammer (@ChristianAmmer)
1305 - [Christian Ammer brought this change]
1307 Remaining queries counter fix, additional unit tests for `ares_getaddrinfo` (#233)
1309 Remaining queries counter fix, added tests (ParallelLookups,
1310 SearchDomains, SearchDomainsServFailOnAAAA). Removed unnecessary
1311 if and commented code in test.
1313 Fix By: Christian Ammer (@ChristianAmmer)
1315 - [Christian Ammer brought this change]
1317 Add initial implementation for ares_getaddrinfo (#112)
1319 Initial implementation for ares_getaddrinfo(). It is NOT compliant with RFC6724, though
1320 it is expected to come closer to conformance prior to the next release.
1322 Features not supported include sorted addresses and honoring of service and hints
1325 Implementation by: Christian Ammer (@ChristianAmmer)
1327 - [Ben Noordhuis brought this change]
1329 test: fix bad expectation in ipv6 localhost test (#227)
1331 The LiveGetLocalhostByAddrV6 test expected to see "localhost" in the
1332 result when doing an address-to-name lookup for ::1 but on my system
1333 that resolves to "ip6-loopback" because of this stanza in /etc/hosts:
1335 $ grep ^::1 /etc/hosts
1336 ::1 ip6-localhost ip6-loopback
1338 Fix By: Ben Noordhuis (@bnoordhuis)
1341 - [Ben Noordhuis brought this change]
1343 ares_version.h: bump version (#230)
1345 Version change not committed from maketgz.sh
1349 Daniel Stenberg (24 Oct 2018)
1350 - ares_library_init_android.3: minor syntax edits, fixed AVAILABILITY
1352 Version 1.15.0 (23 Oct 2018)
1354 Brad House (23 Oct 2018)
1355 - last minute 1.15.0 addition
1357 - [Ben Noordhuis brought this change]
1359 Report ARES_ENOTFOUND for .onion domain names as per RFC7686. (#228)
1363 Name Resolution APIs and Libraries (...) MUST either respond
1364 to requests for .onion names by resolving them according to
1365 [tor-rendezvous] or by responding with NXDOMAIN.
1367 A legacy client may inadvertently attempt to resolve a .onion
1368 name through the DNS. This causes a disclosure that the client
1369 is attempting to use Tor to reach a specific service. Malicious
1370 resolvers could be engineered to capture and record such leaks,
1371 which might have very adverse consequences for the well-being
1375 Fix By: Ben Noordhuis @bnoordhuis
1377 - prepare for c-ares 1.15.0 release
1381 AIX attempts to include both nameser_compat.h and onameser_compat.h. It appears
1382 the proper fix is to define _USE_IRS so that only nameser_compat.h is used.
1385 Fix By: Brad House (@bradh352)
1387 - Fix crash in ares_dup() due to new ARES_OPT_RESOLVCONF
1389 ares_dup() calls ares_init_options() by making its own fake option
1390 mask since the original mask isn't stored but ARES_OPT_RESOLVCONF
1391 was always set, instead of conditionally set. This caused a crash
1392 because ares_strdup() isn't NULL-safe if no custom path was set.
1394 Made ares_dup() set ARES_OPT_RESOLVCONF conditionally.
1396 Fix By: Brad House (@bradh352)
1398 - [Sarat Addepalli brought this change]
1400 Add ares_init_options() configurability for path to resolv.conf file
1402 Add resolvconf_path to end of struct ares_options with ARES_OPT_RESOLVCONF option
1403 so on Unix-like systems a custom path can be specified. If no path is specified,
1404 /etc/resolv.conf is used like normal.
1406 Fix By: Sarat Addepalli @SirR4T
1408 Review By: Brad House @bradh352
1410 - remove stale variables
1412 - fix prototype name for ares_strsplit_free()
1414 - add missing prototype
1416 - simplify ares_strsplit() and create ares_strsplit_free() helper function
1418 - missing ares_strsplit.h from HHEADERS for inclusion in distribution
1420 - [Ruslan Baratov brought this change]
1422 Add CARES_BUILD_TOOLS CMake option (#214)
1424 Add ability to exclude building of tools (adig, ahost, acountry) in CMake. This should also close #200.
1426 Fix By: Ruslan Baratov (@ruslo)
1429 - [flyingdutchman23 brought this change]
1431 Style. Whitespace cleanup. (#213)
1433 Small whitespace cleanups.
1435 Fix By: @flyingdutchman23
1437 - [John Schember brought this change]
1439 Android: Support for domain search suffix (#211)
1441 Fixes issue #207. Uses LinkProperties.getDomains() to get a list of search domains and adds them to the suffix list. This also adds a new helper function to split strings into an array based on multiple delimiters replacing multiple other functions for dealing with string splitting.
1443 Submitter: John Schember (@user-none)
1445 Approved-by: Brad House (@bradh352)
1447 - [afalin brought this change]
1449 Improve DNS suffixes extracting from WinNT registry (#202)
1451 Join all global and connection specific suffix lists. Use 'HKLM\Software\Policies\Microsoft\Windows NT\DNSClient\SearchList', 'HKLM\System\CurrentControlSet\Services\Tcpip\Parameters\Domain' as global suffix lists.
1455 - Be consistent with indention in CMakeLists.txt
1457 The imported TRANSFORM_MAKEFILE_INC function from curl used space indention
1458 but the rest of the file used tabs. Go ahead and make it tabs for
1459 consistency as well.
1461 Committed By: Brad House
1463 - [flyingdutchman23 brought this change]
1465 Fix modern gcc warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source
1467 Silence warning about using src to determine number of bytes to copy.
1468 In this case it doesn't matter whether it is `src` or `dest`. So there
1469 is no functionality change.
1472 Fix By: @flyingdutchman23
1474 - [Andi Schnebinger brought this change]
1476 fix stringop-overflow warning of GCC (#201)
1478 When using a modern GCC to compile c-ares, there is a stringop-overflow warning.
1479 This patch simply silences the false-positive warning, there is no actual code flaw.
1481 Bug: https://github.com/c-ares/c-ares/pull/201
1482 Fixed By: Andi Schnebinger @Iniesta8
1484 GitHub (18 May 2018)
1485 - [David Drysdale brought this change]
1487 travis: do coverage in "coverage" build (#195)
1489 Fixes #194, a mistake from commit a255081f2c3c ("travis: Only do
1490 coverage/distcheck on normal build")
1492 Brad House (17 May 2018)
1493 - [Brad Spencer brought this change]
1495 Apply the IPv6 server blacklist to all nameserver sources, not just Windows (#193)
1497 For #164, I mentioned that it seemed like the IPv6 nameserver blacklist should apply to all OSes. In a mailing list post, @bradh352 agreed and suggested that I file a PR to make it so.
1499 This moves the blacklist check from being Windows-specific to being a general feature of config_nameservers(), no matter the nameserver source. It also simplifies the ares_ipv6_server_blacklisted() implementation to not parse and re-parse the blacklisted IPv6 addresses from strings on every check. I think they're almost as easy to read as a sequence of hex bytes in an array initializer, and it's definitely less work on each trip through the code.
1501 Fix By: Brad Spencer @b-spencer
1502 PR: https://github.com/c-ares/c-ares/pull/193
1504 - [Brad Spencer brought this change]
1506 Fix warnings emitted by MSVC when using -W4 (#192)
1508 These changes fix a few warnings emitted by recent versions of MSVC when compiling with -W4. Half of the changes are in Windows-specific code, and the other half should be safe no matter the compiler or OS.
1510 The allocation function change is probably the only one that needs explanation. MSVC gives warnings about the function pointers not being stable across DLL boundaries or something to that effect, so for Windows, I've made them be called indirectly, which at least made the compiler happy. I can't say I've tested every linking combination on Windows with them before or after the change, but it seems harmless.
1512 Fix By: Brad Spencer @b-spencer
1513 PR: https://github.com/c-ares/c-ares/pull/192
1515 - [David Hotham brought this change]
1517 Prevent changing name servers while queries are outstanding (#191)
1519 Changing name servers doesn't work, per #41. Better to return an error code than to crash.
1521 Fix-by: David Hotham @dimbleby
1523 David Drysdale (15 May 2018)
1524 - [Tobias Nießen brought this change]
1526 Fix comment in ares_rules.h (#189)
1528 Brad House (6 May 2018)
1529 - [Brad Spencer brought this change]
1531 Harden and rationalize c-ares timeout computation (#187)
1533 * Harden and rationalize c-ares timeout computation
1534 * Remove the rand() part of the timeout calculation completely.
1536 When c-ares sends a DNS query, it computes the timeout for that request as follows:
1538 timeplus = channel->timeout << (query->try_count / channel->nservers);
1539 timeplus = (timeplus * (9 + (rand () & 7))) / 16;
1540 I see two issues with this code. Firstly, when either try_count or channel->timeout are large enough, this can end up as an illegal shift.
1542 Secondly, the algorithm for adding the random timeout (added in 2009) is surprising. The original commit that introduced this algorithm says it was done to avoid a "packet storm". But, the algorithm appears to only reduce the timeout by an amount proportional to the scaled timeout's magnitude. It isn't clear to me that, for example, cutting a 30 second timeout almost in half to roughly 17 seconds is appropriate. Even with the default timeout of 5000 ms, this algorithm computes values between 2812 ms and 5000 ms, which is enough to cause a slightly latent DNS response to get spuriously dropped.
1544 If preventing the timers from all expiring at the same time really is desirable, then it seems better to extend the timeout by a small factor so that the application gets at least the timeout it asked for, and maybe a little more. In my experience, this is common practice for timeouts: applications expect that a timeout will happen at or after the designated time (but not before), allowing for delay in detecting and reporting the timeout. Furthermore, it seems like the timeout shouldn't be extended by very much (we don't want a 30 second timeout changing into a 45 second timeout, either).
1546 Consider also the documentation of channel->timeout in ares_init_options():
1548 The number of milliseconds each name server is given to respond to a query on the first try. (After the first try, the timeout algorithm becomes more complicated, but scales linearly with the value of timeout.) The default is five seconds.
1550 In the current implementation, even the first try does not use the value that the user supplies; it will use anywhere between 56% and 100% of that value.
1552 The attached patch attempts to address all of these concerns without trying to make the algorithm much more sophisticated. After performing a safe shift, this patch simply adds a small random timeout to the computed value of between 0 ms and 511 ms. I could see limiting the random amount to be no greater than a proportion of the configured magnitude, but I can't see scaling the random with the overall computed timeout. As far as I understand, the goal is just to schedule retries "not at the same exact time", so a small difference seems sufficient.
1554 UPDATE: randomization removed.
1557 Fix by: Brad Spencer
1559 - distribute ares_android.h
1561 Distribute ares_android.h when a release distribution package is
1564 Reported By: Andrey Khranovsky
1565 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-04/0000.shtml
1567 - ares_set_servers_csv() on failure should not leave channel in a bad state
1569 If bad data is passed to ares_set_servers_csv() or
1570 ares_set_servers_ports_csv() it will clear the existing channel
1571 configured DNS servers, then a call to ares_send() will fail due
1572 to a bad malloc which may have undefined behavior.
1574 The fix now only clears existing servers on success. An additional
1575 sanity check was added in ares_send() to ensure nservers >= 1 or
1576 will result in ARES_ESERVFAIL.
1578 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml
1579 Reported-by: Francisco Sedano Crippa
1581 - docs: Not all manpages are listed
1583 Some docs aren't installed or not showing up on
1584 https://c-ares.haxx.se/docs.html
1585 due to not being listed in Makefile.inc. Add missing docs and
1586 ensure docs are alphabetized.
1588 Version 1.14.0 (16 Feb 2018)
1590 Daniel Stenberg (16 Feb 2018)
1591 - ares_android.c: fix warning: ISO C forbids an empty translation unit
1593 - RELEASE-NOTES: some more work we did and people who helped
1595 Brad House (16 Feb 2018)
1596 - travis: skip Autotools style testing for cmake
1598 Fix cmake test build by skipping autotools portion of test script.
1600 - travis: standardize CMake test off of Autotools tests
1602 Instead of running 'make test', run the tests directly like autotools
1603 does. It provides more verbose output.
1605 - travis: Enable building tests for CMake
1607 Travis should auto-build and run tests for cmake builds now that
1610 - fix version in pkgconfig
1612 - Add version update to CMakeLists in maketgz
1614 - Release prep. Add support for pkgconfig in cmake, set versions appropriately
1616 Gregor Jasny (15 Feb 2018)
1619 Brad House (14 Feb 2018)
1620 - [Gregor Jasny brought this change]
1622 Use cmake3 package provided by Ubuntu (#182)
1624 - Cmake 3.1 instead of 3.2.1 should be the minimum
1626 - Update RELEASE-NOTES and RELEASE-PROCEDURE.md to prepare for next release
1628 - get rid of c++ style comments
1630 - Use trusty for all builds, precise is EOL. Update clang and cmake versions.
1632 - Current CMakeLists.txt doesn't support 2.8.12 anymore, we need to bump the version to 3.2.1 minimum
1634 - Re-organize sections in INSTALL.md and add CMake section
1636 - [Sergey Kolomenkin brought this change]
1638 remove compilation warnings in MSVC (#47)
1640 - document handling of timeouts for ares_process and ares_process_fd to close PR #57
1642 - As per Issue #155, since we do not require gethostname() during init, if it fails, there's no reason for init to fail as it is only used to populate the domain
1645 - [David Drysdale brought this change]
1647 Document WSAStartup requirement (#180)
1649 David Drysdale (6 Feb 2018)
1650 - [Antonio Tajuelo brought this change]
1652 Added coderelease.io badge to readme.md for letting people subscribe to new versions (#174)
1654 - [Sheel Bedi brought this change]
1656 Update year in LICENSE.md to 2018 (#170)
1659 - [David Drysdale brought this change]
1661 travis: use VM not container for {L,A}SAN builds (#177)
1663 As per https://github.com/travis-ci/travis-ci/issues/9033, container
1664 based builds do not currently allow ptrace, which is used by LSAN and
1667 Brad House (3 Feb 2018)
1668 - [acthompson-google-com brought this change]
1670 Android JNI code leaks local references in some cases (#175)
1672 * Add Google LLC to AUTHORS.
1674 * android: Explicitly delete all JNI local references, and cache JNI method IDs at initialization.
1676 * android: Only return ARES_ENOTINITIALIZED on failures in initialization code.
1678 Gregor Jasny (2 Jan 2018)
1679 - Embed fused Google Test 1.8.0
1681 Brad House (21 Dec 2017)
1682 - [John Schember brought this change]
1684 android: Check returns for obj and classes are not NULL. Document API levels for various Android functions and objects used. (#166)
1686 - CARES_CHECK_TYPE should reference variable so a warning is not produced for -Werror compatibility
1688 - [Brad Spencer brought this change]
1690 Fix computation of IPv6 blacklist mask for values of netmask > 8. (#164)
1692 David Drysdale (14 Dec 2017)
1693 - travis: Only do coverage/distcheck on normal build
1695 - travis: only do pip install on Linux
1697 - travis: only test in IPv4 mode
1699 Travis' Trusty environment does not support IPv6.
1701 - test: allow restriction to one IP address family
1703 - [Roman Teterin brought this change]
1705 Fix a typo in init_by_resolv_conf (#160)
1707 Brad House (11 Dec 2017)
1708 - @gvanem says MSVC -RTCc option fails, looks erroneous to me, but the additional mask is harmless
1710 - Fix some other mingw warnings
1712 - Issue #143, get rid of windows build warning due to passing 'char **' to argument expecting 'const char **'
1714 - [Gregor Jasny brought this change]
1716 Distribute CMake files (#130)
1718 - Android variants may not have __system_property_get
1720 Some android systems like ARM64 may not have the __system_property_get
1721 symbol in libc (but still have it in the public headers). Detect this
1722 condition at build time. The __system_property_get method of retrieving
1723 name servers is deprecated as of Oreo so should strictly be a fallback
1726 David Drysdale (9 Nov 2017)
1727 - [David Hotham brought this change]
1729 Wrong function name throughout man page (#154)
1731 - ares_data.c: iterate through substructs when freeing
1733 Previous code recursed into substructures, which makes it more likely
1734 that large/heavily-nested responses could use up lots of stack.
1736 - test: test ares_free_data on long chain of structs
1738 - [Felix Yan brought this change]
1740 Fix a typo in inet_ntop.c (#151)
1742 Daniel Stenberg (29 Sep 2017)
1743 - ares_gethostbyname.3: fix callback status values
1745 - ARES_ENOTFOUND means the _name_ wasn't found
1747 - ARES_ENODATA can be returned when a resolve fails
1749 Reported-by: Jakub Hrozek
1750 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
1752 Brad House (28 Sep 2017)
1753 - [John Schember brought this change]
1755 Fix DNS server lookup breaking with Android O due to Android removing access to net.dns# system properties. (#148)
1757 As of Android 8 (Oreo) access to net.dns# has been removed (https://developer.android.com/about/versions/oreo/android-8.0-changes.html). The reasoning given is that it, "improves privacy on the platform". Currently c-ares uses this to get the list of DNS servers.
1759 Now the only way to access the DNS server list is by using the Connectivity Manager though Java. This adds the necessary JNI code to use the Connectivity Manager and pull the DNS server list. The old way using __system_property_get with net.dns# remains for compatibilty.
1761 Using the Connectivity Manager requires the ACCESS_NETWORK_STATE permission to be set on the app. Existing applications most likely are not setting this and keeping the previous method as a fallback will at the very least ensure those apps don't break on older versions of Android. They will need to add this permission for Android 8 compatibility.
1763 Included in the patch are two initalization functions which are required. The JVM must be registered as well as the Connectivity Manager itself. There is no way to get the Connectivity Manager except though Java. Either being passed down to C directly or by passing in an Android Context which can be used to get the Connectivity Manager. Examples are provided in the documentation.
1765 - [Konstantinos Sofokleous brought this change]
1767 allow linking against the static msvc runtime library (#133)
1769 allow linking against the static msvc runtime library
1771 - [Gergely Nagy brought this change]
1773 Force using the ANSI versions of WinAPI functions (#142)
1775 When compiling c-ares with a build system that defines UNICODE,
1776 bad versions of WinAPI functions are used causing failures or even
1777 crashes. When windows.h is included in MBCS mode (like in the default
1778 build system), the ..A versions are the same as using the one without
1781 - [cmake] build fix on Solaris
1783 GitHub (11 Sep 2017)
1784 - [Brad House brought this change]
1786 Win32 exclude legacy ipv6 subnets (#144)
1788 win32 ipv6: add infrastructure to exclude ipv6 subnets that are known to cause issues
1790 - [David Drysdale brought this change]
1792 windows: only look for ancient compilers (#146)
1794 Also drop the use of a versioned output directory; just use
1797 - [David Drysdale brought this change]
1799 ares_init_options.3: match up sock_state_cb args (#141)
1803 Daniel Stenberg (25 Aug 2017)
1804 - [Anna Henningsen brought this change]
1806 gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
1808 When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
1809 queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
1811 It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
1812 but I would appreciate review of the correctness of this change.
1814 Ref: https://github.com/nodejs/node/issues/14814
1818 David Drysdale (18 Aug 2017)
1819 - [David Hotham brought this change]
1821 support most recent Visual Studio 2017
1823 Brad House (26 Jul 2017)
1824 - Preserve original DNS server order on Windows for equal metrics.
1826 qsort is not stable, in order to make it stable we need to record
1827 the original index and add it as a secondary sort value when the
1828 metrics are equal to prevent using DNS servers that may not work
1829 at all as reported by some users.
1831 David Drysdale (15 Jul 2017)
1832 - [Anna Henningsen brought this change]
1834 ares_parse_naptr_reply: make buffer length check more accurate
1836 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
1837 for records parsed by `ares_parse_naptr_reply()`. However, that
1838 function is designed to parse replies which also contain non-NAPTR
1839 records; for A records, the `rr_len > 7` check will fail as there
1840 are only 4 bytes of payload.
1841 In particular, parsing ANY replies for NAPTR records was broken
1844 Fix that by moving the check into the case in which it is already
1845 known that the record is a NAPTR record.
1847 - appveyor: run dnsdump as a sanity check
1849 - travis: run dnsdump as a sanity check
1851 - test: use ares_free_string() throughout
1853 As pointed out by Gisle Vanem in #125.
1855 Daniel Stenberg (3 Jul 2017)
1856 - RELEASE-PROCEDURE.md: how to release
1861 David Drysdale (2 Jul 2017)
1862 - test: Build dnsdump on Windows too
1864 Thanks to Gisle Vanem for showing the way:
1865 https://github.com/c-ares/c-ares/commit/b701af8a24cf9d173b1dbe5faedcea34642e92da#commitcomment-22830845
1867 Brad House (26 Jun 2017)
1868 - [Christian Ammer brought this change]
1870 fix statement like #define - ares ssize_t define had a trailing semicolon (#120)
1872 David Drysdale (21 Jun 2017)
1873 - test: distribute the fuzzcheck.sh script
1875 The TESTS target runs fuzzcheck.sh so make sure it is included
1876 in the distributed tarball.
1878 (The test itself will be pointless when run on a distribution, because
1879 the fuzzing corpus directories are not shipped, but at least this
1880 means that `make -C test test` should work.)
1882 - test: run the name-parsing corpus check too
1884 Daniel Stenberg (21 Jun 2017)
1885 - dist: don't build/ship PDF versions in release archives
1887 ... experience says very few read them and they can still get build by
1888 those who want them.a
1890 - ares_version.h: bump version
1892 Version 1.13.0 (20 Jun 2017)
1894 Daniel Stenberg (20 Jun 2017)
1895 - RELEASE-NOTES: 1.13.0
1897 - ares_set_socket_functions.3: added in 1.13.0
1899 David Drysdale (18 Jun 2017)
1900 - ares_parse_naptr_reply: check sufficient data
1902 Check that there is enough data for the required elements
1903 of an NAPTR record (2 int16, 3 bytes for string lengths)
1904 before processing a record.
1906 - test: Feed in short NAPTR
1908 - test: Add fuzz input with short NAPTR
1910 - test: add ares_parse_naptr_reply to fuzzer
1912 - [noiz brought this change]
1914 Update ares.h to support compiling with QNX
1916 - [Dionna Glaze brought this change]
1918 Simple changes to appease stricter compilers.
1920 ares_process.c uses htonl, which needs <arpa/inet.h> included.
1921 ares_getnameinfo.c uses a dynamically selected format string for
1922 sprintf, which -Wformat-literal doesn't like. Usually one would use
1923 inttypes.h and a format string "%" PRIu32, but C99 is too new for some
1924 supported platforms.
1926 GitHub (16 Jun 2017)
1927 - [Gregor Jasny brought this change]
1929 CMake: Emulate interface library on import (#108)
1932 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
1934 Brad House (6 Jun 2017)
1935 - [ChristianAmmer brought this change]
1937 Added support for Windows DNS Suffix Search List (#93)
1939 This change solves issue #53.
1941 Support for suffix search lists was already built in for Linux. The search list could be set via set_search. With this change the suffix search list from Windows is read from the registry and then set into the ares configuration via set_search. There are two sources for the search list:
1943 The global DNS suffix search list.
1944 The primary and connection specific DNS suffixes if the global is not available.
1946 Contributed by @ChristianAmmer
1948 Daniel Stenberg (25 May 2017)
1949 - [Thomas Köckerbauer brought this change]
1951 configure: do not heck for ar if specified manually
1955 David Drysdale (23 May 2017)
1956 - ares_expand_name: limit number of indirections
1958 - test: fuzz input file that takes a while to process
1960 - test: copy data in fuzz regression driver
1964 GitHub (23 May 2017)
1965 - [David Drysdale brought this change]
1967 Convert char from ISO-8859-1 to UTF-8 (#99)
1971 - [Gregor Jasny brought this change]
1973 travis: Use trusty for cmake builds (#109)
1975 kubuntu-backports dropped the CMake package for Precise
1977 David Drysdale (2 May 2017)
1978 - [David Hotham brought this change]
1980 msvc_ver.inc support most recent Visual Studio 2017 (#101)
1982 - test: use io.h not unistd.h for Windows
1984 - test: try building fuzz binaries on Windows
1986 - test: stick to int in ares-fuzz.c
1988 Using int rather than ares_ssize_t means this file
1989 needs no c-ares dependency - it's a general driver for
1990 any libFuzzer-style entrypoint.
1992 - test: force ARES_OPT_NOROTATE for no-rotate tests
1994 - test: check expected NOROTATE value
1996 - ares_create_query: use ares_free not naked free
1998 Accidentally added in commit 65c71be1cbe5
1999 ("ares_create_query: avoid single-byte buffer overwrite")
2001 Brad House (17 Mar 2017)
2002 - Need ares.h for ares_ssize_t
2004 - tests should not use ssize_t, use ares_ssize_t
2006 GitHub (16 Mar 2017)
2007 - [Brad House brought this change]
2009 Portability updates for legacy systems. (#92)
2011 Socklen_t should not be used in code, instead ares_socklen_t should be used.
2012 Convert ssize_t to ares_ssize_t for portability since the public API now exposes this.
2014 David Drysdale (14 Mar 2017)
2015 - [Michael Osei brought this change]
2017 Update msvc_ver.inc (#91)
2019 For Visual Studio 2017 builds
2021 Daniel Stenberg (13 Mar 2017)
2022 - [Brad House brought this change]
2024 Windows DNS server sorting (#81)
2026 Original Patch From Brad Spencer:
2027 https://c-ares.haxx.se/mail/c-ares-archive-2016-04/0000.shtml
2029 My modifications include:
2030 * Dynamically find GetBestRoute2 since it is a Windows Vista+ symbol, and will fall back to prior behavior when not available.
2031 * Prefer get_DNS_AdaptersAddresses as the modifications should alleviate the concerns which caused us to prefer get_DNS_NetworkParams
2032 * Update AppVeyor to use MinGW-w64 instead of the legacy MinGW
2033 * Fix compile error in test suite for Windows.
2035 Original message from patch below:
2037 From: Brad Spencer <bspencer@blackberry.com>
2038 Date: Fri, 29 Apr 2016 14:26:23 -0300
2040 On Windows, the c-ares DNS resolver tries first to get a full list of
2041 DNS server addresses by enumerating the system's IPv4/v6 interfaces and
2042 then getting the per-interface DNS server lists from those interfaces
2043 and joining them together. The OS, at least in the way the c-ares
2044 prefers to query them (which also may be the only or best way in some
2045 environments), does not provide a unified list of DNS servers ordered
2046 according to "current network conditions". Currently, c-ares will then
2047 try to use them in whatever order the nested enumeration produces, which
2048 may result in DNS requests being sent to servers on one interface
2049 (hosting the current default route, for example) that are only intended
2050 to be used via another interface (intended to be used when the first
2051 interface is not available, for example). This, in turn, can lead to
2052 spurious failures and timeouts simply because of the server address
2053 order that resulted because of the enumeration process.
2055 This patch makes the (safe?) assumption that there is no other better
2056 rule to chose which interface's DNS server list should be prioritized.
2057 After all, a DNS lookup isn't something "per network"; applications
2058 don't look up "these DNS names on this interface and those DNS names on
2059 that interface". There is a single resource pool of DNS servers and the
2060 application should presume that any server will give it the "right"
2061 answer. However, even if all DNS servers are assumed to give equally
2062 useful responses, it is reasonable to expect that some DNS servers will
2063 not accept requests on all interfaces. This patch avoids the problem by
2064 sorting the DNS server addresses using the Windows IPv4/v6 routing tables.
2066 For example, a request to DNS server C on interface 2 that is actually
2067 sent over interface 1 (which may happen to have the default route) may
2068 be rejected by or not delivered to DNS server C. So, better to use DNS
2069 servers A and B associated with interface 1, at least as a first try.
2071 By using the metric of the route to the DNS server itself as a proxy for
2072 priority of the DNS server in the list, this patch is able to adapt
2073 dynamically to changes in the interface list, the DNS server lists per
2074 interface, which interfaces are active, the routing table, and so on,
2075 while always picking a good "best" DNS server first.
2077 In cases where any DNS server on any interface will do, this patch still
2078 seems useful because it will prioritize a lower-metric route's (and thus
2079 interface's) servers.
2081 David Drysdale (22 Feb 2017)
2082 - [Sergii Pylypenko brought this change]
2084 docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
2086 - [Calle Wilund brought this change]
2088 ares test: fix win32 build errors with virtual socket function tests
2090 The added api requires both some typedefs not previously imported
2091 into the test build + the test code did not fully deal with
2092 socket differences on windows.
2094 - [Calle Wilund brought this change]
2096 ares_process: fix return type of socket_create function (win32 warning)
2098 Daniel Stenberg (31 Jan 2017)
2099 - [Calle Wilund brought this change]
2101 ares_set_socket_functions: Add man page
2103 Providing some rudimentary documentation for the added functionality
2107 - [Calle Wilund brought this change]
2109 ares-test: Add test helpers and cases for virtual socket IO
2111 * Added test case macro to automatically run tests twice, once "normal",
2112 once with virtual IO.
2113 * Changed most "live" query tests to run in dual mode to verify
2114 at least simple socket IO via virtual functions
2115 * Added test case for settings/duping socket functions & callback data
2117 - [elcallio brought this change]
2119 Implement using virtual socket IO functions when set
2121 Uses virtual socket IO functions when set on a channel.
2122 Note that no socket options are set, nor is any binding
2123 done by the library in this case, since the client defining
2124 these is probably more suited to deal with this.
2126 - [elcallio brought this change]
2128 Add virtual function set for socket IO
2130 Defines a structure of basic create, close, read/write
2131 functions as virtual function calls, settable for individual
2134 David Drysdale (30 Jan 2017)
2135 - test: ignore aresfuzzname binary
2137 Gregor Jasny (14 Jan 2017)
2138 - [Stephen Sorley brought this change]
2140 Always use check_symbol_exists instead of check_function_exists.
2142 - Also add includes to TARGETS_INST_DEST
2144 - [Stephen Sorley brought this change]
2148 - CMake: Export targets
2150 - CMake: Use GNUInstallDirs for install location defaults
2152 David Drysdale (11 Jan 2017)
2153 - Update Makefile.am for renamed INSTALL.md
2155 GitHub (11 Jan 2017)
2156 - [David Drysdale brought this change]
2158 docs: convert INSTALL to MarkDown & tweak (#83)
2160 - [Gregor Jasny brought this change]
2162 Merge pull request #77 from stephen-sorley/cmake_modernize
2164 Updated CMake minimum version to 2.8.12.
2166 Stephen Sorley (4 Jan 2017)
2167 - Changed executables to depend directly on internal libcares target, instead of against
2168 the external-facing alias targets.
2170 - Updated Travis to pull CMake 2.8.12 from kubuntu-backports ppa.
2172 - Updated CMake minimum version to 2.8.12.
2174 Changed the way usage requirements (include dirs, compile defs, dependent libraries) are specified, to match the recommended standard practice for modern CMake. This involves using target-specific functions (target_include_directories, target_compile_definitions, etc.), along with the PUBLIC, PRIVATE or INTERFACE modifiers.
2176 Updated chain-building support to imitate new-style Find modules (import libs), instead of old-style Find modules (cache variables).
2178 David Drysdale (26 Dec 2016)
2179 - [Chris Araman brought this change]
2181 configure: clock_gettime workaround (#75)
2183 Commits 7518c26, c41726b, and bc14ee7 brought this workaround to the CMake build system. This expands it to the autoconf build system.
2187 - test: add fuzz entrypoint for ares_create_query()
2189 - test: Add gTest/gMock files to SOURCES
2191 Built tarballs are not including all of the files needed
2192 to build the test suite because they are missing from the
2193 <target>_SOURCES variable in Makefile.am.
2195 - travis: Move build scripts under travis/
2197 Travis doesn't always propagate errors in inline multi-line
2198 scripts, so move them all to be explicit shell scripts, each
2201 - travis: check distributed tarball builds
2203 Daniel Stenberg (25 Oct 2016)
2204 - dist: ship msvc_ver.inc too
2206 Reported-by: Bruce Stephens
2210 - [Aaron Bieber brought this change]
2212 fix build on OpenBSD
2214 - ares_version.h: bump, working on 1.12.1 now
2216 GitHub (18 Oct 2016)
2217 - [Gregor Jasny brought this change]
2219 Merge pull request #64 from bradh352/master
2221 Add CMake build system support to C-Ares.
2223 Brad House (5 Oct 2016)
2224 - suggested PROJECT_NAME change broke chain building as it needs the magic PROJECT_NAME set in the ADD_LIBRARY for matching. Fix to make both goals work
2226 - update MacOSX 10.12 detection
2228 - Expand XCode clock_gettime fix to include MacOS 10.12, not just iOS10
2230 David Drysdale (4 Oct 2016)
2231 - Revert "travis: work around bug in PyCParser"
2233 This reverts commit a24a10a348fc00b8cfd684d91894a1df14880ea9.
2235 - travis: work around bug in PyCParser
2237 See https://github.com/pyca/cryptography/issues/3187
2239 Brad House (3 Oct 2016)
2240 - PROJECT_SOURCE_DIR instead of CMAKE_CURRENT_SOURCE_DIR as per @gjasny
2242 - use a project name of c-ares as per @gjasny
2244 - Import curl conversion of Makefile.inc to cmake form dynamically as per bdoetsch@ameritech.net to make maintaining multiple build systems easier
2246 Daniel Stenberg (30 Sep 2016)
2247 - dist: add ares_library_initialized.* to the tarball
2249 David Drysdale (30 Sep 2016)
2250 - test: check ares_create_query with too-long name
2252 Daniel Stenberg (30 Sep 2016)
2253 - man pages: minor formatting edits
2255 Brad House (29 Sep 2016)
2256 - merge fc7917e from @daviddrysdale ... travis build updates for cmake
2258 - cleanups as per @gjasny ... Use naked IF statements and use NOT DEFINED
2260 Version 1.12.0 (29 Sep 2016)
2262 Daniel Stenberg (29 Sep 2016)
2263 - RELEASE-NOTES: 1.12.0
2265 - [David Drysdale brought this change]
2267 ares-test-misc: test ares_create_query with escaped trailing dot
2269 - ares_create_query: avoid single-byte buffer overwrite
2271 ... when the name ends with an escaped dot.
2275 Bug: https://c-ares.haxx.se/adv_20160929.html
2277 Brad House (29 Sep 2016)
2278 - CMake: Unify library versioning with the libtool methodology to make keeping library versions in sync easier with the autotools build system
2280 Daniel Stenberg (29 Sep 2016)
2281 - ares_library_initialized.3: added
2283 - make: bump CARES_VERSION_INFO for release
2285 David Drysdale (29 Sep 2016)
2286 - man: update ares_init_options.3
2288 Daniel Stenberg (29 Sep 2016)
2289 - ares_library_init.3: corrected the ares_library_init_mem proto
2291 Brad House (28 Sep 2016)
2292 - XCode v8 introduced clock_gettime() for iOS v10. However, it is a weak symbol, which means when earlier iOS versions try to use clock_gettime() it results in a crash due to the missing symbol. Detect this condition and do not set HAVE_CLOCK_GETTIME_MONOTONIC.
2294 - Adds cmake build system support to C-Ares.
2296 The patch does not modify any source files, it only adds 3 new files
2297 (CMakelists.txt, ares_build.h.cmake, ares_config.h.cmake) which form the
2298 build system. I've tried to go through as much of the autotools tests and
2299 extracted what I thought was appropriate, though many of the tests aren't
2300 as in-depth in CMake as they are for autotools ... it is unclear why some
2301 of them exist at all, I'm guessing for legacy systems that CMake probably
2302 doesn't support anyhow.
2304 Building the library, and examples (adig, ahost, acountry) plus installation
2305 should work across a large number of tested platforms. The tests have not
2306 yet been integrated.
2308 Daniel Stenberg (27 Sep 2016)
2309 - README.md: remove space from link
2311 - README: link to the correct c-ares badge!
2313 Reported-by: David Hotham
2317 - docs: minor formatting edits
2319 - ares_destroy.3: formatting polish
2321 - ares_init.3: split the init docs into two separate man pages
2323 - SECURITY: point to the vulnerabilities page now
2325 - RELEASE-NOTES: synced with daa7235b1a5
2327 - ares_create_query.3: edit language
2329 Tried to make the man page more readable.
2331 David Drysdale (26 Sep 2016)
2332 - test: fix gMock to work with gcc >= 6.x
2335 https://github.com/google/googletest/issues/705#issuecomment-235067917
2337 Daniel Stenberg (26 Sep 2016)
2338 - [Brad House brought this change]
2340 headers: remove checks for and defines of variable sizes
2342 ... they're not really used and by avoiding them in the ares_build.h
2343 output we make the public header less dependent on data sizes.
2345 David Drysdale (24 Sep 2016)
2346 - api: add ARES_OPT_NOROTATE optmask value
2348 Fix up a couple of problems with configuring whether c-ares rotates
2349 between different name servers between requests.
2351 Firstly, ares_save_options() returns (in *optmask) the value of
2352 (channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily
2353 indicate whether the channel is or is not actually doing rotation.
2354 This can be confusing/incorrect if:
2355 - the channel was originally configured without ARES_OPT_ROTATE
2356 (so it appears that the channel is not rotating)
2357 - the /etc/resolv.conf file includes the 'rotate' option
2358 (so the channel is actually performing rotation).
2360 Secondly, it is not possible to reliably configure a channel
2361 to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since
2362 a 'rotate' option in /etc/resolv.conf will turn it on again.
2365 - add an ARES_OPT_NOROTATE optmask value to allow explicit
2366 configuration of no-rotate behaviour
2367 - in ares_save_options(), report the value of channel->rotate
2368 as exactly one of (optmask & ARES_OPT_ROTATE) or
2369 (optmask & ARES_OPT_NOROTATE).
2371 In terms of back-compatibility:
2372 - existing apps that set ARES_OPT_ROTATE will continue to rotate,
2373 and to have ARES_OPT_ROTATE reported back from ares_save_options()
2374 - existing apps that don't set ARES_OPT_ROTATE will continue to
2375 use local config/defaults to decide whether to rotate, and will
2376 now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from
2377 ares_save_options() rather than 0.
2379 - ares_init_options: only propagate init failures from options
2381 Commit 46bb820be3a8 ("ares_init_options: don't lose init failure")
2382 changed init behaviour so that earlier errors in initialization
2383 weren't lost. In particular, if the user passes in specific
2384 options but they are not applied (e.g. because of an allocation
2385 failure), that failure needs to be reported back to the user; this
2386 also applies when duplicating a channel with ares_dup().
2388 However, other initialization failures can be ignored and
2389 overridden -- in particular, if init_by_resolv_conf() or
2390 init_by_environment() fail, then falling back to default values
2393 So only preserve failures from the init_by_options() stage, not
2394 from all initialization stages.
2398 - test: Force reinstall of libtool on OSX
2400 Travis build environment appears to have changed.
2402 - test: Add valgrind build variant
2404 - test: Add null pointer to gtest args
2406 GoogleTest assumes that there is a null pointer in argv[argc],
2407 so make it look like that. Without this change, tests run with
2408 command-line arguments get memory errors under valgrind/ASAN.
2410 Daniel Stenberg (21 Aug 2016)
2411 - AUTHOR: maybe gitgub isn't really an author =)
2413 - AUTHORS: added contributors from the git log
2415 - LICENSE.md: add a stand-alone license file
2417 Just the MIT license used in the top the source files moved out to a
2418 stand-alone file for easier reference and discovery.
2420 - README: added "CII best practices" badge
2422 - SECURITY.md: suggested "security process" for the project
2424 David Drysdale (17 Aug 2016)
2425 - test: Add Clang static analysis build to Travis
2427 Run scan-build over the library source code, but skip the
2428 tests. Needs a later Clang install in Travis
2430 - test: more info on how to run fuzz testing
2432 - test: make fuzzer driver code C not C++
2434 - test: fuzzer mode for AFL's persistent mode
2436 When fuzzing with AFL, if the LLVM-based instrumentation is
2437 used (via the afl-clang-fast wrapper), then it is possible to
2438 have a single execution of the fuzzer program iterate multiple
2439 times over the fuzzing entrypoint (similar to libFuzzer's normal
2440 mode of execution) with different data. This is much (e.g. 10x)
2443 Add code to support this, by checking whether __AFL_LOOP is
2444 defined at compile-time.
2446 Also, shift the code to effectively be C rather than C++.
2448 - test: simplify deps for fuzzer entrypoint
2450 No need to depend on the rest of the test code (ares-test.h) for
2451 the fuzzer entrypoint; this makes the entrypoint slightly simpler
2452 to build with LLVM's libFuzzer.
2454 Also shift the code to effectively be C rather than C++
2456 - test: disable MinGW tests
2458 The test binary built in the MinGW build is failing for some
2459 reason. It works for me when I build locally, so I'm guessing
2460 it's down to some sort of AppVeyor environment issue.
2464 Daniel Stenberg (16 Aug 2016)
2465 - read_tcp_data: remove superfluous NULL check
2467 CID 56884 by Coverity. The pointer is already derefenced before this
2468 point so it can't be NULL here anyway.
2470 - web: http => https
2472 GitHub (20 Jul 2016)
2473 - [David Drysdale brought this change]
2475 Merge pull request #59 from fuze/master
2477 Update msvc_ver.inc for VS2015 Update 3
2479 - [Chris Araman brought this change]
2483 support Visual Studio 2015 Update 3
2485 David Drysdale (2 May 2016)
2486 - Fix trailing comment for #endif
2488 Daniel Stenberg (30 Apr 2016)
2489 - email: use Gisle's "new" address
2491 David Drysdale (18 Apr 2016)
2492 - test: drop superfluous fuzz inputs
2494 Where there are multiple fuzz input files that only differ in
2495 the first two bytes (the query ID), just keep the first such
2498 svante karlsson (15 Apr 2016)
2499 - Update msvc_ver.inc
2501 support Visual Studio 2015 Update 2
2503 David Drysdale (31 Mar 2016)
2504 - test: Run fuzzcheck.sh in Travis build
2506 - test: add fuzzing check script to tests
2508 Add a test script that runs the fuzzing command over the
2509 corpus of DNS packets. This doesn't actually do any fuzzing
2510 (it just runs them as inputs without generating any variations)
2511 but it does ensure that the fuzzing entrypoint is still working.
2513 - test: allow multiple files in aresfuzz command line
2515 If no arguments are specified, use stdin as input.
2516 Otherwise treat each argument as a filename and feed
2517 its contents to the fuzz entrypoint.
2519 - test: Add corpus of DNS packets
2521 For fuzz testing it is useful to start from a corpus of valid
2522 packets, so fill out the test/fuzzinput/ directory with a bunch
2525 These packets were generated by temporarily modifying the c-ares
2526 process_answer() function to save off any incoming response messages.
2528 - test: Add utility to show DNS packet from file
2530 - [nordsturm brought this change]
2532 Fix nsort initialization
2534 Author: Alexander Drachevskiy
2535 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml
2536 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml
2538 - test: Check setting nsort=0 option is respected
2540 - test: Update fuzzing function prototype
2542 libFuzzer changed expected return type from void to int
2545 - Explicitly clear struct servent before use
2547 On a build where MSAN has been manually set up (which involves
2548 using an MSAN-instrumented version of the standard C++ library, see
2549 https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo)
2550 there's a warning about use of uninitialized memory here. It
2551 might be a false positive, but the fix is trivial so include it.
2553 - test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record
2555 Also shuffle expected responses rsp6/rsp4 into the order they will occur.
2557 - [Chris Araman brought this change]
2559 msvc_ver.inc: support Visual Studio 2015 Update 1
2561 - build: commonize MSVC version detection
2563 Remove the need to copy/paste version number mapping between
2564 Makefile.msvc and test/Makefile.msvc.
2566 - test: Use different name in live test
2568 - test: Only pass unused args to GoogleTest
2570 - ahost.c: add cast to fix C++ compile
2572 If ahost.c is force-compiled as C++ the missing cast from
2573 (void *) to (char **) is problematic.
2575 - ares_library_cleanup: reset ares_realloc too
2577 Otherwise a subsequent use of the library might use a previous
2578 incarnation's realloc() implementation.
2580 Daniel Stenberg (9 Mar 2016)
2581 - [Brad House brought this change]
2583 configure: check if tests can get built before enabled
2585 The current approach for disabling tests is not a good solution because
2586 it forces you to pass --disable-tests, rather than auto-detect if your
2587 system can support the tests in the first place. Many (most?) systems
2588 do not have C++11. This also causes issues when chain-building c-ares,
2589 the hosting system needs to be updated to support passing this
2590 additional flag if necessary, it doesn't seem reasonable to add this
2591 requirement which breaks compatibility.
2593 This change auto-detects if the system can build the tests and
2594 automatically disable them if it cannot. If you pass --enable-tests to
2595 configure and the system cannot build them either due to lack of system
2596 support, or because cross-compilation is being used, it will throw an
2597 appropriate error since the user indicated they really did want the
2600 David Drysdale (3 Mar 2016)
2601 - [Viktor Szakats brought this change]
2603 Makefile.m32: add support for CROSSPREFIX
2605 - [Viktor Szakats brought this change]
2607 Makefile.m32: add support for extra flags
2609 Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars
2612 - test: Build with MinGW on AppVeyor
2614 - test: avoid in6addr_* constants
2616 These aren't available on MinGW, so use explicit addresses instead.
2618 - test: add missing #includes for dns-proto.cc
2620 - [Gregor Jasny brought this change]
2622 Fix man page typos detected by Lintian
2624 Daniel Stenberg (19 Feb 2016)
2625 - configure: acknowledge --disable-tests
2629 - AUTHORS: added contributors from the 1.11.0 release
2631 - bump: start working on the next version
2633 Version 1.11.0 (19 Feb 2016)
2635 Daniel Stenberg (19 Feb 2016)
2636 - RELEASE-NOTES: final edits for 1.11.0
2638 David Drysdale (15 Feb 2016)
2639 - ares_dup.3: remove mention of nonexistent function
2641 ares_dup_options() doesn't exist, so don't document it.
2643 - test: skip repeated build steps
2645 Top-level buildconf/configure now triggers for the
2646 test/ subdir too, so don't need to do explicitly.
2648 - test: namespaces unavailable when cross-compiling
2650 Daniel Stenberg (13 Feb 2016)
2651 - configure: only run configure in test when NOT cross-compiling
2653 ... as the tests won't run cross-compiled anyway
2655 David Drysdale (13 Feb 2016)
2656 - test: prefer ON_CALL to EXPECT_CALL to reduce flakes
2658 For UDP tests, there's a chance of a retry. EXPECT_CALL only
2659 expects a single request to arrive at the server; ON_CALL allows
2660 for a UDP retry and repeats the same answer.
2662 Note that ON_CALL and EXPECT_CALL can't be mixed in the same
2663 test, and that tests that have a varied sequence of responses
2664 for the same repeated request still have to use EXPECT_CALL.
2666 Daniel Stenberg (13 Feb 2016)
2667 - configure: run configure in 'test' too
2669 Having the test dir completely stand-alone causes too many issues for
2670 users and devs. It still needs to be built specifically.
2672 - configure: build silently by default
2674 - buildconf: run test/buildconf too if present
2676 - test/configure: build silently by default
2678 - [Gregor Jasny brought this change]
2680 dist: Distribute README.md
2684 Version 1.11.0 (11 Feb 2016)
2686 Daniel Stenberg (11 Feb 2016)
2687 - Makefile.am: distribute the test dir too
2689 - RELEASE-NOTES: synced with 385582bd14b68a
2691 - [Nicolas \"Pixel\" Noble brought this change]
2693 ares_win32_init: make LoadLibrary work when using UNICODE too
2697 David Drysdale (11 Feb 2016)
2698 - Use "resolve" as synonym of "dns" in nsswitch.conf
2700 Modern Linux systems may have libnss_resolve from systemd as the
2701 resolver, which is then configured in /etc/nsswitch.conf with
2702 the "resolve" keyword rather than "dns".
2706 - ares_set_socket_callback: make manpage match code
2708 The code in ares_process.c that invokes the socket creation/connection
2709 callback only checks for rc < 0, not for standard ares error codes.
2711 - Merge pull request #36 from AGWA-forks/master
2713 Add ares_set_socket_configure_callback()
2715 - test: Update init tests to match behaviour
2717 Unreadable config files are now treated the same way
2718 as absent config files.
2720 - [Fedor Indutny brought this change]
2722 Ignore `fopen` errors to use default values
2724 After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf`
2725 errors are no longer swallowed in `ares_init_options`. This has exposed
2726 a previously unknown bug in `lookups` initialization code.
2728 If there is no lookup configuration in `resolv.conf`,
2729 `init_by_resolv_conf` will attempt to read it from other files available
2730 on the system. However, some of these files may have restricted
2731 permissions (like `600`), which will lead to `EACCESS` errno, which in
2732 turn is handled like a fatal error by `init_by_resolv_conf`.
2734 However, it sounds illogical that this error should be handled as a
2735 fatal. There is a `init_by_defaults` call that overrides `lookups` with
2736 default value, and certainly possible absence of lookup information is
2737 the reason why this function exists in a first place!
2739 I suggest handling any `fopen` errors as non-fatal ones, allowing to
2740 pick up the `lookups` value from different config files, or to pick up
2743 Andrew Ayer (9 Feb 2016)
2744 - Document callback type in man page for ares_set_socket_callback
2746 - Add ares_set_socket_configure_callback()
2748 This function sets a callback that is invoked after the socket is
2749 created, but before the connection is established. This is an ideal
2750 time to customize various socket options.
2752 David Drysdale (9 Feb 2016)
2753 - test: ares_set_socket_callback failure behaviour
2755 - test: Check ares_parse_txt_reply_ext() entrypoint
2757 - [Fedor Indutny brought this change]
2759 txt: introduce `ares_parse_txt_reply_ext`
2761 Introduce `ares_txt_ext` structure with an extra `record_start`
2762 field, which indicates a start of a new TXT record, thus allowing to
2763 differentiate the chunks in the same record, from a chunks in a
2766 Introduce a new API method: `ares_parse_txt_reply_ext` that works with
2767 this kind of struct.
2769 - doc: Update missed repo references
2771 - doc: Update docs on contributing
2773 - test: Run command line tools in Travis
2775 Do a quick execution of each of the command line tools
2776 in the continuous integration build, so that any (say)
2777 sanitizer failures show up.
2779 - acountry: drop inert test
2781 If ver_1 is true, then z0 and z1 must both be 'z', and so
2782 (z0 != 'z' && z1 != 'z') can never be true.
2784 CID 56879, pointed out by Coverity.
2786 - doc: update badge locations to master repo
2788 - test: Enable maintainer mode + debug in Travis
2790 - test: Add an iOS build target
2792 - test: Ignore SIGPIPE in tests
2794 - test: More initialization tests
2796 - test: Improve containerized test mechanism
2798 Aim is to ensure that code coverage information can escape the
2799 container. To do this:
2800 - Enter a new mount namespace too, so that we can...
2801 - Bind mount the expected source directory into the container
2802 - Share memory with the sub-process so coverage information is
2805 - test: Make contained tests easier to write
2807 - test: Add framework for containerized testing
2809 On Linux we can potentially use user and UTS namespaces to run a test
2810 in a pseudo-container with:
2811 - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
2812 - arbitrary hostname/domainname.
2814 Include a first pass at the framework code to allow this, along with a
2815 first test case that uses the container.
2817 - test: Use a longer timeout for less flakiness
2819 Having occasional test failures from timeout before multiple
2820 queries can complete, so up the default timeout for the test
2821 from 100ms to 1500ms.
2823 - test: Make failure tests more robust
2825 Different platforms will do different numbers of allocations
2826 in the processing of a given API call; just check that the
2827 return code is either success or ENOMEM, and free off any
2828 returned state in the former case.
2830 Also cope with ECONNREFUSED as well as ENOTFOUND.
2832 - test: Get test code building under Windows
2834 - Initial nmake file based off library nmake file
2835 - Cast socket call arguments to (char *)
2836 - Use wrapper sclose() that maps to closesocket() or close()
2837 - Build a config.h indicating presence of headers
2838 - Conditionally include netdb.h
2839 - Remove unnecessary include of sys/socket.h
2840 - Force longer bitmask for allocation failure tracking
2841 - Call WSAStartup() / WSACleanup() in main()
2842 - Set TCP_NODELAY for mock server
2843 - Turn on tests in AppVeyor build
2845 - test: Disable tests that manipulate env on Windows
2847 - test: Move file lists into Makefile.inc
2849 In preparation for a Win32 build of the test suite.
2851 - test: Add a simple multi-server test
2853 Check rotate option does something
2855 - test: Allow for multiple mock servers
2857 - Update the MockServer to allow separate specification of
2859 - Have an array of mock servers listening on consecutive
2861 - Rename Process(fd) to ProcessFD(fd) to avoid confusion.
2862 - Initialize channel by using the new ares_set_servers_ports()
2863 entrypoint, so multiple ports on the same loopback address
2866 - test: Update test for set/get_servers variants
2868 Ports are significant in the _ports_ variant functions, so update test to cope.
2870 - test: Make GetNameServers() utility function port-aware
2872 Also make it generally available.
2874 - test: more testing, including of internal static functions
2876 - test: more tests, especially fallback processing
2878 - Make mock server listen on UDP + TCP in parallel.
2879 - Test UDP->TCP fallback on truncation
2880 - Test EDNS->no-EDNS fallback
2881 - Test some environment init options
2882 - Test nonsense reply
2884 test: short response
2886 - test: more tests, particularly of initialization
2888 - test: Run mock tests over both TCP and UDP
2890 With the exception of a few tests that make use of the timed
2891 retry aspect of UDP.
2893 - test: Run mock tests over both IPv4 and IPv6
2895 - test: Add more tests for edge cases
2897 - test: more nooks and crannies of pton functions
2899 - test: More tests for PTR parsing
2901 - test: Use of HOSTALIAS environment variable
2903 - test: Add RAII utility classes for testing
2905 - TempFile holds specific contents
2906 - EnvValue sets an environment variable
2908 - test: More search domain scenarios
2910 - test: Remove duplicate flags from Makefile.am
2912 - test: Make test code leak-free
2916 - test use of sortlist
2917 - test gethostbyname(AF_UNSPEC)
2919 - test: Test ares_gethostbyname_file()
2921 - test: Add more tests of ares_getnameinfo()
2923 - test: Tweak tests, add alloc failure test
2925 - test: Test init with options
2929 - ares_inet_net_pton() variants
2930 - ares_getsock() variants
2932 - test: Expose ProcessWork() function
2934 - test: More parsing tests
2937 - Split each parse function test set out into separate files.
2938 - Add an allocation failure test for each parsing function.
2939 - Add error check test for each parsing function.
2941 - test: Add various additional tests
2945 Include tests of internal functions, based on the value of the
2946 CARES_SYMBOL_HIDING macro; need to configure the library with
2947 --disable-symbol-hiding to enable these tests.
2949 - test: Allow command line override of mock server port
2951 - test: Add README.md documentation
2953 - test: Temporarily avoid latest Python requests package
2955 Currently get error from Travis on this install step, and downgrading one
2956 version appears to fix the problem.
2958 "Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13
2959 (from requests[security])"
2961 - test: Add AppVeyor config file for Windows build
2963 - test: Add configuration for a Travis build
2965 Cover Linux & OSX on the container infrastructure, but install
2966 a later G++ to satisfy the tests' need for C++11.
2968 Use a build matrix to include a variety of build variants:
2972 - Coverage via coveralls.io
2974 test: invoke ASAN and coverage in Travis build
2976 Also shift to use explicit build matrix
2978 test: Use coveralls.io for coverage tracking
2980 test: Add a build with UBSAN
2982 Also expand and re-order the setting of environment variables
2983 for easier modification.
2985 test: Add LSAN build to Travis config
2987 - test: Add initial unit tests for c-ares library
2989 The tests are written in C++11, using the GoogleTest and GoogleMock
2990 frameworks. They have their own independent autoconf setup, so that
2991 users of the library need not have a C++ compiler just to get c-ares
2992 working (however, the test/configure.ac file does assume the use of
2993 a shared top-level m4/ directory). However, this autoconf setup has
2994 only been tested on Linux and OSX so far.
2996 Run with "./arestest", or "./arestest -v" to see extra debug info.
2997 The GoogleTest options for running specific tests are also
2998 available (e.g. "./arestest --gtest_filter=*Live*").
3000 The tests are nowhere near complete yet (currently hitting around
3001 60% coverage as reported by gcov), but they do include examples
3002 of a few different styles of testing:
3004 - There are live tests (ares-test-live.cc), which assume that the
3005 current machine has a valid DNS setup and connection to the
3006 internet; these tests issue queries for real domains but don't
3007 particularly check what gets returned. The tests will fail on
3010 - There a few mock tests (ares-test-mock.cc) that set up a fake DNS
3011 server and inject its port into the c-ares library configuration.
3012 These tests allow specific response messages to be crafted and
3013 injected, and so are likely to be used for many more tests in
3016 - To make this generation/injection easier, the dns-proto.h file
3017 includes C++ helper classes for building DNS packets.
3019 - Other library entrypoints that don't require network activity
3020 (e.g. ares_parse_*_reply) are tested directly.
3022 - There are few tests of library-internal functions that are not
3023 normally visible to API users (in ares-test-internal.cc).
3025 - A couple of the tests use a helper method of the test fixture to
3026 inject memory allocation failures, using the earlier change to the
3027 library to allow override of malloc/realloc/free.
3029 - There is also an entrypoint to allow Clang's libfuzzer to drive
3030 the packet parsing code in ares_parse_*_reply, together with a
3031 standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz
3032 for further fuzz testing.
3034 - test: Add local copy of GoogleMock/GoogleTest 1.7.0
3036 Don't check in gtest/m4 files, as they are unused and interfere
3037 with the top-level configure process.
3039 - doc: Show build badges in README.md
3041 Note that these URLs will need to be updated if/when the test branch
3042 gets pulled into the master repo/branch.
3044 - doc: Convert README to README.md
3046 Gives better display on GitHub
3048 - doc: Update in preparation for next release
3050 Assume 1.11.0 is next (as there are various API additions).
3051 Also add myself to AUTHORS.
3053 - build: Allow header compilation by Windows C++ compiler
3055 - build: Expose whether symbol hiding is on
3057 Adding the CARES_SYMBOL_HIDING definition allows the test suite to
3058 detect whether internal symbols are available or not.
3060 - build: Add autoconf macros for C++11 code using pthreads
3062 Pull in testing macros from the GNU autoconf archive to allow
3063 configure scripts to test for and setup use of a C++11 compiler
3064 (AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD).
3066 Note that these macros are not used by the main library autoconf,
3067 just by the tests (which share the same m4/ directory).
3069 - build: Add a code coverage option
3072 ./configure --enable-code-coverage
3073 Show coverage output with:
3074 make code-coverage-capture
3076 Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
3077 to provide the macros to check for presence of gcov + lcov;
3078 upstream macro modified to:
3079 - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
3080 autoconf (such as the one used by default on Travis) do not have this.
3081 - Rather than automatically defining CODE_COVERAGE_RULES to be a set
3082 of makefile rules that use ifeq/endif (which is GNU make-specific),
3083 instead only define CODE_COVERAGE_RULES if coverages is turned on,
3084 and in that case don't use conditionals in the makefile.
3086 - api: Add entrypoints to allow use of per-server ports
3088 Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
3089 take struct ares_addr_port_node rather than struct ares_addr_node.
3090 This structure includes a UDP and TCP port number; if this is set
3091 to zero, the channel-wide port values are used as before.
3093 Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
3094 is analogous to ares_set_servers(3) except it doesn't ignore any
3095 specified port information; instead, any per-server specified port
3096 is used as both the UDP and TCP port for that server.
3098 The internal struct ares_addr is extended to hold the UDP/TCP ports,
3099 stored in network order, with the convention that a value of zero
3100 indicates that the channel-wide UDP/TCP port should be used.
3102 For the internal implementation of ares_dup(3), shift to use the
3103 _ports() version of the get/set functions, so port information is
3104 transferred correctly to the new channel.
3106 Update manpages, and add missing ares_set_servers_csv to the lists
3109 - api: Add ares_set_sortlist(3) entrypoint
3111 Allow explicit configuration of the channel's sortlist, by
3112 specifying a string in the same format as the equivalent
3113 /etc/resolv.conf option.
3115 This allows library users to perform the same configuration
3116 that is available via /etc/resolv.conf, but without needing
3117 to change that file.
3119 - api: Allow injection of user-specified malloc/free functions
3121 Add a new ares_library_init_mem() initialization function for the
3122 library which allows the library user to specify their own malloc,
3123 realloc & free equivalents for use library-wide.
3125 Store these function pointers in library-wide global variables,
3126 defaulting to libc's malloc(), realloc() and free().
3128 Change all calls to malloc, realloc and free to use the function pointer
3129 instead. Also ensure that ares_strdup() is always available
3130 (even if the local environment includes strdup(3)), and change the
3131 library code to always use it.
3133 Convert calls to calloc() to use ares_malloc() + memset
3135 - api: Add option to expose some internal functions
3137 Purely for testing, add --enable-expose-statics option to configure
3138 which converts some static internal functions to be externally visible.
3140 - api: Expose the ares_library_initialized() function
3142 - ahost: Allow repeated -s <domain> options
3144 This also removes a potential leak where later -s options would
3145 replace earlier ones without freeing the relevant string.
3147 - Mark unhittable lines
3149 Add comments for the benefit of the lcov tool, marking
3150 lines that cannot be hit. Typically these are fall-back
3151 protection arms that are already covered by earlier checks,
3152 and so it's not worth taking out the unhittable code (in case
3153 someone changes the code between the two places in future).
3155 - ares_set_servers_csv.3: make return type match code
3157 - bitncmp: update comment to match code behaviour
3159 - ares_striendstr: fix so non-NULL return can happen
3161 This looks to have been broken since it was first introduced in 2005 in
3162 commit aba0b775ea30 ("Added ares_getnameinfo which mimics the
3165 - config_sortlist: free any existing sortlist on (re)alloc failure
3167 If we get an allocation failure on 2nd or later entry in the sortlist, the
3168 code would return ENOMEM but still leave the initial entries allocated.
3169 Ensure that *sortlist is set to NULL whenever ENOMEM is returned.
3171 - ares_dup: clear new channel on failure
3173 If the attempt to transfer IPv6 servers from the old to the new channel
3174 fails, the previous code would still return a channel to the user even though
3175 an error return code was generated. This makes it likely that users would
3176 leak the channel, so explicitly clear the channel in this case.
3178 - ares_init_options: don't lose init failure
3180 If (say) init_by_options() fails, the subsequent call to
3181 init_by_defaults() was overwriting the return code with
3182 success. Still call init_by_defaults() regardless, but track
3183 its return value separately
3185 - ares_gethostbyname: don't leak valid-but-empty hostent
3187 If an AF_UNSPEC query gets a valid response to its AAAA query,
3188 but which has no IPv6 addresses in it, then the code chains on to
3189 a A record query. However, the hostent from the AAAA response
3190 was being leaked along the way (because it gets replaced before
3191 the follow-on end_hquery() invocation).
3193 - ares_parse_txt_reply: propagate errors from per-substring loop
3195 If we get an allocation failure when processing a particular substring in a
3196 TXT record, that failure is silently lost; fix that by propagating errors from
3197 the inner loop to the outer loop.
3199 - process_answer: fix things up correctly when removing EDNS option
3201 When a server rejects an EDNS-equipped request, we retry without
3202 the EDNS option. However, in TCP mode, the 2-byte length prefix was
3203 being calculated wrong -- it was built from the answer length rather than
3204 the length of the original request.
3206 Also, it is theoretically possible that the call to realloc() might change
3207 the data pointed to; to allow for this, qbuf also needs updating.
3209 (Both these fixes were actually included in a patchset sent on the mailing
3210 list in Oct 2012, but were included with other functional changes that
3212 http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml)
3214 - ares__read_line: clear buf pointer on realloc failure
3216 - ares_expand_name: check for valid bits in label length
3218 The top two bits of the label length indicate whether this is a
3219 label length (00) or an index to a name elsewhere in the message
3220 (11). RFC1035 4.1.4 says that the other possible values for the
3221 top two bits (01, 10) are reserved for future use.
3223 Daniel Stenberg (23 Jan 2016)
3224 - [Gregor Jasny brought this change]
3226 Fix typos detected by lintian
3230 - [Gregor Jasny brought this change]
3232 Distribute all man pages
3234 - README.cares: s/I/Daniel
3236 ... and add a pointer to an existing version of the original area 1.1.1
3239 - read_tcp_data: don't try to use NULL pointer after malloc failure
3241 CID 56884, pointed out by Coverity. We really should make this function
3242 return an error code so that a malloc() failure can return back a major
3245 - configure_socket: explicitly ignore return code
3247 CID 56889 in Coverity pointed out the return code from setsocknonblock()
3248 is ignored, and this added typecast to (void) makes it explicit.
3250 - ahost: check the select() return code
3252 Fixes CID 137189, pointed out by Coverity
3254 David Drysdale (18 Jan 2016)
3255 - Fix buildconf on platforms using glibtoolize
3257 Commit c49a87eea538 changed buildconf to only check for
3258 libtoolize, but missed a line
3260 - Don't exit loop early leaving uninitialized entries
3262 Update for commit affc63cba875d.
3264 The original patch from Gregor Jasny did not have the break
3265 statement; I incorrectly added it to prevent continuing the loop.
3266 However, the later entries in the array would then be left
3267 uninitialized, causing problems for later cleanup.
3269 So fix to match Gregor's original patch, with apologies.
3271 Daniel Stenberg (18 Jan 2016)
3272 - buildconf: remove check for libtool, it only requires libtoolize
3274 David Drysdale (17 Jan 2016)
3275 - [Gregor Jasny brought this change]
3277 Use libresolv to initialize cares on iPhone targets
3279 On iPhone targets like iOS, watchOS or tvOS the file
3280 /etc/resolv.conf cannot be used to configure cares.
3282 Instead the resolver library is queried for configuration
3285 CC: Yury Kirpichev <ykirpichev@yandex-team.ru>
3287 Daniel Stenberg (17 Jan 2016)
3288 - README: updated to new repo URL
3290 David Drysdale (14 Jan 2016)
3291 - [Lei Shi brought this change]
3293 Fixing slow DNS lookup issue
3295 This patch is fixing the dns lookup issue due to dummy dns information
3296 of a disconnected adapter(in my case is a bluetooth adapter). I changed
3297 the dns lookup policy to try GetNetworkParams first because the
3298 GetNetworkParams provides the most reliable dns information (lots of
3299 checks were done by system). I also filter out inoperable adapter in
3300 DNS_AdaptersAddresses in case GetNetworkParams fail.
3302 - Merge pull request #30 from p-push/vs-2015
3304 Support Visual Studio 2015
3306 Oleg Pudeyev (3 Jan 2016)
3307 - [Gisle Vanem brought this change]
3309 Support Visual Studio 2015
3311 David Drysdale (11 Nov 2015)
3312 - [Andrew Andkjar brought this change]
3314 added another version case to Makefile.msvc
3316 nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
3318 - Merge pull request #26 from bitbouncer/vs-2013
3320 added define for visual studio 2013
3322 svante karlsson (25 Jun 2015)
3323 - added define for visual studio 2013
3325 Jakub Hrozek (6 Nov 2014)
3326 - ares__read_line: free buf on realloc failure
3328 - Destroy options if ares_save_options fails
3330 It's possible that, if ares_save_options failed, the opts structure
3331 would contain some allocated memory. Calling ares_destroy_options in
3332 this case is safe, because ares_save_options zeroes out the memory
3335 - [David Drysdale brought this change]
3337 Continue loop if space for hostname not large enough
3339 When attempting to build a search domain from the local hostname
3340 (used as a fallback when no other methods have given a search
3341 domain), the code doubles the buffer size on each loop iteration.
3343 However, the loop previously had a WHILE_FALSE terminator so the continue
3344 statement exited the loop rather than going round again.
3346 Daniel Stenberg (30 Oct 2014)
3347 - ares_getnameinfo.3: there is no ares_getaddrinfo
3349 David Drysdale (30 Sep 2014)
3350 - [Gregor Jasny brought this change]
3352 Prevent tmpbuf from overrunning
3354 Fix Coverity error CID 56886.
3356 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
3358 - [Gregor Jasny brought this change]
3360 Re-start loop if select fails
3362 Fix Coverity error CID 56882
3364 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
3366 - [Gregor Jasny brought this change]
3368 Free temporary variable in error path
3370 Fix Coverity CID 56890
3372 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
3374 - [Gregor Jasny brought this change]
3376 Fix integer shift overflow if both tcp_socket and udp_socket are set
3378 The problem occurs if at the start of the loop the sockindex is at the
3379 last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
3380 tcp_socket are valid, sockindex gets incremented for UDP first and
3381 points one entry behind the array for the tcp block.
3382 So the fix is to check after every increment of sockindex if it is still
3385 Fix Coverity error CID 56878
3387 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
3389 - [Gregor Jasny brought this change]
3391 Null check before dereference
3393 Fix Coverity error CID 56880
3395 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
3397 Jakub Hrozek (28 Jul 2014)
3398 - [Gisle Vanem brought this change]
3400 Comment in ares_ipv6.h
3402 David Drysdale (25 Jul 2014)
3403 - CONTRIBUTING: add file to indicate mailing list is preferred
3405 - Add -t u option to ahost
3407 Add an option to allow specification of the AF_UNSPEC
3410 Jakub Hrozek (24 Jul 2014)
3411 - host_callback: Fall back to AF_INET on searching with AF_UNSPEC
3413 Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
3414 first AF_INET6 call only returned CNAMEs, the host_callback never
3417 This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
3418 taken as authoritative only if the result contains some addresses.
3420 - [David Drysdale brought this change]
3422 Move memset call below platform-specific declarations
3424 A GitHub commenter [1] says that my recent change to ahost.c has
3425 problems compiling on Windows + C89 platforms.
3427 [1] https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
3429 - [David Drysdale brought this change]
3431 Update ahost man page to describe -s option.
3433 Commit ee22246507c9 added the -s <domain> option to the
3434 ahost command, but neglected to update the man page to
3437 Also fix typo in description of -t option.
3439 - ares_parse_soa_reply: Do not leak rr_name on allocation failure
3441 If ares_malloc_data failed, already allocated rr_name would go out of
3444 - [David Drysdale brought this change]
3446 Don't override explicitly specified search domains
3448 Only set search domains from /etc/resolv.conf if there isn't a value
3449 already present in the channel.
3451 - [David Drysdale brought this change]
3453 Allow specification of search domain in ahost
3455 Add the "-s domain" command line option to override the search
3458 Daniel Stenberg (12 May 2014)
3459 - Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
3461 This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451.
3463 - [Frederic Germain brought this change]
3465 ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address
3467 - [Doug Kwan brought this change]
3469 ares_build.h: fix building on 64-bit powerpc
3471 There are two issues.
3473 1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
3474 __PPC64__. The tests of __ILP32__ and __LP64__ are sufficient for gcc.
3476 2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
3477 targeting ppc64. This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
3478 when building with clang.
3480 My patch is two change the order of the checks so that we check the
3483 - refresh: updated now with automake 1.14
3485 - [David Drysdale brought this change]
3487 single_domain: Invalid memory access for empty string input
3489 We noticed a small buglet in ares_search() when it gets an empty string
3490 as input -- the single_domain() utility function in ares_search.c
3491 accesses invalid memory (before the start of the string).
3493 Guenter Knauf (31 Aug 2013)
3494 - Fixed warning 'type specifier missing'.
3496 Daniel Stenberg (30 Aug 2013)
3497 - [Tor Arntsen brought this change]
3499 ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
3501 It was removed in f19387dd72432
3503 - nowarn: use <limits.h> instead of configure for size of long
3505 This makes the header file much more multi-arch friendly and can be used
3506 as-is with both 32 bit and 64 bit builds.
3508 - timeoffset: made static and private
3510 ares__timeoffset() was only used once within this single source file
3512 - timeadd: make static
3514 ares__timeadd() was only ever used from within the same source
3516 Yang Tse (18 Jul 2013)
3517 - xc-am-iface.m4: comments refinement
3519 - configure: fix 'subdir-objects' distclean related issue
3521 See XC_AMEND_DISTCLEAN comments for details.
3523 - configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)
3525 - xc-am-iface.m4: provide XC_AUTOMAKE macro
3527 Daniel Stenberg (12 May 2013)
3528 - gitignore: ignore all ares_*pdf but also CHANGES.dist
3530 - bump: start working towards 1.10.1
3532 Version 1.10.0 (12 May 2013)
3534 Daniel Stenberg (12 May 2013)
3535 - RELEASE-NOTES: two more bug fixes
3537 - [Keith Shaw brought this change]
3539 ares_set_servers_csv: fixed IPv6 address parsing
3541 Fixed bug that caused the last part of an IPv6 address to be parsed as
3542 the port number when the last part is all numeric.
3544 - nroff: fix two syntax mistakes
3546 ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of
3549 Reported-by: Alexander Klauer
3550 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml
3552 - [Alex Loukissas brought this change]
3554 build: fix build on msvc11
3556 - Makefile.am: increment -version-info for 1.10.0 release
3558 - README: remove unnecessary comment
3560 - ares_version.h: copyright end range year is now 2013
3562 - RELEASE-NOTES: synced with fb0737f3a0a1c37
3564 - [Paul Saab brought this change]
3566 ares_parse_aaaa_reply: Plug memory leak
3568 This change is similar to ares_parse_a_reply.c in commit
3569 bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6
3571 - [Patrick Valsecchi brought this change]
3573 ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
3575 Previously, the function would wrongly return all substrings merged into
3578 - [Alexander Klauer brought this change]
3580 library init: documentation update
3582 This commit updates the documentation of ares_library_init() and
3583 ares_library_cleanup() with regard to the newly introduced reference
3584 counting of initializations and deinitializations.
3586 - [Alexander Klauer brought this change]
3588 library init: be recursive
3590 Previously, a single call to ares_library_cleanup() would deinitialise
3591 the c-ares library, regardless of how many times ares_library_init() was
3592 called. This behaviour may cause problems in programs linking two or
3593 more libraries which, in turn, use c-ares. The present commit fixes this
3594 problem, deinitializing the library only after a number of calls to
3595 ares_library_cleanup() matching the number of calls to
3596 ares_library_init().
3598 - [Patrick Valsecchi brought this change]
3600 protocol parsing: check input data stricter
3602 ... so that bad length fields aren't blindly accepted
3604 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml
3606 Guenter Knauf (11 Apr 2013)
3607 - Create ares_build.h when buidling from Git.
3609 - Added -DCARES_STATICLIB to CFLAGS.
3611 Currently this static makefile does only support building the
3612 static library libcares.a.
3614 Daniel Stenberg (8 Apr 2013)
3615 - [Alexander Klauer brought this change]
3617 .gitignore: ignore patch files
3619 This commit adds a line to .gitignore to the effect that patch files
3620 generated by 'git format-patch' are excluded from the repository.
3622 - [Alexander Klauer brought this change]
3624 ares_destroy() documentation: no new requests
3626 Clarify that no new requests may be added to a resolver channel that is
3627 currently being destroyed.
3629 - [Alexander Klauer brought this change]
3631 Documentation: properly document ARES_ECANCELLED
3633 This commit clarifies the behaviour of ares_cancel() with respect to
3634 callbacks and adds missing documentation of ARES_ECANCELLED to the man
3635 pages of the affected functions.
3637 - [Alexander Klauer brought this change]
3639 ares_cancel(): cancel requests safely
3641 An invocation of ares_cancel() walks through the request list, calling
3642 the callbacks of all pending requests on a channel. Previously, if such
3643 a callback added a new request to the channel, the request list might
3644 not end up empty, causing an abort by assertion failure. The present
3645 commit ensures that precisely all requests present upon entry of
3646 ares_cancel() are cancelled, and that adding new requests through
3649 Yang Tse (10 Mar 2013)
3650 - ares.h: stricter CARES_EXTERN linkage decorations logic
3652 No API change involved.
3654 - ares_build.h.dist: enhance non-configure GCC ABI detection logic
3656 GCC specific adjustments:
3658 - check __ILP32__ before 32 and 64bit processor architectures in
3659 order to detect ILP32 programming model on 64 bit processors
3660 which, of course, also support LP64 programming model, when using
3663 - keep 32bit processor architecture checks in order to support gcc
3664 versions older than 4.7 which don't define __ILP32__
3666 - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
3667 architecture checks for older versions which don't define __LP64__
3669 Daniel Stenberg (9 Mar 2013)
3670 - ares.h: there is no ares_free_soa function
3672 Yang Tse (9 Mar 2013)
3673 - Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
3675 - ares_inet_ntop.3: s/socklen_t/ares_socklen_t
3677 - configure: use XC_LIBTOOL for portability across libtool versions
3679 - xc-lt-iface.m4: provide XC_LIBTOOL macro
3681 - Makefile.am: use AM_CPPFLAGS instead of INCLUDES
3683 - inet_ntop.c: s/socklen_t/ares_socklen_t
3685 - inet_ntop.c: s/socklen_t/ares_socklen_t for portability
3687 Daniel Stenberg (19 Feb 2013)
3688 - ares.h: s/socklen_t/ares_socklen_t for portability
3690 - ares_inet_ntop.3: 4th argument is socklen_t!
3692 - spell inet correctly!
3694 - ares_inet_pton/ntop: cleanup
3696 Make sure that the symbols are always exported and present in c-ares.
3698 Make the headers prefixed with 'ares'.
3700 Removed the inet_ntop.h version as it no longer features any content.
3702 - ares_inet_ntop/ares_inet_pton: added man pages
3704 Yang Tse (15 Feb 2013)
3705 - [Gisle Vanem brought this change]
3707 curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
3709 - [Gisle Vanem brought this change]
3711 config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
3713 - [Gisle Vanem brought this change]
3715 config-dos.h: define strerror() to strerror_s_() for High-C
3717 Daniel Stenberg (13 Feb 2013)
3718 - ares_get_datatype: removed unused function
3720 it was also wrongly named as internal functions require two underscores
3722 - ares__bitncmp: use two underscores for private functions
3724 It used a single one previously making it look like a public one
3726 - ares__generate_new_id: moved to ares_query.c
3728 ... and ares__rc4 is turned into a local static function.
3730 - ares__swap_lists: make private and static
3732 ... since there's only one user, make it static within ares_process.c
3734 Yang Tse (13 Feb 2013)
3735 - Makefile.msvc: add four VS version strings
3737 Daniel Stenberg (13 Feb 2013)
3738 - ares_expand_name.3: clarify how to free the data
3740 Yang Tse (30 Jan 2013)
3741 - zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
3743 - Fix a pair of single quotes to double quotes.
3745 URL: http://curl.haxx.se/mail/lib-2013-01/0355.html
3746 Reported by: Tor Arntsen
3748 - zz40-xc-ovr.m4: fix 'wc' detection - follow-up
3750 - Take into account that 'wc' may return leading spaces and/or tabs.
3752 - Set initial IFS to space, tab and newline.
3754 - zz40-xc-ovr.m4: fix 'wc' detection
3756 - Take into account that 'wc' may return leading spaces.
3758 - Set internationalization behavior variables.
3760 Tor Arntsen analyzed and reported the issue.
3762 URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
3764 - zz40-xc-ovr.m4: check another three basic utilities
3766 - zz40-xc-ovr.m4: 1.0 interface stabilization
3768 - Stabilization results in 4 public interface m4 macros:
3769 XC_CONFIGURE_PREAMBLE
3770 XC_CONFIGURE_PREAMBLE_VER_MAJOR
3771 XC_CONFIGURE_PREAMBLE_VER_MINOR
3772 XC_CHECK_PATH_SEPARATOR
3773 - Avoid one level of internal indirection
3775 - Drop XC_OVR_ZZ40 macro
3777 - zz40-xc-ovr.m4: emit witness message in configure BODY
3779 This avoids witness message in output when running configure --help,
3780 while sending the message to config.log for other configure runs.
3782 - zz40-xc-ovr.m4: truly do version conditional overriding
3784 - version conditional overriding
3785 - catch unexpanded XC macros
3786 - fix double words in comments
3788 - zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
3790 Tor Arntsen analyzed and reported the issue.
3792 URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
3794 - zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
3796 - zz40-xc-ovr.m4: avoid double single-quote usage
3798 - zz40-xc-ovr.m4: parentheses balancing of 'case' statements
3800 m4 quadrigraph shell comment technique allows proper autoconf
3801 parentheses balancing in shell 'case' statements. The presence
3802 of unbalanced parentheses may otherwise trigger expansion bugs.
3804 - zz40-xc-ovr.m4: internals overhauling
3807 - Execute commands in subshells
3808 - Faster path separator check
3809 - Fix missing 'test' command
3810 - Rename private macros
3811 - Minimize AC_REQUIRE usage
3813 - zz40-xc-ovr.m4: redirect errors and warnings to stderr
3815 - configure: use XC_CONFIGURE_PREAMBLE early checks
3817 Some basic checks we make were placed early enough in generated
3818 configure script when using autoconf 2.5X versions. Newer autoconf
3819 versions expand these checks much further into the configure script,
3820 rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement
3821 of early intended checks across all our autoconf supported versions.
3823 - zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
3825 - configure: autotools compatibility fixes - step I
3827 Fix proper macro expansion order across autotools versions for
3828 C compiler and preprocessor program checks.
3830 - configure: fix automake 1.13 compatibility
3834 buildconf: autoconf version 2.69
3835 buildconf: autom4te version 2.69
3836 buildconf: autoheader version 2.69
3837 buildconf: automake version 1.13.1
3838 buildconf: aclocal version 1.13.1
3839 buildconf: libtool version 2.4
3840 buildconf: GNU m4 version 1.4.16
3842 - ares_private.h: use again memdebug.h instead of curl_memdebug.h
3844 - configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
3846 automake 1.13 errors if AM_CONFIG_HEADER is used in configure script.
3848 - cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
3850 Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
3851 an autoconf version that does not provide it, instead of what we were
3852 doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
3853 all autoconf versions.
3855 - ares_private.h: use curl_memdebug.h instead of memdebug.h
3857 - vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c
3859 - cares-functions.m4: improve gethostname arg 2 data type check
3861 - setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
3863 Also reverts commit bceb40095a
3865 - configure: check if compiler halts on function prototype mismatch
3867 - cares-functions.m4: add gethostname arg 2 data type check and definition
3869 - cares-functions.m4: update thread-safeness detection of getaddrinfo()
3871 Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
3872 consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
3873 (_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.
3875 Take in account that h_errno might be a modifiable lvalue not defined as
3876 a C preprocessor macro.
3878 - setup_once.h: HP-UX <sys/socket.h> issue workaround
3880 Issue: When building a 32bit target with large file support HP-UX
3881 <sys/socket.h> header file may simultaneously provide two different
3882 sets of declarations for sendfile and sendpath functions, one with
3883 static and another with external linkage. Given that we do not use
3884 mentioned functions we really don't care which linkage is the
3885 appropriate one, but on the other hand, the double declaration emmits
3886 warnings when using the HP-UX compiler and errors when using modern
3887 gcc versions resulting in fatal compilation errors.
3889 Mentioned issue is now fixed as long as we don't use sendfile nor
3892 - setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
3894 Inclusion of these two header files now done in setup_once.h
3896 - Header inclusion clean-up
3898 Remove header inclusions already done in setup_once.h
3900 - setup_once.h: HP-UX specific TRUE and FALSE definitions
3902 Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
3904 - ares_timeout.c: fix compiler warning
3906 - ares_create_query.c: IRIX compilation fix
3908 - c-ares/nameser.h: add some T_* defines for ns_t_* values
3910 Daniel Stenberg (7 Nov 2012)
3911 - Revert "ares_parse_aaaa_reply: fix memory leak"
3913 This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a.
3915 - ares_parse_aaaa_reply: fix memory leak
3917 an allocated buffer was not freed in the successful case.
3919 - [Gisle Vanem brought this change]
3921 adig: perror() doesn't work for socket errors on windows
3923 ... so print the SOCKERRNO instead
3925 - get_DNS_AdaptersAddresses: fix IPv6 parsing
3927 Use of the wrong define made the function not parse IPv6 addresses
3930 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml
3931 Reported by: Saúl Ibarra Corretgé
3933 - version: bumped to 1.10.0
3935 Due to the newly added function: ares_create_query()
3937 - AUTHORS: synced with 83093ac450
3939 Added 21 authors since this document was last updated
3941 - ares_create_query.3: mention when this is added
3943 - [hpopescu@ixiacom.com brought this change]
3945 Added new feature (rfc2671)
3947 - code police: fix indents, < 80 columns, reflowed comments
3949 Guenter Knauf (11 Jul 2012)
3950 - Cleaned up version awk script.
3952 Daniel Stenberg (30 Jun 2012)
3953 - [Gisle Vanem brought this change]
3955 read_udp_packets: bail out loop on bad sockets
3957 I can see that recvfrom() in ares_process.c many times is called with
3958 'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call
3959 recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the
3962 Yang Tse (29 Jun 2012)
3963 - cares-compilers.m4: remove -Wstrict-aliasing=3 from clang
3965 Currently it is unknown if there is any version of clang that
3966 actually supports -Wstrict-aliasing. What is known is that there
3967 are several that don't support it.
3969 - cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
3971 Daniel Stenberg (18 Jun 2012)
3972 - version: work towards 1.9.2 (at least)
3974 Version 1.9.1 (18 Jun 2012)
3976 Daniel Stenberg (18 Jun 2012)
3977 - RELEASE-NOTES: 1.9.1 coming up
3979 Version 1.9.0 (16 Jun 2012)
3981 Daniel Stenberg (16 Jun 2012)
3982 - ares_version.h: next version is 1.9.0
3984 - [Marko Kreen brought this change]
3986 ares_data.h: ARES_DATATYPE_SOA_REPLY is added in 1.9.0
3988 - RELEASE-NOTES: synced with 979bf951d
3990 Next release deemed to become 1.9.0 due to the new function
3992 - [Marko Kreen brought this change]
3996 I need to do SOA queries, so here is a parser for them.
3998 - ares_soa_reply: new struct
3999 - ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY
4000 - ares_parse_soa_reply: actual function
4002 Yang Tse (14 Jun 2012)
4003 - Kill compiler warning
4005 - Fix libcares.pc generation for static MingW* cross builds
4007 Daniel Stenberg (21 May 2012)
4008 - [Nick Alcock brought this change]
4010 Fix UDP and TCP port byte order in saved options.
4012 The UDP and TCP port are stored in network byte order in the
4013 ares_channeldata, but are passed in to ares_init_options() in host byte
4014 order. Thus we must return them from ares_save_options() in host byte
4015 order too, or a duplicated channel will convert them again, leading to a
4016 nonfunctional channel and a mysterious connection refused error from
4017 ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API
4018 when c-ares is used by curl, and thus all the curl easy API's users.
4020 Yang Tse (28 Apr 2012)
4021 - version: start working on 1.8.1-DEV
4023 Version 1.8.0 (27 Apr 2012)
4025 Daniel Stenberg (27 Apr 2012)
4026 - RELEASE-NOTES: call next 1.8 instead
4028 Since we added a function, let's use a stricter bumping scheme
4030 Yang Tse (25 Apr 2012)
4031 - INSTALL: some adjustments
4033 Daniel Stenberg (25 Apr 2012)
4034 - GIT-INFO: mention buildconf
4036 Yang Tse (25 Apr 2012)
4037 - INSTALL: remove more sections that don't apply to c-ares
4039 - ares_timeout.c: fix compiler warning
4041 Daniel Stenberg (25 Apr 2012)
4042 - [Ben Noordhuis brought this change]
4044 Makefile.m32: fix mingw32 build
4046 * add . to include path so ares_build.h is picked up
4047 * make ar configurable to ease cross-compiling
4049 - RELEASE-NOTES: added what's happened since 1.7.5
4051 Guenter Knauf (22 Apr 2012)
4052 - Updated copyright year.
4054 Yang Tse (21 Apr 2012)
4055 - ares_init.c: Further refactoring of Windows system's DNS fetching code
4057 Guenter Knauf (20 Apr 2012)
4058 - Android: small changes to dns property part.
4060 Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro.
4062 - Handle CNAME-only in ares_parse_aaaa_reply().
4064 posted to the c-ares list by Peter Griess <pg@std.in>.
4066 - Add support for multiple DNS servers on Android.
4068 Before, c-ares always used the first DNS server on Android, causing
4069 network problems if this DNS server was not available.
4071 Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
4073 - Added INSTALL so it gets into tarballs.
4075 - Added some more ifdefs to silent compiler warnings.
4077 Yang Tse (17 Apr 2012)
4078 - INSTALL: remove a non c-ares section
4080 - cares-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
4082 When building a Windows target with gcc 4.5 or newer and strict compiler
4083 warnings enabled use -Wno-pedantic-ms-format in addition to other flags.
4085 - setup_once.h: tighten requirements for stdbool.h header inclusion
4087 Include stdbool.h only when it is available and configure is capable of
4088 detecting a proper 'bool' data type when the header is included.
4090 - configure: NATIVE_WINDOWS no longer defined in config file
4092 - cares-compilers.m4: double underscore decoration for visibility attribute
4094 - build adjustments: CARES_SYMBOL_HIDING no longer defined in config files
4096 configure script now provides conditional definitions for Makefile.am
4097 that result in CARES_SYMBOL_HIDING being defined by resulting makefiles
4100 - configure: Windows cross-compilation fixes
4102 CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h,
4103 configure will generate appropriate conditionals so that mentioned symbols
4104 get defined and used in Makefile derived from Makefile.am at compilation time.
4106 Guenter Knauf (17 Apr 2012)
4107 - Added INSTALL file adapted from libcurl.
4109 Not yet ready, and needs further edits.
4111 Yang Tse (16 Apr 2012)
4112 - ares_init.c: get_iphlpapi_dns_info() refactoring
4114 Guenter Knauf (16 Apr 2012)
4115 - Kill some more compiler warnings.
4117 - Kill compiler warning about unused var.
4119 - Fixed my last commit: wrong preprocessor directive.
4121 - Check for __ANDROID__ in addition to ANDROID macro.
4123 - Check for __ANDROID__ in addition to ANDROID macro.
4125 Posted to c-ares list by Wayne.
4127 - Fix for Android to disable useless arpa/nameser.h.
4129 - Fix for Android to include sys/select.h for fd_set.
4131 Yang Tse (17 Mar 2012)
4132 - ares_data.c: some NAPTR related fixes
4134 Daniel Stenberg (16 Mar 2012)
4135 - port numbers: convert them to network order!
4137 When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used,
4138 make sure to convert them to network byte order!
4140 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml
4142 - white space cleanup
4144 - Keep code within 80 columns
4146 - Removed funny spaces after open paren and before closing paren
4148 - [Poul Thomas Lomholt brought this change]
4150 get_iphlpapi_dns_info: fix buffer overrun
4152 I experienced a buffer overrun exception in c-ares on Windows and
4153 tracked it down to be an error in the calculation of the 'left' variable
4154 in get_iphlpapi_dns_info().
4156 I changed the variable type of 'left' to a _signed_ type because of the
4157 subtraction arithmetic; not sure if a long is the best choice
4159 - Merge pull request #7 from saghul/naptr
4161 Added support for parsing NAPTR records
4163 saghul (23 Feb 2012)
4164 - Added support for parsing NAPTR records
4166 Yang Tse (19 Jan 2012)
4167 - ares_init.c: fix compiler warning on winsock builds
4169 - configure: libtool 1.5 tweaks
4171 Daniel Stenberg (19 Dec 2011)
4172 - ares_timeout.3: fix the NAME section
4174 It was clearly a copy n' paste error
4176 Yang Tse (27 Sep 2011)
4177 - [Albert Chin brought this change]
4179 configure - m4: make CURL_CHECK_DEF ignore leading whitespace on symbol def
4181 When using Sun C compiler the preprocessor somehow inserts an extra space
4182 in front of replaced symbol, breaking CURL_CHECK_DEF macro. To workaround
4183 this, macro CURL_CHECK_DEF now ignores all leading whitespace in front of
4184 symbol substitution result.
4186 - ares_init.c: fix segfault triggered in ares_init_options() upon previous
4187 failure of init_by_defaults() and incomplete cleanup there.
4189 - ares_process.c: fix compiler warning
4191 - fix MSVC compiler warning 'conditional expression is constant'
4193 - setup_once.h cleanup and sync
4195 - [Denis Bilenko brought this change]
4197 ares_getnameinfo: fix random results with c-ares 1.7.5
4199 In ares_getnameinfo memcpy did not copy enough bytes, causing
4200 it to return arbitrary memory contents as a result.
4202 - warnings: fix another 'conversion may lose significant bits' compiler warning
4204 - ares_dns.h: adjust DNS__16BIT and DNS__32BIT macro definitions
4206 Fixing compiler warnings existing definitions triggered on these.
4208 - ares_destroy.c: fix segfault in ares_destroy_options()
4210 Daniel Stenberg (21 Aug 2011)
4211 - ares_parse_srv_reply: silence compiler warnings
4213 ... by adding ugly typecasts.
4215 - CHANGES: generate from script
4217 The CHANGES file is now generated automatically with 'git2changes.pl',
4218 invoked by the maketgz script which is used to build release archives.
4220 The former human edited CHANGES file was renamed to CHANGES.0 in git.
4222 Yang Tse (21 Aug 2011)
4223 - Makefile.netware: SIZEOF_SHORT definition
4225 - warnings: fix some 'conversion may lose significant bits' compiler warnings
4227 - configure: fix symbol hiding usability check
4229 A more thorough test is done now in order to determine visibility attribute
4230 usability, given that some compilers don't support visibility attribute on
4233 Daniel Stenberg (16 Aug 2011)
4234 - 1.7.6: start working...
4236 Version 1.7.5 (16 Aug 2011)
4238 Daniel Stenberg (16 Aug 2011)
4239 - CHANGES: synced for 1.7.5 release
4241 - RELEASE-NOTES: synced with bb4096effef7f000
4243 Jakub Hrozek (15 Aug 2011)
4244 - Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
4246 Yang Tse (10 Aug 2011)
4247 - [Gisle Vanem brought this change]
4249 ares_iphlpapi.h: Watcom C fix
4251 Added "!defined(_WS2DEF_)" since Watcom doesn't have
4252 a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or
4253 'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for
4256 - [Gisle Vanem brought this change]
4259 * The 'NTDDI_VERSION' needs to be raised to 0x05010000
4260 in order for SOCKADDR_STORAGE etc. to be typedefed.
4261 * Replaced '-dUSE_WATT32' with '-dWATT32'.
4262 * Added $(DEMOS) to the 'all' target and removed the 'demos'
4263 target to be consistent with e.g. Makefile.msvc etc.
4264 * 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct.
4265 * object-file order seems to be important (Watcom v.19). Hence
4266 'ares_getopt.obj' must be put after the .obj that references getopt().
4268 - cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments
4270 Add CARES_CHECK_COMPILER as a requirement.
4272 Ensure macro does nothing unless GNU_C or CLANG compiler is used.
4274 This should allow usage of this macro in unforeseen placements.
4276 - config-win32.h: comments adjustments - followup
4278 - config-win32.h: comments adjustments
4280 Daniel Stenberg (5 Aug 2011)
4281 - [Tom Hughes brought this change]
4283 ares_parse_a_reply: fix memleak
4285 Yang Tse (29 Jul 2011)
4286 - cares-functions.m4 serial # bump
4288 - Revert "configure: additional flag checks for fcntl() and socket()"
4290 This reverts commit 5f2a3b0e48f26d24cb1fefea0dccb92d417dcbf7.
4292 - configure: additional flag checks for fcntl() and socket()
4294 - xc-translit.m4 fix quoting
4296 - configure: avoid direct usage of AS_TR_* macros
4298 - xc-translit.m4 provides transliteration macros with well defined behavior.
4300 Jakub Hrozek (15 Jun 2011)
4301 - Revert "Only fall back to AF_INET searches when looking for AF_UNSPEC addresses"
4303 This reverts commit b5823d65706af687c0e5110af8f0cfdcd068997d.
4305 This patch was not reviewed properly before pushing
4307 - Revert "Do not use sized constants in public headers"
4309 This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d.
4311 This is a Red Hat specific patch that does not belong into upstream
4313 - Use correct sizeof in ares_getnameinfo()
4315 - Do not leak rr_name on failures inside ares_parse_ptr_reply
4317 - Do not leak rr_name on failures inside ares_parse_a_reply
4319 - Do not leak rr_name on failures inside ares_parse_aaaa_reply
4321 - Do not leak rr_name on failures inside ares_parse_ns_reply
4323 - Fix incorrect sizeof() in ares_save_options
4325 - Fix incorrect allocation in ares_parse_ptr_reply()
4327 - Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
4329 - Do not use sized constants in public headers
4331 Daniel Stenberg (13 Jun 2011)
4332 - [Jakub Hrozek brought this change]
4334 ares_free_hostent(NULL) should be a noop
4336 Yang Tse (8 Jun 2011)
4337 - configure: fix recvfrom 5th arg type qualifier detection (followup)
4339 - configure: fix recvfrom 5th arg type qualifier detection
4341 Additionally remove whitespace from EOL
4343 Daniel Stenberg (4 Jun 2011)
4344 - strlen: use size_t to receive the return
4346 Yang Tse (4 Jun 2011)
4347 - xlc: avoid preprocessor definition usage when linking
4349 - ares_nowarn: icc 9.1 workaround
4351 - ares_nowarn: header inclusion fix
4353 - ares_init: make ares_private.h last included header again
4355 - compiler warning: fix
4357 Fix compiler warning: conversion may lose significant bits
4359 - compiler warning: fix
4361 Fix compiler warning: variable was set but never used
4363 Fix compiler warning: clobber ignored
4365 - ares_iphlpapi: fix compiler warnings
4367 - winsock: compilation fixes
4369 Provide winsock iphlpapi alternative definitions to prevent compilation
4370 failures when using a variety of winsock header implementations.
4372 Daniel Stenberg (17 May 2011)
4373 - [David Stuart brought this change]
4375 IPv6-on-windows: find DNS servers correctly
4377 - man pages: docs for the c-ares utility programs
4379 - ares_parse_ns_reply.c: remove CVSism
4381 Yang Tse (27 Mar 2011)
4382 - build: fix header inclusion
4384 - getservbyport replacement for Win CE
4386 - renamed getplatform() to ares__getplatform() to avoid namespace pollution
4388 - configure: fix libtool warning
4390 Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR
4391 macro and warn heavily when not used in configure script along with
4392 ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy
4393 while keeping backwards compatibility this is added.
4395 - adig: RFC4034 resource record type detection
4397 Can be tested with: adig -s 8.8.8.8 -t ANY example.com
4399 - nameser.h: RFC4034 resource record type definitions
4401 - build: move platform stuff to ares_platform.c and ares_platform.h
4403 - build: find out windows platform using GetVersionEx()
4405 - build: use getenv() replacement function for systems which lack it
4407 - setup_once: system error codes for Windows CE
4409 - ares_search: use ERRNO macro for portability sake
4411 - System's errno.h inclusion cleanup follow-up.
4413 System's errno.h is conditionally included from setup_once.h
4415 - Windows CE specific adjustment
4417 All versions of Windows CE support Winsock 1.1
4419 - System's errno.h inclusion cleanup.
4421 System's errno.h is conditionally included from setup_once.h
4423 - ares_init: fix gethostname error detection on winsock platforms
4425 - configure: r-enable temporarily disabled detection of system's inet_ntop()
4427 Detection was temporarily disabled in commit 674e044ccb21f2f63537da53565fce868f
4429 Daniel Stenberg (15 Mar 2011)
4430 - configure: stop using the deprecated AM_INIT_AUTOMAKE syntax
4432 - [Gisle Vanem brought this change]
4436 Make sure Watt-32 programs use 'errno' even on Win32 targets
4438 Guenter Knauf (18 Feb 2011)
4439 - Removed commented CLFAGS no longer needed.
4441 - Fixed CFLAGS for NetWare.
4443 Added -m32 to enable compilation with x86_64 compilers;
4444 added conditional to set -fpcc-struct-return only for gcc compiler.
4446 Daniel Stenberg (18 Feb 2011)
4447 - [Gisle Vanem brought this change]
4449 Watt32: fix server init
4451 Somewhere in the process, programs using the Watt-32 tcp/ip stack
4454 - [Dima Tisnek brought this change]
4456 config_sortlist: (win32) missing else
4458 Without an else there, contents of "pat" that could have been
4459 successfully set just above, may be clobbered by successive unsuccessful
4460 calls to "xxx_pton" or "ip_addr".
4462 Yang Tse (17 Jan 2011)
4463 - Makefile.msvc: add a couple of VS version strings
4465 - Makefile.msvc: add a couple of VS version strings
4467 - build: add install target to Makefile.msvc
4469 Daniel Stenberg (27 Dec 2010)
4470 - ares_set_servers_csv: remove unused variables
4472 - init_by_resolv_conf: fix compiler warnings
4474 The code received the return codes in the 'status' variable without
4475 using it. Instead we just ignore those particular errors.
4477 - getv4: Value stored to 'dst' is never read
4479 - advance_tcp_send_queue: avoid NULL ptr dereference
4481 If given a too large 'num_bytes' value, it would cause a NULL ptr
4482 dereference. Instead the code will now break out of the loop at the end
4485 - [Peter Pentchev brought this change]
4487 configure: fix a bashism
4489 - cleanup: avoid unsafe typecasts
4491 Avoid the risk of reading 16bit data from an unaligned address by using
4492 a macro that is adapted for this.
4494 - [Stefan Bühler brought this change]
4496 ares_expand_name: Fix encoded length for indirect root
4498 Yang Tse (18 Dec 2010)
4499 - build: add some explicit file references to VS project files
4501 - config-win32: provide HAVE_ASSERT_H definition
4503 - build: include ares_nowarn in sample program VS project files
4505 - build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS
4507 - configure: temporarily disable detection of system's inet_ntop()
4509 This is done to allow compilation of ares_inet_ntop() by some daily
4510 builds picky compilers that otherwise do not need this function.
4512 - changes: mention last fix
4514 - ares_inet_ntop: remove definition and usage of macro SPRINTF
4516 Existing definition of SPRINTF always resulted in sprintf() being used,
4517 and sprintf() returning 'int' is already used throughout the library.
4519 - ares_inet_ntop: reapply changes from previous c-ares version (III)
4521 - Replace 'u_char' with 'unsigned char'.
4522 - Replace 'u_int' with 'unsigned int'.
4523 - use macros ERRNO and SET_ERRNO() for errno handling.
4525 - ares_inet_ntop: reapply changes from previous c-ares version (II)
4528 - Adjust header file inclusions.
4529 - ares_inet_ntop used only on systems without a proper inet_ntop function.
4531 - ares_inet_ntop: reapply changes from previous c-ares version (I)
4533 - Replace tabs with spaces.
4534 - Use ANSI C style for function declarations and definitions.
4535 - Use sizeof with parentheses.
4537 - ares_inet_ntop: fix off by one error triggering out of bounds write
4539 ares_inet_ntop would trigger an out of bounds write when the representation
4540 of the address required 15 characters, due to not taking in account null
4541 termination character.
4543 Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes.
4545 - ares_nowarn: add conditional inclusion of assert.h header
4547 - fix compiler warning: conversion may lose significant bits
4549 - ares_inet_net_pton: fix non-rejection of some malformed literals
4551 ares_inet_net_pton would return wrong values when excessively large,
4552 and invalid, netmasks are used. Fixes are from bind-9.5.3rc1,
4553 issue also described in the WLB-2008080064 advisory.
4555 - setup_once: provide ISASCII macro
4557 - configure: inet_net_pton function check adjustments
4559 Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6
4560 capable and is not affected by the WLB-2008080064 advisory.
4562 HAVE_INET_NET_PTON_IPV6 is no longer defined nor used.
4564 - ares_init: fix detection of semicolon comments in resolv.conf
4566 File resolv.conf may either use a hash '#' or a semicolon ';' character as an
4567 indication that the rest of the line is a comment. This fixes not recognizing
4568 the semicolon as a valid comment indicator in resolv.conf.
4570 - version: start working on 1.7.5
4572 Version 1.7.4 (8 Dec 2010)
4574 Daniel Stenberg (8 Dec 2010)
4575 - release-preps: CHANGES and RELEASE-NOTES synced
4577 - ares_set_local_*: added in 1.7.4, not before
4579 Yang Tse (3 Dec 2010)
4580 - build: provide SIZEOF_SIZE_T definition for non-configure builds
4582 - build: config.dos renamed to config-dos.h
4584 - build: provide SIZEOF_SIZE_T netware definition
4586 - ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits
4588 - configure: undo using autobuilds to temporarily verify strict aliasing warnings.
4590 - fix compiler warning: rounding, sign extension, or loss of accuracy may result
4592 Daniel Stenberg (2 Dec 2010)
4593 - [Ben Noordhuis brought this change]
4595 ares_parse_a_reply: fix CNAME response parsing
4597 Reply to a CNAME query doesn't contain addresses, causing
4598 ares_parse_a_reply() to bail out with ARES_ENODATA
4600 Bug: http://groups.google.com/group/nodejs/browse_thread/thread/a1268c9ea5e9ad9b
4602 Yang Tse (1 Dec 2010)
4603 - fix compiler warning: conversion may lose significant bits
4605 - atoi: remove atoi usage
4607 - ares_init: fix compiler warning: conversion may lose significant bits
4609 - configure: fix autoconf warning
4611 - inet_pton: fix compiler warning
4613 - configure: use autobuilds to temporarily verify strict aliasing warnings.
4615 Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
4616 rules and warnings. Given that cross-compiled targets autobuilds do not run the
4617 test-suite, there is no risk of running code that violates strict aliasing rules
4619 - ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f
4621 Upon socket address family and length validation failure return ARES_ENOTIMP
4622 in callback again, this is the error code documented in man page and used
4623 mostly all over the library.
4625 - ares_getnameinfo: Validate socket address family and length.
4627 Validate socket address family and that the socket address length is appropriate
4628 for the specified family. Failure is reported with ARES_EBADFAMILY in callback.
4630 - ares_getnameinfo: fix two compiler warnings
4632 - Added another VS10 version string
4634 - Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
4636 - Revert commit 494274e653936335c255a47599970de3df21e7c4
4638 - configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body
4640 - Fix compiler warning: array subscript has type 'char'
4642 - Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
4644 - Revert following commits:
4645 07bc7ea79509bcc9ef6e09151e81766ed00d3392
4646 3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9
4647 9912637d32c9987719a1ea12db591aee2941891c
4649 The purpose of the whole patch was to silence a compiler warning triggered
4650 with GCC 4 on file ares_process.c The specific compiler warning was
4651 'dereferencing type-punned pointer might break strict-aliasing rules'.
4653 A simpler patch will follow to equally silence the warning.
4655 - ares_options: reorder header inclusions to make inclusion of
4656 ares_private.h the last included one again.
4658 Daniel Stenberg (12 Nov 2010)
4659 - [Patrik Thunstrom brought this change]
4661 adig: fix NAPTR parsing
4663 I ran across a small "issue" in your adig example.
4665 It is simply the last part of the NAPTR record, the replacement element,
4666 which is not a string, as currently handled in adig, but a domain name.
4668 - ares_save_options: assignments instead of memcpy
4670 - init_by_options: don't copy an empty sortlist
4672 If there aren't any sort items to copy, don't bother. Without this
4673 little precaution it would do a malloc(0) which causes undefined
4674 behaviors and is frowned upon by curl's memdebug-system.
4676 Guenter Knauf (3 Oct 2010)
4677 - Minor Watcom makefile tweaks.
4679 Daniel Stenberg (30 Sep 2010)
4680 - [Mike Crowe brought this change]
4682 Fix lookup with HOSTALIASES set.
4684 ares__read_line returns ARES_EOF when it reaches the end of the
4685 file. This will happen every time when reading to the end of the
4686 HOSTALIASES file. Unfortunately single_domain treats this error as
4689 Signed-off-by: Mike Crowe <mac@mcrowe.com>
4691 Ben Greear (24 Aug 2010)
4692 - Add missing break that caused get_ares_servers to fail.
4694 Reported-by: Ning Dong <flintning@163.com>
4695 Signed-off-by: Ben Greear <greearb@candelatech.com>
4697 Yang Tse (11 Aug 2010)
4698 - configure: werror related adjustments
4700 Guenter Knauf (8 Aug 2010)
4701 - Added copyright string to ares_version.h and make use of it in other files.
4703 - Block created ares_build.h for NetWare to avoid usage from other platforms.
4705 - Fix to overwrite default libname.
4707 - Some more Watcom makefile massage ...
4709 - Some more Watcom makefile massage ...
4711 Ben Greear (4 Aug 2010)
4712 - sock-addr-storage: Detect and deal with lack of .ss_family member.
4714 AIX, at least, does not have sockaddr_storage.ss_family member.
4715 Detect this in the configure logic and use proper #ifdefs in the
4718 Signed-off-by: Ben Greear <greearb@candelatech.com>
4719 Tested-by: Tor Arntsen <tor@spacetec.no>
4721 Guenter Knauf (3 Aug 2010)
4722 - Added Watcom makefile based on libcurl's Makefile.Watcom.
4724 Ben Greear (31 Jul 2010)
4725 - typo: Fix compile bug for platforms that don't have sockaddr_storage.
4727 Bug was introduced by me in previous commit.
4729 Signed-off-by: Ben Greear <greearb@candelatech.com>
4731 - Fix aliasing warning in gcc 4.4.4 (at least).
4733 Should be no functional change, though the code gets a bit
4736 Signed-off-by: Ben Greear <greearb@candelatech.com>
4738 Daniel Stenberg (31 Jul 2010)
4739 - ares_set_servers_csv: use ISDIGIT
4741 The IS*() set of macros are preferred to the regular is*() functions as
4742 they help us avoid the most common pitfalls.
4744 Ben Greear (30 Jul 2010)
4745 - cast arg to isdigit to int
4747 Looks like it might silence a warning on Netware build.
4749 Signed-off-by: Ben Greear <greearb@candelatech.com>
4751 - remove all uses of uint32_t
4753 Previous fix forgot a few.
4755 Signed-off-by: Ben Greear <greearb@candelatech.com>
4757 - fix signed v/s unsigned casts warning in ares_gethostbyaddr.c
4759 Signed-off-by: Ben Greear <greearb@candelatech.com>
4761 - local-bind-fixup: Fix inet_pton warning.
4763 Conditionally include <arpa/inet.h> for inet_pton
4766 Signed-off-by: Ben Greear <greearb@candelatech.com>
4768 - build: Enable compiling with -Werror.
4770 This helps find compile warnings because they simply break
4774 ./configure --enable-warnings --enable-werror
4776 Signed-off-by: Ben Greear <greearb@candelatech.com>
4778 - ipv6: Fix some build issues related to the local-bind feature.
4780 Signed-off-by: Ben Greear <greearb@candelatech.com>
4782 Guenter Knauf (29 Jul 2010)
4783 - Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms.
4785 Daniel Stenberg (18 Jul 2010)
4786 - [Ben Greear brought this change]
4788 local-bind: Support binding to local interface/IPs
4790 Add 3 new functions to set the local binding for the out-going
4791 socket connection, and add ares_set_servers_csv() to set a
4792 list of servers at once as a comma-separated string.
4794 Signed-off-by: Ben Greear <greearb@candelatech.com>
4796 - version: now start on 1.7.4
4798 - [Andrew C. Morrow brought this change]
4800 fix memory leak in ares_getnameinfo
4802 Version 1.7.3 (11 Jun 2010)
4804 Daniel Stenberg (11 Jun 2010)
4805 - changelogs: updated for 1.7.3
4807 - [BogDan Vatra brought this change]
4809 init: allow c-ares to work on Android OS
4811 - changelog: fill in the 1.7.2 changes
4813 - added another pdf to ignore
4815 Yang Tse (11 Jun 2010)
4816 - add ares_parse_mx_reply.c to VS dsp file
4818 Daniel Stenberg (10 Jun 2010)
4819 - tarball: add $(CSOURCES) $(HHEADERS) to EXTRA_DIST
4821 It's not clear to me why we need this, but we apparently may
4822 otherwise not get all files bundled in the dist tarball.
4824 - version: start working on 1.7.3
4826 Version 1.7.2 (10 Jun 2010)
4828 Daniel Stenberg (10 Jun 2010)
4829 - RELEASE-NOTES: 1.7.2 details added
4831 - [Jakub Hrozek brought this change]
4833 ares_init: Last, not first instance of domain or search should win
4835 - style: make code less than 80 columns wide
4837 Yang Tse (31 May 2010)
4838 - [Tor Arntsen brought this change]
4840 improve alternative definition of bool to use enum instead of unsigned char
4842 - fix VS2010 compiler warnings
4844 Daniel Stenberg (18 Apr 2010)
4845 - [Jérémy Lal brought this change]
4847 added ares_parse_mx_reply
4849 - repair the file mode
4851 - remove all $Id$ lines
4853 - remove all .cvsignore files
4857 reported by Gregor Jasny on the mailing list
4859 - [Peter Pentchev brought this change]
4861 Fix a couple of typos and grammar nits.
4863 - ignore the GPG signature files too
4865 - start the journey towards 1.7.2
4867 - no longer CVS tagging
4869 - ignore generated PDFs
4871 Version 1.7.1 (23 Mar 2010)
4873 Daniel Stenberg (23 Mar 2010)
4876 - made README the primary readme file
4878 ... and did README.cares to contain a historic reason etc.
4884 - ignore lots of generated files
4886 - [Daniel Johnson brought this change]
4888 Fix warnings for clang
4890 Yang Tse (17 Mar 2010)
4891 - replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
4893 - update outdated serial number
4895 - fix compiler warning
4897 - watt32 compilation fix
4899 - Added another VS10 version string
4903 - removed usage of 's6_addr', fixing compilation issue triggered with no
4904 longer using 'in6_addr' but only our 'ares_in6_addr' struct
4906 Daniel Stenberg (5 Mar 2010)
4907 - Daniel Johnson provided fixes for building with the clang compiler
4909 Yang Tse (5 Mar 2010)
4910 - Added IPv6 name servers support
4912 Gisle Vanem (5 Mar 2010)
4913 - Ops!. Readded ares_nowarn.h.
4915 - Added ares_nowarn.c.
4917 Yang Tse (28 Feb 2010)
4918 - Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
4920 - Added ares_nowarn.* to VC6 project file
4922 - Added SIZEOF_INT definition
4924 - fix compiler warning
4926 - fix compiler warning
4928 - fix compiler warning
4930 Daniel Stenberg (17 Feb 2010)
4933 - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
4934 like the res_init() resolver function offers
4936 - - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
4937 check for broken connections like ares_process() did. Based on that, I
4938 merged the two functions into a single generic one with two front-ends.
4940 Yang Tse (30 Dec 2009)
4941 - VMS specific preprocessor symbol checking adjustments
4943 - Mention last changes
4945 - - Fix configure_socket() to use ares_socket_t instead of int data type.
4947 - - Where run-time error checks enabling compiler option /GZ was used it is now
4948 replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions.
4950 - Compiler option /GX is now replaced with equivalent /EHsc for all versions.
4952 - - Ingmar Runge noticed that Windows config-win32.h configuration file
4953 did not include a definition for HAVE_CLOSESOCKET which resulted in
4954 function close() being inappropriately used to close sockets.
4956 Daniel Stenberg (30 Nov 2009)
4957 - start working on 1.7.1
4959 Version 1.7.0 (27 Nov 2009)
4961 Yang Tse (27 Nov 2009)
4962 - Preserve empty line following last target
4964 - - Larry Lansing fixed ares_parse_srv_reply to properly parse replies
4965 which might contain non-SRV answers, skipping over potential non-SRV
4966 ones such as CNAMEs.
4968 - When using icc, compile with -fpic and link with intel dynamic libraries.
4970 - Added 'currently' in italics to insist on transient situation.
4974 - Daniel wants upcoming release to be 1.7.0
4976 - Mention last changes
4978 - - Removed from external interface preprocessor symbol definition for
4979 CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data()
4980 makes it unnecessary.
4984 - Changed c-ares naming conventions when using MSVC as described in README.msvc
4986 - - Mention other recent changes
4988 - - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and
4989 ares_addr6ttl in order to prevent name space pollution, along with
4990 necessary changes to code base and man pages.This change does not break
4991 ABI, there is no need to recompile existing applications. But existing
4992 applications using these structs with the old name will need source code
4993 adjustments when recompiled using c-ares 1.6.1.
4995 - - Jakub Hrozek fixed more function prototypes in man pages to sync them
4996 with the ones declared in ares.h
4998 - Make configure remove the ares_build.h file included in distribution tarballs.
5000 - Fix macro redefinition.
5002 - Fix name space pollution.
5004 - Allow using different extra import libraries for debug and release builds.
5006 - Add manifest stuff to msvc makefile
5008 - Sync man page with reality
5010 - Add missing external API decoration for ares_set_socket_callback()
5012 - Add ares_free_data() man page.
5014 - - Provide in external interface preprocessor symbol definitions for
5015 CARES_HAVE_ARES_FREE_DATA as an indication of function availability.
5021 - Add ares_data.c and ares_data.h
5023 - Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API
5024 to return a linked lists of results. These were also modified to internally
5025 use the ares_data memory struct and as such its result must be free'ed with
5028 - Initial support for the generic ares_free_data() function that will allow
5029 applications to free memory allocated and returned by some c-ares funtions.
5031 - Make usage of calloc()'s arguments consistent with rest of code base
5033 - workaround icc 9.1 optimizer issue
5035 - Add icc fvisibility bug test
5037 - Fix icc 9.0 compiler warning: external definition with no prior declaration
5039 - Fix three var names
5041 - Add check for assert.h header file
5043 - getaddrinfo is fully thread safe on solaris versions which
5044 implement the function even when h_errno is not a macro.
5046 The h_errno macro test now only done on systems for which there
5047 is no hard coded knowledge about getaddrinfo's thread safeness.
5049 - Remove files generated on previous buildconf/configure run
5051 - Remove enable-thread / disable-thread configure option. These were only placebo
5052 options. The library is always built as thread safe as possible on every system.
5054 - Refactor how preprocessor symbol _THREAD_SAFE definition is done.
5056 - Assume that getaddrinfo is thread safe, unless hard coded
5057 knowledge says the contrary or h_errno is not defined.
5059 - Related with the threadsafe capability of getaddrinfo:
5061 - Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2
5062 and newer have a threadsafe getaddrinfo.
5064 - Fix Dragonfly BSD triplet detection.
5066 - In case the hard-coded knowledge says that getaddrinfo is threadsafe,
5067 an additional check is done to verify that h_errno is also defined.
5068 If h_errno isn't defined, we finally assume that it isn't threadsafe.
5069 Jamie Lokier provided the inspiration for this extra check.
5071 - AIX 5.2 and newer have threadsafe getaddrinfo.
5073 Add some comments to better understand what the regex's pretend to achieve.
5075 - HP-UX 11.11 and later have threadsafe getaddrinfo
5077 - Check if getaddrinfo is threadsafe when function check allows it to be used
5079 - Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library
5083 - Mention last changes
5085 - Reinstate copyright symbol lost in previous commit
5087 - Make some strings different in resource file for debug or release builds
5089 - Ignore more subdirs
5091 - Fix compiler warning: conditional expression is constant
5093 - Sync linker and resource compiler options with Makefile.msvc
5095 - Follow Makefile.msvc subdirectory naming scheme, and sync compiler options
5097 - Updated MSVC makefile that allows building dynamic and static
5098 c-ares libraries in debug and release flavours.
5100 Additionally each of the three sample programs is built against
5101 each of the four possible c-ares libraries, generating all this
5102 a total number of 12 executables and 4 libraries.
5104 - Test for USE_WINSOCK since it is more restrictive than WIN32
5106 - Make header inclusion depend on HAVE_*_H definition
5108 - Remove unneeded preprocessor directives
5110 - Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds
5112 - source files used by sample programs
5114 - Renamed c-ares setup.h to ares_setup.h
5116 - Adjust include paths to take in account that currently:
5118 c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory.
5120 memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory
5121 and also needs access to libcurl's generated curl_config.h