1 Changelog for the c-ares project. Generated with git2changes.pl
3 Version 1.17.1 (19 Nov 2020)
6 - [Brad House brought this change]
8 Travis: add iOS target built with CMake (#378)
10 Issue #377 suggested that CMake builds for iOS with c-ares were broken. This PR adds an automatic Travis build for iOS CMake.
12 Fix By: Brad House (@bradh352)
14 bradh352 (18 Nov 2020)
18 - [Fabrice Fontaine brought this change]
20 External projects were using non-public header ares_dns.h, make public again (#376)
22 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.
24 Fix By: Fabrice Fontaine (@ffontaine)
26 bradh352 (17 Nov 2020)
27 - note that so versioning has moved to configure.ac
34 - [Daniel Stenberg brought this change]
36 autotools cleanup (#372)
38 * remove: install-sh mkinstalldirs
40 They're generated when needed, no need to store in it.
42 * buildconf: remove custom logic with autoreconf
44 Fix By: Daniel Stenberg (@bagder)
46 bradh352 (17 Nov 2020)
47 - attempt to fix 1.17.0 release distribution issues
49 Version 1.17.0 (16 Nov 2020)
51 bradh352 (16 Nov 2020)
54 - ares_getaddrinfo(): duplicate hints ai_socktype and ai_protocol into output
56 ai_socktype and ai_protocol were ignored from the hints input. They are now
57 duplicated into the output as expected. Currently no sanity checks on
58 proper values are taking place.
61 Fix By: Brad House (@bradh352)
63 - ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in
65 If there are more ttls returned than the maximum provided by the requestor, then
66 the *naddrttls response would be larger than the actual number of elements in
69 This bug could lead to invalid memory accesses in applications using c-ares.
71 This behavior appeared to break with PR #257
74 Reported By: Momtchil Momtchev (@mmomtchev)
75 Fix By: Brad House (@bradh352)
78 - [Dustin Lundquist brought this change]
80 docs: ares_set_local_ip4() uses host byte order (#368)
82 Properly document brain-dead behavior of ares_set_local_ip4() using host byte order instead of expected network byte order.
84 Fix By: Dustin Lundquist <d.lundquist@tempered.io>
86 - [Łukasz Marszał brought this change]
88 empty hquery->name could lead to invalid memory access (#367)
90 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.
92 Fix By: Łukasz Marszał (@lmarszal)
94 bradh352 (28 Sep 2020)
95 - Fix OSSFuzz reported issue in CAA reply parsing
97 OSS-Fuzz is reporting a use-of-uninitialized-value:
98 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26012
100 Reported By: David Drysdale (@daviddrysdale)
103 - [David Hotham brought this change]
105 fuzz CAA parsing (#363)
107 Add fuzz support for CAA parsing
109 Fix By: David Hotham (@dimbleby)
111 - [Daniela Sonnenschein brought this change]
113 Allow parsing of CAA Resource Record (#360)
115 CAA (Certification Authority Authorization) was introduced in RFC 6844.
116 This has been obsoleted by RFC 8659. This commit added the possibility
117 to query CAA resource records with adig and adds a parser for CAA
118 records, that can be used in conjunction with ares_query(3).
121 Fix By: Daniela Sonnenschein (@lxdicted)
123 Daniel Stenberg (17 Sep 2020)
124 - docs: remove the html and pdf make targets
126 They're rarely used in our daily work flow and mostly just add friction,
130 bradh352 (14 Sep 2020)
131 - ares_process needs to always include nameser.h as it has compat
133 - Define T_OPT if system doesn't provide it
136 - [Gisle Vanem brought this change]
138 Change the mailman links (#358)
140 Links when wrapping become misleading. Insert newline to prevent wrapping.
142 Fix By: Gisle Vanem (@gvanem)
144 - [Gisle Vanem brought this change]
146 [adig] Update man-page for the '-x' option (#357)
148 Fix By: Gisle Vanem (@gvanem)
150 - [Gisle Vanem brought this change]
152 [adig] add '-x' option. (#356)
154 Added a 'dig-style' '-x' option. Also support '-xx' for a
155 IPv6 bit-string PTR query.
157 Fix By: Gisle Vanem (@gvanem)
159 bradh352 (12 Sep 2020)
165 - [Gisle Vanem brought this change]
167 Fixes for Watt-32 on djgpp + Windows (#355)
169 No longer any relation to libcurl since '<libcurl-root>/packages/DOS/common.dj' is dropped.
170 This Makefile.dj has been tested on Win-10 only (using the Windows hosted djgpp cross compiler).
172 Fix By: Gisle Vanem (@gvanem)
174 - [Gisle Vanem brought this change]
176 Fixes for Watt-32 on Windows and MSDOS (#354)
178 Move the prototype to 'ares_private.h'.
180 Fix By: Gisle Vanem (@gvanem)
182 bradh352 (11 Sep 2020)
183 - update path for include
185 - remove stale information
187 - remove stale information
189 Brad House (9 Sep 2020)
190 - silence compiler warnings
192 - Remove stale msvc files from makefile
195 - [Brad House brought this change]
197 Reorganize source tree (#349)
199 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.
201 Fix By: Brad House (@bradh352)
203 Brad House (1 Sep 2020)
204 - remove CURLDEBUG as per #82
207 - [Erik Lax brought this change]
209 Detect remote DNS server does not support EDNS as per RFC 6891 (#244)
211 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.
213 Fix By: Erik Lax (@eriklax)
215 Brad House (27 Aug 2020)
216 - Fix for #345, don't use 'true' use 1
219 - [Seraphime Kirkovski brought this change]
221 ares_gethostbyname: Fix AF_UNSPEC support when using an ip address (#204)
223 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.
225 Fix By: Seraphime Kirkovski (@Seraphime)
227 - [apenn-msft brought this change]
229 Tests should use dynamic system-assigned ports rather than static port (#346)
231 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.
233 Fix By: Anthony Penniston (@apenn-msft)
235 Brad House (25 Aug 2020)
236 - Unset members of the addr struct contain garbage values (#343)
238 When generating the ares_sockaddr data by getaddrinfo() it was only filling
239 in certain members while leaving others uninitialized. This left garbage
240 data if a user tried to use the unset values. memset() the ares_sockaddr
241 to 0 prior to filling in the values to prevent this.
243 Reported By: @SmorkalovG
244 Fix By: Brad House (@bradh352)
247 - [Jonathan Maye-Hobbs brought this change]
249 FQDN with trailing period should be queried first with larger ndot value (#345)
251 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.
253 We may need to determine if we should abort any further searching, however as is probably intended.
255 Fix by: Jonathan Maye-Hobbs (@wheelpharoah)
257 - [Gisle Vanem brought this change]
259 Update acountry.c country code list (#341)
261 Updated country_list[]:
262 * 2-letter ISO-3166 country-codes.
263 * Add, rename some names + codes in accordance with latest table at https://en.wikipedia.org/wiki/ISO_3166-1.
265 Fix By: Gisle Vanem (@gvanem)
267 - [Bulat Gaifullin brought this change]
269 Test case should honor flag HAVE_WRITEV rather than WIN32 (#344)
271 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.
273 Fix By: Bulat Gaifullin (@bgaifullin)
275 Brad House (18 Jul 2020)
278 A couple of for loops in Mac-specific code were using integer declarations
279 inside a for loop. Move the declaration to the top of the preceding
280 code block to retain c89 compliance.
282 Reported By: Jeffrey Walton
285 - [Fionn Fitzmaurice brought this change]
287 Avoid buffer overflow in RC4 loop comparison (#336)
289 The rc4 function iterates over a buffer of size buffer_len who's maximum
290 value is INT_MAX with a counter of type short that is not guaranteed to
291 have maximum size INT_MAX.
293 In circumstances where short is narrower than int and where buffer_len
294 is larger than the maximum value of a short, it may be possible to loop
295 infinitely as counter will overflow and never be greater than or equal
298 The solution is to make the comparison be between types of equal width.
299 This commit defines counter as an int.
301 Fix By: Fionn Fitzmaurice (@fionn)
303 - [anonymoushelpishere brought this change]
305 Updated help information for adig, acountry, and ahost. (#334)
307 Provide more descriptive help information for various utilities.
309 Fix By: @anonymoushelpishere
311 - [lutianxiong brought this change]
313 avoid read-heap-buffer-overflow (#332)
315 Fix invalid read in ares_parse_soa_reply.c found during fuzzing
318 Fix By: lutianxiong (@ltx2018)
320 - [Ivan Baidakou brought this change]
322 Fix: sizeof(sizeof(addr.saX)) -> sizeof(addr.saX) in readaddrinfo (#331)
324 Looks like a sed-gone-wrong, a sizeof inside of a sizeof.
326 Fix By: Ivan Baidakou (@basiliscos)
328 Version 1.16.1 (11 May 2020)
330 Brad House (11 May 2020)
331 - c-ares 1.16.1 release prep
333 - update travis to use xcode11.4
335 - Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called
337 In the event that ares_destroy() is called prior to ares_getaddrinfo() completing,
338 it would result in an invalid read and double-free due to calling end_hquery() twice.
340 Reported By: Jann Horn @ Google Project Zero
343 - [shelley vohr brought this change]
345 fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328)
347 Fixes the following compatibility issues:
348 * Use RegQueryValueExA instead of RegQueryValueEx
349 * Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings
350 * Use RegOpenKeyExA instead of RegOpenKeyExA
351 * Use GetWindowsDirectoryA instead of GetWindowsDirectoryA
353 Fix By: Shelley Vohr (@codebytere)
356 Brad House (13 Apr 2020)
357 - travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail. Disable.
359 - travis: bump macos image to the latest
361 - cast-align warnings are false for struct sockaddr, silence
363 Create a macro to silence false cast-align warnings when casting
364 struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *.
366 Fix By: Brad House (@bradh352)
368 - MacOS: Enable libresolv support for retrieving DNS servers like iOS does.
371 - [Dmitry Igrishin brought this change]
373 CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323)
375 Populate the INCLUDE_DIRECTORIES property of installed targets
377 Fix By: Dmitry Igrishin (@dmitigr)
379 Brad House (10 Apr 2020)
380 - travis: make valgrind use cmake for tests
382 - dont try to use libtool to run valgrind
384 - valgrind requires libtool installed to wrap tests
388 - fix travis live test
390 - add debug for travis
394 - attempt to modernize travis build environment
397 - [Teemu R brought this change]
399 Allow TXT records on CHAOS qclass (#321)
401 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`.
403 C-ares was not allowing such use cases.
405 Fix By: Teemu R. (@rytilahti)
407 Brad House (5 Apr 2020)
408 - Remove warnings from ares_getaddrinfo.3 man page
410 As reported in #319, non-standard macros of .IN were used.
411 Replace with .RS/.RE.
414 Fix By: Brad House (@bradh352)
416 - ares_getaddrinfo man page render better for man2html
418 - update man pages to render better for man2html
420 Version 1.16.0 (12 Mar 2020)
422 Brad House (12 Mar 2020)
423 - 1.16.0 release notes draft
425 - attempt to fix double-free introduced in e0517f9
428 - [David Drysdale brought this change]
430 test: fuzzer input triggering double free (#315)
432 OSS-Fuzz has reported a double-free with the fuzzer input file
433 included here; run with:
434 ./test/aresfuzz test/fuzzinput/clusterfuzz-5637790584012800
436 Bisecting the failure points to commit e0517f97d988 ("Parse SOA records
437 from ns_t_any response (#103)")
439 - [Brad House brought this change]
441 CMake: Install Manpages (#314)
443 CMake wasn't installing manpages.
446 Fix By: Brad House (@bradh352)
448 - [Brad House brought this change]
450 Enable cmake tests for AppVeyor (#313)
452 Tests require linking against the static library on Windows otherwise the symbols are not exported for internals being tested.
454 Fix By: Brad House (@bradh352)
456 Brad House (11 Mar 2020)
459 - bump c-ares version to 1.16.0. test AppVeyor integration.
462 - [Brad House brought this change]
464 replace all usages of inet_addr() with ares_inet_pton() which is more proper (#312)
466 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.
469 Fix By: Brad House (@bradh352)
471 - [Brad House brought this change]
473 CMake: Generate WinPDB files during build (#311)
475 Build and Install PDB (Windows Debug Symbol) files if supported by underlying system.
477 Also update AppVeyor to test cmake builds.
480 Fix By: Piotr Pietraszkiewicz (@ppietrasa) and Brad House (@bradh352)
482 - [Brad House brought this change]
484 CMake: Rework library function checking (#310)
486 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.
488 Wrap with a Macro to change the behavior.
491 Fix By: Brad House (@bradh352)
493 - [Dron Rathore brought this change]
495 Parse SOA records from ns_t_any response (#103)
497 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).
499 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.
501 Note that asking for T_ANY is generally a bad idea:
502 - https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/
503 - https://tools.ietf.org/html/draft-ietf-dnsop-refuse-any
506 Fix By: Dron Rathore (@DronRathore)
508 - [Stephen Bryant brought this change]
510 Added CPack functionality for generating RPM or DEB packages (#283)
512 Added CPack functionality for generating RPM or DEB packages
514 ie: run `cpack -G RPM` (or "DEB") after building with CMake.
516 The current configuration creates 3 separate packages for the shared library,
517 the development files and the tools.
519 Fix By: Stephen Bryant (@bf-bryants)
521 - [tjwalton brought this change]
523 ares_gethostbyname: Return ENODATA if no valid A or AAAA record found (#304)
525 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.
527 * Return ENODATA if no valid A or AAAA record found
528 * Fix and update test ParseAReplyNoData.
529 * Add test for new ENODATA behaviour in ares_gethostbyname.
534 - [Michal Rostecki brought this change]
536 test: Separate live tests from SetServers* tests (#299)
538 Before this change, SetServers, SetServersPorts and SetServersCSV
539 contained test cases trying to make DNS queries with the google.com
540 hostname, which requires Internet connectivity. Tests with that
541 requirement should be defined in the ares-test-live.cc file and contain
542 "Live" prefix to filter them out with `--gtest_filter=-*.Live*` on
543 machines without Internet connectivity.
545 Fix By: Michal Rostecki (@mrostecki)
547 - [Adam Majer brought this change]
549 Only count valid addresses when response parsing (#302)
551 When ares_parse_a_reply or ares_parse_aaaa_reply is called in case
552 where another AAAA and A responses exist, the resulting ares_addrttl
553 count is invalid and the structure points to gibberish.
555 This is a regression since 1.15.
557 Issue: https://github.com/c-ares/c-ares/issues/300
558 Fix By: Adam Majer (@AdamMajer)
560 Brad House (24 Dec 2019)
561 - [Kyle Edwards brought this change]
563 CMake: Provide c-ares version in package export file (#296)
565 The CMake package export file should provide version information.
567 Fix By: Kyle Edwards (@KyleFromKitware)
569 - [Ben Noordhuis brought this change]
571 Accept invalid /etc/resolv.conf lookup values, ability to build container tests (#274)
573 * Add CARES_BUILD_CONTAINER_TESTS CMake option to add ability to build the Linux-only containerized tests.
574 * Accept invalid /etc/resolv.conf lookup values
576 Before this commit invalid `lookup` values resulted in c-ares not using
577 any lookups without any clear indication why. After this commit it uses
580 Fix By: Ben Noordhuis (@bnoordhuis)
582 - [Christian Ammer brought this change]
584 Parallel A and AAAA lookups in `ares_getaddrinfo` (#290)
586 A and AAAA lookups for ares_getaddrinfo() are now performed in parallel.
588 For this change `ares_search` was removed from `ares_getaddrinfo`.
589 Instead `ares_query` in combination with `next_dns_lookup` are
590 doing the suffix search.
592 Adding support for `.onion` addresses which are tested by
593 `TEST_F(DefaultChannelTest, GetAddrinfoOnionDomain)`
595 Fix By: Christian Ammer (@ChristianAmmer)
597 - [Vy Nguyen brought this change]
599 Move variables into the block where it is used to avoid unused-vars (#281)
601 Warning uncovered with [-Werror, -Wunused-variables]
603 Fix By: Vy Nguyen (@oontvoo)
605 - [Vy Nguyen brought this change]
607 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)
609 Fix new getaddrinfo code to not redefine macros on some systems.
611 Fix By: Vy Nguyen (@oontvoo)
613 - [Egor Pugin brought this change]
615 [ares_getenv] Return NULL in all cases. (#279)
617 if ares_getenv is defined, it must return a value on all platforms.
619 Fix By: Egor Pugin (@egorpugin)
621 - [Abhishek Arya brought this change]
623 Add OSS-Fuzz fuzzing badge (#278)
625 Adds based on instructions at
626 https://google.github.io/oss-fuzz/getting-started/new-project-guide/#status-badge
628 Patch By: Abhishek Arya (@inferno-chromium)
630 - [Peter Eisentraut brought this change]
632 ares_init_options.3: Fix layout (#275)
634 7e6af8e inserted the documentation of resolvconf_path in the middle of
635 the item for ednspsz, leading to broken layout. Fix that.
637 Fix By: Peter Eisentraut (@petere)
639 - [Gregor Jasny brought this change]
641 manpages: Fix typos detected by lintian (#269)
644 Fix By: Gregor Jasny (@gjasny)
646 - [lifenjoiner brought this change]
648 keep command line usage up to date (#256)
650 adig and ahost built-in help did not match args taken.
654 - [Dan Noé brought this change]
656 ares-test.cc: Handle nullptr in AddrInfo ostream. (#268)
658 The const AddrInfo& argument to operator<< overload for AddrInfo can be
659 a nullptr unique_ptr. Handle this explicitly by printing {nullptr} if
660 the rest of the function cannot be safely executed.
662 Fix-by: Dan Noé <dpn@google.com>
664 - [Dan Noé brought this change]
666 Add missing limits.h include from ares_getaddrinfo.c (#267)
668 This files references INT_MAX, but does not include limits.h. This can
669 cause a build failure on some platforms. Include limits.h if we have it.
671 Fix-by: Dan Noé <dpn@google.com>
673 - [Andrew Selivanov brought this change]
675 fix fuzzer docs and add missing getaddrinfo docs (#265)
677 There is a fix for a bit outdated clang fuzzer docs and ares_getaddrinfo docs.
679 Fix By: Andrew Selivanov (@ki11roy)
681 - [Andrew Selivanov brought this change]
683 Fix leak and crash in ares_parse_a/aaaa_reply (#264)
685 * fix leak if naddress of particular type found
686 * fix segfault when wanted ttls count lesser than count of result records
687 * add fuzzer input files that trigger problems (from #263)
689 Reported-By: David Drysdale (@daviddrysdale)
690 Fix-By: Andrew Selivanov (@ki11roy)
692 - [Andrew Selivanov brought this change]
694 fix segfault when parsing wrong type of record (#262)
696 Fixes segfault when trying to ares_parse_aaaa with AF_INET and vise versa.
698 Fix By: Andrew Selivanov (@ki11roy)
700 - work around mingw compile failure
702 - c++ requires explicit casts
704 - support EnvValue on Windows by implementing setenv/unsetenv
706 - [Andrew Selivanov brought this change]
708 getaddrinfo enhancements (#257)
710 * Service support has been added to getaddrinfo.
711 * ares_parse_a/aaaa_record now share code with the addrinfo parser.
712 * Private ares_addrinfo structure with useful extensions such as ttls (including cname ttls),
713 as well as the ability to list multiple cnames in chain of lookups
715 Work By: Andrew Selivanov @ki11roy
717 - [Andrew Selivanov brought this change]
719 fix ares__sortaddrinfo, use wrappers for sock_funcs (#258)
721 Some socket functions weren't exposed for use by other areas of the library. Expose
722 those and make use of them in ares__sortaddrinfo().
724 Fix By: Andrew Selivanov (@ki11roy)
726 - Fix c89 compilation support broken by .onion rejection changes
728 Move .onion check lower after all variables have been declared.
732 - [kedixa brought this change]
734 getaddrinfo: callback must be called on bad domain (#249)
736 Due to an order of incrementing the remaining queries and calling ares_query, on a bad domain
737 the registered callback wouldn't be called.
742 - [Darrin W. Cullop brought this change]
744 Windows ARM/ARM64 requires AdvApi32 (#252)
746 Fix link issues caused by missing library that appears to only be required on ARM (though
747 docs don't list this restriction). Doesn't hurt to require it everywhere.
750 Fixed-By: Darrin Cullop (@dwcullop)
752 - [kedixa brought this change]
754 getaddrinfo: avoid infinite loop in case of NXDOMAIN(#240) (#242)
756 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.
760 - Portability fix for ares__sortaddrinfo()
762 replace uint32_t with unsigned int and socklen_t with ares_socklen_t
766 - [Khaidi Chu brought this change]
768 fix: init bufp before reject .onion to make it can be free correctly (#241)
770 When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault.
772 Fix By: Khaidi Chu (@XadillaX)
774 - [Andrew Selivanov brought this change]
776 Add ares__sortaddrinfo() to support getaddrinfo() sorted results (#239)
778 This is a port of RFC 6724 compliant sorting function from Android Bionic project:
779 https://android.googlesource.com/platform/bionic/+/e919b116d35aa7deb24ddece69c491e24c3b0d6f/libc/netbsd/net/getaddrinfo.c
781 The latest version is essentially the same, except two additional parameters to test connection with (mark/uid):
782 https://android.googlesource.com/platform/bionic/+/master/libc/dns/net/getaddrinfo.c
784 Please note that even that version has some restrictions. It doesn't support some rules from RFC 6724:
786 Rule 3 (Avoid deprecated addresses)
787 Rule 4 (Prefer home addresses)
788 Rule 7 (Prefer native transport)
790 Submitted By: Andrew Selivanov (@ki11roy)
792 - [Christian Ammer brought this change]
794 Increase portability of `ares-test-mock-ai.cc` (#235)
796 * using portable ares_inet_pton and updated includes in ares-test-mock-ai
797 * forgot to remove deleted ares-test-ai.cc in Makefile.inc
799 Fix By: Christian Ammer (@ChristianAmmer)
801 - [Fabrice Fontaine brought this change]
803 m4/xc-cc-check.m4: use XC_CHECK_BUILD_FLAGS (#236)
805 Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS.
806 Otherwise it complains of CPPFLAGS in CFLAGS.
808 https://git.buildroot.net/buildroot/tree/package/c-ares/0001-use_check_build_instead_of_check_user.patch]
810 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
811 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
812 Submitted by: Fabrice Fontaine
814 - [Christian Ammer brought this change]
816 Bugfix for `ares_getaddrinfo` and additional unit tests (#234)
818 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:
820 Additional mock server test classes (ares-test-mock-ai.cc):
823 MockNoCheckRespChannelTestAI
824 MockEDNSChannelTestAI
825 RotateMultiMockTestAI
826 NoRotateMultiMockTestAI
828 Additional live tests (ares-test-live-ai.cc):
831 LiveGetHostByNameV4AndV6
833 Fix By: Christian Ammer (@ChristianAmmer)
835 - [Christian Ammer brought this change]
837 Remaining queries counter fix, additional unit tests for `ares_getaddrinfo` (#233)
839 Remaining queries counter fix, added tests (ParallelLookups,
840 SearchDomains, SearchDomainsServFailOnAAAA). Removed unnecessary
841 if and commented code in test.
843 Fix By: Christian Ammer (@ChristianAmmer)
845 - [Christian Ammer brought this change]
847 Add initial implementation for ares_getaddrinfo (#112)
849 Initial implementation for ares_getaddrinfo(). It is NOT compliant with RFC6724, though
850 it is expected to come closer to conformance prior to the next release.
852 Features not supported include sorted addresses and honoring of service and hints
855 Implementation by: Christian Ammer (@ChristianAmmer)
857 - [Ben Noordhuis brought this change]
859 test: fix bad expectation in ipv6 localhost test (#227)
861 The LiveGetLocalhostByAddrV6 test expected to see "localhost" in the
862 result when doing an address-to-name lookup for ::1 but on my system
863 that resolves to "ip6-loopback" because of this stanza in /etc/hosts:
865 $ grep ^::1 /etc/hosts
866 ::1 ip6-localhost ip6-loopback
868 Fix By: Ben Noordhuis (@bnoordhuis)
871 - [Ben Noordhuis brought this change]
873 ares_version.h: bump version (#230)
875 Version change not committed from maketgz.sh
879 Daniel Stenberg (24 Oct 2018)
880 - ares_library_init_android.3: minor syntax edits, fixed AVAILABILITY
882 Version 1.15.0 (23 Oct 2018)
884 Brad House (23 Oct 2018)
885 - last minute 1.15.0 addition
887 - [Ben Noordhuis brought this change]
889 Report ARES_ENOTFOUND for .onion domain names as per RFC7686. (#228)
893 Name Resolution APIs and Libraries (...) MUST either respond
894 to requests for .onion names by resolving them according to
895 [tor-rendezvous] or by responding with NXDOMAIN.
897 A legacy client may inadvertently attempt to resolve a .onion
898 name through the DNS. This causes a disclosure that the client
899 is attempting to use Tor to reach a specific service. Malicious
900 resolvers could be engineered to capture and record such leaks,
901 which might have very adverse consequences for the well-being
905 Fix By: Ben Noordhuis @bnoordhuis
907 - prepare for c-ares 1.15.0 release
911 AIX attempts to include both nameser_compat.h and onameser_compat.h. It appears
912 the proper fix is to define _USE_IRS so that only nameser_compat.h is used.
915 Fix By: Brad House (@bradh352)
917 - Fix crash in ares_dup() due to new ARES_OPT_RESOLVCONF
919 ares_dup() calls ares_init_options() by making its own fake option
920 mask since the original mask isn't stored but ARES_OPT_RESOLVCONF
921 was always set, instead of conditionally set. This caused a crash
922 because ares_strdup() isn't NULL-safe if no custom path was set.
924 Made ares_dup() set ARES_OPT_RESOLVCONF conditionally.
926 Fix By: Brad House (@bradh352)
928 - [Sarat Addepalli brought this change]
930 Add ares_init_options() configurability for path to resolv.conf file
932 Add resolvconf_path to end of struct ares_options with ARES_OPT_RESOLVCONF option
933 so on Unix-like systems a custom path can be specified. If no path is specified,
934 /etc/resolv.conf is used like normal.
936 Fix By: Sarat Addepalli @SirR4T
938 Review By: Brad House @bradh352
940 - remove stale variables
942 - fix prototype name for ares_strsplit_free()
944 - add missing prototype
946 - simplify ares_strsplit() and create ares_strsplit_free() helper function
948 - missing ares_strsplit.h from HHEADERS for inclusion in distribution
950 - [Ruslan Baratov brought this change]
952 Add CARES_BUILD_TOOLS CMake option (#214)
954 Add ability to exclude building of tools (adig, ahost, acountry) in CMake. This should also close #200.
956 Fix By: Ruslan Baratov (@ruslo)
959 - [flyingdutchman23 brought this change]
961 Style. Whitespace cleanup. (#213)
963 Small whitespace cleanups.
965 Fix By: @flyingdutchman23
967 - [John Schember brought this change]
969 Android: Support for domain search suffix (#211)
971 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.
973 Submitter: John Schember (@user-none)
975 Approved-by: Brad House (@bradh352)
977 - [afalin brought this change]
979 Improve DNS suffixes extracting from WinNT registry (#202)
981 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.
985 - Be consistent with indention in CMakeLists.txt
987 The imported TRANSFORM_MAKEFILE_INC function from curl used space indention
988 but the rest of the file used tabs. Go ahead and make it tabs for
991 Committed By: Brad House
993 - [flyingdutchman23 brought this change]
995 Fix modern gcc warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source
997 Silence warning about using src to determine number of bytes to copy.
998 In this case it doesn't matter whether it is `src` or `dest`. So there
999 is no functionality change.
1002 Fix By: @flyingdutchman23
1004 - [Andi Schnebinger brought this change]
1006 fix stringop-overflow warning of GCC (#201)
1008 When using a modern GCC to compile c-ares, there is a stringop-overflow warning.
1009 This patch simply silences the false-positive warning, there is no actual code flaw.
1011 Bug: https://github.com/c-ares/c-ares/pull/201
1012 Fixed By: Andi Schnebinger @Iniesta8
1014 GitHub (18 May 2018)
1015 - [David Drysdale brought this change]
1017 travis: do coverage in "coverage" build (#195)
1019 Fixes #194, a mistake from commit a255081f2c3c ("travis: Only do
1020 coverage/distcheck on normal build")
1022 Brad House (17 May 2018)
1023 - [Brad Spencer brought this change]
1025 Apply the IPv6 server blacklist to all nameserver sources, not just Windows (#193)
1027 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.
1029 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.
1031 Fix By: Brad Spencer @b-spencer
1032 PR: https://github.com/c-ares/c-ares/pull/193
1034 - [Brad Spencer brought this change]
1036 Fix warnings emitted by MSVC when using -W4 (#192)
1038 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.
1040 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.
1042 Fix By: Brad Spencer @b-spencer
1043 PR: https://github.com/c-ares/c-ares/pull/192
1045 - [David Hotham brought this change]
1047 Prevent changing name servers while queries are outstanding (#191)
1049 Changing name servers doesn't work, per #41. Better to return an error code than to crash.
1051 Fix-by: David Hotham @dimbleby
1053 David Drysdale (15 May 2018)
1054 - [Tobias Nießen brought this change]
1056 Fix comment in ares_rules.h (#189)
1058 Brad House (6 May 2018)
1059 - [Brad Spencer brought this change]
1061 Harden and rationalize c-ares timeout computation (#187)
1063 * Harden and rationalize c-ares timeout computation
1064 * Remove the rand() part of the timeout calculation completely.
1066 When c-ares sends a DNS query, it computes the timeout for that request as follows:
1068 timeplus = channel->timeout << (query->try_count / channel->nservers);
1069 timeplus = (timeplus * (9 + (rand () & 7))) / 16;
1070 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.
1072 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.
1074 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).
1076 Consider also the documentation of channel->timeout in ares_init_options():
1078 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.
1080 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.
1082 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.
1084 UPDATE: randomization removed.
1087 Fix by: Brad Spencer
1089 - distribute ares_android.h
1091 Distribute ares_android.h when a release distribution package is
1094 Reported By: Andrey Khranovsky
1095 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-04/0000.shtml
1097 - ares_set_servers_csv() on failure should not leave channel in a bad state
1099 If bad data is passed to ares_set_servers_csv() or
1100 ares_set_servers_ports_csv() it will clear the existing channel
1101 configured DNS servers, then a call to ares_send() will fail due
1102 to a bad malloc which may have undefined behavior.
1104 The fix now only clears existing servers on success. An additional
1105 sanity check was added in ares_send() to ensure nservers >= 1 or
1106 will result in ARES_ESERVFAIL.
1108 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml
1109 Reported-by: Francisco Sedano Crippa
1111 - docs: Not all manpages are listed
1113 Some docs aren't installed or not showing up on
1114 https://c-ares.haxx.se/docs.html
1115 due to not being listed in Makefile.inc. Add missing docs and
1116 ensure docs are alphabetized.
1118 Version 1.14.0 (16 Feb 2018)
1120 Daniel Stenberg (16 Feb 2018)
1121 - ares_android.c: fix warning: ISO C forbids an empty translation unit
1123 - RELEASE-NOTES: some more work we did and people who helped
1125 Brad House (16 Feb 2018)
1126 - travis: skip Autotools style testing for cmake
1128 Fix cmake test build by skipping autotools portion of test script.
1130 - travis: standardize CMake test off of Autotools tests
1132 Instead of running 'make test', run the tests directly like autotools
1133 does. It provides more verbose output.
1135 - travis: Enable building tests for CMake
1137 Travis should auto-build and run tests for cmake builds now that
1140 - fix version in pkgconfig
1142 - Add version update to CMakeLists in maketgz
1144 - Release prep. Add support for pkgconfig in cmake, set versions appropriately
1146 Gregor Jasny (15 Feb 2018)
1149 Brad House (14 Feb 2018)
1150 - [Gregor Jasny brought this change]
1152 Use cmake3 package provided by Ubuntu (#182)
1154 - Cmake 3.1 instead of 3.2.1 should be the minimum
1156 - Update RELEASE-NOTES and RELEASE-PROCEDURE.md to prepare for next release
1158 - get rid of c++ style comments
1160 - Use trusty for all builds, precise is EOL. Update clang and cmake versions.
1162 - Current CMakeLists.txt doesn't support 2.8.12 anymore, we need to bump the version to 3.2.1 minimum
1164 - Re-organize sections in INSTALL.md and add CMake section
1166 - [Sergey Kolomenkin brought this change]
1168 remove compilation warnings in MSVC (#47)
1170 - document handling of timeouts for ares_process and ares_process_fd to close PR #57
1172 - 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
1175 - [David Drysdale brought this change]
1177 Document WSAStartup requirement (#180)
1179 David Drysdale (6 Feb 2018)
1180 - [Antonio Tajuelo brought this change]
1182 Added coderelease.io badge to readme.md for letting people subscribe to new versions (#174)
1184 - [Sheel Bedi brought this change]
1186 Update year in LICENSE.md to 2018 (#170)
1189 - [David Drysdale brought this change]
1191 travis: use VM not container for {L,A}SAN builds (#177)
1193 As per https://github.com/travis-ci/travis-ci/issues/9033, container
1194 based builds do not currently allow ptrace, which is used by LSAN and
1197 Brad House (3 Feb 2018)
1198 - [acthompson-google-com brought this change]
1200 Android JNI code leaks local references in some cases (#175)
1202 * Add Google LLC to AUTHORS.
1204 * android: Explicitly delete all JNI local references, and cache JNI method IDs at initialization.
1206 * android: Only return ARES_ENOTINITIALIZED on failures in initialization code.
1208 Gregor Jasny (2 Jan 2018)
1209 - Embed fused Google Test 1.8.0
1211 Brad House (21 Dec 2017)
1212 - [John Schember brought this change]
1214 android: Check returns for obj and classes are not NULL. Document API levels for various Android functions and objects used. (#166)
1216 - CARES_CHECK_TYPE should reference variable so a warning is not produced for -Werror compatibility
1218 - [Brad Spencer brought this change]
1220 Fix computation of IPv6 blacklist mask for values of netmask > 8. (#164)
1222 David Drysdale (14 Dec 2017)
1223 - travis: Only do coverage/distcheck on normal build
1225 - travis: only do pip install on Linux
1227 - travis: only test in IPv4 mode
1229 Travis' Trusty environment does not support IPv6.
1231 - test: allow restriction to one IP address family
1233 - [Roman Teterin brought this change]
1235 Fix a typo in init_by_resolv_conf (#160)
1237 Brad House (11 Dec 2017)
1238 - @gvanem says MSVC -RTCc option fails, looks erroneous to me, but the additional mask is harmless
1240 - Fix some other mingw warnings
1242 - Issue #143, get rid of windows build warning due to passing 'char **' to argument expecting 'const char **'
1244 - [Gregor Jasny brought this change]
1246 Distribute CMake files (#130)
1248 - Android variants may not have __system_property_get
1250 Some android systems like ARM64 may not have the __system_property_get
1251 symbol in libc (but still have it in the public headers). Detect this
1252 condition at build time. The __system_property_get method of retrieving
1253 name servers is deprecated as of Oreo so should strictly be a fallback
1256 David Drysdale (9 Nov 2017)
1257 - [David Hotham brought this change]
1259 Wrong function name throughout man page (#154)
1261 - ares_data.c: iterate through substructs when freeing
1263 Previous code recursed into substructures, which makes it more likely
1264 that large/heavily-nested responses could use up lots of stack.
1266 - test: test ares_free_data on long chain of structs
1268 - [Felix Yan brought this change]
1270 Fix a typo in inet_ntop.c (#151)
1272 Daniel Stenberg (29 Sep 2017)
1273 - ares_gethostbyname.3: fix callback status values
1275 - ARES_ENOTFOUND means the _name_ wasn't found
1277 - ARES_ENODATA can be returned when a resolve fails
1279 Reported-by: Jakub Hrozek
1280 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml
1282 Brad House (28 Sep 2017)
1283 - [John Schember brought this change]
1285 Fix DNS server lookup breaking with Android O due to Android removing access to net.dns# system properties. (#148)
1287 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.
1289 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.
1291 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.
1293 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.
1295 - [Konstantinos Sofokleous brought this change]
1297 allow linking against the static msvc runtime library (#133)
1299 allow linking against the static msvc runtime library
1301 - [Gergely Nagy brought this change]
1303 Force using the ANSI versions of WinAPI functions (#142)
1305 When compiling c-ares with a build system that defines UNICODE,
1306 bad versions of WinAPI functions are used causing failures or even
1307 crashes. When windows.h is included in MBCS mode (like in the default
1308 build system), the ..A versions are the same as using the one without
1311 - [cmake] build fix on Solaris
1313 GitHub (11 Sep 2017)
1314 - [Brad House brought this change]
1316 Win32 exclude legacy ipv6 subnets (#144)
1318 win32 ipv6: add infrastructure to exclude ipv6 subnets that are known to cause issues
1320 - [David Drysdale brought this change]
1322 windows: only look for ancient compilers (#146)
1324 Also drop the use of a versioned output directory; just use
1327 - [David Drysdale brought this change]
1329 ares_init_options.3: match up sock_state_cb args (#141)
1333 Daniel Stenberg (25 Aug 2017)
1334 - [Anna Henningsen brought this change]
1336 gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()`
1338 When `ares_cancel()` was invoked, `ares_gethostbyaddr()`
1339 queries would fail with `ENOTFOUND` instead of `ECANCELLED`.
1341 It seems appropriate to treat `ares_cancel()` like `ares_destroy()`,
1342 but I would appreciate review of the correctness of this change.
1344 Ref: https://github.com/nodejs/node/issues/14814
1348 David Drysdale (18 Aug 2017)
1349 - [David Hotham brought this change]
1351 support most recent Visual Studio 2017
1353 Brad House (26 Jul 2017)
1354 - Preserve original DNS server order on Windows for equal metrics.
1356 qsort is not stable, in order to make it stable we need to record
1357 the original index and add it as a secondary sort value when the
1358 metrics are equal to prevent using DNS servers that may not work
1359 at all as reported by some users.
1361 David Drysdale (15 Jul 2017)
1362 - [Anna Henningsen brought this change]
1364 ares_parse_naptr_reply: make buffer length check more accurate
1366 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check
1367 for records parsed by `ares_parse_naptr_reply()`. However, that
1368 function is designed to parse replies which also contain non-NAPTR
1369 records; for A records, the `rr_len > 7` check will fail as there
1370 are only 4 bytes of payload.
1371 In particular, parsing ANY replies for NAPTR records was broken
1374 Fix that by moving the check into the case in which it is already
1375 known that the record is a NAPTR record.
1377 - appveyor: run dnsdump as a sanity check
1379 - travis: run dnsdump as a sanity check
1381 - test: use ares_free_string() throughout
1383 As pointed out by Gisle Vanem in #125.
1385 Daniel Stenberg (3 Jul 2017)
1386 - RELEASE-PROCEDURE.md: how to release
1391 David Drysdale (2 Jul 2017)
1392 - test: Build dnsdump on Windows too
1394 Thanks to Gisle Vanem for showing the way:
1395 https://github.com/c-ares/c-ares/commit/b701af8a24cf9d173b1dbe5faedcea34642e92da#commitcomment-22830845
1397 Brad House (26 Jun 2017)
1398 - [Christian Ammer brought this change]
1400 fix statement like #define - ares ssize_t define had a trailing semicolon (#120)
1402 David Drysdale (21 Jun 2017)
1403 - test: distribute the fuzzcheck.sh script
1405 The TESTS target runs fuzzcheck.sh so make sure it is included
1406 in the distributed tarball.
1408 (The test itself will be pointless when run on a distribution, because
1409 the fuzzing corpus directories are not shipped, but at least this
1410 means that `make -C test test` should work.)
1412 - test: run the name-parsing corpus check too
1414 Daniel Stenberg (21 Jun 2017)
1415 - dist: don't build/ship PDF versions in release archives
1417 ... experience says very few read them and they can still get build by
1418 those who want them.a
1420 - ares_version.h: bump version
1422 Version 1.13.0 (20 Jun 2017)
1424 Daniel Stenberg (20 Jun 2017)
1425 - RELEASE-NOTES: 1.13.0
1427 - ares_set_socket_functions.3: added in 1.13.0
1429 David Drysdale (18 Jun 2017)
1430 - ares_parse_naptr_reply: check sufficient data
1432 Check that there is enough data for the required elements
1433 of an NAPTR record (2 int16, 3 bytes for string lengths)
1434 before processing a record.
1436 - test: Feed in short NAPTR
1438 - test: Add fuzz input with short NAPTR
1440 - test: add ares_parse_naptr_reply to fuzzer
1442 - [noiz brought this change]
1444 Update ares.h to support compiling with QNX
1446 - [Dionna Glaze brought this change]
1448 Simple changes to appease stricter compilers.
1450 ares_process.c uses htonl, which needs <arpa/inet.h> included.
1451 ares_getnameinfo.c uses a dynamically selected format string for
1452 sprintf, which -Wformat-literal doesn't like. Usually one would use
1453 inttypes.h and a format string "%" PRIu32, but C99 is too new for some
1454 supported platforms.
1456 GitHub (16 Jun 2017)
1457 - [Gregor Jasny brought this change]
1459 CMake: Emulate interface library on import (#108)
1462 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
1464 Brad House (6 Jun 2017)
1465 - [ChristianAmmer brought this change]
1467 Added support for Windows DNS Suffix Search List (#93)
1469 This change solves issue #53.
1471 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:
1473 The global DNS suffix search list.
1474 The primary and connection specific DNS suffixes if the global is not available.
1476 Contributed by @ChristianAmmer
1478 Daniel Stenberg (25 May 2017)
1479 - [Thomas Köckerbauer brought this change]
1481 configure: do not heck for ar if specified manually
1485 David Drysdale (23 May 2017)
1486 - ares_expand_name: limit number of indirections
1488 - test: fuzz input file that takes a while to process
1490 - test: copy data in fuzz regression driver
1494 GitHub (23 May 2017)
1495 - [David Drysdale brought this change]
1497 Convert char from ISO-8859-1 to UTF-8 (#99)
1501 - [Gregor Jasny brought this change]
1503 travis: Use trusty for cmake builds (#109)
1505 kubuntu-backports dropped the CMake package for Precise
1507 David Drysdale (2 May 2017)
1508 - [David Hotham brought this change]
1510 msvc_ver.inc support most recent Visual Studio 2017 (#101)
1512 - test: use io.h not unistd.h for Windows
1514 - test: try building fuzz binaries on Windows
1516 - test: stick to int in ares-fuzz.c
1518 Using int rather than ares_ssize_t means this file
1519 needs no c-ares dependency - it's a general driver for
1520 any libFuzzer-style entrypoint.
1522 - test: force ARES_OPT_NOROTATE for no-rotate tests
1524 - test: check expected NOROTATE value
1526 - ares_create_query: use ares_free not naked free
1528 Accidentally added in commit 65c71be1cbe5
1529 ("ares_create_query: avoid single-byte buffer overwrite")
1531 Brad House (17 Mar 2017)
1532 - Need ares.h for ares_ssize_t
1534 - tests should not use ssize_t, use ares_ssize_t
1536 GitHub (16 Mar 2017)
1537 - [Brad House brought this change]
1539 Portability updates for legacy systems. (#92)
1541 Socklen_t should not be used in code, instead ares_socklen_t should be used.
1542 Convert ssize_t to ares_ssize_t for portability since the public API now exposes this.
1544 David Drysdale (14 Mar 2017)
1545 - [Michael Osei brought this change]
1547 Update msvc_ver.inc (#91)
1549 For Visual Studio 2017 builds
1551 Daniel Stenberg (13 Mar 2017)
1552 - [Brad House brought this change]
1554 Windows DNS server sorting (#81)
1556 Original Patch From Brad Spencer:
1557 https://c-ares.haxx.se/mail/c-ares-archive-2016-04/0000.shtml
1559 My modifications include:
1560 * Dynamically find GetBestRoute2 since it is a Windows Vista+ symbol, and will fall back to prior behavior when not available.
1561 * Prefer get_DNS_AdaptersAddresses as the modifications should alleviate the concerns which caused us to prefer get_DNS_NetworkParams
1562 * Update AppVeyor to use MinGW-w64 instead of the legacy MinGW
1563 * Fix compile error in test suite for Windows.
1565 Original message from patch below:
1567 From: Brad Spencer <bspencer@blackberry.com>
1568 Date: Fri, 29 Apr 2016 14:26:23 -0300
1570 On Windows, the c-ares DNS resolver tries first to get a full list of
1571 DNS server addresses by enumerating the system's IPv4/v6 interfaces and
1572 then getting the per-interface DNS server lists from those interfaces
1573 and joining them together. The OS, at least in the way the c-ares
1574 prefers to query them (which also may be the only or best way in some
1575 environments), does not provide a unified list of DNS servers ordered
1576 according to "current network conditions". Currently, c-ares will then
1577 try to use them in whatever order the nested enumeration produces, which
1578 may result in DNS requests being sent to servers on one interface
1579 (hosting the current default route, for example) that are only intended
1580 to be used via another interface (intended to be used when the first
1581 interface is not available, for example). This, in turn, can lead to
1582 spurious failures and timeouts simply because of the server address
1583 order that resulted because of the enumeration process.
1585 This patch makes the (safe?) assumption that there is no other better
1586 rule to chose which interface's DNS server list should be prioritized.
1587 After all, a DNS lookup isn't something "per network"; applications
1588 don't look up "these DNS names on this interface and those DNS names on
1589 that interface". There is a single resource pool of DNS servers and the
1590 application should presume that any server will give it the "right"
1591 answer. However, even if all DNS servers are assumed to give equally
1592 useful responses, it is reasonable to expect that some DNS servers will
1593 not accept requests on all interfaces. This patch avoids the problem by
1594 sorting the DNS server addresses using the Windows IPv4/v6 routing tables.
1596 For example, a request to DNS server C on interface 2 that is actually
1597 sent over interface 1 (which may happen to have the default route) may
1598 be rejected by or not delivered to DNS server C. So, better to use DNS
1599 servers A and B associated with interface 1, at least as a first try.
1601 By using the metric of the route to the DNS server itself as a proxy for
1602 priority of the DNS server in the list, this patch is able to adapt
1603 dynamically to changes in the interface list, the DNS server lists per
1604 interface, which interfaces are active, the routing table, and so on,
1605 while always picking a good "best" DNS server first.
1607 In cases where any DNS server on any interface will do, this patch still
1608 seems useful because it will prioritize a lower-metric route's (and thus
1609 interface's) servers.
1611 David Drysdale (22 Feb 2017)
1612 - [Sergii Pylypenko brought this change]
1614 docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6
1616 - [Calle Wilund brought this change]
1618 ares test: fix win32 build errors with virtual socket function tests
1620 The added api requires both some typedefs not previously imported
1621 into the test build + the test code did not fully deal with
1622 socket differences on windows.
1624 - [Calle Wilund brought this change]
1626 ares_process: fix return type of socket_create function (win32 warning)
1628 Daniel Stenberg (31 Jan 2017)
1629 - [Calle Wilund brought this change]
1631 ares_set_socket_functions: Add man page
1633 Providing some rudimentary documentation for the added functionality
1637 - [Calle Wilund brought this change]
1639 ares-test: Add test helpers and cases for virtual socket IO
1641 * Added test case macro to automatically run tests twice, once "normal",
1642 once with virtual IO.
1643 * Changed most "live" query tests to run in dual mode to verify
1644 at least simple socket IO via virtual functions
1645 * Added test case for settings/duping socket functions & callback data
1647 - [elcallio brought this change]
1649 Implement using virtual socket IO functions when set
1651 Uses virtual socket IO functions when set on a channel.
1652 Note that no socket options are set, nor is any binding
1653 done by the library in this case, since the client defining
1654 these is probably more suited to deal with this.
1656 - [elcallio brought this change]
1658 Add virtual function set for socket IO
1660 Defines a structure of basic create, close, read/write
1661 functions as virtual function calls, settable for individual
1664 David Drysdale (30 Jan 2017)
1665 - test: ignore aresfuzzname binary
1667 Gregor Jasny (14 Jan 2017)
1668 - [Stephen Sorley brought this change]
1670 Always use check_symbol_exists instead of check_function_exists.
1672 - Also add includes to TARGETS_INST_DEST
1674 - [Stephen Sorley brought this change]
1678 - CMake: Export targets
1680 - CMake: Use GNUInstallDirs for install location defaults
1682 David Drysdale (11 Jan 2017)
1683 - Update Makefile.am for renamed INSTALL.md
1685 GitHub (11 Jan 2017)
1686 - [David Drysdale brought this change]
1688 docs: convert INSTALL to MarkDown & tweak (#83)
1690 - [Gregor Jasny brought this change]
1692 Merge pull request #77 from stephen-sorley/cmake_modernize
1694 Updated CMake minimum version to 2.8.12.
1696 Stephen Sorley (4 Jan 2017)
1697 - Changed executables to depend directly on internal libcares target, instead of against
1698 the external-facing alias targets.
1700 - Updated Travis to pull CMake 2.8.12 from kubuntu-backports ppa.
1702 - Updated CMake minimum version to 2.8.12.
1704 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.
1706 Updated chain-building support to imitate new-style Find modules (import libs), instead of old-style Find modules (cache variables).
1708 David Drysdale (26 Dec 2016)
1709 - [Chris Araman brought this change]
1711 configure: clock_gettime workaround (#75)
1713 Commits 7518c26, c41726b, and bc14ee7 brought this workaround to the CMake build system. This expands it to the autoconf build system.
1717 - test: add fuzz entrypoint for ares_create_query()
1719 - test: Add gTest/gMock files to SOURCES
1721 Built tarballs are not including all of the files needed
1722 to build the test suite because they are missing from the
1723 <target>_SOURCES variable in Makefile.am.
1725 - travis: Move build scripts under travis/
1727 Travis doesn't always propagate errors in inline multi-line
1728 scripts, so move them all to be explicit shell scripts, each
1731 - travis: check distributed tarball builds
1733 Daniel Stenberg (25 Oct 2016)
1734 - dist: ship msvc_ver.inc too
1736 Reported-by: Bruce Stephens
1740 - [Aaron Bieber brought this change]
1742 fix build on OpenBSD
1744 - ares_version.h: bump, working on 1.12.1 now
1746 GitHub (18 Oct 2016)
1747 - [Gregor Jasny brought this change]
1749 Merge pull request #64 from bradh352/master
1751 Add CMake build system support to C-Ares.
1753 Brad House (5 Oct 2016)
1754 - 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
1756 - update MacOSX 10.12 detection
1758 - Expand XCode clock_gettime fix to include MacOS 10.12, not just iOS10
1760 David Drysdale (4 Oct 2016)
1761 - Revert "travis: work around bug in PyCParser"
1763 This reverts commit a24a10a348fc00b8cfd684d91894a1df14880ea9.
1765 - travis: work around bug in PyCParser
1767 See https://github.com/pyca/cryptography/issues/3187
1769 Brad House (3 Oct 2016)
1770 - PROJECT_SOURCE_DIR instead of CMAKE_CURRENT_SOURCE_DIR as per @gjasny
1772 - use a project name of c-ares as per @gjasny
1774 - Import curl conversion of Makefile.inc to cmake form dynamically as per bdoetsch@ameritech.net to make maintaining multiple build systems easier
1776 Daniel Stenberg (30 Sep 2016)
1777 - dist: add ares_library_initialized.* to the tarball
1779 David Drysdale (30 Sep 2016)
1780 - test: check ares_create_query with too-long name
1782 Daniel Stenberg (30 Sep 2016)
1783 - man pages: minor formatting edits
1785 Brad House (29 Sep 2016)
1786 - merge fc7917e from @daviddrysdale ... travis build updates for cmake
1788 - cleanups as per @gjasny ... Use naked IF statements and use NOT DEFINED
1790 Version 1.12.0 (29 Sep 2016)
1792 Daniel Stenberg (29 Sep 2016)
1793 - RELEASE-NOTES: 1.12.0
1795 - [David Drysdale brought this change]
1797 ares-test-misc: test ares_create_query with escaped trailing dot
1799 - ares_create_query: avoid single-byte buffer overwrite
1801 ... when the name ends with an escaped dot.
1805 Bug: https://c-ares.haxx.se/adv_20160929.html
1807 Brad House (29 Sep 2016)
1808 - CMake: Unify library versioning with the libtool methodology to make keeping library versions in sync easier with the autotools build system
1810 Daniel Stenberg (29 Sep 2016)
1811 - ares_library_initialized.3: added
1813 - make: bump CARES_VERSION_INFO for release
1815 David Drysdale (29 Sep 2016)
1816 - man: update ares_init_options.3
1818 Daniel Stenberg (29 Sep 2016)
1819 - ares_library_init.3: corrected the ares_library_init_mem proto
1821 Brad House (28 Sep 2016)
1822 - 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.
1824 - Adds cmake build system support to C-Ares.
1826 The patch does not modify any source files, it only adds 3 new files
1827 (CMakelists.txt, ares_build.h.cmake, ares_config.h.cmake) which form the
1828 build system. I've tried to go through as much of the autotools tests and
1829 extracted what I thought was appropriate, though many of the tests aren't
1830 as in-depth in CMake as they are for autotools ... it is unclear why some
1831 of them exist at all, I'm guessing for legacy systems that CMake probably
1832 doesn't support anyhow.
1834 Building the library, and examples (adig, ahost, acountry) plus installation
1835 should work across a large number of tested platforms. The tests have not
1836 yet been integrated.
1838 Daniel Stenberg (27 Sep 2016)
1839 - README.md: remove space from link
1841 - README: link to the correct c-ares badge!
1843 Reported-by: David Hotham
1847 - docs: minor formatting edits
1849 - ares_destroy.3: formatting polish
1851 - ares_init.3: split the init docs into two separate man pages
1853 - SECURITY: point to the vulnerabilities page now
1855 - RELEASE-NOTES: synced with daa7235b1a5
1857 - ares_create_query.3: edit language
1859 Tried to make the man page more readable.
1861 David Drysdale (26 Sep 2016)
1862 - test: fix gMock to work with gcc >= 6.x
1865 https://github.com/google/googletest/issues/705#issuecomment-235067917
1867 Daniel Stenberg (26 Sep 2016)
1868 - [Brad House brought this change]
1870 headers: remove checks for and defines of variable sizes
1872 ... they're not really used and by avoiding them in the ares_build.h
1873 output we make the public header less dependent on data sizes.
1875 David Drysdale (24 Sep 2016)
1876 - api: add ARES_OPT_NOROTATE optmask value
1878 Fix up a couple of problems with configuring whether c-ares rotates
1879 between different name servers between requests.
1881 Firstly, ares_save_options() returns (in *optmask) the value of
1882 (channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily
1883 indicate whether the channel is or is not actually doing rotation.
1884 This can be confusing/incorrect if:
1885 - the channel was originally configured without ARES_OPT_ROTATE
1886 (so it appears that the channel is not rotating)
1887 - the /etc/resolv.conf file includes the 'rotate' option
1888 (so the channel is actually performing rotation).
1890 Secondly, it is not possible to reliably configure a channel
1891 to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since
1892 a 'rotate' option in /etc/resolv.conf will turn it on again.
1895 - add an ARES_OPT_NOROTATE optmask value to allow explicit
1896 configuration of no-rotate behaviour
1897 - in ares_save_options(), report the value of channel->rotate
1898 as exactly one of (optmask & ARES_OPT_ROTATE) or
1899 (optmask & ARES_OPT_NOROTATE).
1901 In terms of back-compatibility:
1902 - existing apps that set ARES_OPT_ROTATE will continue to rotate,
1903 and to have ARES_OPT_ROTATE reported back from ares_save_options()
1904 - existing apps that don't set ARES_OPT_ROTATE will continue to
1905 use local config/defaults to decide whether to rotate, and will
1906 now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from
1907 ares_save_options() rather than 0.
1909 - ares_init_options: only propagate init failures from options
1911 Commit 46bb820be3a8 ("ares_init_options: don't lose init failure")
1912 changed init behaviour so that earlier errors in initialization
1913 weren't lost. In particular, if the user passes in specific
1914 options but they are not applied (e.g. because of an allocation
1915 failure), that failure needs to be reported back to the user; this
1916 also applies when duplicating a channel with ares_dup().
1918 However, other initialization failures can be ignored and
1919 overridden -- in particular, if init_by_resolv_conf() or
1920 init_by_environment() fail, then falling back to default values
1923 So only preserve failures from the init_by_options() stage, not
1924 from all initialization stages.
1928 - test: Force reinstall of libtool on OSX
1930 Travis build environment appears to have changed.
1932 - test: Add valgrind build variant
1934 - test: Add null pointer to gtest args
1936 GoogleTest assumes that there is a null pointer in argv[argc],
1937 so make it look like that. Without this change, tests run with
1938 command-line arguments get memory errors under valgrind/ASAN.
1940 Daniel Stenberg (21 Aug 2016)
1941 - AUTHOR: maybe gitgub isn't really an author =)
1943 - AUTHORS: added contributors from the git log
1945 - LICENSE.md: add a stand-alone license file
1947 Just the MIT license used in the top the source files moved out to a
1948 stand-alone file for easier reference and discovery.
1950 - README: added "CII best practices" badge
1952 - SECURITY.md: suggested "security process" for the project
1954 David Drysdale (17 Aug 2016)
1955 - test: Add Clang static analysis build to Travis
1957 Run scan-build over the library source code, but skip the
1958 tests. Needs a later Clang install in Travis
1960 - test: more info on how to run fuzz testing
1962 - test: make fuzzer driver code C not C++
1964 - test: fuzzer mode for AFL's persistent mode
1966 When fuzzing with AFL, if the LLVM-based instrumentation is
1967 used (via the afl-clang-fast wrapper), then it is possible to
1968 have a single execution of the fuzzer program iterate multiple
1969 times over the fuzzing entrypoint (similar to libFuzzer's normal
1970 mode of execution) with different data. This is much (e.g. 10x)
1973 Add code to support this, by checking whether __AFL_LOOP is
1974 defined at compile-time.
1976 Also, shift the code to effectively be C rather than C++.
1978 - test: simplify deps for fuzzer entrypoint
1980 No need to depend on the rest of the test code (ares-test.h) for
1981 the fuzzer entrypoint; this makes the entrypoint slightly simpler
1982 to build with LLVM's libFuzzer.
1984 Also shift the code to effectively be C rather than C++
1986 - test: disable MinGW tests
1988 The test binary built in the MinGW build is failing for some
1989 reason. It works for me when I build locally, so I'm guessing
1990 it's down to some sort of AppVeyor environment issue.
1994 Daniel Stenberg (16 Aug 2016)
1995 - read_tcp_data: remove superfluous NULL check
1997 CID 56884 by Coverity. The pointer is already derefenced before this
1998 point so it can't be NULL here anyway.
2000 - web: http => https
2002 GitHub (20 Jul 2016)
2003 - [David Drysdale brought this change]
2005 Merge pull request #59 from fuze/master
2007 Update msvc_ver.inc for VS2015 Update 3
2009 - [Chris Araman brought this change]
2013 support Visual Studio 2015 Update 3
2015 David Drysdale (2 May 2016)
2016 - Fix trailing comment for #endif
2018 Daniel Stenberg (30 Apr 2016)
2019 - email: use Gisle's "new" address
2021 David Drysdale (18 Apr 2016)
2022 - test: drop superfluous fuzz inputs
2024 Where there are multiple fuzz input files that only differ in
2025 the first two bytes (the query ID), just keep the first such
2028 svante karlsson (15 Apr 2016)
2029 - Update msvc_ver.inc
2031 support Visual Studio 2015 Update 2
2033 David Drysdale (31 Mar 2016)
2034 - test: Run fuzzcheck.sh in Travis build
2036 - test: add fuzzing check script to tests
2038 Add a test script that runs the fuzzing command over the
2039 corpus of DNS packets. This doesn't actually do any fuzzing
2040 (it just runs them as inputs without generating any variations)
2041 but it does ensure that the fuzzing entrypoint is still working.
2043 - test: allow multiple files in aresfuzz command line
2045 If no arguments are specified, use stdin as input.
2046 Otherwise treat each argument as a filename and feed
2047 its contents to the fuzz entrypoint.
2049 - test: Add corpus of DNS packets
2051 For fuzz testing it is useful to start from a corpus of valid
2052 packets, so fill out the test/fuzzinput/ directory with a bunch
2055 These packets were generated by temporarily modifying the c-ares
2056 process_answer() function to save off any incoming response messages.
2058 - test: Add utility to show DNS packet from file
2060 - [nordsturm brought this change]
2062 Fix nsort initialization
2064 Author: Alexander Drachevskiy
2065 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml
2066 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml
2068 - test: Check setting nsort=0 option is respected
2070 - test: Update fuzzing function prototype
2072 libFuzzer changed expected return type from void to int
2075 - Explicitly clear struct servent before use
2077 On a build where MSAN has been manually set up (which involves
2078 using an MSAN-instrumented version of the standard C++ library, see
2079 https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo)
2080 there's a warning about use of uninitialized memory here. It
2081 might be a false positive, but the fix is trivial so include it.
2083 - test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record
2085 Also shuffle expected responses rsp6/rsp4 into the order they will occur.
2087 - [Chris Araman brought this change]
2089 msvc_ver.inc: support Visual Studio 2015 Update 1
2091 - build: commonize MSVC version detection
2093 Remove the need to copy/paste version number mapping between
2094 Makefile.msvc and test/Makefile.msvc.
2096 - test: Use different name in live test
2098 - test: Only pass unused args to GoogleTest
2100 - ahost.c: add cast to fix C++ compile
2102 If ahost.c is force-compiled as C++ the missing cast from
2103 (void *) to (char **) is problematic.
2105 - ares_library_cleanup: reset ares_realloc too
2107 Otherwise a subsequent use of the library might use a previous
2108 incarnation's realloc() implementation.
2110 Daniel Stenberg (9 Mar 2016)
2111 - [Brad House brought this change]
2113 configure: check if tests can get built before enabled
2115 The current approach for disabling tests is not a good solution because
2116 it forces you to pass --disable-tests, rather than auto-detect if your
2117 system can support the tests in the first place. Many (most?) systems
2118 do not have C++11. This also causes issues when chain-building c-ares,
2119 the hosting system needs to be updated to support passing this
2120 additional flag if necessary, it doesn't seem reasonable to add this
2121 requirement which breaks compatibility.
2123 This change auto-detects if the system can build the tests and
2124 automatically disable them if it cannot. If you pass --enable-tests to
2125 configure and the system cannot build them either due to lack of system
2126 support, or because cross-compilation is being used, it will throw an
2127 appropriate error since the user indicated they really did want the
2130 David Drysdale (3 Mar 2016)
2131 - [Viktor Szakats brought this change]
2133 Makefile.m32: add support for CROSSPREFIX
2135 - [Viktor Szakats brought this change]
2137 Makefile.m32: add support for extra flags
2139 Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars
2142 - test: Build with MinGW on AppVeyor
2144 - test: avoid in6addr_* constants
2146 These aren't available on MinGW, so use explicit addresses instead.
2148 - test: add missing #includes for dns-proto.cc
2150 - [Gregor Jasny brought this change]
2152 Fix man page typos detected by Lintian
2154 Daniel Stenberg (19 Feb 2016)
2155 - configure: acknowledge --disable-tests
2159 - AUTHORS: added contributors from the 1.11.0 release
2161 - bump: start working on the next version
2163 Version 1.11.0 (19 Feb 2016)
2165 Daniel Stenberg (19 Feb 2016)
2166 - RELEASE-NOTES: final edits for 1.11.0
2168 David Drysdale (15 Feb 2016)
2169 - ares_dup.3: remove mention of nonexistent function
2171 ares_dup_options() doesn't exist, so don't document it.
2173 - test: skip repeated build steps
2175 Top-level buildconf/configure now triggers for the
2176 test/ subdir too, so don't need to do explicitly.
2178 - test: namespaces unavailable when cross-compiling
2180 Daniel Stenberg (13 Feb 2016)
2181 - configure: only run configure in test when NOT cross-compiling
2183 ... as the tests won't run cross-compiled anyway
2185 David Drysdale (13 Feb 2016)
2186 - test: prefer ON_CALL to EXPECT_CALL to reduce flakes
2188 For UDP tests, there's a chance of a retry. EXPECT_CALL only
2189 expects a single request to arrive at the server; ON_CALL allows
2190 for a UDP retry and repeats the same answer.
2192 Note that ON_CALL and EXPECT_CALL can't be mixed in the same
2193 test, and that tests that have a varied sequence of responses
2194 for the same repeated request still have to use EXPECT_CALL.
2196 Daniel Stenberg (13 Feb 2016)
2197 - configure: run configure in 'test' too
2199 Having the test dir completely stand-alone causes too many issues for
2200 users and devs. It still needs to be built specifically.
2202 - configure: build silently by default
2204 - buildconf: run test/buildconf too if present
2206 - test/configure: build silently by default
2208 - [Gregor Jasny brought this change]
2210 dist: Distribute README.md
2214 Version 1.11.0 (11 Feb 2016)
2216 Daniel Stenberg (11 Feb 2016)
2217 - Makefile.am: distribute the test dir too
2219 - RELEASE-NOTES: synced with 385582bd14b68a
2221 - [Nicolas \"Pixel\" Noble brought this change]
2223 ares_win32_init: make LoadLibrary work when using UNICODE too
2227 David Drysdale (11 Feb 2016)
2228 - Use "resolve" as synonym of "dns" in nsswitch.conf
2230 Modern Linux systems may have libnss_resolve from systemd as the
2231 resolver, which is then configured in /etc/nsswitch.conf with
2232 the "resolve" keyword rather than "dns".
2236 - ares_set_socket_callback: make manpage match code
2238 The code in ares_process.c that invokes the socket creation/connection
2239 callback only checks for rc < 0, not for standard ares error codes.
2241 - Merge pull request #36 from AGWA-forks/master
2243 Add ares_set_socket_configure_callback()
2245 - test: Update init tests to match behaviour
2247 Unreadable config files are now treated the same way
2248 as absent config files.
2250 - [Fedor Indutny brought this change]
2252 Ignore `fopen` errors to use default values
2254 After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf`
2255 errors are no longer swallowed in `ares_init_options`. This has exposed
2256 a previously unknown bug in `lookups` initialization code.
2258 If there is no lookup configuration in `resolv.conf`,
2259 `init_by_resolv_conf` will attempt to read it from other files available
2260 on the system. However, some of these files may have restricted
2261 permissions (like `600`), which will lead to `EACCESS` errno, which in
2262 turn is handled like a fatal error by `init_by_resolv_conf`.
2264 However, it sounds illogical that this error should be handled as a
2265 fatal. There is a `init_by_defaults` call that overrides `lookups` with
2266 default value, and certainly possible absence of lookup information is
2267 the reason why this function exists in a first place!
2269 I suggest handling any `fopen` errors as non-fatal ones, allowing to
2270 pick up the `lookups` value from different config files, or to pick up
2273 Andrew Ayer (9 Feb 2016)
2274 - Document callback type in man page for ares_set_socket_callback
2276 - Add ares_set_socket_configure_callback()
2278 This function sets a callback that is invoked after the socket is
2279 created, but before the connection is established. This is an ideal
2280 time to customize various socket options.
2282 David Drysdale (9 Feb 2016)
2283 - test: ares_set_socket_callback failure behaviour
2285 - test: Check ares_parse_txt_reply_ext() entrypoint
2287 - [Fedor Indutny brought this change]
2289 txt: introduce `ares_parse_txt_reply_ext`
2291 Introduce `ares_txt_ext` structure with an extra `record_start`
2292 field, which indicates a start of a new TXT record, thus allowing to
2293 differentiate the chunks in the same record, from a chunks in a
2296 Introduce a new API method: `ares_parse_txt_reply_ext` that works with
2297 this kind of struct.
2299 - doc: Update missed repo references
2301 - doc: Update docs on contributing
2303 - test: Run command line tools in Travis
2305 Do a quick execution of each of the command line tools
2306 in the continuous integration build, so that any (say)
2307 sanitizer failures show up.
2309 - acountry: drop inert test
2311 If ver_1 is true, then z0 and z1 must both be 'z', and so
2312 (z0 != 'z' && z1 != 'z') can never be true.
2314 CID 56879, pointed out by Coverity.
2316 - doc: update badge locations to master repo
2318 - test: Enable maintainer mode + debug in Travis
2320 - test: Add an iOS build target
2322 - test: Ignore SIGPIPE in tests
2324 - test: More initialization tests
2326 - test: Improve containerized test mechanism
2328 Aim is to ensure that code coverage information can escape the
2329 container. To do this:
2330 - Enter a new mount namespace too, so that we can...
2331 - Bind mount the expected source directory into the container
2332 - Share memory with the sub-process so coverage information is
2335 - test: Make contained tests easier to write
2337 - test: Add framework for containerized testing
2339 On Linux we can potentially use user and UTS namespaces to run a test
2340 in a pseudo-container with:
2341 - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts)
2342 - arbitrary hostname/domainname.
2344 Include a first pass at the framework code to allow this, along with a
2345 first test case that uses the container.
2347 - test: Use a longer timeout for less flakiness
2349 Having occasional test failures from timeout before multiple
2350 queries can complete, so up the default timeout for the test
2351 from 100ms to 1500ms.
2353 - test: Make failure tests more robust
2355 Different platforms will do different numbers of allocations
2356 in the processing of a given API call; just check that the
2357 return code is either success or ENOMEM, and free off any
2358 returned state in the former case.
2360 Also cope with ECONNREFUSED as well as ENOTFOUND.
2362 - test: Get test code building under Windows
2364 - Initial nmake file based off library nmake file
2365 - Cast socket call arguments to (char *)
2366 - Use wrapper sclose() that maps to closesocket() or close()
2367 - Build a config.h indicating presence of headers
2368 - Conditionally include netdb.h
2369 - Remove unnecessary include of sys/socket.h
2370 - Force longer bitmask for allocation failure tracking
2371 - Call WSAStartup() / WSACleanup() in main()
2372 - Set TCP_NODELAY for mock server
2373 - Turn on tests in AppVeyor build
2375 - test: Disable tests that manipulate env on Windows
2377 - test: Move file lists into Makefile.inc
2379 In preparation for a Win32 build of the test suite.
2381 - test: Add a simple multi-server test
2383 Check rotate option does something
2385 - test: Allow for multiple mock servers
2387 - Update the MockServer to allow separate specification of
2389 - Have an array of mock servers listening on consecutive
2391 - Rename Process(fd) to ProcessFD(fd) to avoid confusion.
2392 - Initialize channel by using the new ares_set_servers_ports()
2393 entrypoint, so multiple ports on the same loopback address
2396 - test: Update test for set/get_servers variants
2398 Ports are significant in the _ports_ variant functions, so update test to cope.
2400 - test: Make GetNameServers() utility function port-aware
2402 Also make it generally available.
2404 - test: more testing, including of internal static functions
2406 - test: more tests, especially fallback processing
2408 - Make mock server listen on UDP + TCP in parallel.
2409 - Test UDP->TCP fallback on truncation
2410 - Test EDNS->no-EDNS fallback
2411 - Test some environment init options
2412 - Test nonsense reply
2414 test: short response
2416 - test: more tests, particularly of initialization
2418 - test: Run mock tests over both TCP and UDP
2420 With the exception of a few tests that make use of the timed
2421 retry aspect of UDP.
2423 - test: Run mock tests over both IPv4 and IPv6
2425 - test: Add more tests for edge cases
2427 - test: more nooks and crannies of pton functions
2429 - test: More tests for PTR parsing
2431 - test: Use of HOSTALIAS environment variable
2433 - test: Add RAII utility classes for testing
2435 - TempFile holds specific contents
2436 - EnvValue sets an environment variable
2438 - test: More search domain scenarios
2440 - test: Remove duplicate flags from Makefile.am
2442 - test: Make test code leak-free
2446 - test use of sortlist
2447 - test gethostbyname(AF_UNSPEC)
2449 - test: Test ares_gethostbyname_file()
2451 - test: Add more tests of ares_getnameinfo()
2453 - test: Tweak tests, add alloc failure test
2455 - test: Test init with options
2459 - ares_inet_net_pton() variants
2460 - ares_getsock() variants
2462 - test: Expose ProcessWork() function
2464 - test: More parsing tests
2467 - Split each parse function test set out into separate files.
2468 - Add an allocation failure test for each parsing function.
2469 - Add error check test for each parsing function.
2471 - test: Add various additional tests
2475 Include tests of internal functions, based on the value of the
2476 CARES_SYMBOL_HIDING macro; need to configure the library with
2477 --disable-symbol-hiding to enable these tests.
2479 - test: Allow command line override of mock server port
2481 - test: Add README.md documentation
2483 - test: Temporarily avoid latest Python requests package
2485 Currently get error from Travis on this install step, and downgrading one
2486 version appears to fix the problem.
2488 "Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13
2489 (from requests[security])"
2491 - test: Add AppVeyor config file for Windows build
2493 - test: Add configuration for a Travis build
2495 Cover Linux & OSX on the container infrastructure, but install
2496 a later G++ to satisfy the tests' need for C++11.
2498 Use a build matrix to include a variety of build variants:
2502 - Coverage via coveralls.io
2504 test: invoke ASAN and coverage in Travis build
2506 Also shift to use explicit build matrix
2508 test: Use coveralls.io for coverage tracking
2510 test: Add a build with UBSAN
2512 Also expand and re-order the setting of environment variables
2513 for easier modification.
2515 test: Add LSAN build to Travis config
2517 - test: Add initial unit tests for c-ares library
2519 The tests are written in C++11, using the GoogleTest and GoogleMock
2520 frameworks. They have their own independent autoconf setup, so that
2521 users of the library need not have a C++ compiler just to get c-ares
2522 working (however, the test/configure.ac file does assume the use of
2523 a shared top-level m4/ directory). However, this autoconf setup has
2524 only been tested on Linux and OSX so far.
2526 Run with "./arestest", or "./arestest -v" to see extra debug info.
2527 The GoogleTest options for running specific tests are also
2528 available (e.g. "./arestest --gtest_filter=*Live*").
2530 The tests are nowhere near complete yet (currently hitting around
2531 60% coverage as reported by gcov), but they do include examples
2532 of a few different styles of testing:
2534 - There are live tests (ares-test-live.cc), which assume that the
2535 current machine has a valid DNS setup and connection to the
2536 internet; these tests issue queries for real domains but don't
2537 particularly check what gets returned. The tests will fail on
2540 - There a few mock tests (ares-test-mock.cc) that set up a fake DNS
2541 server and inject its port into the c-ares library configuration.
2542 These tests allow specific response messages to be crafted and
2543 injected, and so are likely to be used for many more tests in
2546 - To make this generation/injection easier, the dns-proto.h file
2547 includes C++ helper classes for building DNS packets.
2549 - Other library entrypoints that don't require network activity
2550 (e.g. ares_parse_*_reply) are tested directly.
2552 - There are few tests of library-internal functions that are not
2553 normally visible to API users (in ares-test-internal.cc).
2555 - A couple of the tests use a helper method of the test fixture to
2556 inject memory allocation failures, using the earlier change to the
2557 library to allow override of malloc/realloc/free.
2559 - There is also an entrypoint to allow Clang's libfuzzer to drive
2560 the packet parsing code in ares_parse_*_reply, together with a
2561 standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz
2562 for further fuzz testing.
2564 - test: Add local copy of GoogleMock/GoogleTest 1.7.0
2566 Don't check in gtest/m4 files, as they are unused and interfere
2567 with the top-level configure process.
2569 - doc: Show build badges in README.md
2571 Note that these URLs will need to be updated if/when the test branch
2572 gets pulled into the master repo/branch.
2574 - doc: Convert README to README.md
2576 Gives better display on GitHub
2578 - doc: Update in preparation for next release
2580 Assume 1.11.0 is next (as there are various API additions).
2581 Also add myself to AUTHORS.
2583 - build: Allow header compilation by Windows C++ compiler
2585 - build: Expose whether symbol hiding is on
2587 Adding the CARES_SYMBOL_HIDING definition allows the test suite to
2588 detect whether internal symbols are available or not.
2590 - build: Add autoconf macros for C++11 code using pthreads
2592 Pull in testing macros from the GNU autoconf archive to allow
2593 configure scripts to test for and setup use of a C++11 compiler
2594 (AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD).
2596 Note that these macros are not used by the main library autoconf,
2597 just by the tests (which share the same m4/ directory).
2599 - build: Add a code coverage option
2602 ./configure --enable-code-coverage
2603 Show coverage output with:
2604 make code-coverage-capture
2606 Built on m4/ax_code_coverage.m4 from the GNU autoconf archive
2607 to provide the macros to check for presence of gcov + lcov;
2608 upstream macro modified to:
2609 - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of
2610 autoconf (such as the one used by default on Travis) do not have this.
2611 - Rather than automatically defining CODE_COVERAGE_RULES to be a set
2612 of makefile rules that use ifeq/endif (which is GNU make-specific),
2613 instead only define CODE_COVERAGE_RULES if coverages is turned on,
2614 and in that case don't use conditionals in the makefile.
2616 - api: Add entrypoints to allow use of per-server ports
2618 Add user-visible entrypoints ares_{get,set}_servers_ports(3), which
2619 take struct ares_addr_port_node rather than struct ares_addr_node.
2620 This structure includes a UDP and TCP port number; if this is set
2621 to zero, the channel-wide port values are used as before.
2623 Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which
2624 is analogous to ares_set_servers(3) except it doesn't ignore any
2625 specified port information; instead, any per-server specified port
2626 is used as both the UDP and TCP port for that server.
2628 The internal struct ares_addr is extended to hold the UDP/TCP ports,
2629 stored in network order, with the convention that a value of zero
2630 indicates that the channel-wide UDP/TCP port should be used.
2632 For the internal implementation of ares_dup(3), shift to use the
2633 _ports() version of the get/set functions, so port information is
2634 transferred correctly to the new channel.
2636 Update manpages, and add missing ares_set_servers_csv to the lists
2639 - api: Add ares_set_sortlist(3) entrypoint
2641 Allow explicit configuration of the channel's sortlist, by
2642 specifying a string in the same format as the equivalent
2643 /etc/resolv.conf option.
2645 This allows library users to perform the same configuration
2646 that is available via /etc/resolv.conf, but without needing
2647 to change that file.
2649 - api: Allow injection of user-specified malloc/free functions
2651 Add a new ares_library_init_mem() initialization function for the
2652 library which allows the library user to specify their own malloc,
2653 realloc & free equivalents for use library-wide.
2655 Store these function pointers in library-wide global variables,
2656 defaulting to libc's malloc(), realloc() and free().
2658 Change all calls to malloc, realloc and free to use the function pointer
2659 instead. Also ensure that ares_strdup() is always available
2660 (even if the local environment includes strdup(3)), and change the
2661 library code to always use it.
2663 Convert calls to calloc() to use ares_malloc() + memset
2665 - api: Add option to expose some internal functions
2667 Purely for testing, add --enable-expose-statics option to configure
2668 which converts some static internal functions to be externally visible.
2670 - api: Expose the ares_library_initialized() function
2672 - ahost: Allow repeated -s <domain> options
2674 This also removes a potential leak where later -s options would
2675 replace earlier ones without freeing the relevant string.
2677 - Mark unhittable lines
2679 Add comments for the benefit of the lcov tool, marking
2680 lines that cannot be hit. Typically these are fall-back
2681 protection arms that are already covered by earlier checks,
2682 and so it's not worth taking out the unhittable code (in case
2683 someone changes the code between the two places in future).
2685 - ares_set_servers_csv.3: make return type match code
2687 - bitncmp: update comment to match code behaviour
2689 - ares_striendstr: fix so non-NULL return can happen
2691 This looks to have been broken since it was first introduced in 2005 in
2692 commit aba0b775ea30 ("Added ares_getnameinfo which mimics the
2695 - config_sortlist: free any existing sortlist on (re)alloc failure
2697 If we get an allocation failure on 2nd or later entry in the sortlist, the
2698 code would return ENOMEM but still leave the initial entries allocated.
2699 Ensure that *sortlist is set to NULL whenever ENOMEM is returned.
2701 - ares_dup: clear new channel on failure
2703 If the attempt to transfer IPv6 servers from the old to the new channel
2704 fails, the previous code would still return a channel to the user even though
2705 an error return code was generated. This makes it likely that users would
2706 leak the channel, so explicitly clear the channel in this case.
2708 - ares_init_options: don't lose init failure
2710 If (say) init_by_options() fails, the subsequent call to
2711 init_by_defaults() was overwriting the return code with
2712 success. Still call init_by_defaults() regardless, but track
2713 its return value separately
2715 - ares_gethostbyname: don't leak valid-but-empty hostent
2717 If an AF_UNSPEC query gets a valid response to its AAAA query,
2718 but which has no IPv6 addresses in it, then the code chains on to
2719 a A record query. However, the hostent from the AAAA response
2720 was being leaked along the way (because it gets replaced before
2721 the follow-on end_hquery() invocation).
2723 - ares_parse_txt_reply: propagate errors from per-substring loop
2725 If we get an allocation failure when processing a particular substring in a
2726 TXT record, that failure is silently lost; fix that by propagating errors from
2727 the inner loop to the outer loop.
2729 - process_answer: fix things up correctly when removing EDNS option
2731 When a server rejects an EDNS-equipped request, we retry without
2732 the EDNS option. However, in TCP mode, the 2-byte length prefix was
2733 being calculated wrong -- it was built from the answer length rather than
2734 the length of the original request.
2736 Also, it is theoretically possible that the call to realloc() might change
2737 the data pointed to; to allow for this, qbuf also needs updating.
2739 (Both these fixes were actually included in a patchset sent on the mailing
2740 list in Oct 2012, but were included with other functional changes that
2742 http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml)
2744 - ares__read_line: clear buf pointer on realloc failure
2746 - ares_expand_name: check for valid bits in label length
2748 The top two bits of the label length indicate whether this is a
2749 label length (00) or an index to a name elsewhere in the message
2750 (11). RFC1035 4.1.4 says that the other possible values for the
2751 top two bits (01, 10) are reserved for future use.
2753 Daniel Stenberg (23 Jan 2016)
2754 - [Gregor Jasny brought this change]
2756 Fix typos detected by lintian
2760 - [Gregor Jasny brought this change]
2762 Distribute all man pages
2764 - README.cares: s/I/Daniel
2766 ... and add a pointer to an existing version of the original area 1.1.1
2769 - read_tcp_data: don't try to use NULL pointer after malloc failure
2771 CID 56884, pointed out by Coverity. We really should make this function
2772 return an error code so that a malloc() failure can return back a major
2775 - configure_socket: explicitly ignore return code
2777 CID 56889 in Coverity pointed out the return code from setsocknonblock()
2778 is ignored, and this added typecast to (void) makes it explicit.
2780 - ahost: check the select() return code
2782 Fixes CID 137189, pointed out by Coverity
2784 David Drysdale (18 Jan 2016)
2785 - Fix buildconf on platforms using glibtoolize
2787 Commit c49a87eea538 changed buildconf to only check for
2788 libtoolize, but missed a line
2790 - Don't exit loop early leaving uninitialized entries
2792 Update for commit affc63cba875d.
2794 The original patch from Gregor Jasny did not have the break
2795 statement; I incorrectly added it to prevent continuing the loop.
2796 However, the later entries in the array would then be left
2797 uninitialized, causing problems for later cleanup.
2799 So fix to match Gregor's original patch, with apologies.
2801 Daniel Stenberg (18 Jan 2016)
2802 - buildconf: remove check for libtool, it only requires libtoolize
2804 David Drysdale (17 Jan 2016)
2805 - [Gregor Jasny brought this change]
2807 Use libresolv to initialize cares on iPhone targets
2809 On iPhone targets like iOS, watchOS or tvOS the file
2810 /etc/resolv.conf cannot be used to configure cares.
2812 Instead the resolver library is queried for configuration
2815 CC: Yury Kirpichev <ykirpichev@yandex-team.ru>
2817 Daniel Stenberg (17 Jan 2016)
2818 - README: updated to new repo URL
2820 David Drysdale (14 Jan 2016)
2821 - [Lei Shi brought this change]
2823 Fixing slow DNS lookup issue
2825 This patch is fixing the dns lookup issue due to dummy dns information
2826 of a disconnected adapter(in my case is a bluetooth adapter). I changed
2827 the dns lookup policy to try GetNetworkParams first because the
2828 GetNetworkParams provides the most reliable dns information (lots of
2829 checks were done by system). I also filter out inoperable adapter in
2830 DNS_AdaptersAddresses in case GetNetworkParams fail.
2832 - Merge pull request #30 from p-push/vs-2015
2834 Support Visual Studio 2015
2836 Oleg Pudeyev (3 Jan 2016)
2837 - [Gisle Vanem brought this change]
2839 Support Visual Studio 2015
2841 David Drysdale (11 Nov 2015)
2842 - [Andrew Andkjar brought this change]
2844 added another version case to Makefile.msvc
2846 nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110
2848 - Merge pull request #26 from bitbouncer/vs-2013
2850 added define for visual studio 2013
2852 svante karlsson (25 Jun 2015)
2853 - added define for visual studio 2013
2855 Jakub Hrozek (6 Nov 2014)
2856 - ares__read_line: free buf on realloc failure
2858 - Destroy options if ares_save_options fails
2860 It's possible that, if ares_save_options failed, the opts structure
2861 would contain some allocated memory. Calling ares_destroy_options in
2862 this case is safe, because ares_save_options zeroes out the memory
2865 - [David Drysdale brought this change]
2867 Continue loop if space for hostname not large enough
2869 When attempting to build a search domain from the local hostname
2870 (used as a fallback when no other methods have given a search
2871 domain), the code doubles the buffer size on each loop iteration.
2873 However, the loop previously had a WHILE_FALSE terminator so the continue
2874 statement exited the loop rather than going round again.
2876 Daniel Stenberg (30 Oct 2014)
2877 - ares_getnameinfo.3: there is no ares_getaddrinfo
2879 David Drysdale (30 Sep 2014)
2880 - [Gregor Jasny brought this change]
2882 Prevent tmpbuf from overrunning
2884 Fix Coverity error CID 56886.
2886 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2888 - [Gregor Jasny brought this change]
2890 Re-start loop if select fails
2892 Fix Coverity error CID 56882
2894 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2896 - [Gregor Jasny brought this change]
2898 Free temporary variable in error path
2900 Fix Coverity CID 56890
2902 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2904 - [Gregor Jasny brought this change]
2906 Fix integer shift overflow if both tcp_socket and udp_socket are set
2908 The problem occurs if at the start of the loop the sockindex is at the
2909 last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and
2910 tcp_socket are valid, sockindex gets incremented for UDP first and
2911 points one entry behind the array for the tcp block.
2912 So the fix is to check after every increment of sockindex if it is still
2915 Fix Coverity error CID 56878
2917 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2919 - [Gregor Jasny brought this change]
2921 Null check before dereference
2923 Fix Coverity error CID 56880
2925 Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2927 Jakub Hrozek (28 Jul 2014)
2928 - [Gisle Vanem brought this change]
2930 Comment in ares_ipv6.h
2932 David Drysdale (25 Jul 2014)
2933 - CONTRIBUTING: add file to indicate mailing list is preferred
2935 - Add -t u option to ahost
2937 Add an option to allow specification of the AF_UNSPEC
2940 Jakub Hrozek (24 Jul 2014)
2941 - host_callback: Fall back to AF_INET on searching with AF_UNSPEC
2943 Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the
2944 first AF_INET6 call only returned CNAMEs, the host_callback never
2947 This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is
2948 taken as authoritative only if the result contains some addresses.
2950 - [David Drysdale brought this change]
2952 Move memset call below platform-specific declarations
2954 A GitHub commenter [1] says that my recent change to ahost.c has
2955 problems compiling on Windows + C89 platforms.
2957 [1] https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616
2959 - [David Drysdale brought this change]
2961 Update ahost man page to describe -s option.
2963 Commit ee22246507c9 added the -s <domain> option to the
2964 ahost command, but neglected to update the man page to
2967 Also fix typo in description of -t option.
2969 - ares_parse_soa_reply: Do not leak rr_name on allocation failure
2971 If ares_malloc_data failed, already allocated rr_name would go out of
2974 - [David Drysdale brought this change]
2976 Don't override explicitly specified search domains
2978 Only set search domains from /etc/resolv.conf if there isn't a value
2979 already present in the channel.
2981 - [David Drysdale brought this change]
2983 Allow specification of search domain in ahost
2985 Add the "-s domain" command line option to override the search
2988 Daniel Stenberg (12 May 2014)
2989 - Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address"
2991 This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451.
2993 - [Frederic Germain brought this change]
2995 ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address
2997 - [Doug Kwan brought this change]
2999 ares_build.h: fix building on 64-bit powerpc
3001 There are two issues.
3003 1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and
3004 __PPC64__. The tests of __ILP32__ and __LP64__ are sufficient for gcc.
3006 2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when
3007 targeting ppc64. This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system
3008 when building with clang.
3010 My patch is two change the order of the checks so that we check the
3013 - refresh: updated now with automake 1.14
3015 - [David Drysdale brought this change]
3017 single_domain: Invalid memory access for empty string input
3019 We noticed a small buglet in ares_search() when it gets an empty string
3020 as input -- the single_domain() utility function in ares_search.c
3021 accesses invalid memory (before the start of the string).
3023 Guenter Knauf (31 Aug 2013)
3024 - Fixed warning 'type specifier missing'.
3026 Daniel Stenberg (30 Aug 2013)
3027 - [Tor Arntsen brought this change]
3029 ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it
3031 It was removed in f19387dd72432
3033 - nowarn: use <limits.h> instead of configure for size of long
3035 This makes the header file much more multi-arch friendly and can be used
3036 as-is with both 32 bit and 64 bit builds.
3038 - timeoffset: made static and private
3040 ares__timeoffset() was only used once within this single source file
3042 - timeadd: make static
3044 ares__timeadd() was only ever used from within the same source
3046 Yang Tse (18 Jul 2013)
3047 - xc-am-iface.m4: comments refinement
3049 - configure: fix 'subdir-objects' distclean related issue
3051 See XC_AMEND_DISTCLEAN comments for details.
3053 - configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE)
3055 - xc-am-iface.m4: provide XC_AUTOMAKE macro
3057 Daniel Stenberg (12 May 2013)
3058 - gitignore: ignore all ares_*pdf but also CHANGES.dist
3060 - bump: start working towards 1.10.1
3062 Version 1.10.0 (12 May 2013)
3064 Daniel Stenberg (12 May 2013)
3065 - RELEASE-NOTES: two more bug fixes
3067 - [Keith Shaw brought this change]
3069 ares_set_servers_csv: fixed IPv6 address parsing
3071 Fixed bug that caused the last part of an IPv6 address to be parsed as
3072 the port number when the last part is all numeric.
3074 - nroff: fix two syntax mistakes
3076 ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of
3079 Reported-by: Alexander Klauer
3080 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml
3082 - [Alex Loukissas brought this change]
3084 build: fix build on msvc11
3086 - Makefile.am: increment -version-info for 1.10.0 release
3088 - README: remove unnecessary comment
3090 - ares_version.h: copyright end range year is now 2013
3092 - RELEASE-NOTES: synced with fb0737f3a0a1c37
3094 - [Paul Saab brought this change]
3096 ares_parse_aaaa_reply: Plug memory leak
3098 This change is similar to ares_parse_a_reply.c in commit
3099 bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6
3101 - [Patrick Valsecchi brought this change]
3103 ares_parse_txt_reply: return a ares_txt_reply node for each sub-string
3105 Previously, the function would wrongly return all substrings merged into
3108 - [Alexander Klauer brought this change]
3110 library init: documentation update
3112 This commit updates the documentation of ares_library_init() and
3113 ares_library_cleanup() with regard to the newly introduced reference
3114 counting of initializations and deinitializations.
3116 - [Alexander Klauer brought this change]
3118 library init: be recursive
3120 Previously, a single call to ares_library_cleanup() would deinitialise
3121 the c-ares library, regardless of how many times ares_library_init() was
3122 called. This behaviour may cause problems in programs linking two or
3123 more libraries which, in turn, use c-ares. The present commit fixes this
3124 problem, deinitializing the library only after a number of calls to
3125 ares_library_cleanup() matching the number of calls to
3126 ares_library_init().
3128 - [Patrick Valsecchi brought this change]
3130 protocol parsing: check input data stricter
3132 ... so that bad length fields aren't blindly accepted
3134 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml
3136 Guenter Knauf (11 Apr 2013)
3137 - Create ares_build.h when buidling from Git.
3139 - Added -DCARES_STATICLIB to CFLAGS.
3141 Currently this static makefile does only support building the
3142 static library libcares.a.
3144 Daniel Stenberg (8 Apr 2013)
3145 - [Alexander Klauer brought this change]
3147 .gitignore: ignore patch files
3149 This commit adds a line to .gitignore to the effect that patch files
3150 generated by 'git format-patch' are excluded from the repository.
3152 - [Alexander Klauer brought this change]
3154 ares_destroy() documentation: no new requests
3156 Clarify that no new requests may be added to a resolver channel that is
3157 currently being destroyed.
3159 - [Alexander Klauer brought this change]
3161 Documentation: properly document ARES_ECANCELLED
3163 This commit clarifies the behaviour of ares_cancel() with respect to
3164 callbacks and adds missing documentation of ARES_ECANCELLED to the man
3165 pages of the affected functions.
3167 - [Alexander Klauer brought this change]
3169 ares_cancel(): cancel requests safely
3171 An invocation of ares_cancel() walks through the request list, calling
3172 the callbacks of all pending requests on a channel. Previously, if such
3173 a callback added a new request to the channel, the request list might
3174 not end up empty, causing an abort by assertion failure. The present
3175 commit ensures that precisely all requests present upon entry of
3176 ares_cancel() are cancelled, and that adding new requests through
3179 Yang Tse (10 Mar 2013)
3180 - ares.h: stricter CARES_EXTERN linkage decorations logic
3182 No API change involved.
3184 - ares_build.h.dist: enhance non-configure GCC ABI detection logic
3186 GCC specific adjustments:
3188 - check __ILP32__ before 32 and 64bit processor architectures in
3189 order to detect ILP32 programming model on 64 bit processors
3190 which, of course, also support LP64 programming model, when using
3193 - keep 32bit processor architecture checks in order to support gcc
3194 versions older than 4.7 which don't define __ILP32__
3196 - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor
3197 architecture checks for older versions which don't define __LP64__
3199 Daniel Stenberg (9 Mar 2013)
3200 - ares.h: there is no ares_free_soa function
3202 Yang Tse (9 Mar 2013)
3203 - Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility
3205 - ares_inet_ntop.3: s/socklen_t/ares_socklen_t
3207 - configure: use XC_LIBTOOL for portability across libtool versions
3209 - xc-lt-iface.m4: provide XC_LIBTOOL macro
3211 - Makefile.am: use AM_CPPFLAGS instead of INCLUDES
3213 - inet_ntop.c: s/socklen_t/ares_socklen_t
3215 - inet_ntop.c: s/socklen_t/ares_socklen_t for portability
3217 Daniel Stenberg (19 Feb 2013)
3218 - ares.h: s/socklen_t/ares_socklen_t for portability
3220 - ares_inet_ntop.3: 4th argument is socklen_t!
3222 - spell inet correctly!
3224 - ares_inet_pton/ntop: cleanup
3226 Make sure that the symbols are always exported and present in c-ares.
3228 Make the headers prefixed with 'ares'.
3230 Removed the inet_ntop.h version as it no longer features any content.
3232 - ares_inet_ntop/ares_inet_pton: added man pages
3234 Yang Tse (15 Feb 2013)
3235 - [Gisle Vanem brought this change]
3237 curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s()
3239 - [Gisle Vanem brought this change]
3241 config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32
3243 - [Gisle Vanem brought this change]
3245 config-dos.h: define strerror() to strerror_s_() for High-C
3247 Daniel Stenberg (13 Feb 2013)
3248 - ares_get_datatype: removed unused function
3250 it was also wrongly named as internal functions require two underscores
3252 - ares__bitncmp: use two underscores for private functions
3254 It used a single one previously making it look like a public one
3256 - ares__generate_new_id: moved to ares_query.c
3258 ... and ares__rc4 is turned into a local static function.
3260 - ares__swap_lists: make private and static
3262 ... since there's only one user, make it static within ares_process.c
3264 Yang Tse (13 Feb 2013)
3265 - Makefile.msvc: add four VS version strings
3267 Daniel Stenberg (13 Feb 2013)
3268 - ares_expand_name.3: clarify how to free the data
3270 Yang Tse (30 Jan 2013)
3271 - zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2
3273 - Fix a pair of single quotes to double quotes.
3275 URL: http://curl.haxx.se/mail/lib-2013-01/0355.html
3276 Reported by: Tor Arntsen
3278 - zz40-xc-ovr.m4: fix 'wc' detection - follow-up
3280 - Take into account that 'wc' may return leading spaces and/or tabs.
3282 - Set initial IFS to space, tab and newline.
3284 - zz40-xc-ovr.m4: fix 'wc' detection
3286 - Take into account that 'wc' may return leading spaces.
3288 - Set internationalization behavior variables.
3290 Tor Arntsen analyzed and reported the issue.
3292 URL: http://curl.haxx.se/mail/lib-2013-01/0351.html
3294 - zz40-xc-ovr.m4: check another three basic utilities
3296 - zz40-xc-ovr.m4: 1.0 interface stabilization
3298 - Stabilization results in 4 public interface m4 macros:
3299 XC_CONFIGURE_PREAMBLE
3300 XC_CONFIGURE_PREAMBLE_VER_MAJOR
3301 XC_CONFIGURE_PREAMBLE_VER_MINOR
3302 XC_CHECK_PATH_SEPARATOR
3303 - Avoid one level of internal indirection
3305 - Drop XC_OVR_ZZ40 macro
3307 - zz40-xc-ovr.m4: emit witness message in configure BODY
3309 This avoids witness message in output when running configure --help,
3310 while sending the message to config.log for other configure runs.
3312 - zz40-xc-ovr.m4: truly do version conditional overriding
3314 - version conditional overriding
3315 - catch unexpanded XC macros
3316 - fix double words in comments
3318 - zz40-xc-ovr.m4: fix variable assignment of subshell output bashism
3320 Tor Arntsen analyzed and reported the issue.
3322 URL: http://curl.haxx.se/mail/lib-2013-01/0306.html
3324 - zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies
3326 - zz40-xc-ovr.m4: avoid double single-quote usage
3328 - zz40-xc-ovr.m4: parentheses balancing of 'case' statements
3330 m4 quadrigraph shell comment technique allows proper autoconf
3331 parentheses balancing in shell 'case' statements. The presence
3332 of unbalanced parentheses may otherwise trigger expansion bugs.
3334 - zz40-xc-ovr.m4: internals overhauling
3337 - Execute commands in subshells
3338 - Faster path separator check
3339 - Fix missing 'test' command
3340 - Rename private macros
3341 - Minimize AC_REQUIRE usage
3343 - zz40-xc-ovr.m4: redirect errors and warnings to stderr
3345 - configure: use XC_CONFIGURE_PREAMBLE early checks
3347 Some basic checks we make were placed early enough in generated
3348 configure script when using autoconf 2.5X versions. Newer autoconf
3349 versions expand these checks much further into the configure script,
3350 rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement
3351 of early intended checks across all our autoconf supported versions.
3353 - zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro
3355 - configure: autotools compatibility fixes - step I
3357 Fix proper macro expansion order across autotools versions for
3358 C compiler and preprocessor program checks.
3360 - configure: fix automake 1.13 compatibility
3364 buildconf: autoconf version 2.69
3365 buildconf: autom4te version 2.69
3366 buildconf: autoheader version 2.69
3367 buildconf: automake version 1.13.1
3368 buildconf: aclocal version 1.13.1
3369 buildconf: libtool version 2.4
3370 buildconf: GNU m4 version 1.4.16
3372 - ares_private.h: use again memdebug.h instead of curl_memdebug.h
3374 - configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS
3376 automake 1.13 errors if AM_CONFIG_HEADER is used in configure script.
3378 - cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally
3380 Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using
3381 an autoconf version that does not provide it, instead of what we were
3382 doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for
3383 all autoconf versions.
3385 - ares_private.h: use curl_memdebug.h instead of memdebug.h
3387 - vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c
3389 - cares-functions.m4: improve gethostname arg 2 data type check
3391 - setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
3393 Also reverts commit bceb40095a
3395 - configure: check if compiler halts on function prototype mismatch
3397 - cares-functions.m4: add gethostname arg 2 data type check and definition
3399 - cares-functions.m4: update thread-safeness detection of getaddrinfo()
3401 Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also
3402 consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or
3403 (_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not.
3405 Take in account that h_errno might be a modifiable lvalue not defined as
3406 a C preprocessor macro.
3408 - setup_once.h: HP-UX <sys/socket.h> issue workaround
3410 Issue: When building a 32bit target with large file support HP-UX
3411 <sys/socket.h> header file may simultaneously provide two different
3412 sets of declarations for sendfile and sendpath functions, one with
3413 static and another with external linkage. Given that we do not use
3414 mentioned functions we really don't care which linkage is the
3415 appropriate one, but on the other hand, the double declaration emmits
3416 warnings when using the HP-UX compiler and errors when using modern
3417 gcc versions resulting in fatal compilation errors.
3419 Mentioned issue is now fixed as long as we don't use sendfile nor
3422 - setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
3424 Inclusion of these two header files now done in setup_once.h
3426 - Header inclusion clean-up
3428 Remove header inclusions already done in setup_once.h
3430 - setup_once.h: HP-UX specific TRUE and FALSE definitions
3432 Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
3434 - ares_timeout.c: fix compiler warning
3436 - ares_create_query.c: IRIX compilation fix
3438 - c-ares/nameser.h: add some T_* defines for ns_t_* values
3440 Daniel Stenberg (7 Nov 2012)
3441 - Revert "ares_parse_aaaa_reply: fix memory leak"
3443 This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a.
3445 - ares_parse_aaaa_reply: fix memory leak
3447 an allocated buffer was not freed in the successful case.
3449 - [Gisle Vanem brought this change]
3451 adig: perror() doesn't work for socket errors on windows
3453 ... so print the SOCKERRNO instead
3455 - get_DNS_AdaptersAddresses: fix IPv6 parsing
3457 Use of the wrong define made the function not parse IPv6 addresses
3460 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml
3461 Reported by: Saúl Ibarra Corretgé
3463 - version: bumped to 1.10.0
3465 Due to the newly added function: ares_create_query()
3467 - AUTHORS: synced with 83093ac450
3469 Added 21 authors since this document was last updated
3471 - ares_create_query.3: mention when this is added
3473 - [hpopescu@ixiacom.com brought this change]
3475 Added new feature (rfc2671)
3477 - code police: fix indents, < 80 columns, reflowed comments
3479 Guenter Knauf (11 Jul 2012)
3480 - Cleaned up version awk script.
3482 Daniel Stenberg (30 Jun 2012)
3483 - [Gisle Vanem brought this change]
3485 read_udp_packets: bail out loop on bad sockets
3487 I can see that recvfrom() in ares_process.c many times is called with
3488 'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call
3489 recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the
3492 Yang Tse (29 Jun 2012)
3493 - cares-compilers.m4: remove -Wstrict-aliasing=3 from clang
3495 Currently it is unknown if there is any version of clang that
3496 actually supports -Wstrict-aliasing. What is known is that there
3497 are several that don't support it.
3499 - cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds
3501 Daniel Stenberg (18 Jun 2012)
3502 - version: work towards 1.9.2 (at least)
3504 Version 1.9.1 (18 Jun 2012)
3506 Daniel Stenberg (18 Jun 2012)
3507 - RELEASE-NOTES: 1.9.1 coming up
3509 Version 1.9.0 (16 Jun 2012)
3511 Daniel Stenberg (16 Jun 2012)
3512 - ares_version.h: next version is 1.9.0
3514 - [Marko Kreen brought this change]
3516 ares_data.h: ARES_DATATYPE_SOA_REPLY is added in 1.9.0
3518 - RELEASE-NOTES: synced with 979bf951d
3520 Next release deemed to become 1.9.0 due to the new function
3522 - [Marko Kreen brought this change]
3526 I need to do SOA queries, so here is a parser for them.
3528 - ares_soa_reply: new struct
3529 - ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY
3530 - ares_parse_soa_reply: actual function
3532 Yang Tse (14 Jun 2012)
3533 - Kill compiler warning
3535 - Fix libcares.pc generation for static MingW* cross builds
3537 Daniel Stenberg (21 May 2012)
3538 - [Nick Alcock brought this change]
3540 Fix UDP and TCP port byte order in saved options.
3542 The UDP and TCP port are stored in network byte order in the
3543 ares_channeldata, but are passed in to ares_init_options() in host byte
3544 order. Thus we must return them from ares_save_options() in host byte
3545 order too, or a duplicated channel will convert them again, leading to a
3546 nonfunctional channel and a mysterious connection refused error from
3547 ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API
3548 when c-ares is used by curl, and thus all the curl easy API's users.
3550 Yang Tse (28 Apr 2012)
3551 - version: start working on 1.8.1-DEV
3553 Version 1.8.0 (27 Apr 2012)
3555 Daniel Stenberg (27 Apr 2012)
3556 - RELEASE-NOTES: call next 1.8 instead
3558 Since we added a function, let's use a stricter bumping scheme
3560 Yang Tse (25 Apr 2012)
3561 - INSTALL: some adjustments
3563 Daniel Stenberg (25 Apr 2012)
3564 - GIT-INFO: mention buildconf
3566 Yang Tse (25 Apr 2012)
3567 - INSTALL: remove more sections that don't apply to c-ares
3569 - ares_timeout.c: fix compiler warning
3571 Daniel Stenberg (25 Apr 2012)
3572 - [Ben Noordhuis brought this change]
3574 Makefile.m32: fix mingw32 build
3576 * add . to include path so ares_build.h is picked up
3577 * make ar configurable to ease cross-compiling
3579 - RELEASE-NOTES: added what's happened since 1.7.5
3581 Guenter Knauf (22 Apr 2012)
3582 - Updated copyright year.
3584 Yang Tse (21 Apr 2012)
3585 - ares_init.c: Further refactoring of Windows system's DNS fetching code
3587 Guenter Knauf (20 Apr 2012)
3588 - Android: small changes to dns property part.
3590 Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro.
3592 - Handle CNAME-only in ares_parse_aaaa_reply().
3594 posted to the c-ares list by Peter Griess <pg@std.in>.
3596 - Add support for multiple DNS servers on Android.
3598 Before, c-ares always used the first DNS server on Android, causing
3599 network problems if this DNS server was not available.
3601 Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
3603 - Added INSTALL so it gets into tarballs.
3605 - Added some more ifdefs to silent compiler warnings.
3607 Yang Tse (17 Apr 2012)
3608 - INSTALL: remove a non c-ares section
3610 - cares-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds
3612 When building a Windows target with gcc 4.5 or newer and strict compiler
3613 warnings enabled use -Wno-pedantic-ms-format in addition to other flags.
3615 - setup_once.h: tighten requirements for stdbool.h header inclusion
3617 Include stdbool.h only when it is available and configure is capable of
3618 detecting a proper 'bool' data type when the header is included.
3620 - configure: NATIVE_WINDOWS no longer defined in config file
3622 - cares-compilers.m4: double underscore decoration for visibility attribute
3624 - build adjustments: CARES_SYMBOL_HIDING no longer defined in config files
3626 configure script now provides conditional definitions for Makefile.am
3627 that result in CARES_SYMBOL_HIDING being defined by resulting makefiles
3630 - configure: Windows cross-compilation fixes
3632 CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h,
3633 configure will generate appropriate conditionals so that mentioned symbols
3634 get defined and used in Makefile derived from Makefile.am at compilation time.
3636 Guenter Knauf (17 Apr 2012)
3637 - Added INSTALL file adapted from libcurl.
3639 Not yet ready, and needs further edits.
3641 Yang Tse (16 Apr 2012)
3642 - ares_init.c: get_iphlpapi_dns_info() refactoring
3644 Guenter Knauf (16 Apr 2012)
3645 - Kill some more compiler warnings.
3647 - Kill compiler warning about unused var.
3649 - Fixed my last commit: wrong preprocessor directive.
3651 - Check for __ANDROID__ in addition to ANDROID macro.
3653 - Check for __ANDROID__ in addition to ANDROID macro.
3655 Posted to c-ares list by Wayne.
3657 - Fix for Android to disable useless arpa/nameser.h.
3659 - Fix for Android to include sys/select.h for fd_set.
3661 Yang Tse (17 Mar 2012)
3662 - ares_data.c: some NAPTR related fixes
3664 Daniel Stenberg (16 Mar 2012)
3665 - port numbers: convert them to network order!
3667 When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used,
3668 make sure to convert them to network byte order!
3670 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml
3672 - white space cleanup
3674 - Keep code within 80 columns
3676 - Removed funny spaces after open paren and before closing paren
3678 - [Poul Thomas Lomholt brought this change]
3680 get_iphlpapi_dns_info: fix buffer overrun
3682 I experienced a buffer overrun exception in c-ares on Windows and
3683 tracked it down to be an error in the calculation of the 'left' variable
3684 in get_iphlpapi_dns_info().
3686 I changed the variable type of 'left' to a _signed_ type because of the
3687 subtraction arithmetic; not sure if a long is the best choice
3689 - Merge pull request #7 from saghul/naptr
3691 Added support for parsing NAPTR records
3693 saghul (23 Feb 2012)
3694 - Added support for parsing NAPTR records
3696 Yang Tse (19 Jan 2012)
3697 - ares_init.c: fix compiler warning on winsock builds
3699 - configure: libtool 1.5 tweaks
3701 Daniel Stenberg (19 Dec 2011)
3702 - ares_timeout.3: fix the NAME section
3704 It was clearly a copy n' paste error
3706 Yang Tse (27 Sep 2011)
3707 - [Albert Chin brought this change]
3709 configure - m4: make CURL_CHECK_DEF ignore leading whitespace on symbol def
3711 When using Sun C compiler the preprocessor somehow inserts an extra space
3712 in front of replaced symbol, breaking CURL_CHECK_DEF macro. To workaround
3713 this, macro CURL_CHECK_DEF now ignores all leading whitespace in front of
3714 symbol substitution result.
3716 - ares_init.c: fix segfault triggered in ares_init_options() upon previous
3717 failure of init_by_defaults() and incomplete cleanup there.
3719 - ares_process.c: fix compiler warning
3721 - fix MSVC compiler warning 'conditional expression is constant'
3723 - setup_once.h cleanup and sync
3725 - [Denis Bilenko brought this change]
3727 ares_getnameinfo: fix random results with c-ares 1.7.5
3729 In ares_getnameinfo memcpy did not copy enough bytes, causing
3730 it to return arbitrary memory contents as a result.
3732 - warnings: fix another 'conversion may lose significant bits' compiler warning
3734 - ares_dns.h: adjust DNS__16BIT and DNS__32BIT macro definitions
3736 Fixing compiler warnings existing definitions triggered on these.
3738 - ares_destroy.c: fix segfault in ares_destroy_options()
3740 Daniel Stenberg (21 Aug 2011)
3741 - ares_parse_srv_reply: silence compiler warnings
3743 ... by adding ugly typecasts.
3745 - CHANGES: generate from script
3747 The CHANGES file is now generated automatically with 'git2changes.pl',
3748 invoked by the maketgz script which is used to build release archives.
3750 The former human edited CHANGES file was renamed to CHANGES.0 in git.
3752 Yang Tse (21 Aug 2011)
3753 - Makefile.netware: SIZEOF_SHORT definition
3755 - warnings: fix some 'conversion may lose significant bits' compiler warnings
3757 - configure: fix symbol hiding usability check
3759 A more thorough test is done now in order to determine visibility attribute
3760 usability, given that some compilers don't support visibility attribute on
3763 Daniel Stenberg (16 Aug 2011)
3764 - 1.7.6: start working...
3766 Version 1.7.5 (16 Aug 2011)
3768 Daniel Stenberg (16 Aug 2011)
3769 - CHANGES: synced for 1.7.5 release
3771 - RELEASE-NOTES: synced with bb4096effef7f000
3773 Jakub Hrozek (15 Aug 2011)
3774 - Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
3776 Yang Tse (10 Aug 2011)
3777 - [Gisle Vanem brought this change]
3779 ares_iphlpapi.h: Watcom C fix
3781 Added "!defined(_WS2DEF_)" since Watcom doesn't have
3782 a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or
3783 'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for
3786 - [Gisle Vanem brought this change]
3789 * The 'NTDDI_VERSION' needs to be raised to 0x05010000
3790 in order for SOCKADDR_STORAGE etc. to be typedefed.
3791 * Replaced '-dUSE_WATT32' with '-dWATT32'.
3792 * Added $(DEMOS) to the 'all' target and removed the 'demos'
3793 target to be consistent with e.g. Makefile.msvc etc.
3794 * 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct.
3795 * object-file order seems to be important (Watcom v.19). Hence
3796 'ares_getopt.obj' must be put after the .obj that references getopt().
3798 - cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments
3800 Add CARES_CHECK_COMPILER as a requirement.
3802 Ensure macro does nothing unless GNU_C or CLANG compiler is used.
3804 This should allow usage of this macro in unforeseen placements.
3806 - config-win32.h: comments adjustments - followup
3808 - config-win32.h: comments adjustments
3810 Daniel Stenberg (5 Aug 2011)
3811 - [Tom Hughes brought this change]
3813 ares_parse_a_reply: fix memleak
3815 Yang Tse (29 Jul 2011)
3816 - cares-functions.m4 serial # bump
3818 - Revert "configure: additional flag checks for fcntl() and socket()"
3820 This reverts commit 5f2a3b0e48f26d24cb1fefea0dccb92d417dcbf7.
3822 - configure: additional flag checks for fcntl() and socket()
3824 - xc-translit.m4 fix quoting
3826 - configure: avoid direct usage of AS_TR_* macros
3828 - xc-translit.m4 provides transliteration macros with well defined behavior.
3830 Jakub Hrozek (15 Jun 2011)
3831 - Revert "Only fall back to AF_INET searches when looking for AF_UNSPEC addresses"
3833 This reverts commit b5823d65706af687c0e5110af8f0cfdcd068997d.
3835 This patch was not reviewed properly before pushing
3837 - Revert "Do not use sized constants in public headers"
3839 This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d.
3841 This is a Red Hat specific patch that does not belong into upstream
3843 - Use correct sizeof in ares_getnameinfo()
3845 - Do not leak rr_name on failures inside ares_parse_ptr_reply
3847 - Do not leak rr_name on failures inside ares_parse_a_reply
3849 - Do not leak rr_name on failures inside ares_parse_aaaa_reply
3851 - Do not leak rr_name on failures inside ares_parse_ns_reply
3853 - Fix incorrect sizeof() in ares_save_options
3855 - Fix incorrect allocation in ares_parse_ptr_reply()
3857 - Only fall back to AF_INET searches when looking for AF_UNSPEC addresses
3859 - Do not use sized constants in public headers
3861 Daniel Stenberg (13 Jun 2011)
3862 - [Jakub Hrozek brought this change]
3864 ares_free_hostent(NULL) should be a noop
3866 Yang Tse (8 Jun 2011)
3867 - configure: fix recvfrom 5th arg type qualifier detection (followup)
3869 - configure: fix recvfrom 5th arg type qualifier detection
3871 Additionally remove whitespace from EOL
3873 Daniel Stenberg (4 Jun 2011)
3874 - strlen: use size_t to receive the return
3876 Yang Tse (4 Jun 2011)
3877 - xlc: avoid preprocessor definition usage when linking
3879 - ares_nowarn: icc 9.1 workaround
3881 - ares_nowarn: header inclusion fix
3883 - ares_init: make ares_private.h last included header again
3885 - compiler warning: fix
3887 Fix compiler warning: conversion may lose significant bits
3889 - compiler warning: fix
3891 Fix compiler warning: variable was set but never used
3893 Fix compiler warning: clobber ignored
3895 - ares_iphlpapi: fix compiler warnings
3897 - winsock: compilation fixes
3899 Provide winsock iphlpapi alternative definitions to prevent compilation
3900 failures when using a variety of winsock header implementations.
3902 Daniel Stenberg (17 May 2011)
3903 - [David Stuart brought this change]
3905 IPv6-on-windows: find DNS servers correctly
3907 - man pages: docs for the c-ares utility programs
3909 - ares_parse_ns_reply.c: remove CVSism
3911 Yang Tse (27 Mar 2011)
3912 - build: fix header inclusion
3914 - getservbyport replacement for Win CE
3916 - renamed getplatform() to ares__getplatform() to avoid namespace pollution
3918 - configure: fix libtool warning
3920 Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR
3921 macro and warn heavily when not used in configure script along with
3922 ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy
3923 while keeping backwards compatibility this is added.
3925 - adig: RFC4034 resource record type detection
3927 Can be tested with: adig -s 8.8.8.8 -t ANY example.com
3929 - nameser.h: RFC4034 resource record type definitions
3931 - build: move platform stuff to ares_platform.c and ares_platform.h
3933 - build: find out windows platform using GetVersionEx()
3935 - build: use getenv() replacement function for systems which lack it
3937 - setup_once: system error codes for Windows CE
3939 - ares_search: use ERRNO macro for portability sake
3941 - System's errno.h inclusion cleanup follow-up.
3943 System's errno.h is conditionally included from setup_once.h
3945 - Windows CE specific adjustment
3947 All versions of Windows CE support Winsock 1.1
3949 - System's errno.h inclusion cleanup.
3951 System's errno.h is conditionally included from setup_once.h
3953 - ares_init: fix gethostname error detection on winsock platforms
3955 - configure: r-enable temporarily disabled detection of system's inet_ntop()
3957 Detection was temporarily disabled in commit 674e044ccb21f2f63537da53565fce868f
3959 Daniel Stenberg (15 Mar 2011)
3960 - configure: stop using the deprecated AM_INIT_AUTOMAKE syntax
3962 - [Gisle Vanem brought this change]
3966 Make sure Watt-32 programs use 'errno' even on Win32 targets
3968 Guenter Knauf (18 Feb 2011)
3969 - Removed commented CLFAGS no longer needed.
3971 - Fixed CFLAGS for NetWare.
3973 Added -m32 to enable compilation with x86_64 compilers;
3974 added conditional to set -fpcc-struct-return only for gcc compiler.
3976 Daniel Stenberg (18 Feb 2011)
3977 - [Gisle Vanem brought this change]
3979 Watt32: fix server init
3981 Somewhere in the process, programs using the Watt-32 tcp/ip stack
3984 - [Dima Tisnek brought this change]
3986 config_sortlist: (win32) missing else
3988 Without an else there, contents of "pat" that could have been
3989 successfully set just above, may be clobbered by successive unsuccessful
3990 calls to "xxx_pton" or "ip_addr".
3992 Yang Tse (17 Jan 2011)
3993 - Makefile.msvc: add a couple of VS version strings
3995 - Makefile.msvc: add a couple of VS version strings
3997 - build: add install target to Makefile.msvc
3999 Daniel Stenberg (27 Dec 2010)
4000 - ares_set_servers_csv: remove unused variables
4002 - init_by_resolv_conf: fix compiler warnings
4004 The code received the return codes in the 'status' variable without
4005 using it. Instead we just ignore those particular errors.
4007 - getv4: Value stored to 'dst' is never read
4009 - advance_tcp_send_queue: avoid NULL ptr dereference
4011 If given a too large 'num_bytes' value, it would cause a NULL ptr
4012 dereference. Instead the code will now break out of the loop at the end
4015 - [Peter Pentchev brought this change]
4017 configure: fix a bashism
4019 - cleanup: avoid unsafe typecasts
4021 Avoid the risk of reading 16bit data from an unaligned address by using
4022 a macro that is adapted for this.
4024 - [Stefan Bühler brought this change]
4026 ares_expand_name: Fix encoded length for indirect root
4028 Yang Tse (18 Dec 2010)
4029 - build: add some explicit file references to VS project files
4031 - config-win32: provide HAVE_ASSERT_H definition
4033 - build: include ares_nowarn in sample program VS project files
4035 - build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS
4037 - configure: temporarily disable detection of system's inet_ntop()
4039 This is done to allow compilation of ares_inet_ntop() by some daily
4040 builds picky compilers that otherwise do not need this function.
4042 - changes: mention last fix
4044 - ares_inet_ntop: remove definition and usage of macro SPRINTF
4046 Existing definition of SPRINTF always resulted in sprintf() being used,
4047 and sprintf() returning 'int' is already used throughout the library.
4049 - ares_inet_ntop: reapply changes from previous c-ares version (III)
4051 - Replace 'u_char' with 'unsigned char'.
4052 - Replace 'u_int' with 'unsigned int'.
4053 - use macros ERRNO and SET_ERRNO() for errno handling.
4055 - ares_inet_ntop: reapply changes from previous c-ares version (II)
4058 - Adjust header file inclusions.
4059 - ares_inet_ntop used only on systems without a proper inet_ntop function.
4061 - ares_inet_ntop: reapply changes from previous c-ares version (I)
4063 - Replace tabs with spaces.
4064 - Use ANSI C style for function declarations and definitions.
4065 - Use sizeof with parentheses.
4067 - ares_inet_ntop: fix off by one error triggering out of bounds write
4069 ares_inet_ntop would trigger an out of bounds write when the representation
4070 of the address required 15 characters, due to not taking in account null
4071 termination character.
4073 Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes.
4075 - ares_nowarn: add conditional inclusion of assert.h header
4077 - fix compiler warning: conversion may lose significant bits
4079 - ares_inet_net_pton: fix non-rejection of some malformed literals
4081 ares_inet_net_pton would return wrong values when excessively large,
4082 and invalid, netmasks are used. Fixes are from bind-9.5.3rc1,
4083 issue also described in the WLB-2008080064 advisory.
4085 - setup_once: provide ISASCII macro
4087 - configure: inet_net_pton function check adjustments
4089 Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6
4090 capable and is not affected by the WLB-2008080064 advisory.
4092 HAVE_INET_NET_PTON_IPV6 is no longer defined nor used.
4094 - ares_init: fix detection of semicolon comments in resolv.conf
4096 File resolv.conf may either use a hash '#' or a semicolon ';' character as an
4097 indication that the rest of the line is a comment. This fixes not recognizing
4098 the semicolon as a valid comment indicator in resolv.conf.
4100 - version: start working on 1.7.5
4102 Version 1.7.4 (8 Dec 2010)
4104 Daniel Stenberg (8 Dec 2010)
4105 - release-preps: CHANGES and RELEASE-NOTES synced
4107 - ares_set_local_*: added in 1.7.4, not before
4109 Yang Tse (3 Dec 2010)
4110 - build: provide SIZEOF_SIZE_T definition for non-configure builds
4112 - build: config.dos renamed to config-dos.h
4114 - build: provide SIZEOF_SIZE_T netware definition
4116 - ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits
4118 - configure: undo using autobuilds to temporarily verify strict aliasing warnings.
4120 - fix compiler warning: rounding, sign extension, or loss of accuracy may result
4122 Daniel Stenberg (2 Dec 2010)
4123 - [Ben Noordhuis brought this change]
4125 ares_parse_a_reply: fix CNAME response parsing
4127 Reply to a CNAME query doesn't contain addresses, causing
4128 ares_parse_a_reply() to bail out with ARES_ENODATA
4130 Bug: http://groups.google.com/group/nodejs/browse_thread/thread/a1268c9ea5e9ad9b
4132 Yang Tse (1 Dec 2010)
4133 - fix compiler warning: conversion may lose significant bits
4135 - atoi: remove atoi usage
4137 - ares_init: fix compiler warning: conversion may lose significant bits
4139 - configure: fix autoconf warning
4141 - inet_pton: fix compiler warning
4143 - configure: use autobuilds to temporarily verify strict aliasing warnings.
4145 Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing
4146 rules and warnings. Given that cross-compiled targets autobuilds do not run the
4147 test-suite, there is no risk of running code that violates strict aliasing rules
4149 - ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f
4151 Upon socket address family and length validation failure return ARES_ENOTIMP
4152 in callback again, this is the error code documented in man page and used
4153 mostly all over the library.
4155 - ares_getnameinfo: Validate socket address family and length.
4157 Validate socket address family and that the socket address length is appropriate
4158 for the specified family. Failure is reported with ARES_EBADFAMILY in callback.
4160 - ares_getnameinfo: fix two compiler warnings
4162 - Added another VS10 version string
4164 - Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
4166 - Revert commit 494274e653936335c255a47599970de3df21e7c4
4168 - configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body
4170 - Fix compiler warning: array subscript has type 'char'
4172 - Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'.
4174 - Revert following commits:
4175 07bc7ea79509bcc9ef6e09151e81766ed00d3392
4176 3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9
4177 9912637d32c9987719a1ea12db591aee2941891c
4179 The purpose of the whole patch was to silence a compiler warning triggered
4180 with GCC 4 on file ares_process.c The specific compiler warning was
4181 'dereferencing type-punned pointer might break strict-aliasing rules'.
4183 A simpler patch will follow to equally silence the warning.
4185 - ares_options: reorder header inclusions to make inclusion of
4186 ares_private.h the last included one again.
4188 Daniel Stenberg (12 Nov 2010)
4189 - [Patrik Thunstrom brought this change]
4191 adig: fix NAPTR parsing
4193 I ran across a small "issue" in your adig example.
4195 It is simply the last part of the NAPTR record, the replacement element,
4196 which is not a string, as currently handled in adig, but a domain name.
4198 - ares_save_options: assignments instead of memcpy
4200 - init_by_options: don't copy an empty sortlist
4202 If there aren't any sort items to copy, don't bother. Without this
4203 little precaution it would do a malloc(0) which causes undefined
4204 behaviors and is frowned upon by curl's memdebug-system.
4206 Guenter Knauf (3 Oct 2010)
4207 - Minor Watcom makefile tweaks.
4209 Daniel Stenberg (30 Sep 2010)
4210 - [Mike Crowe brought this change]
4212 Fix lookup with HOSTALIASES set.
4214 ares__read_line returns ARES_EOF when it reaches the end of the
4215 file. This will happen every time when reading to the end of the
4216 HOSTALIASES file. Unfortunately single_domain treats this error as
4219 Signed-off-by: Mike Crowe <mac@mcrowe.com>
4221 Ben Greear (24 Aug 2010)
4222 - Add missing break that caused get_ares_servers to fail.
4224 Reported-by: Ning Dong <flintning@163.com>
4225 Signed-off-by: Ben Greear <greearb@candelatech.com>
4227 Yang Tse (11 Aug 2010)
4228 - configure: werror related adjustments
4230 Guenter Knauf (8 Aug 2010)
4231 - Added copyright string to ares_version.h and make use of it in other files.
4233 - Block created ares_build.h for NetWare to avoid usage from other platforms.
4235 - Fix to overwrite default libname.
4237 - Some more Watcom makefile massage ...
4239 - Some more Watcom makefile massage ...
4241 Ben Greear (4 Aug 2010)
4242 - sock-addr-storage: Detect and deal with lack of .ss_family member.
4244 AIX, at least, does not have sockaddr_storage.ss_family member.
4245 Detect this in the configure logic and use proper #ifdefs in the
4248 Signed-off-by: Ben Greear <greearb@candelatech.com>
4249 Tested-by: Tor Arntsen <tor@spacetec.no>
4251 Guenter Knauf (3 Aug 2010)
4252 - Added Watcom makefile based on libcurl's Makefile.Watcom.
4254 Ben Greear (31 Jul 2010)
4255 - typo: Fix compile bug for platforms that don't have sockaddr_storage.
4257 Bug was introduced by me in previous commit.
4259 Signed-off-by: Ben Greear <greearb@candelatech.com>
4261 - Fix aliasing warning in gcc 4.4.4 (at least).
4263 Should be no functional change, though the code gets a bit
4266 Signed-off-by: Ben Greear <greearb@candelatech.com>
4268 Daniel Stenberg (31 Jul 2010)
4269 - ares_set_servers_csv: use ISDIGIT
4271 The IS*() set of macros are preferred to the regular is*() functions as
4272 they help us avoid the most common pitfalls.
4274 Ben Greear (30 Jul 2010)
4275 - cast arg to isdigit to int
4277 Looks like it might silence a warning on Netware build.
4279 Signed-off-by: Ben Greear <greearb@candelatech.com>
4281 - remove all uses of uint32_t
4283 Previous fix forgot a few.
4285 Signed-off-by: Ben Greear <greearb@candelatech.com>
4287 - fix signed v/s unsigned casts warning in ares_gethostbyaddr.c
4289 Signed-off-by: Ben Greear <greearb@candelatech.com>
4291 - local-bind-fixup: Fix inet_pton warning.
4293 Conditionally include <arpa/inet.h> for inet_pton
4296 Signed-off-by: Ben Greear <greearb@candelatech.com>
4298 - build: Enable compiling with -Werror.
4300 This helps find compile warnings because they simply break
4304 ./configure --enable-warnings --enable-werror
4306 Signed-off-by: Ben Greear <greearb@candelatech.com>
4308 - ipv6: Fix some build issues related to the local-bind feature.
4310 Signed-off-by: Ben Greear <greearb@candelatech.com>
4312 Guenter Knauf (29 Jul 2010)
4313 - Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms.
4315 Daniel Stenberg (18 Jul 2010)
4316 - [Ben Greear brought this change]
4318 local-bind: Support binding to local interface/IPs
4320 Add 3 new functions to set the local binding for the out-going
4321 socket connection, and add ares_set_servers_csv() to set a
4322 list of servers at once as a comma-separated string.
4324 Signed-off-by: Ben Greear <greearb@candelatech.com>
4326 - version: now start on 1.7.4
4328 - [Andrew C. Morrow brought this change]
4330 fix memory leak in ares_getnameinfo
4332 Version 1.7.3 (11 Jun 2010)
4334 Daniel Stenberg (11 Jun 2010)
4335 - changelogs: updated for 1.7.3
4337 - [BogDan Vatra brought this change]
4339 init: allow c-ares to work on Android OS
4341 - changelog: fill in the 1.7.2 changes
4343 - added another pdf to ignore
4345 Yang Tse (11 Jun 2010)
4346 - add ares_parse_mx_reply.c to VS dsp file
4348 Daniel Stenberg (10 Jun 2010)
4349 - tarball: add $(CSOURCES) $(HHEADERS) to EXTRA_DIST
4351 It's not clear to me why we need this, but we apparently may
4352 otherwise not get all files bundled in the dist tarball.
4354 - version: start working on 1.7.3
4356 Version 1.7.2 (10 Jun 2010)
4358 Daniel Stenberg (10 Jun 2010)
4359 - RELEASE-NOTES: 1.7.2 details added
4361 - [Jakub Hrozek brought this change]
4363 ares_init: Last, not first instance of domain or search should win
4365 - style: make code less than 80 columns wide
4367 Yang Tse (31 May 2010)
4368 - [Tor Arntsen brought this change]
4370 improve alternative definition of bool to use enum instead of unsigned char
4372 - fix VS2010 compiler warnings
4374 Daniel Stenberg (18 Apr 2010)
4375 - [Jérémy Lal brought this change]
4377 added ares_parse_mx_reply
4379 - repair the file mode
4381 - remove all $Id$ lines
4383 - remove all .cvsignore files
4387 reported by Gregor Jasny on the mailing list
4389 - [Peter Pentchev brought this change]
4391 Fix a couple of typos and grammar nits.
4393 - ignore the GPG signature files too
4395 - start the journey towards 1.7.2
4397 - no longer CVS tagging
4399 - ignore generated PDFs
4401 Version 1.7.1 (23 Mar 2010)
4403 Daniel Stenberg (23 Mar 2010)
4406 - made README the primary readme file
4408 ... and did README.cares to contain a historic reason etc.
4414 - ignore lots of generated files
4416 - [Daniel Johnson brought this change]
4418 Fix warnings for clang
4420 Yang Tse (17 Mar 2010)
4421 - replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing
4423 - update outdated serial number
4425 - fix compiler warning
4427 - watt32 compilation fix
4429 - Added another VS10 version string
4433 - removed usage of 's6_addr', fixing compilation issue triggered with no
4434 longer using 'in6_addr' but only our 'ares_in6_addr' struct
4436 Daniel Stenberg (5 Mar 2010)
4437 - Daniel Johnson provided fixes for building with the clang compiler
4439 Yang Tse (5 Mar 2010)
4440 - Added IPv6 name servers support
4442 Gisle Vanem (5 Mar 2010)
4443 - Ops!. Readded ares_nowarn.h.
4445 - Added ares_nowarn.c.
4447 Yang Tse (28 Feb 2010)
4448 - Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems
4450 - Added ares_nowarn.* to VC6 project file
4452 - Added SIZEOF_INT definition
4454 - fix compiler warning
4456 - fix compiler warning
4458 - fix compiler warning
4460 Daniel Stenberg (17 Feb 2010)
4463 - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much
4464 like the res_init() resolver function offers
4466 - - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't
4467 check for broken connections like ares_process() did. Based on that, I
4468 merged the two functions into a single generic one with two front-ends.
4470 Yang Tse (30 Dec 2009)
4471 - VMS specific preprocessor symbol checking adjustments
4473 - Mention last changes
4475 - - Fix configure_socket() to use ares_socket_t instead of int data type.
4477 - - Where run-time error checks enabling compiler option /GZ was used it is now
4478 replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions.
4480 - Compiler option /GX is now replaced with equivalent /EHsc for all versions.
4482 - - Ingmar Runge noticed that Windows config-win32.h configuration file
4483 did not include a definition for HAVE_CLOSESOCKET which resulted in
4484 function close() being inappropriately used to close sockets.
4486 Daniel Stenberg (30 Nov 2009)
4487 - start working on 1.7.1
4489 Version 1.7.0 (27 Nov 2009)
4491 Yang Tse (27 Nov 2009)
4492 - Preserve empty line following last target
4494 - - Larry Lansing fixed ares_parse_srv_reply to properly parse replies
4495 which might contain non-SRV answers, skipping over potential non-SRV
4496 ones such as CNAMEs.
4498 - When using icc, compile with -fpic and link with intel dynamic libraries.
4500 - Added 'currently' in italics to insist on transient situation.
4504 - Daniel wants upcoming release to be 1.7.0
4506 - Mention last changes
4508 - - Removed from external interface preprocessor symbol definition for
4509 CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data()
4510 makes it unnecessary.
4514 - Changed c-ares naming conventions when using MSVC as described in README.msvc
4516 - - Mention other recent changes
4518 - - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and
4519 ares_addr6ttl in order to prevent name space pollution, along with
4520 necessary changes to code base and man pages.This change does not break
4521 ABI, there is no need to recompile existing applications. But existing
4522 applications using these structs with the old name will need source code
4523 adjustments when recompiled using c-ares 1.6.1.
4525 - - Jakub Hrozek fixed more function prototypes in man pages to sync them
4526 with the ones declared in ares.h
4528 - Make configure remove the ares_build.h file included in distribution tarballs.
4530 - Fix macro redefinition.
4532 - Fix name space pollution.
4534 - Allow using different extra import libraries for debug and release builds.
4536 - Add manifest stuff to msvc makefile
4538 - Sync man page with reality
4540 - Add missing external API decoration for ares_set_socket_callback()
4542 - Add ares_free_data() man page.
4544 - - Provide in external interface preprocessor symbol definitions for
4545 CARES_HAVE_ARES_FREE_DATA as an indication of function availability.
4551 - Add ares_data.c and ares_data.h
4553 - Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API
4554 to return a linked lists of results. These were also modified to internally
4555 use the ares_data memory struct and as such its result must be free'ed with
4558 - Initial support for the generic ares_free_data() function that will allow
4559 applications to free memory allocated and returned by some c-ares funtions.
4561 - Make usage of calloc()'s arguments consistent with rest of code base
4563 - workaround icc 9.1 optimizer issue
4565 - Add icc fvisibility bug test
4567 - Fix icc 9.0 compiler warning: external definition with no prior declaration
4569 - Fix three var names
4571 - Add check for assert.h header file
4573 - getaddrinfo is fully thread safe on solaris versions which
4574 implement the function even when h_errno is not a macro.
4576 The h_errno macro test now only done on systems for which there
4577 is no hard coded knowledge about getaddrinfo's thread safeness.
4579 - Remove files generated on previous buildconf/configure run
4581 - Remove enable-thread / disable-thread configure option. These were only placebo
4582 options. The library is always built as thread safe as possible on every system.
4584 - Refactor how preprocessor symbol _THREAD_SAFE definition is done.
4586 - Assume that getaddrinfo is thread safe, unless hard coded
4587 knowledge says the contrary or h_errno is not defined.
4589 - Related with the threadsafe capability of getaddrinfo:
4591 - Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2
4592 and newer have a threadsafe getaddrinfo.
4594 - Fix Dragonfly BSD triplet detection.
4596 - In case the hard-coded knowledge says that getaddrinfo is threadsafe,
4597 an additional check is done to verify that h_errno is also defined.
4598 If h_errno isn't defined, we finally assume that it isn't threadsafe.
4599 Jamie Lokier provided the inspiration for this extra check.
4601 - AIX 5.2 and newer have threadsafe getaddrinfo.
4603 Add some comments to better understand what the regex's pretend to achieve.
4605 - HP-UX 11.11 and later have threadsafe getaddrinfo
4607 - Check if getaddrinfo is threadsafe when function check allows it to be used
4609 - Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library
4613 - Mention last changes
4615 - Reinstate copyright symbol lost in previous commit
4617 - Make some strings different in resource file for debug or release builds
4619 - Ignore more subdirs
4621 - Fix compiler warning: conditional expression is constant
4623 - Sync linker and resource compiler options with Makefile.msvc
4625 - Follow Makefile.msvc subdirectory naming scheme, and sync compiler options
4627 - Updated MSVC makefile that allows building dynamic and static
4628 c-ares libraries in debug and release flavours.
4630 Additionally each of the three sample programs is built against
4631 each of the four possible c-ares libraries, generating all this
4632 a total number of 12 executables and 4 libraries.
4634 - Test for USE_WINSOCK since it is more restrictive than WIN32
4636 - Make header inclusion depend on HAVE_*_H definition
4638 - Remove unneeded preprocessor directives
4640 - Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds
4642 - source files used by sample programs
4644 - Renamed c-ares setup.h to ares_setup.h
4646 - Adjust include paths to take in account that currently:
4648 c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory.
4650 memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory
4651 and also needs access to libcurl's generated curl_config.h
4653 - Undo old temporary change once used for testing purposes
4655 - Mention many changes
4657 - Mention --enable-symbol-hiding configure option
4659 - Symbol hiding configure options renamed to the hopefully less ambiguous
4660 --enable-symbol-hiding and --disable-symbol-hiding as well as related
4661 macro names and some internal variables used for them.
4663 Related configuration file preprocessor symbols named to
4664 CARES_SYMBOL_HIDING and CARES_SYMBOL_SCOPE_EXTERN.
4666 - Header inclusion depending on HAVE_* symbol.
4669 - Comparison of the Initial revision of this file with ares_parse_a_reply.c
4670 shows that this one is actually a modified copy of ares_parse_a_reply.c.
4672 In order to comply with ares_parse_a_reply.c's M.I.T. license, the old
4673 1998 M.I.T. copyright notice is now also preserved in this file the same
4674 as it is done in other ares_parse_*.c files.
4677 Fix identation of some license lines.
4683 - In no particular order, changed/fixed all of the following in
4684 ares_parse_txt_reply() current version:
4686 - Fixed a couple of potential double free's.
4688 - Fixed memory leaks upon out of memory condition.
4690 - Fixed pointer arithmetic.
4692 - Setting ntxtreply to zero upon entry for all failure cases.
4694 - Changed data type to size_t for variables substr_len, str_len and
4695 the length member of ares_txt_reply struct.
4697 - Avoided a couple of memcpy() calls.
4699 - Changed i data type to unsigned int to prevent compiler warnings.
4701 - Adjusted a comment.
4703 - Use ARES_SUCCESS literal for successfull completion.
4707 - Add c-ares DLL resource file to distribution archive
4713 - Updated MSVC 6.0 workspace and project files that allows building
4714 dynamic and static c-ares libraries in debug and release flavours.
4716 Additionally each of the three sample programs is built against
4717 each of the four possible c-ares libraries, generating all this
4718 a total number of 12 executables and 4 libraries.
4720 Daniel Stenberg (29 Oct 2009)
4721 - no need to check for NULL pointers before dereferencing, as the pointers
4722 MUST be valid and they are dereferenced further down in the function
4725 - shorten the descriptions somewhat
4727 - update to the new struct name
4729 - Jakub Hrozek added ares_parse_txt_reply() for TXT parsing
4731 - use 'ares_srv_reply' for proper name-spacing
4733 Yang Tse (29 Oct 2009)
4734 - Add reference for ares_parse_srv_reply.pdf
4736 - Add reference for ares_parse_srv_reply docs
4738 - External API function linkage decoration adjustment
4740 - External API function linkage decoration adjustment
4742 - Initial step towards the ability to reduce c-ares exported symbols
4743 based on the 'visibility' attribute for GNUC and __global for Sun
4744 compilers, taking also in account __declspec function decoration
4745 for Win32 and Symbian DLL's.
4747 Introducing configure options --enable-hidden-symbols and
4748 --disable-hidden-symbols following libcurl's naming.
4754 - Fix Pelles C Win32 target compilation issues
4756 - John Engelhart noticed an unreleased problem relative to a duplicate
4757 ARES_ECANCELLED error code value and missing error code description.
4759 - Fix compiler warning: local variable may be used without having been initialized
4761 - Use *_CHECK_PATH_SEPARATOR_REQUIRED to ensure that *_CHECK_PATH_SEPARATOR
4762 is only expanded and included once in the configure script.
4764 - Our _AS_PATH_SEPARATOR_PREPARE override is now m4_defun'd instead of m4_define'd
4765 due to autoconf 2.64 m4_require'ing it in _AS_SHELL_SANITIZE indirectly through
4768 - Fix compiler warning: argument is incompatible with corresponding format string conversion
4770 - Fix potential out-of-bounds read
4772 - Fix compiler warning: loop without body
4774 - Fix compiler warning
4776 - Fix compiler warning
4778 - Fix compiler warning
4780 - Fix compiler warning: addition result could be truncated before cast to bigger sized type
4782 - Overhauled ares__get_hostent()
4784 - Fixing out of bounds memory overwrite triggered with malformed /etc/hosts file.
4785 - Improving parsing of /etc/hosts file.
4786 - Validating requested address family.
4787 - Ensuring that failures always return a NULL pointer.
4788 - Adjusting header inclusions.
4790 - Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak
4792 - more files to ignore
4794 - Check if _REENTRANT definition is required to
4795 make errno available as a preprocessor macro.
4797 - Attempt to silence bogus compiler warning: "Potential null pointer dereference"
4801 Gisle Vanem (7 Sep 2009)
4802 - Suppress warnings about unused prototypes in Watt32 and Win32 programs.
4804 - Update email address.
4806 - Update my email address. Add ares_config.h as dependency for 'make depend'.
4808 Yang Tse (6 Sep 2009)
4809 - T_SRV portability check
4811 Gunter Knauf (5 Sep 2009)
4812 - changed includes to match style how we do with all other *.c files.
4814 - changed u_int16_t to unsigned short because it is the only place within ares and curl where such a type would be used;
4815 also it broke many autobuilds. We should probably introduce an ares_port_t if we want to use a type here.
4817 Gisle Vanem (5 Sep 2009)
4818 - Replace 'uint16_t' with 'u_int16_t' since the latter is used in ares.h.
4820 - Added 'ares_parse_srv_reply.obj'. Added definition of 'u_int16_t'. This is I don't like; we should not depend on such non-universal types in a public header. But this is just a quick fix.
4822 Daniel Stenberg (4 Sep 2009)
4823 - - Jakub Hrozek added ares_parse_srv_reply() for SRV parsing
4825 Steinar H. Gunderson (27 Aug 2009)
4826 - Support lookup of IPv4 literals in ares_gethostbyname(), even when the address family is set to AF_INET6.
4828 Gisle Vanem (3 Aug 2009)
4829 - Remove call to LoadLibrary(). (leftover from debugging).
4833 Daniel Stenberg (3 Aug 2009)
4834 - - Timo Teras changed the reason code used in the resolve callback done when
4835 ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to
4836 better allow the callback to know what's happening.
4838 - - Joshua Kwan fixed the init routine to fill in the defaults for stuff that
4839 fails to get inited by other means. This fixes a case of when the c-ares
4840 init fails when internet access is fone.
4842 Gunter Knauf (16 Jul 2009)
4843 - test if adding ../lib to includes can fix the current break ...
4845 - renamed generated config.h to ares_config.h in order to avoid clashes when libcurl is used with other projects which also have a config.h.
4847 Yang Tse (21 Jun 2009)
4848 - Refactor how libraries are checked for connect() function, follow-up.
4850 - Refactor how libraries are checked for connect() function,
4851 and check for connect() as it is done for other functions.
4853 Gisle Vanem (20 Jun 2009)
4854 - Remove unneeded defines.
4856 - Use select_s() and not select().
4858 Yang Tse (19 Jun 2009)
4859 - sclose() function-like macro definition used to close a socket,
4860 now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
4861 config file preprocessor definitions.
4863 - add CloseSocket camel case function check
4865 - check for socket() and closesocket() as it is done for other functions
4867 - Remove HAVE_CONFIG_H definition from here,
4868 CFLAGS from common.dj already defines it.
4870 - initial step towards decoupling c-ares from libcurl for DOS
4872 - don't ignore these subdirs, they must be removed first
4874 - Remove DEBUGBUILD symbol definition, is not required for programs using the library.
4876 - DEBUGBUILD symbol definition for debug builds
4878 - ignore some subdirs
4882 - Try to make more clear that --enable-curldebug has nothing to do with --enable-debug for this library.
4884 - Revert last change, it is inappropriate.
4886 Gisle Vanem (12 Jun 2009)
4887 - Replace CURLDEBUG with DEBUGBUILD.
4889 Yang Tse (11 Jun 2009)
4890 - when running automake copy missing files instead of symlinking them
4892 - Adjusted to take in account that...
4894 With the curl memory tracking feature decoupled from the debug build feature,
4895 CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows:
4897 CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug)
4899 DEBUGBUILD used for debug enabled specific code (--enable-debug)
4901 - c-ares' --enable-debug --enable-curldebug decoupling follow-up
4903 - mention last changes
4905 - Remove buildconf.bat from release and daily snapshot archives.
4907 buildconf.bat is only for CVS tree builds.
4909 - Ensure that buildconf.bat does nothing unless it is used with a CVS checkout.
4911 - CVS-INFO file only present in CVS tree, never in release nor daily snapshot
4912 archives. Used as a sentinel file in buildconf.bat to differentiate CVS builds.
4914 Gisle Vanem (8 Jun 2009)
4915 - Update comment about "ML". Removed "-D_USE_32BIT_TIME_T" (not a requirement).
4917 Yang Tse (8 Jun 2009)
4918 - just comment it out
4920 - For debugging purposes...
4922 Disable the '-export-symbols-regex' to discard this as the origin
4923 of link failures related with shared libraries and non-GNU linkers.
4925 - c-ares Makefile.am back to using $(top_builddir) for *_LDADD
4927 - c-ares' -no-undefined and --enable-curldebug adjustments
4929 - Use relative path to built c-ares tree libtool library
4931 - John E. Malmberg noticed that the configure script was failing to detect the
4932 timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due
4933 to definition taking place in socket.h instead of time.h
4935 - Fix compiler warning: out of bound access