1 Changelog for the c-ares project. Generated with git2changes.pl 2 3Version 1.16.1 (11 May 2020) 4 5Brad House (11 May 2020) 6- c-ares 1.16.1 release prep 7 8- update travis to use xcode11.4 9 10- Prevent possible double-free in ares_getaddrinfo() if ares_destroy() is called 11 12 In the event that ares_destroy() is called prior to ares_getaddrinfo() completing, 13 it would result in an invalid read and double-free due to calling end_hquery() twice. 14 15 Reported By: Jann Horn @ Google Project Zero 16 17GitHub (30 Apr 2020) 18- [shelley vohr brought this change] 19 20 fix: windows UNICODE incompatibilities with ares_getaddrinfo (#328) 21 22 Fixes the following compatibility issues: 23 * Use RegQueryValueExA instead of RegQueryValueEx 24 * Use ExpandEnvironmentStringsA instead of ExpandEnvironmentStrings 25 * Use RegOpenKeyExA instead of RegOpenKeyExA 26 * Use GetWindowsDirectoryA instead of GetWindowsDirectoryA 27 28 Fix By: Shelley Vohr (@codebytere) 29 Closes: #327 30 31Brad House (13 Apr 2020) 32- travis: CloudFlare does not allow T_ANY requests, so live tests that use it fail. Disable. 33 34- travis: bump macos image to the latest 35 36- cast-align warnings are false for struct sockaddr, silence 37 38 Create a macro to silence false cast-align warnings when casting 39 struct sockaddr * to struct sockaddr_in * and struct sockaddr_in6 *. 40 41 Fix By: Brad House (@bradh352) 42 43- MacOS: Enable libresolv support for retrieving DNS servers like iOS does. 44 45GitHub (10 Apr 2020) 46- [Dmitry Igrishin brought this change] 47 48 CMake: Populate the INCLUDE_DIRECTORIES property of installed targets (#323) 49 50 Populate the INCLUDE_DIRECTORIES property of installed targets 51 52 Fix By: Dmitry Igrishin (@dmitigr) 53 54Brad House (10 Apr 2020) 55- travis: make valgrind use cmake for tests 56 57- dont try to use libtool to run valgrind 58 59- valgrind requires libtool installed to wrap tests 60 61- scan build 7 62 63- fix travis live test 64 65- add debug for travis 66 67- try without sudo 68 69- attempt to modernize travis build environment 70 71GitHub (6 Apr 2020) 72- [Teemu R brought this change] 73 74 Allow TXT records on CHAOS qclass (#321) 75 76 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`. 77 78 C-ares was not allowing such use cases. 79 80 Fix By: Teemu R. (@rytilahti) 81 82Brad House (5 Apr 2020) 83- Remove warnings from ares_getaddrinfo.3 man page 84 85 As reported in #319, non-standard macros of .IN were used. 86 Replace with .RS/.RE. 87 88 Fixes: #319 89 Fix By: Brad House (@bradh352) 90 91- ares_getaddrinfo man page render better for man2html 92 93- update man pages to render better for man2html 94 95Version 1.16.0 (12 Mar 2020) 96 97Brad House (12 Mar 2020) 98- 1.16.0 release notes draft 99 100- attempt to fix double-free introduced in e0517f9 101 102GitHub (12 Mar 2020) 103- [David Drysdale brought this change] 104 105 test: fuzzer input triggering double free (#315) 106 107 OSS-Fuzz has reported a double-free with the fuzzer input file 108 included here; run with: 109 ./test/aresfuzz test/fuzzinput/clusterfuzz-5637790584012800 110 111 Bisecting the failure points to commit e0517f97d988 ("Parse SOA records 112 from ns_t_any response (#103)") 113 114- [Brad House brought this change] 115 116 CMake: Install Manpages (#314) 117 118 CMake wasn't installing manpages. 119 120 Fixes #297 121 Fix By: Brad House (@bradh352) 122 123- [Brad House brought this change] 124 125 Enable cmake tests for AppVeyor (#313) 126 127 Tests require linking against the static library on Windows otherwise the symbols are not exported for internals being tested. 128 129 Fix By: Brad House (@bradh352) 130 131Brad House (11 Mar 2020) 132- Add AppVeyor badge 133 134- bump c-ares version to 1.16.0. test AppVeyor integration. 135 136GitHub (11 Mar 2020) 137- [Brad House brought this change] 138 139 replace all usages of inet_addr() with ares_inet_pton() which is more proper (#312) 140 141 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. 142 143 Fixes #309 144 Fix By: Brad House (@bradh352) 145 146- [Brad House brought this change] 147 148 CMake: Generate WinPDB files during build (#311) 149 150 Build and Install PDB (Windows Debug Symbol) files if supported by underlying system. 151 152 Also update AppVeyor to test cmake builds. 153 154 Fixes #245 155 Fix By: Piotr Pietraszkiewicz (@ppietrasa) and Brad House (@bradh352) 156 157- [Brad House brought this change] 158 159 CMake: Rework library function checking (#310) 160 161 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. 162 163 Wrap with a Macro to change the behavior. 164 165 Fixes: #307 166 Fix By: Brad House (@bradh352) 167 168- [Dron Rathore brought this change] 169 170 Parse SOA records from ns_t_any response (#103) 171 172 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). 173 174 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. 175 176 Note that asking for T_ANY is generally a bad idea: 177 - https://blog.cloudflare.com/what-happened-next-the-deprecation-of-any/ 178 - https://tools.ietf.org/html/draft-ietf-dnsop-refuse-any 179 180 Bug: #102 181 Fix By: Dron Rathore (@DronRathore) 182 183- [Stephen Bryant brought this change] 184 185 Added CPack functionality for generating RPM or DEB packages (#283) 186 187 Added CPack functionality for generating RPM or DEB packages 188 189 ie: run `cpack -G RPM` (or "DEB") after building with CMake. 190 191 The current configuration creates 3 separate packages for the shared library, 192 the development files and the tools. 193 194 Fix By: Stephen Bryant (@bf-bryants) 195 196- [tjwalton brought this change] 197 198 ares_gethostbyname: Return ENODATA if no valid A or AAAA record found (#304) 199 200 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. 201 202 * Return ENODATA if no valid A or AAAA record found 203 * Fix and update test ParseAReplyNoData. 204 * Add test for new ENODATA behaviour in ares_gethostbyname. 205 206 Fixes Bug #303 207 Fix By: @tjwalton 208 209- [Michal Rostecki brought this change] 210 211 test: Separate live tests from SetServers* tests (#299) 212 213 Before this change, SetServers, SetServersPorts and SetServersCSV 214 contained test cases trying to make DNS queries with the google.com 215 hostname, which requires Internet connectivity. Tests with that 216 requirement should be defined in the ares-test-live.cc file and contain 217 "Live" prefix to filter them out with `--gtest_filter=-*.Live*` on 218 machines without Internet connectivity. 219 220 Fix By: Michal Rostecki (@mrostecki) 221 222- [Adam Majer brought this change] 223 224 Only count valid addresses when response parsing (#302) 225 226 When ares_parse_a_reply or ares_parse_aaaa_reply is called in case 227 where another AAAA and A responses exist, the resulting ares_addrttl 228 count is invalid and the structure points to gibberish. 229 230 This is a regression since 1.15. 231 232 Issue: https://github.com/c-ares/c-ares/issues/300 233 Fix By: Adam Majer (@AdamMajer) 234 235Brad House (24 Dec 2019) 236- [Kyle Edwards brought this change] 237 238 CMake: Provide c-ares version in package export file (#296) 239 240 The CMake package export file should provide version information. 241 242 Fix By: Kyle Edwards (@KyleFromKitware) 243 244- [Ben Noordhuis brought this change] 245 246 Accept invalid /etc/resolv.conf lookup values, ability to build container tests (#274) 247 248 * Add CARES_BUILD_CONTAINER_TESTS CMake option to add ability to build the Linux-only containerized tests. 249 * Accept invalid /etc/resolv.conf lookup values 250 251 Before this commit invalid `lookup` values resulted in c-ares not using 252 any lookups without any clear indication why. After this commit it uses 253 the default "fb". 254 255 Fix By: Ben Noordhuis (@bnoordhuis) 256 257- [Christian Ammer brought this change] 258 259 Parallel A and AAAA lookups in `ares_getaddrinfo` (#290) 260 261 A and AAAA lookups for ares_getaddrinfo() are now performed in parallel. 262 263 For this change `ares_search` was removed from `ares_getaddrinfo`. 264 Instead `ares_query` in combination with `next_dns_lookup` are 265 doing the suffix search. 266 267 Adding support for `.onion` addresses which are tested by 268 `TEST_F(DefaultChannelTest, GetAddrinfoOnionDomain)` 269 270 Fix By: Christian Ammer (@ChristianAmmer) 271 272- [Vy Nguyen brought this change] 273 274 Move variables into the block where it is used to avoid unused-vars (#281) 275 276 Warning uncovered with [-Werror, -Wunused-variables] 277 278 Fix By: Vy Nguyen (@oontvoo) 279 280- [Vy Nguyen brought this change] 281 282 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) 283 284 Fix new getaddrinfo code to not redefine macros on some systems. 285 286 Fix By: Vy Nguyen (@oontvoo) 287 288- [Egor Pugin brought this change] 289 290 [ares_getenv] Return NULL in all cases. (#279) 291 292 if ares_getenv is defined, it must return a value on all platforms. 293 294 Fix By: Egor Pugin (@egorpugin) 295 296- [Abhishek Arya brought this change] 297 298 Add OSS-Fuzz fuzzing badge (#278) 299 300 Adds based on instructions at 301 https://google.github.io/oss-fuzz/getting-started/new-project-guide/#status-badge 302 303 Patch By: Abhishek Arya (@inferno-chromium) 304 305- [Peter Eisentraut brought this change] 306 307 ares_init_options.3: Fix layout (#275) 308 309 7e6af8e inserted the documentation of resolvconf_path in the middle of 310 the item for ednspsz, leading to broken layout. Fix that. 311 312 Fix By: Peter Eisentraut (@petere) 313 314- [Gregor Jasny brought this change] 315 316 manpages: Fix typos detected by lintian (#269) 317 318 319 Fix By: Gregor Jasny (@gjasny) 320 321- [lifenjoiner brought this change] 322 323 keep command line usage up to date (#256) 324 325 adig and ahost built-in help did not match args taken. 326 327 Fix-By: @lifenjoiner 328 329- [Dan Noé brought this change] 330 331 ares-test.cc: Handle nullptr in AddrInfo ostream. (#268) 332 333 The const AddrInfo& argument to operator<< overload for AddrInfo can be 334 a nullptr unique_ptr. Handle this explicitly by printing {nullptr} if 335 the rest of the function cannot be safely executed. 336 337 Fix-by: Dan Noé <dpn@google.com> 338 339- [Dan Noé brought this change] 340 341 Add missing limits.h include from ares_getaddrinfo.c (#267) 342 343 This files references INT_MAX, but does not include limits.h. This can 344 cause a build failure on some platforms. Include limits.h if we have it. 345 346 Fix-by: Dan Noé <dpn@google.com> 347 348- [Andrew Selivanov brought this change] 349 350 fix fuzzer docs and add missing getaddrinfo docs (#265) 351 352 There is a fix for a bit outdated clang fuzzer docs and ares_getaddrinfo docs. 353 354 Fix By: Andrew Selivanov (@ki11roy) 355 356- [Andrew Selivanov brought this change] 357 358 Fix leak and crash in ares_parse_a/aaaa_reply (#264) 359 360 * fix leak if naddress of particular type found 361 * fix segfault when wanted ttls count lesser than count of result records 362 * add fuzzer input files that trigger problems (from #263) 363 364 Reported-By: David Drysdale (@daviddrysdale) 365 Fix-By: Andrew Selivanov (@ki11roy) 366 367- [Andrew Selivanov brought this change] 368 369 fix segfault when parsing wrong type of record (#262) 370 371 Fixes segfault when trying to ares_parse_aaaa with AF_INET and vise versa. 372 373 Fix By: Andrew Selivanov (@ki11roy) 374 375- work around mingw compile failure 376 377- c++ requires explicit casts 378 379- support EnvValue on Windows by implementing setenv/unsetenv 380 381- [Andrew Selivanov brought this change] 382 383 getaddrinfo enhancements (#257) 384 385 * Service support has been added to getaddrinfo. 386 * ares_parse_a/aaaa_record now share code with the addrinfo parser. 387 * Private ares_addrinfo structure with useful extensions such as ttls (including cname ttls), 388 as well as the ability to list multiple cnames in chain of lookups 389 390 Work By: Andrew Selivanov @ki11roy 391 392- [Andrew Selivanov brought this change] 393 394 fix ares__sortaddrinfo, use wrappers for sock_funcs (#258) 395 396 Some socket functions weren't exposed for use by other areas of the library. Expose 397 those and make use of them in ares__sortaddrinfo(). 398 399 Fix By: Andrew Selivanov (@ki11roy) 400 401- Fix c89 compilation support broken by .onion rejection changes 402 403 Move .onion check lower after all variables have been declared. 404 405 Bug: #246 406 407- [kedixa brought this change] 408 409 getaddrinfo: callback must be called on bad domain (#249) 410 411 Due to an order of incrementing the remaining queries and calling ares_query, on a bad domain 412 the registered callback wouldn't be called. 413 414 Bug: #248 415 Fixed-By: @kedixa 416 417- [Darrin W. Cullop brought this change] 418 419 Windows ARM/ARM64 requires AdvApi32 (#252) 420 421 Fix link issues caused by missing library that appears to only be required on ARM (though 422 docs don't list this restriction). Doesn't hurt to require it everywhere. 423 424 Bug: #251 425 Fixed-By: Darrin Cullop (@dwcullop) 426 427- [kedixa brought this change] 428 429 getaddrinfo: avoid infinite loop in case of NXDOMAIN(#240) (#242) 430 431 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. 432 433 Fix By: @kedixa 434 435- Portability fix for ares__sortaddrinfo() 436 437 replace uint32_t with unsigned int and socklen_t with ares_socklen_t 438 439 By: Brad House 440 441- [Khaidi Chu brought this change] 442 443 fix: init bufp before reject .onion to make it can be free correctly (#241) 444 445 When querying a .onion domain, it returns directly without setting bufp to NULL. A subsequent free() that occurs can cause a segmentation fault. 446 447 Fix By: Khaidi Chu (@XadillaX) 448 449- [Andrew Selivanov brought this change] 450 451 Add ares__sortaddrinfo() to support getaddrinfo() sorted results (#239) 452 453 This is a port of RFC 6724 compliant sorting function from Android Bionic project: 454 https://android.googlesource.com/platform/bionic/+/e919b116d35aa7deb24ddece69c491e24c3b0d6f/libc/netbsd/net/getaddrinfo.c 455 456 The latest version is essentially the same, except two additional parameters to test connection with (mark/uid): 457 https://android.googlesource.com/platform/bionic/+/master/libc/dns/net/getaddrinfo.c 458 459 Please note that even that version has some restrictions. It doesn't support some rules from RFC 6724: 460 461 Rule 3 (Avoid deprecated addresses) 462 Rule 4 (Prefer home addresses) 463 Rule 7 (Prefer native transport) 464 465 Submitted By: Andrew Selivanov (@ki11roy) 466 467- [Christian Ammer brought this change] 468 469 Increase portability of `ares-test-mock-ai.cc` (#235) 470 471 * using portable ares_inet_pton and updated includes in ares-test-mock-ai 472 * forgot to remove deleted ares-test-ai.cc in Makefile.inc 473 474 Fix By: Christian Ammer (@ChristianAmmer) 475 476- [Fabrice Fontaine brought this change] 477 478 m4/xc-cc-check.m4: use XC_CHECK_BUILD_FLAGS (#236) 479 480 Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS. 481 Otherwise it complains of CPPFLAGS in CFLAGS. 482 [Retrieved from: 483 https://git.buildroot.net/buildroot/tree/package/c-ares/0001-use_check_build_instead_of_check_user.patch] 484 485 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> 486 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 487 Submitted by: Fabrice Fontaine 488 489- [Christian Ammer brought this change] 490 491 Bugfix for `ares_getaddrinfo` and additional unit tests (#234) 492 493 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: 494 495 Additional mock server test classes (ares-test-mock-ai.cc): 496 MockTCPChannelTestAI 497 MockExtraOptsTestAI 498 MockNoCheckRespChannelTestAI 499 MockEDNSChannelTestAI 500 RotateMultiMockTestAI 501 NoRotateMultiMockTestAI 502 503 Additional live tests (ares-test-live-ai.cc): 504 LiveGetHostByNameV4 505 LiveGetHostByNameV6 506 LiveGetHostByNameV4AndV6 507 508 Fix By: Christian Ammer (@ChristianAmmer) 509 510- [Christian Ammer brought this change] 511 512 Remaining queries counter fix, additional unit tests for `ares_getaddrinfo` (#233) 513 514 Remaining queries counter fix, added tests (ParallelLookups, 515 SearchDomains, SearchDomainsServFailOnAAAA). Removed unnecessary 516 if and commented code in test. 517 518 Fix By: Christian Ammer (@ChristianAmmer) 519 520- [Christian Ammer brought this change] 521 522 Add initial implementation for ares_getaddrinfo (#112) 523 524 Initial implementation for ares_getaddrinfo(). It is NOT compliant with RFC6724, though 525 it is expected to come closer to conformance prior to the next release. 526 527 Features not supported include sorted addresses and honoring of service and hints 528 parameters. 529 530 Implementation by: Christian Ammer (@ChristianAmmer) 531 532- [Ben Noordhuis brought this change] 533 534 test: fix bad expectation in ipv6 localhost test (#227) 535 536 The LiveGetLocalhostByAddrV6 test expected to see "localhost" in the 537 result when doing an address-to-name lookup for ::1 but on my system 538 that resolves to "ip6-loopback" because of this stanza in /etc/hosts: 539 540 $ grep ^::1 /etc/hosts 541 ::1 ip6-localhost ip6-loopback 542 543 Fix By: Ben Noordhuis (@bnoordhuis) 544 Bug: #85 545 546- [Ben Noordhuis brought this change] 547 548 ares_version.h: bump version (#230) 549 550 Version change not committed from maketgz.sh 551 552 Bug: #229 553 554Daniel Stenberg (24 Oct 2018) 555- ares_library_init_android.3: minor syntax edits, fixed AVAILABILITY 556 557Version 1.15.0 (23 Oct 2018) 558 559Brad House (23 Oct 2018) 560- last minute 1.15.0 addition 561 562- [Ben Noordhuis brought this change] 563 564 Report ARES_ENOTFOUND for .onion domain names as per RFC7686. (#228) 565 566 Quoting RFC 7686: 567 568 Name Resolution APIs and Libraries (...) MUST either respond 569 to requests for .onion names by resolving them according to 570 [tor-rendezvous] or by responding with NXDOMAIN. 571 572 A legacy client may inadvertently attempt to resolve a .onion 573 name through the DNS. This causes a disclosure that the client 574 is attempting to use Tor to reach a specific service. Malicious 575 resolvers could be engineered to capture and record such leaks, 576 which might have very adverse consequences for the well-being 577 of the user. 578 579 Bug: #196 580 Fix By: Ben Noordhuis @bnoordhuis 581 582- prepare for c-ares 1.15.0 release 583 584- AIX Build Fix 585 586 AIX attempts to include both nameser_compat.h and onameser_compat.h. It appears 587 the proper fix is to define _USE_IRS so that only nameser_compat.h is used. 588 589 Bug: #224 590 Fix By: Brad House (@bradh352) 591 592- Fix crash in ares_dup() due to new ARES_OPT_RESOLVCONF 593 594 ares_dup() calls ares_init_options() by making its own fake option 595 mask since the original mask isn't stored but ARES_OPT_RESOLVCONF 596 was always set, instead of conditionally set. This caused a crash 597 because ares_strdup() isn't NULL-safe if no custom path was set. 598 599 Made ares_dup() set ARES_OPT_RESOLVCONF conditionally. 600 601 Fix By: Brad House (@bradh352) 602 603- [Sarat Addepalli brought this change] 604 605 Add ares_init_options() configurability for path to resolv.conf file 606 607 Add resolvconf_path to end of struct ares_options with ARES_OPT_RESOLVCONF option 608 so on Unix-like systems a custom path can be specified. If no path is specified, 609 /etc/resolv.conf is used like normal. 610 611 Fix By: Sarat Addepalli @SirR4T 612 Fixes Bug: #220 613 Review By: Brad House @bradh352 614 615- remove stale variables 616 617- fix prototype name for ares_strsplit_free() 618 619- add missing prototype 620 621- simplify ares_strsplit() and create ares_strsplit_free() helper function 622 623- missing ares_strsplit.h from HHEADERS for inclusion in distribution 624 625- [Ruslan Baratov brought this change] 626 627 Add CARES_BUILD_TOOLS CMake option (#214) 628 629 Add ability to exclude building of tools (adig, ahost, acountry) in CMake. This should also close #200. 630 631 Fix By: Ruslan Baratov (@ruslo) 632 Bug: #200 633 634- [flyingdutchman23 brought this change] 635 636 Style. Whitespace cleanup. (#213) 637 638 Small whitespace cleanups. 639 640 Fix By: @flyingdutchman23 641 642- [John Schember brought this change] 643 644 Android: Support for domain search suffix (#211) 645 646 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. 647 648 Submitter: John Schember (@user-none) 649 Fixes: #207 650 Approved-by: Brad House (@bradh352) 651 652- [afalin brought this change] 653 654 Improve DNS suffixes extracting from WinNT registry (#202) 655 656 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. 657 658 Fix By: @afalin 659 660- Be consistent with indention in CMakeLists.txt 661 662 The imported TRANSFORM_MAKEFILE_INC function from curl used space indention 663 but the rest of the file used tabs. Go ahead and make it tabs for 664 consistency as well. 665 666 Committed By: Brad House 667 668- [flyingdutchman23 brought this change] 669 670 Fix modern gcc warning: argument to 'sizeof' in 'strncpy' call is the same expression as the source 671 672 Silence warning about using src to determine number of bytes to copy. 673 In this case it doesn't matter whether it is `src` or `dest`. So there 674 is no functionality change. 675 676 Bug: #210 677 Fix By: @flyingdutchman23 678 679- [Andi Schnebinger brought this change] 680 681 fix stringop-overflow warning of GCC (#201) 682 683 When using a modern GCC to compile c-ares, there is a stringop-overflow warning. 684 This patch simply silences the false-positive warning, there is no actual code flaw. 685 686 Bug: https://github.com/c-ares/c-ares/pull/201 687 Fixed By: Andi Schnebinger @Iniesta8 688 689GitHub (18 May 2018) 690- [David Drysdale brought this change] 691 692 travis: do coverage in "coverage" build (#195) 693 694 Fixes #194, a mistake from commit a255081f2c3c ("travis: Only do 695 coverage/distcheck on normal build") 696 697Brad House (17 May 2018) 698- [Brad Spencer brought this change] 699 700 Apply the IPv6 server blacklist to all nameserver sources, not just Windows (#193) 701 702 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. 703 704 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. 705 706 Fix By: Brad Spencer @b-spencer 707 PR: https://github.com/c-ares/c-ares/pull/193 708 709- [Brad Spencer brought this change] 710 711 Fix warnings emitted by MSVC when using -W4 (#192) 712 713 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. 714 715 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. 716 717 Fix By: Brad Spencer @b-spencer 718 PR: https://github.com/c-ares/c-ares/pull/192 719 720- [David Hotham brought this change] 721 722 Prevent changing name servers while queries are outstanding (#191) 723 724 Changing name servers doesn't work, per #41. Better to return an error code than to crash. 725 726 Fix-by: David Hotham @dimbleby 727 728David Drysdale (15 May 2018) 729- [Tobias Nießen brought this change] 730 731 Fix comment in ares_rules.h (#189) 732 733Brad House (6 May 2018) 734- [Brad Spencer brought this change] 735 736 Harden and rationalize c-ares timeout computation (#187) 737 738 * Harden and rationalize c-ares timeout computation 739 * Remove the rand() part of the timeout calculation completely. 740 741 When c-ares sends a DNS query, it computes the timeout for that request as follows: 742 743 timeplus = channel->timeout << (query->try_count / channel->nservers); 744 timeplus = (timeplus * (9 + (rand () & 7))) / 16; 745 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. 746 747 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. 748 749 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). 750 751 Consider also the documentation of channel->timeout in ares_init_options(): 752 753 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. 754 755 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. 756 757 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. 758 759 UPDATE: randomization removed. 760 761 Closes PR #187 762 Fix by: Brad Spencer 763 764- distribute ares_android.h 765 766 Distribute ares_android.h when a release distribution package is 767 created. 768 769 Reported By: Andrey Khranovsky 770 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-04/0000.shtml 771 772- ares_set_servers_csv() on failure should not leave channel in a bad state 773 774 If bad data is passed to ares_set_servers_csv() or 775 ares_set_servers_ports_csv() it will clear the existing channel 776 configured DNS servers, then a call to ares_send() will fail due 777 to a bad malloc which may have undefined behavior. 778 779 The fix now only clears existing servers on success. An additional 780 sanity check was added in ares_send() to ensure nservers >= 1 or 781 will result in ARES_ESERVFAIL. 782 783 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2018-03/0000.shtml 784 Reported-by: Francisco Sedano Crippa 785 786- docs: Not all manpages are listed 787 788 Some docs aren't installed or not showing up on 789 https://c-ares.haxx.se/docs.html 790 due to not being listed in Makefile.inc. Add missing docs and 791 ensure docs are alphabetized. 792 793Version 1.14.0 (16 Feb 2018) 794 795Daniel Stenberg (16 Feb 2018) 796- ares_android.c: fix warning: ISO C forbids an empty translation unit 797 798- RELEASE-NOTES: some more work we did and people who helped 799 800Brad House (16 Feb 2018) 801- travis: skip Autotools style testing for cmake 802 803 Fix cmake test build by skipping autotools portion of test script. 804 805- travis: standardize CMake test off of Autotools tests 806 807 Instead of running 'make test', run the tests directly like autotools 808 does. It provides more verbose output. 809 810- travis: Enable building tests for CMake 811 812 Travis should auto-build and run tests for cmake builds now that 813 PR #168 is merged. 814 815- fix version in pkgconfig 816 817- Add version update to CMakeLists in maketgz 818 819- Release prep. Add support for pkgconfig in cmake, set versions appropriately 820 821Gregor Jasny (15 Feb 2018) 822- CMake: Add tests 823 824Brad House (14 Feb 2018) 825- [Gregor Jasny brought this change] 826 827 Use cmake3 package provided by Ubuntu (#182) 828 829- Cmake 3.1 instead of 3.2.1 should be the minimum 830 831- Update RELEASE-NOTES and RELEASE-PROCEDURE.md to prepare for next release 832 833- get rid of c++ style comments 834 835- Use trusty for all builds, precise is EOL. Update clang and cmake versions. 836 837- Current CMakeLists.txt doesn't support 2.8.12 anymore, we need to bump the version to 3.2.1 minimum 838 839- Re-organize sections in INSTALL.md and add CMake section 840 841- [Sergey Kolomenkin brought this change] 842 843 remove compilation warnings in MSVC (#47) 844 845- document handling of timeouts for ares_process and ares_process_fd to close PR #57 846 847- 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 848 849GitHub (7 Feb 2018) 850- [David Drysdale brought this change] 851 852 Document WSAStartup requirement (#180) 853 854David Drysdale (6 Feb 2018) 855- [Antonio Tajuelo brought this change] 856 857 Added coderelease.io badge to readme.md for letting people subscribe to new versions (#174) 858 859- [Sheel Bedi brought this change] 860 861 Update year in LICENSE.md to 2018 (#170) 862 863GitHub (4 Feb 2018) 864- [David Drysdale brought this change] 865 866 travis: use VM not container for {L,A}SAN builds (#177) 867 868 As per https://github.com/travis-ci/travis-ci/issues/9033, container 869 based builds do not currently allow ptrace, which is used by LSAN and 870 ASAN. 871 872Brad House (3 Feb 2018) 873- [acthompson-google-com brought this change] 874 875 Android JNI code leaks local references in some cases (#175) 876 877 * Add Google LLC to AUTHORS. 878 879 * android: Explicitly delete all JNI local references, and cache JNI method IDs at initialization. 880 881 * android: Only return ARES_ENOTINITIALIZED on failures in initialization code. 882 883Gregor Jasny (2 Jan 2018) 884- Embed fused Google Test 1.8.0 885 886Brad House (21 Dec 2017) 887- [John Schember brought this change] 888 889 android: Check returns for obj and classes are not NULL. Document API levels for various Android functions and objects used. (#166) 890 891- CARES_CHECK_TYPE should reference variable so a warning is not produced for -Werror compatibility 892 893- [Brad Spencer brought this change] 894 895 Fix computation of IPv6 blacklist mask for values of netmask > 8. (#164) 896 897David Drysdale (14 Dec 2017) 898- travis: Only do coverage/distcheck on normal build 899 900- travis: only do pip install on Linux 901 902- travis: only test in IPv4 mode 903 904 Travis' Trusty environment does not support IPv6. 905 906- test: allow restriction to one IP address family 907 908- [Roman Teterin brought this change] 909 910 Fix a typo in init_by_resolv_conf (#160) 911 912Brad House (11 Dec 2017) 913- @gvanem says MSVC -RTCc option fails, looks erroneous to me, but the additional mask is harmless 914 915- Fix some other mingw warnings 916 917- Issue #143, get rid of windows build warning due to passing 'char **' to argument expecting 'const char **' 918 919- [Gregor Jasny brought this change] 920 921 Distribute CMake files (#130) 922 923- Android variants may not have __system_property_get 924 925 Some android systems like ARM64 may not have the __system_property_get 926 symbol in libc (but still have it in the public headers). Detect this 927 condition at build time. The __system_property_get method of retrieving 928 name servers is deprecated as of Oreo so should strictly be a fallback 929 mechanism anyhow. 930 931David Drysdale (9 Nov 2017) 932- [David Hotham brought this change] 933 934 Wrong function name throughout man page (#154) 935 936- ares_data.c: iterate through substructs when freeing 937 938 Previous code recursed into substructures, which makes it more likely 939 that large/heavily-nested responses could use up lots of stack. 940 941- test: test ares_free_data on long chain of structs 942 943- [Felix Yan brought this change] 944 945 Fix a typo in inet_ntop.c (#151) 946 947Daniel Stenberg (29 Sep 2017) 948- ares_gethostbyname.3: fix callback status values 949 950 - ARES_ENOTFOUND means the _name_ wasn't found 951 952 - ARES_ENODATA can be returned when a resolve fails 953 954 Reported-by: Jakub Hrozek 955 Bug: https://c-ares.haxx.se/mail/c-ares-archive-2011-06/0012.shtml 956 957Brad House (28 Sep 2017) 958- [John Schember brought this change] 959 960 Fix DNS server lookup breaking with Android O due to Android removing access to net.dns# system properties. (#148) 961 962 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. 963 964 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. 965 966 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. 967 968 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. 969 970- [Konstantinos Sofokleous brought this change] 971 972 allow linking against the static msvc runtime library (#133) 973 974 allow linking against the static msvc runtime library 975 976- [Gergely Nagy brought this change] 977 978 Force using the ANSI versions of WinAPI functions (#142) 979 980 When compiling c-ares with a build system that defines UNICODE, 981 bad versions of WinAPI functions are used causing failures or even 982 crashes. When windows.h is included in MBCS mode (like in the default 983 build system), the ..A versions are the same as using the one without 984 any suffix. 985 986- [cmake] build fix on Solaris 987 988GitHub (11 Sep 2017) 989- [Brad House brought this change] 990 991 Win32 exclude legacy ipv6 subnets (#144) 992 993 win32 ipv6: add infrastructure to exclude ipv6 subnets that are known to cause issues 994 995- [David Drysdale brought this change] 996 997 windows: only look for ancient compilers (#146) 998 999 Also drop the use of a versioned output directory; just use 1000 .\msvc 1001 1002- [David Drysdale brought this change] 1003 1004 ares_init_options.3: match up sock_state_cb args (#141) 1005 1006 Fixes #140 1007 1008Daniel Stenberg (25 Aug 2017) 1009- [Anna Henningsen brought this change] 1010 1011 gethostbyaddr: fail with `ECANCELLED` for `ares_cancel()` 1012 1013 When `ares_cancel()` was invoked, `ares_gethostbyaddr()` 1014 queries would fail with `ENOTFOUND` instead of `ECANCELLED`. 1015 1016 It seems appropriate to treat `ares_cancel()` like `ares_destroy()`, 1017 but I would appreciate review of the correctness of this change. 1018 1019 Ref: https://github.com/nodejs/node/issues/14814 1020 1021 Closes #138 1022 1023David Drysdale (18 Aug 2017) 1024- [David Hotham brought this change] 1025 1026 support most recent Visual Studio 2017 1027 1028Brad House (26 Jul 2017) 1029- Preserve original DNS server order on Windows for equal metrics. 1030 1031 qsort is not stable, in order to make it stable we need to record 1032 the original index and add it as a secondary sort value when the 1033 metrics are equal to prevent using DNS servers that may not work 1034 at all as reported by some users. 1035 1036David Drysdale (15 Jul 2017) 1037- [Anna Henningsen brought this change] 1038 1039 ares_parse_naptr_reply: make buffer length check more accurate 1040 1041 9478908a490a6bf009ba58d81de8c1d06d50a117 introduced a length check 1042 for records parsed by `ares_parse_naptr_reply()`. However, that 1043 function is designed to parse replies which also contain non-NAPTR 1044 records; for A records, the `rr_len > 7` check will fail as there 1045 are only 4 bytes of payload. 1046 In particular, parsing ANY replies for NAPTR records was broken 1047 by that patch. 1048 1049 Fix that by moving the check into the case in which it is already 1050 known that the record is a NAPTR record. 1051 1052- appveyor: run dnsdump as a sanity check 1053 1054- travis: run dnsdump as a sanity check 1055 1056- test: use ares_free_string() throughout 1057 1058 As pointed out by Gisle Vanem in #125. 1059 1060Daniel Stenberg (3 Jul 2017) 1061- RELEASE-PROCEDURE.md: how to release 1062 1063 Fixes #115 1064 Closes #116 1065 1066David Drysdale (2 Jul 2017) 1067- test: Build dnsdump on Windows too 1068 1069 Thanks to Gisle Vanem for showing the way: 1070 https://github.com/c-ares/c-ares/commit/b701af8a24cf9d173b1dbe5faedcea34642e92da#commitcomment-22830845 1071 1072Brad House (26 Jun 2017) 1073- [Christian Ammer brought this change] 1074 1075 fix statement like #define - ares ssize_t define had a trailing semicolon (#120) 1076 1077David Drysdale (21 Jun 2017) 1078- test: distribute the fuzzcheck.sh script 1079 1080 The TESTS target runs fuzzcheck.sh so make sure it is included 1081 in the distributed tarball. 1082 1083 (The test itself will be pointless when run on a distribution, because 1084 the fuzzing corpus directories are not shipped, but at least this 1085 means that `make -C test test` should work.) 1086 1087- test: run the name-parsing corpus check too 1088 1089Daniel Stenberg (21 Jun 2017) 1090- dist: don't build/ship PDF versions in release archives 1091 1092 ... experience says very few read them and they can still get build by 1093 those who want them.a 1094 1095- ares_version.h: bump version 1096 1097Version 1.13.0 (20 Jun 2017) 1098 1099Daniel Stenberg (20 Jun 2017) 1100- RELEASE-NOTES: 1.13.0 1101 1102- ares_set_socket_functions.3: added in 1.13.0 1103 1104David Drysdale (18 Jun 2017) 1105- ares_parse_naptr_reply: check sufficient data 1106 1107 Check that there is enough data for the required elements 1108 of an NAPTR record (2 int16, 3 bytes for string lengths) 1109 before processing a record. 1110 1111- test: Feed in short NAPTR 1112 1113- test: Add fuzz input with short NAPTR 1114 1115- test: add ares_parse_naptr_reply to fuzzer 1116 1117- [noiz brought this change] 1118 1119 Update ares.h to support compiling with QNX 1120 1121- [Dionna Glaze brought this change] 1122 1123 Simple changes to appease stricter compilers. 1124 1125 ares_process.c uses htonl, which needs <arpa/inet.h> included. 1126 ares_getnameinfo.c uses a dynamically selected format string for 1127 sprintf, which -Wformat-literal doesn't like. Usually one would use 1128 inttypes.h and a format string "%" PRIu32, but C99 is too new for some 1129 supported platforms. 1130 1131GitHub (16 Jun 2017) 1132- [Gregor Jasny brought this change] 1133 1134 CMake: Emulate interface library on import (#108) 1135 1136 Closes: #104 1137 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 1138 1139Brad House (6 Jun 2017) 1140- [ChristianAmmer brought this change] 1141 1142 Added support for Windows DNS Suffix Search List (#93) 1143 1144 This change solves issue #53. 1145 1146 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: 1147 1148 The global DNS suffix search list. 1149 The primary and connection specific DNS suffixes if the global is not available. 1150 1151 Contributed by @ChristianAmmer 1152 1153Daniel Stenberg (25 May 2017) 1154- [Thomas Köckerbauer brought this change] 1155 1156 configure: do not heck for ar if specified manually 1157 1158 Closes #62 1159 1160David Drysdale (23 May 2017) 1161- ares_expand_name: limit number of indirections 1162 1163- test: fuzz input file that takes a while to process 1164 1165- test: copy data in fuzz regression driver 1166 1167 Oops. 1168 1169GitHub (23 May 2017) 1170- [David Drysdale brought this change] 1171 1172 Convert char from ISO-8859-1 to UTF-8 (#99) 1173 1174 Fixes #97 1175 1176- [Gregor Jasny brought this change] 1177 1178 travis: Use trusty for cmake builds (#109) 1179 1180 kubuntu-backports dropped the CMake package for Precise 1181 1182David Drysdale (2 May 2017) 1183- [David Hotham brought this change] 1184 1185 msvc_ver.inc support most recent Visual Studio 2017 (#101) 1186 1187- test: use io.h not unistd.h for Windows 1188 1189- test: try building fuzz binaries on Windows 1190 1191- test: stick to int in ares-fuzz.c 1192 1193 Using int rather than ares_ssize_t means this file 1194 needs no c-ares dependency - it's a general driver for 1195 any libFuzzer-style entrypoint. 1196 1197- test: force ARES_OPT_NOROTATE for no-rotate tests 1198 1199- test: check expected NOROTATE value 1200 1201- ares_create_query: use ares_free not naked free 1202 1203 Accidentally added in commit 65c71be1cbe5 1204 ("ares_create_query: avoid single-byte buffer overwrite") 1205 1206Brad House (17 Mar 2017) 1207- Need ares.h for ares_ssize_t 1208 1209- tests should not use ssize_t, use ares_ssize_t 1210 1211GitHub (16 Mar 2017) 1212- [Brad House brought this change] 1213 1214 Portability updates for legacy systems. (#92) 1215 1216 Socklen_t should not be used in code, instead ares_socklen_t should be used. 1217 Convert ssize_t to ares_ssize_t for portability since the public API now exposes this. 1218 1219David Drysdale (14 Mar 2017) 1220- [Michael Osei brought this change] 1221 1222 Update msvc_ver.inc (#91) 1223 1224 For Visual Studio 2017 builds 1225 1226Daniel Stenberg (13 Mar 2017) 1227- [Brad House brought this change] 1228 1229 Windows DNS server sorting (#81) 1230 1231 Original Patch From Brad Spencer: 1232 https://c-ares.haxx.se/mail/c-ares-archive-2016-04/0000.shtml 1233 1234 My modifications include: 1235 * Dynamically find GetBestRoute2 since it is a Windows Vista+ symbol, and will fall back to prior behavior when not available. 1236 * Prefer get_DNS_AdaptersAddresses as the modifications should alleviate the concerns which caused us to prefer get_DNS_NetworkParams 1237 * Update AppVeyor to use MinGW-w64 instead of the legacy MinGW 1238 * Fix compile error in test suite for Windows. 1239 1240 Original message from patch below: 1241 1242 From: Brad Spencer <bspencer@blackberry.com> 1243 Date: Fri, 29 Apr 2016 14:26:23 -0300 1244 1245 On Windows, the c-ares DNS resolver tries first to get a full list of 1246 DNS server addresses by enumerating the system's IPv4/v6 interfaces and 1247 then getting the per-interface DNS server lists from those interfaces 1248 and joining them together. The OS, at least in the way the c-ares 1249 prefers to query them (which also may be the only or best way in some 1250 environments), does not provide a unified list of DNS servers ordered 1251 according to "current network conditions". Currently, c-ares will then 1252 try to use them in whatever order the nested enumeration produces, which 1253 may result in DNS requests being sent to servers on one interface 1254 (hosting the current default route, for example) that are only intended 1255 to be used via another interface (intended to be used when the first 1256 interface is not available, for example). This, in turn, can lead to 1257 spurious failures and timeouts simply because of the server address 1258 order that resulted because of the enumeration process. 1259 1260 This patch makes the (safe?) assumption that there is no other better 1261 rule to chose which interface's DNS server list should be prioritized. 1262 After all, a DNS lookup isn't something "per network"; applications 1263 don't look up "these DNS names on this interface and those DNS names on 1264 that interface". There is a single resource pool of DNS servers and the 1265 application should presume that any server will give it the "right" 1266 answer. However, even if all DNS servers are assumed to give equally 1267 useful responses, it is reasonable to expect that some DNS servers will 1268 not accept requests on all interfaces. This patch avoids the problem by 1269 sorting the DNS server addresses using the Windows IPv4/v6 routing tables. 1270 1271 For example, a request to DNS server C on interface 2 that is actually 1272 sent over interface 1 (which may happen to have the default route) may 1273 be rejected by or not delivered to DNS server C. So, better to use DNS 1274 servers A and B associated with interface 1, at least as a first try. 1275 1276 By using the metric of the route to the DNS server itself as a proxy for 1277 priority of the DNS server in the list, this patch is able to adapt 1278 dynamically to changes in the interface list, the DNS server lists per 1279 interface, which interfaces are active, the routing table, and so on, 1280 while always picking a good "best" DNS server first. 1281 1282 In cases where any DNS server on any interface will do, this patch still 1283 seems useful because it will prioritize a lower-metric route's (and thus 1284 interface's) servers. 1285 1286David Drysdale (22 Feb 2017) 1287- [Sergii Pylypenko brought this change] 1288 1289 docs: fixed references to ares_set_local_ip4 and ares_set_local_ip6 1290 1291- [Calle Wilund brought this change] 1292 1293 ares test: fix win32 build errors with virtual socket function tests 1294 1295 The added api requires both some typedefs not previously imported 1296 into the test build + the test code did not fully deal with 1297 socket differences on windows. 1298 1299- [Calle Wilund brought this change] 1300 1301 ares_process: fix return type of socket_create function (win32 warning) 1302 1303Daniel Stenberg (31 Jan 2017) 1304- [Calle Wilund brought this change] 1305 1306 ares_set_socket_functions: Add man page 1307 1308 Providing some rudimentary documentation for the added functionality 1309 1310 Closes #72 1311 1312- [Calle Wilund brought this change] 1313 1314 ares-test: Add test helpers and cases for virtual socket IO 1315 1316 * Added test case macro to automatically run tests twice, once "normal", 1317 once with virtual IO. 1318 * Changed most "live" query tests to run in dual mode to verify 1319 at least simple socket IO via virtual functions 1320 * Added test case for settings/duping socket functions & callback data 1321 1322- [elcallio brought this change] 1323 1324 Implement using virtual socket IO functions when set 1325 1326 Uses virtual socket IO functions when set on a channel. 1327 Note that no socket options are set, nor is any binding 1328 done by the library in this case, since the client defining 1329 these is probably more suited to deal with this. 1330 1331- [elcallio brought this change] 1332 1333 Add virtual function set for socket IO 1334 1335 Defines a structure of basic create, close, read/write 1336 functions as virtual function calls, settable for individual 1337 c-ares channels. 1338 1339David Drysdale (30 Jan 2017) 1340- test: ignore aresfuzzname binary 1341 1342Gregor Jasny (14 Jan 2017) 1343- [Stephen Sorley brought this change] 1344 1345 Always use check_symbol_exists instead of check_function_exists. 1346 1347- Also add includes to TARGETS_INST_DEST 1348 1349- [Stephen Sorley brought this change] 1350 1351 Windows build fixes 1352 1353- CMake: Export targets 1354 1355- CMake: Use GNUInstallDirs for install location defaults 1356 1357David Drysdale (11 Jan 2017) 1358- Update Makefile.am for renamed INSTALL.md 1359 1360GitHub (11 Jan 2017) 1361- [David Drysdale brought this change] 1362 1363 docs: convert INSTALL to MarkDown & tweak (#83) 1364 1365- [Gregor Jasny brought this change] 1366 1367 Merge pull request #77 from stephen-sorley/cmake_modernize 1368 1369 Updated CMake minimum version to 2.8.12. 1370 1371Stephen Sorley (4 Jan 2017) 1372- Changed executables to depend directly on internal libcares target, instead of against 1373 the external-facing alias targets. 1374 1375- Updated Travis to pull CMake 2.8.12 from kubuntu-backports ppa. 1376 1377- Updated CMake minimum version to 2.8.12. 1378 1379 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. 1380 1381 Updated chain-building support to imitate new-style Find modules (import libs), instead of old-style Find modules (cache variables). 1382 1383David Drysdale (26 Dec 2016) 1384- [Chris Araman brought this change] 1385 1386 configure: clock_gettime workaround (#75) 1387 1388 Commits 7518c26, c41726b, and bc14ee7 brought this workaround to the CMake build system. This expands it to the autoconf build system. 1389 1390 Fixes #71 1391 1392- test: add fuzz entrypoint for ares_create_query() 1393 1394- test: Add gTest/gMock files to SOURCES 1395 1396 Built tarballs are not including all of the files needed 1397 to build the test suite because they are missing from the 1398 <target>_SOURCES variable in Makefile.am. 1399 1400- travis: Move build scripts under travis/ 1401 1402 Travis doesn't always propagate errors in inline multi-line 1403 scripts, so move them all to be explicit shell scripts, each 1404 with set -e. 1405 1406- travis: check distributed tarball builds 1407 1408Daniel Stenberg (25 Oct 2016) 1409- dist: ship msvc_ver.inc too 1410 1411 Reported-by: Bruce Stephens 1412 1413 Fixes #69 1414 1415- [Aaron Bieber brought this change] 1416 1417 fix build on OpenBSD 1418 1419- ares_version.h: bump, working on 1.12.1 now 1420 1421GitHub (18 Oct 2016) 1422- [Gregor Jasny brought this change] 1423 1424 Merge pull request #64 from bradh352/master 1425 1426 Add CMake build system support to C-Ares. 1427 1428Brad House (5 Oct 2016) 1429- 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 1430 1431- update MacOSX 10.12 detection 1432 1433- Expand XCode clock_gettime fix to include MacOS 10.12, not just iOS10 1434 1435David Drysdale (4 Oct 2016) 1436- Revert "travis: work around bug in PyCParser" 1437 1438 This reverts commit a24a10a348fc00b8cfd684d91894a1df14880ea9. 1439 1440- travis: work around bug in PyCParser 1441 1442 See https://github.com/pyca/cryptography/issues/3187 1443 1444Brad House (3 Oct 2016) 1445- PROJECT_SOURCE_DIR instead of CMAKE_CURRENT_SOURCE_DIR as per @gjasny 1446 1447- use a project name of c-ares as per @gjasny 1448 1449- Import curl conversion of Makefile.inc to cmake form dynamically as per bdoetsch@ameritech.net to make maintaining multiple build systems easier 1450 1451Daniel Stenberg (30 Sep 2016) 1452- dist: add ares_library_initialized.* to the tarball 1453 1454David Drysdale (30 Sep 2016) 1455- test: check ares_create_query with too-long name 1456 1457Daniel Stenberg (30 Sep 2016) 1458- man pages: minor formatting edits 1459 1460Brad House (29 Sep 2016) 1461- merge fc7917e from @daviddrysdale ... travis build updates for cmake 1462 1463- cleanups as per @gjasny ... Use naked IF statements and use NOT DEFINED 1464 1465Version 1.12.0 (29 Sep 2016) 1466 1467Daniel Stenberg (29 Sep 2016) 1468- RELEASE-NOTES: 1.12.0 1469 1470- [David Drysdale brought this change] 1471 1472 ares-test-misc: test ares_create_query with escaped trailing dot 1473 1474- ares_create_query: avoid single-byte buffer overwrite 1475 1476 ... when the name ends with an escaped dot. 1477 1478 CVE-2016-5180 1479 1480 Bug: https://c-ares.haxx.se/adv_20160929.html 1481 1482Brad House (29 Sep 2016) 1483- CMake: Unify library versioning with the libtool methodology to make keeping library versions in sync easier with the autotools build system 1484 1485Daniel Stenberg (29 Sep 2016) 1486- ares_library_initialized.3: added 1487 1488- make: bump CARES_VERSION_INFO for release 1489 1490David Drysdale (29 Sep 2016) 1491- man: update ares_init_options.3 1492 1493Daniel Stenberg (29 Sep 2016) 1494- ares_library_init.3: corrected the ares_library_init_mem proto 1495 1496Brad House (28 Sep 2016) 1497- 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. 1498 1499- Adds cmake build system support to C-Ares. 1500 1501 The patch does not modify any source files, it only adds 3 new files 1502 (CMakelists.txt, ares_build.h.cmake, ares_config.h.cmake) which form the 1503 build system. I've tried to go through as much of the autotools tests and 1504 extracted what I thought was appropriate, though many of the tests aren't 1505 as in-depth in CMake as they are for autotools ... it is unclear why some 1506 of them exist at all, I'm guessing for legacy systems that CMake probably 1507 doesn't support anyhow. 1508 1509 Building the library, and examples (adig, ahost, acountry) plus installation 1510 should work across a large number of tested platforms. The tests have not 1511 yet been integrated. 1512 1513Daniel Stenberg (27 Sep 2016) 1514- README.md: remove space from link 1515 1516- README: link to the correct c-ares badge! 1517 1518 Reported-by: David Hotham 1519 1520 Fixes #63 1521 1522- docs: minor formatting edits 1523 1524- ares_destroy.3: formatting polish 1525 1526- ares_init.3: split the init docs into two separate man pages 1527 1528- SECURITY: point to the vulnerabilities page now 1529 1530- RELEASE-NOTES: synced with daa7235b1a5 1531 1532- ares_create_query.3: edit language 1533 1534 Tried to make the man page more readable. 1535 1536David Drysdale (26 Sep 2016) 1537- test: fix gMock to work with gcc >= 6.x 1538 1539 Taken from: 1540 https://github.com/google/googletest/issues/705#issuecomment-235067917 1541 1542Daniel Stenberg (26 Sep 2016) 1543- [Brad House brought this change] 1544 1545 headers: remove checks for and defines of variable sizes 1546 1547 ... they're not really used and by avoiding them in the ares_build.h 1548 output we make the public header less dependent on data sizes. 1549 1550David Drysdale (24 Sep 2016) 1551- api: add ARES_OPT_NOROTATE optmask value 1552 1553 Fix up a couple of problems with configuring whether c-ares rotates 1554 between different name servers between requests. 1555 1556 Firstly, ares_save_options() returns (in *optmask) the value of 1557 (channel->optmask & ARES_OPT_ROTATE), which doesn't necessarily 1558 indicate whether the channel is or is not actually doing rotation. 1559 This can be confusing/incorrect if: 1560 - the channel was originally configured without ARES_OPT_ROTATE 1561 (so it appears that the channel is not rotating) 1562 - the /etc/resolv.conf file includes the 'rotate' option 1563 (so the channel is actually performing rotation). 1564 1565 Secondly, it is not possible to reliably configure a channel 1566 to not-rotate; leaving off ARES_OPT_ROTATE is not enough, since 1567 a 'rotate' option in /etc/resolv.conf will turn it on again. 1568 1569 Therefore: 1570 - add an ARES_OPT_NOROTATE optmask value to allow explicit 1571 configuration of no-rotate behaviour 1572 - in ares_save_options(), report the value of channel->rotate 1573 as exactly one of (optmask & ARES_OPT_ROTATE) or 1574 (optmask & ARES_OPT_NOROTATE). 1575 1576 In terms of back-compatibility: 1577 - existing apps that set ARES_OPT_ROTATE will continue to rotate, 1578 and to have ARES_OPT_ROTATE reported back from ares_save_options() 1579 - existing apps that don't set ARES_OPT_ROTATE will continue to 1580 use local config/defaults to decide whether to rotate, and will 1581 now get ARES_OPT_ROTATE or ARES_OPT_NOROTATE reported back from 1582 ares_save_options() rather than 0. 1583 1584- ares_init_options: only propagate init failures from options 1585 1586 Commit 46bb820be3a8 ("ares_init_options: don't lose init failure") 1587 changed init behaviour so that earlier errors in initialization 1588 weren't lost. In particular, if the user passes in specific 1589 options but they are not applied (e.g. because of an allocation 1590 failure), that failure needs to be reported back to the user; this 1591 also applies when duplicating a channel with ares_dup(). 1592 1593 However, other initialization failures can be ignored and 1594 overridden -- in particular, if init_by_resolv_conf() or 1595 init_by_environment() fail, then falling back to default values 1596 is OK. 1597 1598 So only preserve failures from the init_by_options() stage, not 1599 from all initialization stages. 1600 1601 Fixes issue 60. 1602 1603- test: Force reinstall of libtool on OSX 1604 1605 Travis build environment appears to have changed. 1606 1607- test: Add valgrind build variant 1608 1609- test: Add null pointer to gtest args 1610 1611 GoogleTest assumes that there is a null pointer in argv[argc], 1612 so make it look like that. Without this change, tests run with 1613 command-line arguments get memory errors under valgrind/ASAN. 1614 1615Daniel Stenberg (21 Aug 2016) 1616- AUTHOR: maybe gitgub isn't really an author =) 1617 1618- AUTHORS: added contributors from the git log 1619 1620- LICENSE.md: add a stand-alone license file 1621 1622 Just the MIT license used in the top the source files moved out to a 1623 stand-alone file for easier reference and discovery. 1624 1625- README: added "CII best practices" badge 1626 1627- SECURITY.md: suggested "security process" for the project 1628 1629David Drysdale (17 Aug 2016) 1630- test: Add Clang static analysis build to Travis 1631 1632 Run scan-build over the library source code, but skip the 1633 tests. Needs a later Clang install in Travis 1634 1635- test: more info on how to run fuzz testing 1636 1637- test: make fuzzer driver code C not C++ 1638 1639- test: fuzzer mode for AFL's persistent mode 1640 1641 When fuzzing with AFL, if the LLVM-based instrumentation is 1642 used (via the afl-clang-fast wrapper), then it is possible to 1643 have a single execution of the fuzzer program iterate multiple 1644 times over the fuzzing entrypoint (similar to libFuzzer's normal 1645 mode of execution) with different data. This is much (e.g. 10x) 1646 faster. 1647 1648 Add code to support this, by checking whether __AFL_LOOP is 1649 defined at compile-time. 1650 1651 Also, shift the code to effectively be C rather than C++. 1652 1653- test: simplify deps for fuzzer entrypoint 1654 1655 No need to depend on the rest of the test code (ares-test.h) for 1656 the fuzzer entrypoint; this makes the entrypoint slightly simpler 1657 to build with LLVM's libFuzzer. 1658 1659 Also shift the code to effectively be C rather than C++ 1660 1661- test: disable MinGW tests 1662 1663 The test binary built in the MinGW build is failing for some 1664 reason. It works for me when I build locally, so I'm guessing 1665 it's down to some sort of AppVeyor environment issue. 1666 1667 Disable for now. 1668 1669Daniel Stenberg (16 Aug 2016) 1670- read_tcp_data: remove superfluous NULL check 1671 1672 CID 56884 by Coverity. The pointer is already derefenced before this 1673 point so it can't be NULL here anyway. 1674 1675- web: http => https 1676 1677GitHub (20 Jul 2016) 1678- [David Drysdale brought this change] 1679 1680 Merge pull request #59 from fuze/master 1681 1682 Update msvc_ver.inc for VS2015 Update 3 1683 1684- [Chris Araman brought this change] 1685 1686 Update msvc_ver.inc 1687 1688 support Visual Studio 2015 Update 3 1689 1690David Drysdale (2 May 2016) 1691- Fix trailing comment for #endif 1692 1693Daniel Stenberg (30 Apr 2016) 1694- email: use Gisle's "new" address 1695 1696David Drysdale (18 Apr 2016) 1697- test: drop superfluous fuzz inputs 1698 1699 Where there are multiple fuzz input files that only differ in 1700 the first two bytes (the query ID), just keep the first such 1701 file. 1702 1703svante karlsson (15 Apr 2016) 1704- Update msvc_ver.inc 1705 1706 support Visual Studio 2015 Update 2 1707 1708David Drysdale (31 Mar 2016) 1709- test: Run fuzzcheck.sh in Travis build 1710 1711- test: add fuzzing check script to tests 1712 1713 Add a test script that runs the fuzzing command over the 1714 corpus of DNS packets. This doesn't actually do any fuzzing 1715 (it just runs them as inputs without generating any variations) 1716 but it does ensure that the fuzzing entrypoint is still working. 1717 1718- test: allow multiple files in aresfuzz command line 1719 1720 If no arguments are specified, use stdin as input. 1721 Otherwise treat each argument as a filename and feed 1722 its contents to the fuzz entrypoint. 1723 1724- test: Add corpus of DNS packets 1725 1726 For fuzz testing it is useful to start from a corpus of valid 1727 packets, so fill out the test/fuzzinput/ directory with a bunch 1728 of inputs. 1729 1730 These packets were generated by temporarily modifying the c-ares 1731 process_answer() function to save off any incoming response messages. 1732 1733- test: Add utility to show DNS packet from file 1734 1735- [nordsturm brought this change] 1736 1737 Fix nsort initialization 1738 1739 Author: Alexander Drachevskiy 1740 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0004.shtml 1741 http://c-ares.haxx.se/mail/c-ares-archive-2014-07/0014.shtml 1742 1743- test: Check setting nsort=0 option is respected 1744 1745- test: Update fuzzing function prototype 1746 1747 libFuzzer changed expected return type from void to int 1748 in LLVM 3.8. 1749 1750- Explicitly clear struct servent before use 1751 1752 On a build where MSAN has been manually set up (which involves 1753 using an MSAN-instrumented version of the standard C++ library, see 1754 https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo) 1755 there's a warning about use of uninitialized memory here. It 1756 might be a false positive, but the fix is trivial so include it. 1757 1758- test: for AF_UNSPEC, return CNAME only for AAAA, but valid A record 1759 1760 Also shuffle expected responses rsp6/rsp4 into the order they will occur. 1761 1762- [Chris Araman brought this change] 1763 1764 msvc_ver.inc: support Visual Studio 2015 Update 1 1765 1766- build: commonize MSVC version detection 1767 1768 Remove the need to copy/paste version number mapping between 1769 Makefile.msvc and test/Makefile.msvc. 1770 1771- test: Use different name in live test 1772 1773- test: Only pass unused args to GoogleTest 1774 1775- ahost.c: add cast to fix C++ compile 1776 1777 If ahost.c is force-compiled as C++ the missing cast from 1778 (void *) to (char **) is problematic. 1779 1780- ares_library_cleanup: reset ares_realloc too 1781 1782 Otherwise a subsequent use of the library might use a previous 1783 incarnation's realloc() implementation. 1784 1785Daniel Stenberg (9 Mar 2016) 1786- [Brad House brought this change] 1787 1788 configure: check if tests can get built before enabled 1789 1790 The current approach for disabling tests is not a good solution because 1791 it forces you to pass --disable-tests, rather than auto-detect if your 1792 system can support the tests in the first place. Many (most?) systems 1793 do not have C++11. This also causes issues when chain-building c-ares, 1794 the hosting system needs to be updated to support passing this 1795 additional flag if necessary, it doesn't seem reasonable to add this 1796 requirement which breaks compatibility. 1797 1798 This change auto-detects if the system can build the tests and 1799 automatically disable them if it cannot. If you pass --enable-tests to 1800 configure and the system cannot build them either due to lack of system 1801 support, or because cross-compilation is being used, it will throw an 1802 appropriate error since the user indicated they really did want the 1803 tests. 1804 1805David Drysdale (3 Mar 2016) 1806- [Viktor Szakats brought this change] 1807 1808 Makefile.m32: add support for CROSSPREFIX 1809 1810- [Viktor Szakats brought this change] 1811 1812 Makefile.m32: add support for extra flags 1813 1814 Allow specification of CARES_{LD,C}FLAG_EXTRAS envvars 1815 for mingw 1816 1817- test: Build with MinGW on AppVeyor 1818 1819- test: avoid in6addr_* constants 1820 1821 These aren't available on MinGW, so use explicit addresses instead. 1822 1823- test: add missing #includes for dns-proto.cc 1824 1825- [Gregor Jasny brought this change] 1826 1827 Fix man page typos detected by Lintian 1828 1829Daniel Stenberg (19 Feb 2016) 1830- configure: acknowledge --disable-tests 1831 1832 Fixes #44 1833 1834- AUTHORS: added contributors from the 1.11.0 release 1835 1836- bump: start working on the next version 1837 1838Version 1.11.0 (19 Feb 2016) 1839 1840Daniel Stenberg (19 Feb 2016) 1841- RELEASE-NOTES: final edits for 1.11.0 1842 1843David Drysdale (15 Feb 2016) 1844- ares_dup.3: remove mention of nonexistent function 1845 1846 ares_dup_options() doesn't exist, so don't document it. 1847 1848- test: skip repeated build steps 1849 1850 Top-level buildconf/configure now triggers for the 1851 test/ subdir too, so don't need to do explicitly. 1852 1853- test: namespaces unavailable when cross-compiling 1854 1855Daniel Stenberg (13 Feb 2016) 1856- configure: only run configure in test when NOT cross-compiling 1857 1858 ... as the tests won't run cross-compiled anyway 1859 1860David Drysdale (13 Feb 2016) 1861- test: prefer ON_CALL to EXPECT_CALL to reduce flakes 1862 1863 For UDP tests, there's a chance of a retry. EXPECT_CALL only 1864 expects a single request to arrive at the server; ON_CALL allows 1865 for a UDP retry and repeats the same answer. 1866 1867 Note that ON_CALL and EXPECT_CALL can't be mixed in the same 1868 test, and that tests that have a varied sequence of responses 1869 for the same repeated request still have to use EXPECT_CALL. 1870 1871Daniel Stenberg (13 Feb 2016) 1872- configure: run configure in 'test' too 1873 1874 Having the test dir completely stand-alone causes too many issues for 1875 users and devs. It still needs to be built specifically. 1876 1877- configure: build silently by default 1878 1879- buildconf: run test/buildconf too if present 1880 1881- test/configure: build silently by default 1882 1883- [Gregor Jasny brought this change] 1884 1885 dist: Distribute README.md 1886 1887 Closes #42 1888 1889Version 1.11.0 (11 Feb 2016) 1890 1891Daniel Stenberg (11 Feb 2016) 1892- Makefile.am: distribute the test dir too 1893 1894- RELEASE-NOTES: synced with 385582bd14b68a 1895 1896- [Nicolas \"Pixel\" Noble brought this change] 1897 1898 ares_win32_init: make LoadLibrary work when using UNICODE too 1899 1900 Closes #17 1901 1902David Drysdale (11 Feb 2016) 1903- Use "resolve" as synonym of "dns" in nsswitch.conf 1904 1905 Modern Linux systems may have libnss_resolve from systemd as the 1906 resolver, which is then configured in /etc/nsswitch.conf with 1907 the "resolve" keyword rather than "dns". 1908 1909 Fixes #33 1910 1911- ares_set_socket_callback: make manpage match code 1912 1913 The code in ares_process.c that invokes the socket creation/connection 1914 callback only checks for rc < 0, not for standard ares error codes. 1915 1916- Merge pull request #36 from AGWA-forks/master 1917 1918 Add ares_set_socket_configure_callback() 1919 1920- test: Update init tests to match behaviour 1921 1922 Unreadable config files are now treated the same way 1923 as absent config files. 1924 1925- [Fedor Indutny brought this change] 1926 1927 Ignore `fopen` errors to use default values 1928 1929 After 46bb820be3a83520e70e6c5f0c5133253fcd69cd `init_by_resolv_conf` 1930 errors are no longer swallowed in `ares_init_options`. This has exposed 1931 a previously unknown bug in `lookups` initialization code. 1932 1933 If there is no lookup configuration in `resolv.conf`, 1934 `init_by_resolv_conf` will attempt to read it from other files available 1935 on the system. However, some of these files may have restricted 1936 permissions (like `600`), which will lead to `EACCESS` errno, which in 1937 turn is handled like a fatal error by `init_by_resolv_conf`. 1938 1939 However, it sounds illogical that this error should be handled as a 1940 fatal. There is a `init_by_defaults` call that overrides `lookups` with 1941 default value, and certainly possible absence of lookup information is 1942 the reason why this function exists in a first place! 1943 1944 I suggest handling any `fopen` errors as non-fatal ones, allowing to 1945 pick up the `lookups` value from different config files, or to pick up 1946 default value. 1947 1948Andrew Ayer (9 Feb 2016) 1949- Document callback type in man page for ares_set_socket_callback 1950 1951- Add ares_set_socket_configure_callback() 1952 1953 This function sets a callback that is invoked after the socket is 1954 created, but before the connection is established. This is an ideal 1955 time to customize various socket options. 1956 1957David Drysdale (9 Feb 2016) 1958- test: ares_set_socket_callback failure behaviour 1959 1960- test: Check ares_parse_txt_reply_ext() entrypoint 1961 1962- [Fedor Indutny brought this change] 1963 1964 txt: introduce `ares_parse_txt_reply_ext` 1965 1966 Introduce `ares_txt_ext` structure with an extra `record_start` 1967 field, which indicates a start of a new TXT record, thus allowing to 1968 differentiate the chunks in the same record, from a chunks in a 1969 different record. 1970 1971 Introduce a new API method: `ares_parse_txt_reply_ext` that works with 1972 this kind of struct. 1973 1974- doc: Update missed repo references 1975 1976- doc: Update docs on contributing 1977 1978- test: Run command line tools in Travis 1979 1980 Do a quick execution of each of the command line tools 1981 in the continuous integration build, so that any (say) 1982 sanitizer failures show up. 1983 1984- acountry: drop inert test 1985 1986 If ver_1 is true, then z0 and z1 must both be 'z', and so 1987 (z0 != 'z' && z1 != 'z') can never be true. 1988 1989 CID 56879, pointed out by Coverity. 1990 1991- doc: update badge locations to master repo 1992 1993- test: Enable maintainer mode + debug in Travis 1994 1995- test: Add an iOS build target 1996 1997- test: Ignore SIGPIPE in tests 1998 1999- test: More initialization tests 2000 2001- test: Improve containerized test mechanism 2002 2003 Aim is to ensure that code coverage information can escape the 2004 container. To do this: 2005 - Enter a new mount namespace too, so that we can... 2006 - Bind mount the expected source directory into the container 2007 - Share memory with the sub-process so coverage information is 2008 shared too. 2009 2010- test: Make contained tests easier to write 2011 2012- test: Add framework for containerized testing 2013 2014 On Linux we can potentially use user and UTS namespaces to run a test 2015 in a pseudo-container with: 2016 - arbitrary filesystem (e.g. /etc/resolv.conf, /etc/nsswitch.conf, /etc/hosts) 2017 - arbitrary hostname/domainname. 2018 2019 Include a first pass at the framework code to allow this, along with a 2020 first test case that uses the container. 2021 2022- test: Use a longer timeout for less flakiness 2023 2024 Having occasional test failures from timeout before multiple 2025 queries can complete, so up the default timeout for the test 2026 from 100ms to 1500ms. 2027 2028- test: Make failure tests more robust 2029 2030 Different platforms will do different numbers of allocations 2031 in the processing of a given API call; just check that the 2032 return code is either success or ENOMEM, and free off any 2033 returned state in the former case. 2034 2035 Also cope with ECONNREFUSED as well as ENOTFOUND. 2036 2037- test: Get test code building under Windows 2038 2039 - Initial nmake file based off library nmake file 2040 - Cast socket call arguments to (char *) 2041 - Use wrapper sclose() that maps to closesocket() or close() 2042 - Build a config.h indicating presence of headers 2043 - Conditionally include netdb.h 2044 - Remove unnecessary include of sys/socket.h 2045 - Force longer bitmask for allocation failure tracking 2046 - Call WSAStartup() / WSACleanup() in main() 2047 - Set TCP_NODELAY for mock server 2048 - Turn on tests in AppVeyor build 2049 2050- test: Disable tests that manipulate env on Windows 2051 2052- test: Move file lists into Makefile.inc 2053 2054 In preparation for a Win32 build of the test suite. 2055 2056- test: Add a simple multi-server test 2057 2058 Check rotate option does something 2059 2060- test: Allow for multiple mock servers 2061 2062 - Update the MockServer to allow separate specification of 2063 UDP and TCP ports 2064 - Have an array of mock servers listening on consecutive 2065 sets of ports. 2066 - Rename Process(fd) to ProcessFD(fd) to avoid confusion. 2067 - Initialize channel by using the new ares_set_servers_ports() 2068 entrypoint, so multiple ports on the same loopback address 2069 can be used. 2070 2071- test: Update test for set/get_servers variants 2072 2073 Ports are significant in the _ports_ variant functions, so update test to cope. 2074 2075- test: Make GetNameServers() utility function port-aware 2076 2077 Also make it generally available. 2078 2079- test: more testing, including of internal static functions 2080 2081- test: more tests, especially fallback processing 2082 2083 - Make mock server listen on UDP + TCP in parallel. 2084 - Test UDP->TCP fallback on truncation 2085 - Test EDNS->no-EDNS fallback 2086 - Test some environment init options 2087 - Test nonsense reply 2088 2089 test: short response 2090 2091- test: more tests, particularly of initialization 2092 2093- test: Run mock tests over both TCP and UDP 2094 2095 With the exception of a few tests that make use of the timed 2096 retry aspect of UDP. 2097 2098- test: Run mock tests over both IPv4 and IPv6 2099 2100- test: Add more tests for edge cases 2101 2102- test: more nooks and crannies of pton functions 2103 2104- test: More tests for PTR parsing 2105 2106- test: Use of HOSTALIAS environment variable 2107 2108- test: Add RAII utility classes for testing 2109 2110 - TempFile holds specific contents 2111 - EnvValue sets an environment variable 2112 2113- test: More search domain scenarios 2114 2115- test: Remove duplicate flags from Makefile.am 2116 2117- test: Make test code leak-free 2118 2119- test: More tests 2120 2121 - test use of sortlist 2122 - test gethostbyname(AF_UNSPEC) 2123 2124- test: Test ares_gethostbyname_file() 2125 2126- test: Add more tests of ares_getnameinfo() 2127 2128- test: Tweak tests, add alloc failure test 2129 2130- test: Test init with options 2131 2132- test: More tests 2133 2134 - ares_inet_net_pton() variants 2135 - ares_getsock() variants 2136 2137- test: Expose ProcessWork() function 2138 2139- test: More parsing tests 2140 2141 Including: 2142 - Split each parse function test set out into separate files. 2143 - Add an allocation failure test for each parsing function. 2144 - Add error check test for each parsing function. 2145 2146- test: Add various additional tests 2147 2148- test: More tests 2149 2150 Include tests of internal functions, based on the value of the 2151 CARES_SYMBOL_HIDING macro; need to configure the library with 2152 --disable-symbol-hiding to enable these tests. 2153 2154- test: Allow command line override of mock server port 2155 2156- test: Add README.md documentation 2157 2158- test: Temporarily avoid latest Python requests package 2159 2160 Currently get error from Travis on this install step, and downgrading one 2161 version appears to fix the problem. 2162 2163 "Could not find any downloads that satisfy the requirement pyOpenSSL>=0.13 2164 (from requests[security])" 2165 2166- test: Add AppVeyor config file for Windows build 2167 2168- test: Add configuration for a Travis build 2169 2170 Cover Linux & OSX on the container infrastructure, but install 2171 a later G++ to satisfy the tests' need for C++11. 2172 2173 Use a build matrix to include a variety of build variants: 2174 - ASAN 2175 - UBSAN 2176 - LSAN 2177 - Coverage via coveralls.io 2178 2179 test: invoke ASAN and coverage in Travis build 2180 2181 Also shift to use explicit build matrix 2182 2183 test: Use coveralls.io for coverage tracking 2184 2185 test: Add a build with UBSAN 2186 2187 Also expand and re-order the setting of environment variables 2188 for easier modification. 2189 2190 test: Add LSAN build to Travis config 2191 2192- test: Add initial unit tests for c-ares library 2193 2194 The tests are written in C++11, using the GoogleTest and GoogleMock 2195 frameworks. They have their own independent autoconf setup, so that 2196 users of the library need not have a C++ compiler just to get c-ares 2197 working (however, the test/configure.ac file does assume the use of 2198 a shared top-level m4/ directory). However, this autoconf setup has 2199 only been tested on Linux and OSX so far. 2200 2201 Run with "./arestest", or "./arestest -v" to see extra debug info. 2202 The GoogleTest options for running specific tests are also 2203 available (e.g. "./arestest --gtest_filter=*Live*"). 2204 2205 The tests are nowhere near complete yet (currently hitting around 2206 60% coverage as reported by gcov), but they do include examples 2207 of a few different styles of testing: 2208 2209 - There are live tests (ares-test-live.cc), which assume that the 2210 current machine has a valid DNS setup and connection to the 2211 internet; these tests issue queries for real domains but don't 2212 particularly check what gets returned. The tests will fail on 2213 an offline machine. 2214 2215 - There a few mock tests (ares-test-mock.cc) that set up a fake DNS 2216 server and inject its port into the c-ares library configuration. 2217 These tests allow specific response messages to be crafted and 2218 injected, and so are likely to be used for many more tests in 2219 future. 2220 2221 - To make this generation/injection easier, the dns-proto.h file 2222 includes C++ helper classes for building DNS packets. 2223 2224 - Other library entrypoints that don't require network activity 2225 (e.g. ares_parse_*_reply) are tested directly. 2226 2227 - There are few tests of library-internal functions that are not 2228 normally visible to API users (in ares-test-internal.cc). 2229 2230 - A couple of the tests use a helper method of the test fixture to 2231 inject memory allocation failures, using the earlier change to the 2232 library to allow override of malloc/realloc/free. 2233 2234 - There is also an entrypoint to allow Clang's libfuzzer to drive 2235 the packet parsing code in ares_parse_*_reply, together with a 2236 standalone wrapper for it (./aresfuzz) to allow use of afl-fuzz 2237 for further fuzz testing. 2238 2239- test: Add local copy of GoogleMock/GoogleTest 1.7.0 2240 2241 Don't check in gtest/m4 files, as they are unused and interfere 2242 with the top-level configure process. 2243 2244- doc: Show build badges in README.md 2245 2246 Note that these URLs will need to be updated if/when the test branch 2247 gets pulled into the master repo/branch. 2248 2249- doc: Convert README to README.md 2250 2251 Gives better display on GitHub 2252 2253- doc: Update in preparation for next release 2254 2255 Assume 1.11.0 is next (as there are various API additions). 2256 Also add myself to AUTHORS. 2257 2258- build: Allow header compilation by Windows C++ compiler 2259 2260- build: Expose whether symbol hiding is on 2261 2262 Adding the CARES_SYMBOL_HIDING definition allows the test suite to 2263 detect whether internal symbols are available or not. 2264 2265- build: Add autoconf macros for C++11 code using pthreads 2266 2267 Pull in testing macros from the GNU autoconf archive to allow 2268 configure scripts to test for and setup use of a C++11 compiler 2269 (AX_CXX_COMPILE_STDCXX_11) and the pthreads library (AX_PTHREAD). 2270 2271 Note that these macros are not used by the main library autoconf, 2272 just by the tests (which share the same m4/ directory). 2273 2274- build: Add a code coverage option 2275 2276 Configure with: 2277 ./configure --enable-code-coverage 2278 Show coverage output with: 2279 make code-coverage-capture 2280 2281 Built on m4/ax_code_coverage.m4 from the GNU autoconf archive 2282 to provide the macros to check for presence of gcov + lcov; 2283 upstream macro modified to: 2284 - Remove use of $(AM_DEFAULT_VERBOSITY) , as earlier versions of 2285 autoconf (such as the one used by default on Travis) do not have this. 2286 - Rather than automatically defining CODE_COVERAGE_RULES to be a set 2287 of makefile rules that use ifeq/endif (which is GNU make-specific), 2288 instead only define CODE_COVERAGE_RULES if coverages is turned on, 2289 and in that case don't use conditionals in the makefile. 2290 2291- api: Add entrypoints to allow use of per-server ports 2292 2293 Add user-visible entrypoints ares_{get,set}_servers_ports(3), which 2294 take struct ares_addr_port_node rather than struct ares_addr_node. 2295 This structure includes a UDP and TCP port number; if this is set 2296 to zero, the channel-wide port values are used as before. 2297 2298 Similarly, add a new ares_set_servers_ports_csv(3) entrypoint, which 2299 is analogous to ares_set_servers(3) except it doesn't ignore any 2300 specified port information; instead, any per-server specified port 2301 is used as both the UDP and TCP port for that server. 2302 2303 The internal struct ares_addr is extended to hold the UDP/TCP ports, 2304 stored in network order, with the convention that a value of zero 2305 indicates that the channel-wide UDP/TCP port should be used. 2306 2307 For the internal implementation of ares_dup(3), shift to use the 2308 _ports() version of the get/set functions, so port information is 2309 transferred correctly to the new channel. 2310 2311 Update manpages, and add missing ares_set_servers_csv to the lists 2312 while we're at it 2313 2314- api: Add ares_set_sortlist(3) entrypoint 2315 2316 Allow explicit configuration of the channel's sortlist, by 2317 specifying a string in the same format as the equivalent 2318 /etc/resolv.conf option. 2319 2320 This allows library users to perform the same configuration 2321 that is available via /etc/resolv.conf, but without needing 2322 to change that file. 2323 2324- api: Allow injection of user-specified malloc/free functions 2325 2326 Add a new ares_library_init_mem() initialization function for the 2327 library which allows the library user to specify their own malloc, 2328 realloc & free equivalents for use library-wide. 2329 2330 Store these function pointers in library-wide global variables, 2331 defaulting to libc's malloc(), realloc() and free(). 2332 2333 Change all calls to malloc, realloc and free to use the function pointer 2334 instead. Also ensure that ares_strdup() is always available 2335 (even if the local environment includes strdup(3)), and change the 2336 library code to always use it. 2337 2338 Convert calls to calloc() to use ares_malloc() + memset 2339 2340- api: Add option to expose some internal functions 2341 2342 Purely for testing, add --enable-expose-statics option to configure 2343 which converts some static internal functions to be externally visible. 2344 2345- api: Expose the ares_library_initialized() function 2346 2347- ahost: Allow repeated -s <domain> options 2348 2349 This also removes a potential leak where later -s options would 2350 replace earlier ones without freeing the relevant string. 2351 2352- Mark unhittable lines 2353 2354 Add comments for the benefit of the lcov tool, marking 2355 lines that cannot be hit. Typically these are fall-back 2356 protection arms that are already covered by earlier checks, 2357 and so it's not worth taking out the unhittable code (in case 2358 someone changes the code between the two places in future). 2359 2360- ares_set_servers_csv.3: make return type match code 2361 2362- bitncmp: update comment to match code behaviour 2363 2364- ares_striendstr: fix so non-NULL return can happen 2365 2366 This looks to have been broken since it was first introduced in 2005 in 2367 commit aba0b775ea30 ("Added ares_getnameinfo which mimics the 2368 getnameinfo API") 2369 2370- config_sortlist: free any existing sortlist on (re)alloc failure 2371 2372 If we get an allocation failure on 2nd or later entry in the sortlist, the 2373 code would return ENOMEM but still leave the initial entries allocated. 2374 Ensure that *sortlist is set to NULL whenever ENOMEM is returned. 2375 2376- ares_dup: clear new channel on failure 2377 2378 If the attempt to transfer IPv6 servers from the old to the new channel 2379 fails, the previous code would still return a channel to the user even though 2380 an error return code was generated. This makes it likely that users would 2381 leak the channel, so explicitly clear the channel in this case. 2382 2383- ares_init_options: don't lose init failure 2384 2385 If (say) init_by_options() fails, the subsequent call to 2386 init_by_defaults() was overwriting the return code with 2387 success. Still call init_by_defaults() regardless, but track 2388 its return value separately 2389 2390- ares_gethostbyname: don't leak valid-but-empty hostent 2391 2392 If an AF_UNSPEC query gets a valid response to its AAAA query, 2393 but which has no IPv6 addresses in it, then the code chains on to 2394 a A record query. However, the hostent from the AAAA response 2395 was being leaked along the way (because it gets replaced before 2396 the follow-on end_hquery() invocation). 2397 2398- ares_parse_txt_reply: propagate errors from per-substring loop 2399 2400 If we get an allocation failure when processing a particular substring in a 2401 TXT record, that failure is silently lost; fix that by propagating errors from 2402 the inner loop to the outer loop. 2403 2404- process_answer: fix things up correctly when removing EDNS option 2405 2406 When a server rejects an EDNS-equipped request, we retry without 2407 the EDNS option. However, in TCP mode, the 2-byte length prefix was 2408 being calculated wrong -- it was built from the answer length rather than 2409 the length of the original request. 2410 2411 Also, it is theoretically possible that the call to realloc() might change 2412 the data pointed to; to allow for this, qbuf also needs updating. 2413 2414 (Both these fixes were actually included in a patchset sent on the mailing 2415 list in Oct 2012, but were included with other functional changes that 2416 didn't get merged: 2417 http://c-ares.haxx.se/mail/c-ares-archive-2012-10/0004.shtml) 2418 2419- ares__read_line: clear buf pointer on realloc failure 2420 2421- ares_expand_name: check for valid bits in label length 2422 2423 The top two bits of the label length indicate whether this is a 2424 label length (00) or an index to a name elsewhere in the message 2425 (11). RFC1035 4.1.4 says that the other possible values for the 2426 top two bits (01, 10) are reserved for future use. 2427 2428Daniel Stenberg (23 Jan 2016) 2429- [Gregor Jasny brought this change] 2430 2431 Fix typos detected by lintian 2432 2433 Closes #32 2434 2435- [Gregor Jasny brought this change] 2436 2437 Distribute all man pages 2438 2439- README.cares: s/I/Daniel 2440 2441 ... and add a pointer to an existing version of the original area 1.1.1 2442 package.a 2443 2444- read_tcp_data: don't try to use NULL pointer after malloc failure 2445 2446 CID 56884, pointed out by Coverity. We really should make this function 2447 return an error code so that a malloc() failure can return back a major 2448 failure. 2449 2450- configure_socket: explicitly ignore return code 2451 2452 CID 56889 in Coverity pointed out the return code from setsocknonblock() 2453 is ignored, and this added typecast to (void) makes it explicit. 2454 2455- ahost: check the select() return code 2456 2457 Fixes CID 137189, pointed out by Coverity 2458 2459David Drysdale (18 Jan 2016) 2460- Fix buildconf on platforms using glibtoolize 2461 2462 Commit c49a87eea538 changed buildconf to only check for 2463 libtoolize, but missed a line 2464 2465- Don't exit loop early leaving uninitialized entries 2466 2467 Update for commit affc63cba875d. 2468 2469 The original patch from Gregor Jasny did not have the break 2470 statement; I incorrectly added it to prevent continuing the loop. 2471 However, the later entries in the array would then be left 2472 uninitialized, causing problems for later cleanup. 2473 2474 So fix to match Gregor's original patch, with apologies. 2475 2476Daniel Stenberg (18 Jan 2016) 2477- buildconf: remove check for libtool, it only requires libtoolize 2478 2479David Drysdale (17 Jan 2016) 2480- [Gregor Jasny brought this change] 2481 2482 Use libresolv to initialize cares on iPhone targets 2483 2484 On iPhone targets like iOS, watchOS or tvOS the file 2485 /etc/resolv.conf cannot be used to configure cares. 2486 2487 Instead the resolver library is queried for configuration 2488 values. 2489 2490 CC: Yury Kirpichev <ykirpichev@yandex-team.ru> 2491 2492Daniel Stenberg (17 Jan 2016) 2493- README: updated to new repo URL 2494 2495David Drysdale (14 Jan 2016) 2496- [Lei Shi brought this change] 2497 2498 Fixing slow DNS lookup issue 2499 2500 This patch is fixing the dns lookup issue due to dummy dns information 2501 of a disconnected adapter(in my case is a bluetooth adapter). I changed 2502 the dns lookup policy to try GetNetworkParams first because the 2503 GetNetworkParams provides the most reliable dns information (lots of 2504 checks were done by system). I also filter out inoperable adapter in 2505 DNS_AdaptersAddresses in case GetNetworkParams fail. 2506 2507- Merge pull request #30 from p-push/vs-2015 2508 2509 Support Visual Studio 2015 2510 2511Oleg Pudeyev (3 Jan 2016) 2512- [Gisle Vanem brought this change] 2513 2514 Support Visual Studio 2015 2515 2516David Drysdale (11 Nov 2015) 2517- [Andrew Andkjar brought this change] 2518 2519 added another version case to Makefile.msvc 2520 2521 nmake version 11.00.61030.0 resolves to CC_VERS_NUM = 110 2522 2523- Merge pull request #26 from bitbouncer/vs-2013 2524 2525 added define for visual studio 2013 2526 2527svante karlsson (25 Jun 2015) 2528- added define for visual studio 2013 2529 2530Jakub Hrozek (6 Nov 2014) 2531- ares__read_line: free buf on realloc failure 2532 2533- Destroy options if ares_save_options fails 2534 2535 It's possible that, if ares_save_options failed, the opts structure 2536 would contain some allocated memory. Calling ares_destroy_options in 2537 this case is safe, because ares_save_options zeroes out the memory 2538 initially. 2539 2540- [David Drysdale brought this change] 2541 2542 Continue loop if space for hostname not large enough 2543 2544 When attempting to build a search domain from the local hostname 2545 (used as a fallback when no other methods have given a search 2546 domain), the code doubles the buffer size on each loop iteration. 2547 2548 However, the loop previously had a WHILE_FALSE terminator so the continue 2549 statement exited the loop rather than going round again. 2550 2551Daniel Stenberg (30 Oct 2014) 2552- ares_getnameinfo.3: there is no ares_getaddrinfo 2553 2554David Drysdale (30 Sep 2014) 2555- [Gregor Jasny brought this change] 2556 2557 Prevent tmpbuf from overrunning 2558 2559 Fix Coverity error CID 56886. 2560 2561 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 2562 2563- [Gregor Jasny brought this change] 2564 2565 Re-start loop if select fails 2566 2567 Fix Coverity error CID 56882 2568 2569 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 2570 2571- [Gregor Jasny brought this change] 2572 2573 Free temporary variable in error path 2574 2575 Fix Coverity CID 56890 2576 2577 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 2578 2579- [Gregor Jasny brought this change] 2580 2581 Fix integer shift overflow if both tcp_socket and udp_socket are set 2582 2583 The problem occurs if at the start of the loop the sockindex is at the 2584 last valid ARES_GETSOCK_MAXNUM position. If then both udp_socket and 2585 tcp_socket are valid, sockindex gets incremented for UDP first and 2586 points one entry behind the array for the tcp block. 2587 So the fix is to check after every increment of sockindex if it is still 2588 valid. 2589 2590 Fix Coverity error CID 56878 2591 2592 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 2593 2594- [Gregor Jasny brought this change] 2595 2596 Null check before dereference 2597 2598 Fix Coverity error CID 56880 2599 2600 Signed-off-by: Gregor Jasny <gjasny@googlemail.com> 2601 2602Jakub Hrozek (28 Jul 2014) 2603- [Gisle Vanem brought this change] 2604 2605 Comment in ares_ipv6.h 2606 2607David Drysdale (25 Jul 2014) 2608- CONTRIBUTING: add file to indicate mailing list is preferred 2609 2610- Add -t u option to ahost 2611 2612 Add an option to allow specification of the AF_UNSPEC 2613 address family. 2614 2615Jakub Hrozek (24 Jul 2014) 2616- host_callback: Fall back to AF_INET on searching with AF_UNSPEC 2617 2618 Previously, when an ares_gethostbyname() searched with AF_UNSPEC and the 2619 first AF_INET6 call only returned CNAMEs, the host_callback never 2620 retried AF_INET. 2621 2622 This patch makes sure than on ARES_SUCCESS, the result of AF_INET6 is 2623 taken as authoritative only if the result contains some addresses. 2624 2625- [David Drysdale brought this change] 2626 2627 Move memset call below platform-specific declarations 2628 2629 A GitHub commenter [1] says that my recent change to ahost.c has 2630 problems compiling on Windows + C89 platforms. 2631 2632 [1] https://github.com/bagder/c-ares/commit/ee22246507c9#commitcomment-6587616 2633 2634- [David Drysdale brought this change] 2635 2636 Update ahost man page to describe -s option. 2637 2638 Commit ee22246507c9 added the -s <domain> option to the 2639 ahost command, but neglected to update the man page to 2640 describe it. 2641 2642 Also fix typo in description of -t option. 2643 2644- ares_parse_soa_reply: Do not leak rr_name on allocation failure 2645 2646 If ares_malloc_data failed, already allocated rr_name would go out of 2647 scope. 2648 2649- [David Drysdale brought this change] 2650 2651 Don't override explicitly specified search domains 2652 2653 Only set search domains from /etc/resolv.conf if there isn't a value 2654 already present in the channel. 2655 2656- [David Drysdale brought this change] 2657 2658 Allow specification of search domain in ahost 2659 2660 Add the "-s domain" command line option to override the search 2661 domains. 2662 2663Daniel Stenberg (12 May 2014) 2664- Revert "ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address" 2665 2666 This reverts commit 440110b303fdbfadb3ad53d30eeb98cc45d70451. 2667 2668- [Frederic Germain brought this change] 2669 2670 ares_parse_aaaa_reply: fix leak when reply contains 1 alias and no address 2671 2672- [Doug Kwan brought this change] 2673 2674 ares_build.h: fix building on 64-bit powerpc 2675 2676 There are two issues. 2677 2678 1. gcc actually does not use __ppc__ and __ppc64__ but __PPC__ and 2679 __PPC64__. The tests of __ILP32__ and __LP64__ are sufficient for gcc. 2680 2681 2. clang defines __GNU__ and defines both __ppc64__ and __ppc__ when 2682 targeting ppc64. This makes CARES_SIZEOF_LONG to be 4 on a ppc64 system 2683 when building with clang. 2684 2685 My patch is two change the order of the checks so that we check the 2686 64-bit case first. 2687 2688- refresh: updated now with automake 1.14 2689 2690- [David Drysdale brought this change] 2691 2692 single_domain: Invalid memory access for empty string input 2693 2694 We noticed a small buglet in ares_search() when it gets an empty string 2695 as input -- the single_domain() utility function in ares_search.c 2696 accesses invalid memory (before the start of the string). 2697 2698Guenter Knauf (31 Aug 2013) 2699- Fixed warning 'type specifier missing'. 2700 2701Daniel Stenberg (30 Aug 2013) 2702- [Tor Arntsen brought this change] 2703 2704 ares_rules.h: CARES_SIZEOF_LONG doesn't exist anymore, don't test for it 2705 2706 It was removed in f19387dd72432 2707 2708- nowarn: use <limits.h> instead of configure for size of long 2709 2710 This makes the header file much more multi-arch friendly and can be used 2711 as-is with both 32 bit and 64 bit builds. 2712 2713- timeoffset: made static and private 2714 2715 ares__timeoffset() was only used once within this single source file 2716 2717- timeadd: make static 2718 2719 ares__timeadd() was only ever used from within the same source 2720 2721Yang Tse (18 Jul 2013) 2722- xc-am-iface.m4: comments refinement 2723 2724- configure: fix 'subdir-objects' distclean related issue 2725 2726 See XC_AMEND_DISTCLEAN comments for details. 2727 2728- configure: automake 1.14 compatibility tweak (use XC_AUTOMAKE) 2729 2730- xc-am-iface.m4: provide XC_AUTOMAKE macro 2731 2732Daniel Stenberg (12 May 2013) 2733- gitignore: ignore all ares_*pdf but also CHANGES.dist 2734 2735- bump: start working towards 1.10.1 2736 2737Version 1.10.0 (12 May 2013) 2738 2739Daniel Stenberg (12 May 2013) 2740- RELEASE-NOTES: two more bug fixes 2741 2742- [Keith Shaw brought this change] 2743 2744 ares_set_servers_csv: fixed IPv6 address parsing 2745 2746 Fixed bug that caused the last part of an IPv6 address to be parsed as 2747 the port number when the last part is all numeric. 2748 2749- nroff: fix two syntax mistakes 2750 2751 ares_parse_a_reply and ares_parse_aaaa_reply both had two \fB instead of 2752 \fP 2753 2754 Reported-by: Alexander Klauer 2755 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-03/0010.shtml 2756 2757- [Alex Loukissas brought this change] 2758 2759 build: fix build on msvc11 2760 2761- Makefile.am: increment -version-info for 1.10.0 release 2762 2763- README: remove unnecessary comment 2764 2765- ares_version.h: copyright end range year is now 2013 2766 2767- RELEASE-NOTES: synced with fb0737f3a0a1c37 2768 2769- [Paul Saab brought this change] 2770 2771 ares_parse_aaaa_reply: Plug memory leak 2772 2773 This change is similar to ares_parse_a_reply.c in commit 2774 bffd67f16a8f42fe6dbf79ab2e39d92eea05c8a6 2775 2776- [Patrick Valsecchi brought this change] 2777 2778 ares_parse_txt_reply: return a ares_txt_reply node for each sub-string 2779 2780 Previously, the function would wrongly return all substrings merged into 2781 one. 2782 2783- [Alexander Klauer brought this change] 2784 2785 library init: documentation update 2786 2787 This commit updates the documentation of ares_library_init() and 2788 ares_library_cleanup() with regard to the newly introduced reference 2789 counting of initializations and deinitializations. 2790 2791- [Alexander Klauer brought this change] 2792 2793 library init: be recursive 2794 2795 Previously, a single call to ares_library_cleanup() would deinitialise 2796 the c-ares library, regardless of how many times ares_library_init() was 2797 called. This behaviour may cause problems in programs linking two or 2798 more libraries which, in turn, use c-ares. The present commit fixes this 2799 problem, deinitializing the library only after a number of calls to 2800 ares_library_cleanup() matching the number of calls to 2801 ares_library_init(). 2802 2803- [Patrick Valsecchi brought this change] 2804 2805 protocol parsing: check input data stricter 2806 2807 ... so that bad length fields aren't blindly accepted 2808 2809 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2013-04/0016.shtml 2810 2811Guenter Knauf (11 Apr 2013) 2812- Create ares_build.h when buidling from Git. 2813 2814- Added -DCARES_STATICLIB to CFLAGS. 2815 2816 Currently this static makefile does only support building the 2817 static library libcares.a. 2818 2819Daniel Stenberg (8 Apr 2013) 2820- [Alexander Klauer brought this change] 2821 2822 .gitignore: ignore patch files 2823 2824 This commit adds a line to .gitignore to the effect that patch files 2825 generated by 'git format-patch' are excluded from the repository. 2826 2827- [Alexander Klauer brought this change] 2828 2829 ares_destroy() documentation: no new requests 2830 2831 Clarify that no new requests may be added to a resolver channel that is 2832 currently being destroyed. 2833 2834- [Alexander Klauer brought this change] 2835 2836 Documentation: properly document ARES_ECANCELLED 2837 2838 This commit clarifies the behaviour of ares_cancel() with respect to 2839 callbacks and adds missing documentation of ARES_ECANCELLED to the man 2840 pages of the affected functions. 2841 2842- [Alexander Klauer brought this change] 2843 2844 ares_cancel(): cancel requests safely 2845 2846 An invocation of ares_cancel() walks through the request list, calling 2847 the callbacks of all pending requests on a channel. Previously, if such 2848 a callback added a new request to the channel, the request list might 2849 not end up empty, causing an abort by assertion failure. The present 2850 commit ensures that precisely all requests present upon entry of 2851 ares_cancel() are cancelled, and that adding new requests through 2852 callbacks is safe. 2853 2854Yang Tse (10 Mar 2013) 2855- ares.h: stricter CARES_EXTERN linkage decorations logic 2856 2857 No API change involved. 2858 2859- ares_build.h.dist: enhance non-configure GCC ABI detection logic 2860 2861 GCC specific adjustments: 2862 2863 - check __ILP32__ before 32 and 64bit processor architectures in 2864 order to detect ILP32 programming model on 64 bit processors 2865 which, of course, also support LP64 programming model, when using 2866 gcc 4.7 or newer. 2867 2868 - keep 32bit processor architecture checks in order to support gcc 2869 versions older than 4.7 which don't define __ILP32__ 2870 2871 - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor 2872 architecture checks for older versions which don't define __LP64__ 2873 2874Daniel Stenberg (9 Mar 2013) 2875- ares.h: there is no ares_free_soa function 2876 2877Yang Tse (9 Mar 2013) 2878- Makefile.am: empty AM_LDFLAGS definition for automake 1.7 compatibility 2879 2880- ares_inet_ntop.3: s/socklen_t/ares_socklen_t 2881 2882- configure: use XC_LIBTOOL for portability across libtool versions 2883 2884- xc-lt-iface.m4: provide XC_LIBTOOL macro 2885 2886- Makefile.am: use AM_CPPFLAGS instead of INCLUDES 2887 2888- inet_ntop.c: s/socklen_t/ares_socklen_t 2889 2890- inet_ntop.c: s/socklen_t/ares_socklen_t for portability 2891 2892Daniel Stenberg (19 Feb 2013) 2893- ares.h: s/socklen_t/ares_socklen_t for portability 2894 2895- ares_inet_ntop.3: 4th argument is socklen_t! 2896 2897- spell inet correctly! 2898 2899- ares_inet_pton/ntop: cleanup 2900 2901 Make sure that the symbols are always exported and present in c-ares. 2902 2903 Make the headers prefixed with 'ares'. 2904 2905 Removed the inet_ntop.h version as it no longer features any content. 2906 2907- ares_inet_ntop/ares_inet_pton: added man pages 2908 2909Yang Tse (15 Feb 2013) 2910- [Gisle Vanem brought this change] 2911 2912 curl_setup_once.h: definition of HAVE_CLOSE_S defines sclose() to close_s() 2913 2914- [Gisle Vanem brought this change] 2915 2916 config-dos.h: define HAVE_CLOSE_S for MSDOS/Watt-32 2917 2918- [Gisle Vanem brought this change] 2919 2920 config-dos.h: define strerror() to strerror_s_() for High-C 2921 2922Daniel Stenberg (13 Feb 2013) 2923- ares_get_datatype: removed unused function 2924 2925 it was also wrongly named as internal functions require two underscores 2926 2927- ares__bitncmp: use two underscores for private functions 2928 2929 It used a single one previously making it look like a public one 2930 2931- ares__generate_new_id: moved to ares_query.c 2932 2933 ... and ares__rc4 is turned into a local static function. 2934 2935- ares__swap_lists: make private and static 2936 2937 ... since there's only one user, make it static within ares_process.c 2938 2939Yang Tse (13 Feb 2013) 2940- Makefile.msvc: add four VS version strings 2941 2942Daniel Stenberg (13 Feb 2013) 2943- ares_expand_name.3: clarify how to free the data 2944 2945Yang Tse (30 Jan 2013) 2946- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2 2947 2948 - Fix a pair of single quotes to double quotes. 2949 2950 URL: http://curl.haxx.se/mail/lib-2013-01/0355.html 2951 Reported by: Tor Arntsen 2952 2953- zz40-xc-ovr.m4: fix 'wc' detection - follow-up 2954 2955 - Take into account that 'wc' may return leading spaces and/or tabs. 2956 2957 - Set initial IFS to space, tab and newline. 2958 2959- zz40-xc-ovr.m4: fix 'wc' detection 2960 2961 - Take into account that 'wc' may return leading spaces. 2962 2963 - Set internationalization behavior variables. 2964 2965 Tor Arntsen analyzed and reported the issue. 2966 2967 URL: http://curl.haxx.se/mail/lib-2013-01/0351.html 2968 2969- zz40-xc-ovr.m4: check another three basic utilities 2970 2971- zz40-xc-ovr.m4: 1.0 interface stabilization 2972 2973 - Stabilization results in 4 public interface m4 macros: 2974 XC_CONFIGURE_PREAMBLE 2975 XC_CONFIGURE_PREAMBLE_VER_MAJOR 2976 XC_CONFIGURE_PREAMBLE_VER_MINOR 2977 XC_CHECK_PATH_SEPARATOR 2978 - Avoid one level of internal indirection 2979 - Update comments 2980 - Drop XC_OVR_ZZ40 macro 2981 2982- zz40-xc-ovr.m4: emit witness message in configure BODY 2983 2984 This avoids witness message in output when running configure --help, 2985 while sending the message to config.log for other configure runs. 2986 2987- zz40-xc-ovr.m4: truly do version conditional overriding 2988 2989 - version conditional overriding 2990 - catch unexpanded XC macros 2991 - fix double words in comments 2992 2993- zz40-xc-ovr.m4: fix variable assignment of subshell output bashism 2994 2995 Tor Arntsen analyzed and reported the issue. 2996 2997 URL: http://curl.haxx.se/mail/lib-2013-01/0306.html 2998 2999- zz40-xc-ovr.m4: reinstate strict AC_REQUIRE macro dependencies 3000 3001- zz40-xc-ovr.m4: avoid double single-quote usage 3002 3003- zz40-xc-ovr.m4: parentheses balancing of 'case' statements 3004 3005 m4 quadrigraph shell comment technique allows proper autoconf 3006 parentheses balancing in shell 'case' statements. The presence 3007 of unbalanced parentheses may otherwise trigger expansion bugs. 3008 3009- zz40-xc-ovr.m4: internals overhauling 3010 3011 - Update comments 3012 - Execute commands in subshells 3013 - Faster path separator check 3014 - Fix missing 'test' command 3015 - Rename private macros 3016 - Minimize AC_REQUIRE usage 3017 3018- zz40-xc-ovr.m4: redirect errors and warnings to stderr 3019 3020- configure: use XC_CONFIGURE_PREAMBLE early checks 3021 3022 Some basic checks we make were placed early enough in generated 3023 configure script when using autoconf 2.5X versions. Newer autoconf 3024 versions expand these checks much further into the configure script, 3025 rendering them useless. Using XC_CONFIGURE_PREAMBLE fixes placement 3026 of early intended checks across all our autoconf supported versions. 3027 3028- zz40-xc-ovr.m4: provide XC_CONFIGURE_PREAMBLE macro 3029 3030- configure: autotools compatibility fixes - step I 3031 3032 Fix proper macro expansion order across autotools versions for 3033 C compiler and preprocessor program checks. 3034 3035- configure: fix automake 1.13 compatibility 3036 3037 Tested with: 3038 3039 buildconf: autoconf version 2.69 3040 buildconf: autom4te version 2.69 3041 buildconf: autoheader version 2.69 3042 buildconf: automake version 1.13.1 3043 buildconf: aclocal version 1.13.1 3044 buildconf: libtool version 2.4 3045 buildconf: GNU m4 version 1.4.16 3046 3047- ares_private.h: use again memdebug.h instead of curl_memdebug.h 3048 3049- configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS 3050 3051 automake 1.13 errors if AM_CONFIG_HEADER is used in configure script. 3052 3053- cares-override.m4: provide AC_CONFIG_MACRO_DIR definition conditionally 3054 3055 Provide a 'traceable' AC_CONFIG_MACRO_DIR definition only when using 3056 an autoconf version that does not provide it, instead of what we were 3057 doing up to now of providing and overriding AC_CONFIG_MACRO_DIR for 3058 all autoconf versions. 3059 3060- ares_private.h: use curl_memdebug.h instead of memdebug.h 3061 3062- vc6cares.dsp: add ares_create_query.c and ares_parse_soa_reply.c 3063 3064- cares-functions.m4: improve gethostname arg 2 data type check 3065 3066- setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions. 3067 3068 Also reverts commit bceb40095a 3069 3070- configure: check if compiler halts on function prototype mismatch 3071 3072- cares-functions.m4: add gethostname arg 2 data type check and definition 3073 3074- cares-functions.m4: update thread-safeness detection of getaddrinfo() 3075 3076 Take in account that POSIX standard Issue 7 drops h_errno support. Now, we also 3077 consider getaddrinfo() to be thread-safe when (_POSIX_C_SOURCE >= 200809L) or 3078 (_XOPEN_SOURCE >= 700) independently of whether h_errno exists or not. 3079 3080 Take in account that h_errno might be a modifiable lvalue not defined as 3081 a C preprocessor macro. 3082 3083- setup_once.h: HP-UX <sys/socket.h> issue workaround 3084 3085 Issue: When building a 32bit target with large file support HP-UX 3086 <sys/socket.h> header file may simultaneously provide two different 3087 sets of declarations for sendfile and sendpath functions, one with 3088 static and another with external linkage. Given that we do not use 3089 mentioned functions we really don't care which linkage is the 3090 appropriate one, but on the other hand, the double declaration emmits 3091 warnings when using the HP-UX compiler and errors when using modern 3092 gcc versions resulting in fatal compilation errors. 3093 3094 Mentioned issue is now fixed as long as we don't use sendfile nor 3095 sendpath functions. 3096 3097- setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h> 3098 3099 Inclusion of these two header files now done in setup_once.h 3100 3101- Header inclusion clean-up 3102 3103 Remove header inclusions already done in setup_once.h 3104 3105- setup_once.h: HP-UX specific TRUE and FALSE definitions 3106 3107 Some HP-UX system headers require TRUE defined to 1 and FALSE to 0. 3108 3109- ares_timeout.c: fix compiler warning 3110 3111- ares_create_query.c: IRIX compilation fix 3112 3113- c-ares/nameser.h: add some T_* defines for ns_t_* values 3114 3115Daniel Stenberg (7 Nov 2012) 3116- Revert "ares_parse_aaaa_reply: fix memory leak" 3117 3118 This reverts commit 50f25d8a4b2d16f4c5e0ef620238688b7a315c7a. 3119 3120- ares_parse_aaaa_reply: fix memory leak 3121 3122 an allocated buffer was not freed in the successful case. 3123 3124- [Gisle Vanem brought this change] 3125 3126 adig: perror() doesn't work for socket errors on windows 3127 3128 ... so print the SOCKERRNO instead 3129 3130- get_DNS_AdaptersAddresses: fix IPv6 parsing 3131 3132 Use of the wrong define made the function not parse IPv6 addresses 3133 properly. 3134 3135 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-06/0028.shtml 3136 Reported by: Saúl Ibarra Corretgé 3137 3138- version: bumped to 1.10.0 3139 3140 Due to the newly added function: ares_create_query() 3141 3142- AUTHORS: synced with 83093ac450 3143 3144 Added 21 authors since this document was last updated 3145 3146- ares_create_query.3: mention when this is added 3147 3148- [hpopescu@ixiacom.com brought this change] 3149 3150 Added new feature (rfc2671) 3151 3152- code police: fix indents, < 80 columns, reflowed comments 3153 3154Guenter Knauf (11 Jul 2012) 3155- Cleaned up version awk script. 3156 3157Daniel Stenberg (30 Jun 2012) 3158- [Gisle Vanem brought this change] 3159 3160 read_udp_packets: bail out loop on bad sockets 3161 3162 I can see that recvfrom() in ares_process.c many times is called with 3163 'udp_socket' == ARES_SOCKET_BAD. The code takes care not to call 3164 recv/recvfrom with ARES_SOCKET_BAD in the outer-loop. So should the 3165 inner-loop. 3166 3167Yang Tse (29 Jun 2012) 3168- cares-compilers.m4: remove -Wstrict-aliasing=3 from clang 3169 3170 Currently it is unknown if there is any version of clang that 3171 actually supports -Wstrict-aliasing. What is known is that there 3172 are several that don't support it. 3173 3174- cares-compilers.m4: -Wstrict-aliasing=3 for warning enabled gcc and clang builds 3175 3176Daniel Stenberg (18 Jun 2012) 3177- version: work towards 1.9.2 (at least) 3178 3179Version 1.9.1 (18 Jun 2012) 3180 3181Daniel Stenberg (18 Jun 2012) 3182- RELEASE-NOTES: 1.9.1 coming up 3183 3184Version 1.9.0 (16 Jun 2012) 3185 3186Daniel Stenberg (16 Jun 2012) 3187- ares_version.h: next version is 1.9.0 3188 3189- [Marko Kreen brought this change] 3190 3191 ares_data.h: ARES_DATATYPE_SOA_REPLY is added in 1.9.0 3192 3193- RELEASE-NOTES: synced with 979bf951d 3194 3195 Next release deemed to become 1.9.0 due to the new function 3196 3197- [Marko Kreen brought this change] 3198 3199 SOA parser added 3200 3201 I need to do SOA queries, so here is a parser for them. 3202 3203 - ares_soa_reply: new struct 3204 - ares_malloc_data/ares_free_soa: ARES_DATATYPE_SOA_REPLY 3205 - ares_parse_soa_reply: actual function 3206 3207Yang Tse (14 Jun 2012) 3208- Kill compiler warning 3209 3210- Fix libcares.pc generation for static MingW* cross builds 3211 3212Daniel Stenberg (21 May 2012) 3213- [Nick Alcock brought this change] 3214 3215 Fix UDP and TCP port byte order in saved options. 3216 3217 The UDP and TCP port are stored in network byte order in the 3218 ares_channeldata, but are passed in to ares_init_options() in host byte 3219 order. Thus we must return them from ares_save_options() in host byte 3220 order too, or a duplicated channel will convert them again, leading to a 3221 nonfunctional channel and a mysterious connection refused error from 3222 ares_gethostbyname(). This breaks ares_dup(), thus the curl easy API 3223 when c-ares is used by curl, and thus all the curl easy API's users. 3224 3225Yang Tse (28 Apr 2012) 3226- version: start working on 1.8.1-DEV 3227 3228Version 1.8.0 (27 Apr 2012) 3229 3230Daniel Stenberg (27 Apr 2012) 3231- RELEASE-NOTES: call next 1.8 instead 3232 3233 Since we added a function, let's use a stricter bumping scheme 3234 3235Yang Tse (25 Apr 2012) 3236- INSTALL: some adjustments 3237 3238Daniel Stenberg (25 Apr 2012) 3239- GIT-INFO: mention buildconf 3240 3241Yang Tse (25 Apr 2012) 3242- INSTALL: remove more sections that don't apply to c-ares 3243 3244- ares_timeout.c: fix compiler warning 3245 3246Daniel Stenberg (25 Apr 2012) 3247- [Ben Noordhuis brought this change] 3248 3249 Makefile.m32: fix mingw32 build 3250 3251 * add . to include path so ares_build.h is picked up 3252 * make ar configurable to ease cross-compiling 3253 3254- RELEASE-NOTES: added what's happened since 1.7.5 3255 3256Guenter Knauf (22 Apr 2012) 3257- Updated copyright year. 3258 3259Yang Tse (21 Apr 2012) 3260- ares_init.c: Further refactoring of Windows system's DNS fetching code 3261 3262Guenter Knauf (20 Apr 2012) 3263- Android: small changes to dns property part. 3264 3265 Prefix prop vars; kill var; use DNS_PROP_NAME_PREFIX macro. 3266 3267- Handle CNAME-only in ares_parse_aaaa_reply(). 3268 3269 posted to the c-ares list by Peter Griess <pg@std.in>. 3270 3271- Add support for multiple DNS servers on Android. 3272 3273 Before, c-ares always used the first DNS server on Android, causing 3274 network problems if this DNS server was not available. 3275 3276 Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> 3277 3278- Added INSTALL so it gets into tarballs. 3279 3280- Added some more ifdefs to silent compiler warnings. 3281 3282Yang Tse (17 Apr 2012) 3283- INSTALL: remove a non c-ares section 3284 3285- cares-compilers.m4: -Wno-pedantic-ms-format for Windows gcc 4.5 builds 3286 3287 When building a Windows target with gcc 4.5 or newer and strict compiler 3288 warnings enabled use -Wno-pedantic-ms-format in addition to other flags. 3289 3290- setup_once.h: tighten requirements for stdbool.h header inclusion 3291 3292 Include stdbool.h only when it is available and configure is capable of 3293 detecting a proper 'bool' data type when the header is included. 3294 3295- configure: NATIVE_WINDOWS no longer defined in config file 3296 3297- cares-compilers.m4: double underscore decoration for visibility attribute 3298 3299- build adjustments: CARES_SYMBOL_HIDING no longer defined in config files 3300 3301 configure script now provides conditional definitions for Makefile.am 3302 that result in CARES_SYMBOL_HIDING being defined by resulting makefiles 3303 when appropriate. 3304 3305- configure: Windows cross-compilation fixes 3306 3307 CARES_BUILDING_LIBRARY and CARES_STATICLIB no longer defined in ares_config.h, 3308 configure will generate appropriate conditionals so that mentioned symbols 3309 get defined and used in Makefile derived from Makefile.am at compilation time. 3310 3311Guenter Knauf (17 Apr 2012) 3312- Added INSTALL file adapted from libcurl. 3313 3314 Not yet ready, and needs further edits. 3315 3316Yang Tse (16 Apr 2012) 3317- ares_init.c: get_iphlpapi_dns_info() refactoring 3318 3319Guenter Knauf (16 Apr 2012) 3320- Kill some more compiler warnings. 3321 3322- Kill compiler warning about unused var. 3323 3324- Fixed my last commit: wrong preprocessor directive. 3325 3326- Check for __ANDROID__ in addition to ANDROID macro. 3327 3328- Check for __ANDROID__ in addition to ANDROID macro. 3329 3330 Posted to c-ares list by Wayne. 3331 3332- Fix for Android to disable useless arpa/nameser.h. 3333 3334- Fix for Android to include sys/select.h for fd_set. 3335 3336Yang Tse (17 Mar 2012) 3337- ares_data.c: some NAPTR related fixes 3338 3339Daniel Stenberg (16 Mar 2012) 3340- port numbers: convert them to network order! 3341 3342 When the config options ARES_OPT_UDP_PORT or ARES_OPT_TCP_PORT are used, 3343 make sure to convert them to network byte order! 3344 3345 Bug: http://c-ares.haxx.se/mail/c-ares-archive-2012-02/0004.shtml 3346 3347- white space cleanup 3348 3349 - Keep code within 80 columns 3350 3351 - Removed funny spaces after open paren and before closing paren 3352 3353- [Poul Thomas Lomholt brought this change] 3354 3355 get_iphlpapi_dns_info: fix buffer overrun 3356 3357 I experienced a buffer overrun exception in c-ares on Windows and 3358 tracked it down to be an error in the calculation of the 'left' variable 3359 in get_iphlpapi_dns_info(). 3360 3361 I changed the variable type of 'left' to a _signed_ type because of the 3362 subtraction arithmetic; not sure if a long is the best choice 3363 3364- Merge pull request #7 from saghul/naptr 3365 3366 Added support for parsing NAPTR records 3367 3368saghul (23 Feb 2012) 3369- Added support for parsing NAPTR records 3370 3371Yang Tse (19 Jan 2012) 3372- ares_init.c: fix compiler warning on winsock builds 3373 3374- configure: libtool 1.5 tweaks 3375 3376Daniel Stenberg (19 Dec 2011) 3377- ares_timeout.3: fix the NAME section 3378 3379 It was clearly a copy n' paste error 3380 3381Yang Tse (27 Sep 2011) 3382- [Albert Chin brought this change] 3383 3384 configure - m4: make CURL_CHECK_DEF ignore leading whitespace on symbol def 3385 3386 When using Sun C compiler the preprocessor somehow inserts an extra space 3387 in front of replaced symbol, breaking CURL_CHECK_DEF macro. To workaround 3388 this, macro CURL_CHECK_DEF now ignores all leading whitespace in front of 3389 symbol substitution result. 3390 3391- ares_init.c: fix segfault triggered in ares_init_options() upon previous 3392 failure of init_by_defaults() and incomplete cleanup there. 3393 3394- ares_process.c: fix compiler warning 3395 3396- fix MSVC compiler warning 'conditional expression is constant' 3397 3398- setup_once.h cleanup and sync 3399 3400- [Denis Bilenko brought this change] 3401 3402 ares_getnameinfo: fix random results with c-ares 1.7.5 3403 3404 In ares_getnameinfo memcpy did not copy enough bytes, causing 3405 it to return arbitrary memory contents as a result. 3406 3407- warnings: fix another 'conversion may lose significant bits' compiler warning 3408 3409- ares_dns.h: adjust DNS__16BIT and DNS__32BIT macro definitions 3410 3411 Fixing compiler warnings existing definitions triggered on these. 3412 3413- ares_destroy.c: fix segfault in ares_destroy_options() 3414 3415Daniel Stenberg (21 Aug 2011) 3416- ares_parse_srv_reply: silence compiler warnings 3417 3418 ... by adding ugly typecasts. 3419 3420- CHANGES: generate from script 3421 3422 The CHANGES file is now generated automatically with 'git2changes.pl', 3423 invoked by the maketgz script which is used to build release archives. 3424 3425 The former human edited CHANGES file was renamed to CHANGES.0 in git. 3426 3427Yang Tse (21 Aug 2011) 3428- Makefile.netware: SIZEOF_SHORT definition 3429 3430- warnings: fix some 'conversion may lose significant bits' compiler warnings 3431 3432- configure: fix symbol hiding usability check 3433 3434 A more thorough test is done now in order to determine visibility attribute 3435 usability, given that some compilers don't support visibility attribute on 3436 all configurations. 3437 3438Daniel Stenberg (16 Aug 2011) 3439- 1.7.6: start working... 3440 3441Version 1.7.5 (16 Aug 2011) 3442 3443Daniel Stenberg (16 Aug 2011) 3444- CHANGES: synced for 1.7.5 release 3445 3446- RELEASE-NOTES: synced with bb4096effef7f000 3447 3448Jakub Hrozek (15 Aug 2011) 3449- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses 3450 3451Yang Tse (10 Aug 2011) 3452- [Gisle Vanem brought this change] 3453 3454 ares_iphlpapi.h: Watcom C fix 3455 3456 Added "!defined(_WS2DEF_)" since Watcom doesn't have 3457 a per type guard for the typedefs 'CSADDR_INFO' (that MingW has) or 3458 'SOCKET_ADDRESS' (that MSVC has). But we can use the header-guard for 3459 <ws2def.h> instead. 3460 3461- [Gisle Vanem brought this change] 3462 3463 Makefile.Watcom: 3464 * The 'NTDDI_VERSION' needs to be raised to 0x05010000 3465 in order for SOCKADDR_STORAGE etc. to be typedefed. 3466 * Replaced '-dUSE_WATT32' with '-dWATT32'. 3467 * Added $(DEMOS) to the 'all' target and removed the 'demos' 3468 target to be consistent with e.g. Makefile.msvc etc. 3469 * 'ENABLE_IPV6' is no longer used. Hence removed the '%use_ipv6' construct. 3470 * object-file order seems to be important (Watcom v.19). Hence 3471 'ares_getopt.obj' must be put after the .obj that references getopt(). 3472 3473- cares-compilers.m4: CARES_CONVERT_INCLUDE_TO_ISYSTEM adjustments 3474 3475 Add CARES_CHECK_COMPILER as a requirement. 3476 3477 Ensure macro does nothing unless GNU_C or CLANG compiler is used. 3478 3479 This should allow usage of this macro in unforeseen placements. 3480 3481- config-win32.h: comments adjustments - followup 3482 3483- config-win32.h: comments adjustments 3484 3485Daniel Stenberg (5 Aug 2011) 3486- [Tom Hughes brought this change] 3487 3488 ares_parse_a_reply: fix memleak 3489 3490Yang Tse (29 Jul 2011) 3491- cares-functions.m4 serial # bump 3492 3493- Revert "configure: additional flag checks for fcntl() and socket()" 3494 3495 This reverts commit 5f2a3b0e48f26d24cb1fefea0dccb92d417dcbf7. 3496 3497- configure: additional flag checks for fcntl() and socket() 3498 3499- xc-translit.m4 fix quoting 3500 3501- configure: avoid direct usage of AS_TR_* macros 3502 3503- xc-translit.m4 provides transliteration macros with well defined behavior. 3504 3505Jakub Hrozek (15 Jun 2011) 3506- Revert "Only fall back to AF_INET searches when looking for AF_UNSPEC addresses" 3507 3508 This reverts commit b5823d65706af687c0e5110af8f0cfdcd068997d. 3509 3510 This patch was not reviewed properly before pushing 3511 3512- Revert "Do not use sized constants in public headers" 3513 3514 This reverts commit 22c01e96f7b2ae9923e1baa50bfe3c0d22297a7d. 3515 3516 This is a Red Hat specific patch that does not belong into upstream 3517 3518- Use correct sizeof in ares_getnameinfo() 3519 3520- Do not leak rr_name on failures inside ares_parse_ptr_reply 3521 3522- Do not leak rr_name on failures inside ares_parse_a_reply 3523 3524- Do not leak rr_name on failures inside ares_parse_aaaa_reply 3525 3526- Do not leak rr_name on failures inside ares_parse_ns_reply 3527 3528- Fix incorrect sizeof() in ares_save_options 3529 3530- Fix incorrect allocation in ares_parse_ptr_reply() 3531 3532- Only fall back to AF_INET searches when looking for AF_UNSPEC addresses 3533 3534- Do not use sized constants in public headers 3535 3536Daniel Stenberg (13 Jun 2011) 3537- [Jakub Hrozek brought this change] 3538 3539 ares_free_hostent(NULL) should be a noop 3540 3541Yang Tse (8 Jun 2011) 3542- configure: fix recvfrom 5th arg type qualifier detection (followup) 3543 3544- configure: fix recvfrom 5th arg type qualifier detection 3545 3546 Additionally remove whitespace from EOL 3547 3548Daniel Stenberg (4 Jun 2011) 3549- strlen: use size_t to receive the return 3550 3551Yang Tse (4 Jun 2011) 3552- xlc: avoid preprocessor definition usage when linking 3553 3554- ares_nowarn: icc 9.1 workaround 3555 3556- ares_nowarn: header inclusion fix 3557 3558- ares_init: make ares_private.h last included header again 3559 3560- compiler warning: fix 3561 3562 Fix compiler warning: conversion may lose significant bits 3563 3564- compiler warning: fix 3565 3566 Fix compiler warning: variable was set but never used 3567 3568 Fix compiler warning: clobber ignored 3569 3570- ares_iphlpapi: fix compiler warnings 3571 3572- winsock: compilation fixes 3573 3574 Provide winsock iphlpapi alternative definitions to prevent compilation 3575 failures when using a variety of winsock header implementations. 3576 3577Daniel Stenberg (17 May 2011) 3578- [David Stuart brought this change] 3579 3580 IPv6-on-windows: find DNS servers correctly 3581 3582- man pages: docs for the c-ares utility programs 3583 3584- ares_parse_ns_reply.c: remove CVSism 3585 3586Yang Tse (27 Mar 2011) 3587- build: fix header inclusion 3588 3589- getservbyport replacement for Win CE 3590 3591- renamed getplatform() to ares__getplatform() to avoid namespace pollution 3592 3593- configure: fix libtool warning 3594 3595 Recent versions of libtool are now tracing usage of AC_CONFIG_MACRO_DIR 3596 macro and warn heavily when not used in configure script along with 3597 ACLOCAL_AMFLAGS in Makefile.am. So in order to make libtool happy 3598 while keeping backwards compatibility this is added. 3599 3600- adig: RFC4034 resource record type detection 3601 3602 Can be tested with: adig -s 8.8.8.8 -t ANY example.com 3603 3604- nameser.h: RFC4034 resource record type definitions 3605 3606- build: move platform stuff to ares_platform.c and ares_platform.h 3607 3608- build: find out windows platform using GetVersionEx() 3609 3610- build: use getenv() replacement function for systems which lack it 3611 3612- setup_once: system error codes for Windows CE 3613 3614- ares_search: use ERRNO macro for portability sake 3615 3616- System's errno.h inclusion cleanup follow-up. 3617 3618 System's errno.h is conditionally included from setup_once.h 3619 3620- Windows CE specific adjustment 3621 3622 All versions of Windows CE support Winsock 1.1 3623 3624- System's errno.h inclusion cleanup. 3625 3626 System's errno.h is conditionally included from setup_once.h 3627 3628- ares_init: fix gethostname error detection on winsock platforms 3629 3630- configure: r-enable temporarily disabled detection of system's inet_ntop() 3631 3632 Detection was temporarily disabled in commit 674e044ccb21f2f63537da53565fce868f 3633 3634Daniel Stenberg (15 Mar 2011) 3635- configure: stop using the deprecated AM_INIT_AUTOMAKE syntax 3636 3637- [Gisle Vanem brought this change] 3638 3639 Watt-32: use errno 3640 3641 Make sure Watt-32 programs use 'errno' even on Win32 targets 3642 3643Guenter Knauf (18 Feb 2011) 3644- Removed commented CLFAGS no longer needed. 3645 3646- Fixed CFLAGS for NetWare. 3647 3648 Added -m32 to enable compilation with x86_64 compilers; 3649 added conditional to set -fpcc-struct-return only for gcc compiler. 3650 3651Daniel Stenberg (18 Feb 2011) 3652- [Gisle Vanem brought this change] 3653 3654 Watt32: fix server init 3655 3656 Somewhere in the process, programs using the Watt-32 tcp/ip stack 3657 stopped working. 3658 3659- [Dima Tisnek brought this change] 3660 3661 config_sortlist: (win32) missing else 3662 3663 Without an else there, contents of "pat" that could have been 3664 successfully set just above, may be clobbered by successive unsuccessful 3665 calls to "xxx_pton" or "ip_addr". 3666 3667Yang Tse (17 Jan 2011) 3668- Makefile.msvc: add a couple of VS version strings 3669 3670- Makefile.msvc: add a couple of VS version strings 3671 3672- build: add install target to Makefile.msvc 3673 3674Daniel Stenberg (27 Dec 2010) 3675- ares_set_servers_csv: remove unused variables 3676 3677- init_by_resolv_conf: fix compiler warnings 3678 3679 The code received the return codes in the 'status' variable without 3680 using it. Instead we just ignore those particular errors. 3681 3682- getv4: Value stored to 'dst' is never read 3683 3684- advance_tcp_send_queue: avoid NULL ptr dereference 3685 3686 If given a too large 'num_bytes' value, it would cause a NULL ptr 3687 dereference. Instead the code will now break out of the loop at the end 3688 of the list. 3689 3690- [Peter Pentchev brought this change] 3691 3692 configure: fix a bashism 3693 3694- cleanup: avoid unsafe typecasts 3695 3696 Avoid the risk of reading 16bit data from an unaligned address by using 3697 a macro that is adapted for this. 3698 3699- [Stefan Bühler brought this change] 3700 3701 ares_expand_name: Fix encoded length for indirect root 3702 3703Yang Tse (18 Dec 2010) 3704- build: add some explicit file references to VS project files 3705 3706- config-win32: provide HAVE_ASSERT_H definition 3707 3708- build: include ares_nowarn in sample program VS project files 3709 3710- build: include ares_nowarn among SAMPLESOURCES and SAMPLEHEADERS 3711 3712- configure: temporarily disable detection of system's inet_ntop() 3713 3714 This is done to allow compilation of ares_inet_ntop() by some daily 3715 builds picky compilers that otherwise do not need this function. 3716 3717- changes: mention last fix 3718 3719- ares_inet_ntop: remove definition and usage of macro SPRINTF 3720 3721 Existing definition of SPRINTF always resulted in sprintf() being used, 3722 and sprintf() returning 'int' is already used throughout the library. 3723 3724- ares_inet_ntop: reapply changes from previous c-ares version (III) 3725 3726 - Replace 'u_char' with 'unsigned char'. 3727 - Replace 'u_int' with 'unsigned int'. 3728 - use macros ERRNO and SET_ERRNO() for errno handling. 3729 3730- ares_inet_ntop: reapply changes from previous c-ares version (II) 3731 3732 - Remove rcsid. 3733 - Adjust header file inclusions. 3734 - ares_inet_ntop used only on systems without a proper inet_ntop function. 3735 3736- ares_inet_ntop: reapply changes from previous c-ares version (I) 3737 3738 - Replace tabs with spaces. 3739 - Use ANSI C style for function declarations and definitions. 3740 - Use sizeof with parentheses. 3741 3742- ares_inet_ntop: fix off by one error triggering out of bounds write 3743 3744 ares_inet_ntop would trigger an out of bounds write when the representation 3745 of the address required 15 characters, due to not taking in account null 3746 termination character. 3747 3748 Full import of inet_ntop.c from bind-9.5.3rc1 to pull additional fixes. 3749 3750- ares_nowarn: add conditional inclusion of assert.h header 3751 3752- fix compiler warning: conversion may lose significant bits 3753 3754- ares_inet_net_pton: fix non-rejection of some malformed literals 3755 3756 ares_inet_net_pton would return wrong values when excessively large, 3757 and invalid, netmasks are used. Fixes are from bind-9.5.3rc1, 3758 issue also described in the WLB-2008080064 advisory. 3759 3760- setup_once: provide ISASCII macro 3761 3762- configure: inet_net_pton function check adjustments 3763 3764 Define HAVE_INET_NET_PTON only when system's inet_net_pton function is IPv6 3765 capable and is not affected by the WLB-2008080064 advisory. 3766 3767 HAVE_INET_NET_PTON_IPV6 is no longer defined nor used. 3768 3769- ares_init: fix detection of semicolon comments in resolv.conf 3770 3771 File resolv.conf may either use a hash '#' or a semicolon ';' character as an 3772 indication that the rest of the line is a comment. This fixes not recognizing 3773 the semicolon as a valid comment indicator in resolv.conf. 3774 3775- version: start working on 1.7.5 3776 3777Version 1.7.4 (8 Dec 2010) 3778 3779Daniel Stenberg (8 Dec 2010) 3780- release-preps: CHANGES and RELEASE-NOTES synced 3781 3782- ares_set_local_*: added in 1.7.4, not before 3783 3784Yang Tse (3 Dec 2010) 3785- build: provide SIZEOF_SIZE_T definition for non-configure builds 3786 3787- build: config.dos renamed to config-dos.h 3788 3789- build: provide SIZEOF_SIZE_T netware definition 3790 3791- ares_gethostbyaddr: fix compiler warning: conversion may lose significant bits 3792 3793- configure: undo using autobuilds to temporarily verify strict aliasing warnings. 3794 3795- fix compiler warning: rounding, sign extension, or loss of accuracy may result 3796 3797Daniel Stenberg (2 Dec 2010) 3798- [Ben Noordhuis brought this change] 3799 3800 ares_parse_a_reply: fix CNAME response parsing 3801 3802 Reply to a CNAME query doesn't contain addresses, causing 3803 ares_parse_a_reply() to bail out with ARES_ENODATA 3804 3805 Bug: http://groups.google.com/group/nodejs/browse_thread/thread/a1268c9ea5e9ad9b 3806 3807Yang Tse (1 Dec 2010) 3808- fix compiler warning: conversion may lose significant bits 3809 3810- atoi: remove atoi usage 3811 3812- ares_init: fix compiler warning: conversion may lose significant bits 3813 3814- configure: fix autoconf warning 3815 3816- inet_pton: fix compiler warning 3817 3818- configure: use autobuilds to temporarily verify strict aliasing warnings. 3819 3820 Temporarily, When cross-compiling with gcc 3.0 or later, enable strict aliasing 3821 rules and warnings. Given that cross-compiled targets autobuilds do not run the 3822 test-suite, there is no risk of running code that violates strict aliasing rules 3823 3824- ares_getnameinfo: Partially revert commit 85520d66e0ac7ac73411bc25e98769a88b2f 3825 3826 Upon socket address family and length validation failure return ARES_ENOTIMP 3827 in callback again, this is the error code documented in man page and used 3828 mostly all over the library. 3829 3830- ares_getnameinfo: Validate socket address family and length. 3831 3832 Validate socket address family and that the socket address length is appropriate 3833 for the specified family. Failure is reported with ARES_EBADFAMILY in callback. 3834 3835- ares_getnameinfo: fix two compiler warnings 3836 3837- Added another VS10 version string 3838 3839- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'. 3840 3841- Revert commit 494274e653936335c255a47599970de3df21e7c4 3842 3843- configure: fix autoconf 2.68 warning: no AC_LANG_SOURCE call detected in body 3844 3845- Fix compiler warning: array subscript has type 'char' 3846 3847- Fix GCC 4 compiler warning 'dereferencing type-punned pointer might break strict-aliasing rules'. 3848 3849- Revert following commits: 3850 07bc7ea79509bcc9ef6e09151e81766ed00d3392 3851 3392a50ea3f8573ea4b7a9d82b9833dab60cb0e9 3852 9912637d32c9987719a1ea12db591aee2941891c 3853 3854 The purpose of the whole patch was to silence a compiler warning triggered 3855 with GCC 4 on file ares_process.c The specific compiler warning was 3856 'dereferencing type-punned pointer might break strict-aliasing rules'. 3857 3858 A simpler patch will follow to equally silence the warning. 3859 3860- ares_options: reorder header inclusions to make inclusion of 3861 ares_private.h the last included one again. 3862 3863Daniel Stenberg (12 Nov 2010) 3864- [Patrik Thunstrom brought this change] 3865 3866 adig: fix NAPTR parsing 3867 3868 I ran across a small "issue" in your adig example. 3869 3870 It is simply the last part of the NAPTR record, the replacement element, 3871 which is not a string, as currently handled in adig, but a domain name. 3872 3873- ares_save_options: assignments instead of memcpy 3874 3875- init_by_options: don't copy an empty sortlist 3876 3877 If there aren't any sort items to copy, don't bother. Without this 3878 little precaution it would do a malloc(0) which causes undefined 3879 behaviors and is frowned upon by curl's memdebug-system. 3880 3881Guenter Knauf (3 Oct 2010) 3882- Minor Watcom makefile tweaks. 3883 3884Daniel Stenberg (30 Sep 2010) 3885- [Mike Crowe brought this change] 3886 3887 Fix lookup with HOSTALIASES set. 3888 3889 ares__read_line returns ARES_EOF when it reaches the end of the 3890 file. This will happen every time when reading to the end of the 3891 HOSTALIASES file. Unfortunately single_domain treats this error as 3892 being fatal. 3893 3894 Signed-off-by: Mike Crowe <mac@mcrowe.com> 3895 3896Ben Greear (24 Aug 2010) 3897- Add missing break that caused get_ares_servers to fail. 3898 3899 Reported-by: Ning Dong <flintning@163.com> 3900 Signed-off-by: Ben Greear <greearb@candelatech.com> 3901 3902Yang Tse (11 Aug 2010) 3903- configure: werror related adjustments 3904 3905Guenter Knauf (8 Aug 2010) 3906- Added copyright string to ares_version.h and make use of it in other files. 3907 3908- Block created ares_build.h for NetWare to avoid usage from other platforms. 3909 3910- Fix to overwrite default libname. 3911 3912- Some more Watcom makefile massage ... 3913 3914- Some more Watcom makefile massage ... 3915 3916Ben Greear (4 Aug 2010) 3917- sock-addr-storage: Detect and deal with lack of .ss_family member. 3918 3919 AIX, at least, does not have sockaddr_storage.ss_family member. 3920 Detect this in the configure logic and use proper #ifdefs in the 3921 ares_process logic. 3922 3923 Signed-off-by: Ben Greear <greearb@candelatech.com> 3924 Tested-by: Tor Arntsen <tor@spacetec.no> 3925 3926Guenter Knauf (3 Aug 2010) 3927- Added Watcom makefile based on libcurl's Makefile.Watcom. 3928 3929Ben Greear (31 Jul 2010) 3930- typo: Fix compile bug for platforms that don't have sockaddr_storage. 3931 3932 Bug was introduced by me in previous commit. 3933 3934 Signed-off-by: Ben Greear <greearb@candelatech.com> 3935 3936- Fix aliasing warning in gcc 4.4.4 (at least). 3937 3938 Should be no functional change, though the code gets a bit 3939 ugglier. 3940 3941 Signed-off-by: Ben Greear <greearb@candelatech.com> 3942 3943Daniel Stenberg (31 Jul 2010) 3944- ares_set_servers_csv: use ISDIGIT 3945 3946 The IS*() set of macros are preferred to the regular is*() functions as 3947 they help us avoid the most common pitfalls. 3948 3949Ben Greear (30 Jul 2010) 3950- cast arg to isdigit to int 3951 3952 Looks like it might silence a warning on Netware build. 3953 3954 Signed-off-by: Ben Greear <greearb@candelatech.com> 3955 3956- remove all uses of uint32_t 3957 3958 Previous fix forgot a few. 3959 3960 Signed-off-by: Ben Greear <greearb@candelatech.com> 3961 3962- fix signed v/s unsigned casts warning in ares_gethostbyaddr.c 3963 3964 Signed-off-by: Ben Greear <greearb@candelatech.com> 3965 3966- local-bind-fixup: Fix inet_pton warning. 3967 3968 Conditionally include <arpa/inet.h> for inet_pton 3969 headers. 3970 3971 Signed-off-by: Ben Greear <greearb@candelatech.com> 3972 3973- build: Enable compiling with -Werror. 3974 3975 This helps find compile warnings because they simply break 3976 the build. 3977 3978 To use: 3979 ./configure --enable-warnings --enable-werror 3980 3981 Signed-off-by: Ben Greear <greearb@candelatech.com> 3982 3983- ipv6: Fix some build issues related to the local-bind feature. 3984 3985 Signed-off-by: Ben Greear <greearb@candelatech.com> 3986 3987Guenter Knauf (29 Jul 2010) 3988- Replaced uint32_t with unsigned int to fix broken builds on a couple of platforms. 3989 3990Daniel Stenberg (18 Jul 2010) 3991- [Ben Greear brought this change] 3992 3993 local-bind: Support binding to local interface/IPs 3994 3995 Add 3 new functions to set the local binding for the out-going 3996 socket connection, and add ares_set_servers_csv() to set a 3997 list of servers at once as a comma-separated string. 3998 3999 Signed-off-by: Ben Greear <greearb@candelatech.com> 4000 4001- version: now start on 1.7.4 4002 4003- [Andrew C. Morrow brought this change] 4004 4005 fix memory leak in ares_getnameinfo 4006 4007Version 1.7.3 (11 Jun 2010) 4008 4009Daniel Stenberg (11 Jun 2010) 4010- changelogs: updated for 1.7.3 4011 4012- [BogDan Vatra brought this change] 4013 4014 init: allow c-ares to work on Android OS 4015 4016- changelog: fill in the 1.7.2 changes 4017 4018- added another pdf to ignore 4019 4020Yang Tse (11 Jun 2010) 4021- add ares_parse_mx_reply.c to VS dsp file 4022 4023Daniel Stenberg (10 Jun 2010) 4024- tarball: add $(CSOURCES) $(HHEADERS) to EXTRA_DIST 4025 4026 It's not clear to me why we need this, but we apparently may 4027 otherwise not get all files bundled in the dist tarball. 4028 4029- version: start working on 1.7.3 4030 4031Version 1.7.2 (10 Jun 2010) 4032 4033Daniel Stenberg (10 Jun 2010) 4034- RELEASE-NOTES: 1.7.2 details added 4035 4036- [Jakub Hrozek brought this change] 4037 4038 ares_init: Last, not first instance of domain or search should win 4039 4040- style: make code less than 80 columns wide 4041 4042Yang Tse (31 May 2010) 4043- [Tor Arntsen brought this change] 4044 4045 improve alternative definition of bool to use enum instead of unsigned char 4046 4047- fix VS2010 compiler warnings 4048 4049Daniel Stenberg (18 Apr 2010) 4050- [Jérémy Lal brought this change] 4051 4052 added ares_parse_mx_reply 4053 4054- repair the file mode 4055 4056- remove all $Id$ lines 4057 4058- remove all .cvsignore files 4059 4060- spell fix 4061 4062 reported by Gregor Jasny on the mailing list 4063 4064- [Peter Pentchev brought this change] 4065 4066 Fix a couple of typos and grammar nits. 4067 4068- ignore the GPG signature files too 4069 4070- start the journey towards 1.7.2 4071 4072- no longer CVS tagging 4073 4074- ignore generated PDFs 4075 4076Version 1.7.1 (23 Mar 2010) 4077 4078Daniel Stenberg (23 Mar 2010) 4079- 1.7.1 4080 4081- made README the primary readme file 4082 4083 ... and did README.cares to contain a historic reason etc. 4084 4085- s/CVS/git 4086 4087- git now, not CVS 4088 4089- ignore lots of generated files 4090 4091- [Daniel Johnson brought this change] 4092 4093 Fix warnings for clang 4094 4095Yang Tse (17 Mar 2010) 4096- replaced intel compiler option -no-ansi-alias with -fno-strict-aliasing 4097 4098- update outdated serial number 4099 4100- fix compiler warning 4101 4102- watt32 compilation fix 4103 4104- Added another VS10 version string 4105 4106- fix line break 4107 4108- removed usage of 's6_addr', fixing compilation issue triggered with no 4109 longer using 'in6_addr' but only our 'ares_in6_addr' struct 4110 4111Daniel Stenberg (5 Mar 2010) 4112- Daniel Johnson provided fixes for building with the clang compiler 4113 4114Yang Tse (5 Mar 2010) 4115- Added IPv6 name servers support 4116 4117Gisle Vanem (5 Mar 2010) 4118- Ops!. Readded ares_nowarn.h. 4119 4120- Added ares_nowarn.c. 4121 4122Yang Tse (28 Feb 2010) 4123- Added SIZEOF_INT and SIZEOF_SHORT definitions for non-configure systems 4124 4125- Added ares_nowarn.* to VC6 project file 4126 4127- Added SIZEOF_INT definition 4128 4129- fix compiler warning 4130 4131- fix compiler warning 4132 4133- fix compiler warning 4134 4135Daniel Stenberg (17 Feb 2010) 4136- ares_reinit() 4137 4138 - To allow an app to force a re-read of /etc/resolv.conf etc, pretty much 4139 like the res_init() resolver function offers 4140 4141- - Tommie Gannert pointed out a silly bug in ares_process_fd() since it didn't 4142 check for broken connections like ares_process() did. Based on that, I 4143 merged the two functions into a single generic one with two front-ends. 4144 4145Yang Tse (30 Dec 2009) 4146- VMS specific preprocessor symbol checking adjustments 4147 4148- Mention last changes 4149 4150- - Fix configure_socket() to use ares_socket_t instead of int data type. 4151 4152- - Where run-time error checks enabling compiler option /GZ was used it is now 4153 replaced with equivalent /RTCsu for Visual Studio 2003 and newer versions. 4154 4155 - Compiler option /GX is now replaced with equivalent /EHsc for all versions. 4156 4157- - Ingmar Runge noticed that Windows config-win32.h configuration file 4158 did not include a definition for HAVE_CLOSESOCKET which resulted in 4159 function close() being inappropriately used to close sockets. 4160 4161Daniel Stenberg (30 Nov 2009) 4162- start working on 1.7.1 4163 4164Version 1.7.0 (27 Nov 2009) 4165 4166Yang Tse (27 Nov 2009) 4167- Preserve empty line following last target 4168 4169- - Larry Lansing fixed ares_parse_srv_reply to properly parse replies 4170 which might contain non-SRV answers, skipping over potential non-SRV 4171 ones such as CNAMEs. 4172 4173- When using icc, compile with -fpic and link with intel dynamic libraries. 4174 4175- Added 'currently' in italics to insist on transient situation. 4176 4177- Fix language 4178 4179- Daniel wants upcoming release to be 1.7.0 4180 4181- Mention last changes 4182 4183- - Removed from external interface preprocessor symbol definition for 4184 CARES_HAVE_ARES_FREE_DATA. Current functionality of ares_free_data() 4185 makes it unnecessary. 4186 4187- Added README.msvc 4188 4189- Changed c-ares naming conventions when using MSVC as described in README.msvc 4190 4191- - Mention other recent changes 4192 4193- - Jakub Hrozek renamed addrttl and addr6ttl structs to ares_addrttl and 4194 ares_addr6ttl in order to prevent name space pollution, along with 4195 necessary changes to code base and man pages.This change does not break 4196 ABI, there is no need to recompile existing applications. But existing 4197 applications using these structs with the old name will need source code 4198 adjustments when recompiled using c-ares 1.6.1. 4199 4200- - Jakub Hrozek fixed more function prototypes in man pages to sync them 4201 with the ones declared in ares.h 4202 4203- Make configure remove the ares_build.h file included in distribution tarballs. 4204 4205- Fix macro redefinition. 4206 4207- Fix name space pollution. 4208 4209- Allow using different extra import libraries for debug and release builds. 4210 4211- Add manifest stuff to msvc makefile 4212 4213- Sync man page with reality 4214 4215- Add missing external API decoration for ares_set_socket_callback() 4216 4217- Add ares_free_data() man page. 4218 4219- - Provide in external interface preprocessor symbol definitions for 4220 CARES_HAVE_ARES_FREE_DATA as an indication of function availability. 4221 4222- Remove typecast 4223 4224- Fix comment 4225 4226- Add ares_data.c and ares_data.h 4227 4228- Jakub Hrozek modified ares_parse_srv_reply() and ares_parse_txt_reply() API 4229 to return a linked lists of results. These were also modified to internally 4230 use the ares_data memory struct and as such its result must be free'ed with 4231 ares_free_data(). 4232 4233- Initial support for the generic ares_free_data() function that will allow 4234 applications to free memory allocated and returned by some c-ares funtions. 4235 4236- Make usage of calloc()'s arguments consistent with rest of code base 4237 4238- workaround icc 9.1 optimizer issue 4239 4240- Add icc fvisibility bug test 4241 4242- Fix icc 9.0 compiler warning: external definition with no prior declaration 4243 4244- Fix three var names 4245 4246- Add check for assert.h header file 4247 4248- getaddrinfo is fully thread safe on solaris versions which 4249 implement the function even when h_errno is not a macro. 4250 4251 The h_errno macro test now only done on systems for which there 4252 is no hard coded knowledge about getaddrinfo's thread safeness. 4253 4254- Remove files generated on previous buildconf/configure run 4255 4256- Remove enable-thread / disable-thread configure option. These were only placebo 4257 options. The library is always built as thread safe as possible on every system. 4258 4259- Refactor how preprocessor symbol _THREAD_SAFE definition is done. 4260 4261- Assume that getaddrinfo is thread safe, unless hard coded 4262 knowledge says the contrary or h_errno is not defined. 4263 4264- Related with the threadsafe capability of getaddrinfo: 4265 4266 - Constantine Sapuntzakis reported that Darwin 6.0 a.k.a. MAC OS X 10.2 4267 and newer have a threadsafe getaddrinfo. 4268 4269 - Fix Dragonfly BSD triplet detection. 4270 4271 - In case the hard-coded knowledge says that getaddrinfo is threadsafe, 4272 an additional check is done to verify that h_errno is also defined. 4273 If h_errno isn't defined, we finally assume that it isn't threadsafe. 4274 Jamie Lokier provided the inspiration for this extra check. 4275 4276- AIX 5.2 and newer have threadsafe getaddrinfo. 4277 4278 Add some comments to better understand what the regex's pretend to achieve. 4279 4280- HP-UX 11.11 and later have threadsafe getaddrinfo 4281 4282- Check if getaddrinfo is threadsafe when function check allows it to be used 4283 4284- Renamed fpGetNetworkParams and fpSystemFunction036 to avoid namespace pollution with static library 4285 4286- Add kernel32.lib 4287 4288- Mention last changes 4289 4290- Reinstate copyright symbol lost in previous commit 4291 4292- Make some strings different in resource file for debug or release builds 4293 4294- Ignore more subdirs 4295 4296- Fix compiler warning: conditional expression is constant 4297 4298- Sync linker and resource compiler options with Makefile.msvc 4299 4300- Follow Makefile.msvc subdirectory naming scheme, and sync compiler options 4301 4302- Updated MSVC makefile that allows building dynamic and static 4303 c-ares libraries in debug and release flavours. 4304 4305 Additionally each of the three sample programs is built against 4306 each of the four possible c-ares libraries, generating all this 4307 a total number of 12 executables and 4 libraries. 4308 4309- Test for USE_WINSOCK since it is more restrictive than WIN32 4310 4311- Make header inclusion depend on HAVE_*_H definition 4312 4313- Remove unneeded preprocessor directives 4314 4315- Adjust c-ares include paths for memory tracking enabled (--enable-curldebug) builds 4316 4317- source files used by sample programs 4318 4319- Renamed c-ares setup.h to ares_setup.h 4320 4321- Adjust include paths to take in account that currently: 4322 4323 c-ares with --enable-curldebug uses memdebug.h from libcurl's lib subdirectory. 4324 4325 memdebug.h needs access to libcurl's setup.h from libcurl's lib subdirectory 4326 and also needs access to libcurl's generated curl_config.h 4327 4328- Undo old temporary change once used for testing purposes 4329 4330- Mention many changes 4331 4332- Mention --enable-symbol-hiding configure option 4333 4334- Symbol hiding configure options renamed to the hopefully less ambiguous 4335 --enable-symbol-hiding and --disable-symbol-hiding as well as related 4336 macro names and some internal variables used for them. 4337 4338 Related configuration file preprocessor symbols named to 4339 CARES_SYMBOL_HIDING and CARES_SYMBOL_SCOPE_EXTERN. 4340 4341- Header inclusion depending on HAVE_* symbol. 4342 Fix two typos. 4343 4344- Comparison of the Initial revision of this file with ares_parse_a_reply.c 4345 shows that this one is actually a modified copy of ares_parse_a_reply.c. 4346 4347 In order to comply with ares_parse_a_reply.c's M.I.T. license, the old 4348 1998 M.I.T. copyright notice is now also preserved in this file the same 4349 as it is done in other ares_parse_*.c files. 4350 4351- Add CVS Id tag. 4352 Fix identation of some license lines. 4353 4354- Add CVS Id tag. 4355 4356- Fix comment 4357 4358- In no particular order, changed/fixed all of the following in 4359 ares_parse_txt_reply() current version: 4360 4361 - Fixed a couple of potential double free's. 4362 4363 - Fixed memory leaks upon out of memory condition. 4364 4365 - Fixed pointer arithmetic. 4366 4367 - Setting ntxtreply to zero upon entry for all failure cases. 4368 4369 - Changed data type to size_t for variables substr_len, str_len and 4370 the length member of ares_txt_reply struct. 4371 4372 - Avoided a couple of memcpy() calls. 4373 4374 - Changed i data type to unsigned int to prevent compiler warnings. 4375 4376 - Adjusted a comment. 4377 4378 - Use ARES_SUCCESS literal for successfull completion. 4379 4380 - Added CVS Id tag. 4381 4382- Add c-ares DLL resource file to distribution archive 4383 4384- ignore files 4385 4386- Empty subdir 4387 4388- Updated MSVC 6.0 workspace and project files that allows building 4389 dynamic and static c-ares libraries in debug and release flavours. 4390 4391 Additionally each of the three sample programs is built against 4392 each of the four possible c-ares libraries, generating all this 4393 a total number of 12 executables and 4 libraries. 4394 4395Daniel Stenberg (29 Oct 2009) 4396- no need to check for NULL pointers before dereferencing, as the pointers 4397 MUST be valid and they are dereferenced further down in the function 4398 unconditionally! 4399 4400- shorten the descriptions somewhat 4401 4402- update to the new struct name 4403 4404- Jakub Hrozek added ares_parse_txt_reply() for TXT parsing 4405 4406- use 'ares_srv_reply' for proper name-spacing 4407 4408Yang Tse (29 Oct 2009) 4409- Add reference for ares_parse_srv_reply.pdf 4410 4411- Add reference for ares_parse_srv_reply docs 4412 4413- External API function linkage decoration adjustment 4414 4415- External API function linkage decoration adjustment 4416 4417- Initial step towards the ability to reduce c-ares exported symbols 4418 based on the 'visibility' attribute for GNUC and __global for Sun 4419 compilers, taking also in account __declspec function decoration 4420 for Win32 and Symbian DLL's. 4421 4422 Introducing configure options --enable-hidden-symbols and 4423 --disable-hidden-symbols following libcurl's naming. 4424 4425- Fix comment 4426 4427- Fix spelling 4428 4429- Fix Pelles C Win32 target compilation issues 4430 4431- John Engelhart noticed an unreleased problem relative to a duplicate 4432 ARES_ECANCELLED error code value and missing error code description. 4433 4434- Fix compiler warning: local variable may be used without having been initialized 4435 4436- Use *_CHECK_PATH_SEPARATOR_REQUIRED to ensure that *_CHECK_PATH_SEPARATOR 4437 is only expanded and included once in the configure script. 4438 4439- Our _AS_PATH_SEPARATOR_PREPARE override is now m4_defun'd instead of m4_define'd 4440 due to autoconf 2.64 m4_require'ing it in _AS_SHELL_SANITIZE indirectly through 4441 _AS_PATH_WALK. 4442 4443- Fix compiler warning: argument is incompatible with corresponding format string conversion 4444 4445- Fix potential out-of-bounds read 4446 4447- Fix compiler warning: loop without body 4448 4449- Fix compiler warning 4450 4451- Fix compiler warning 4452 4453- Fix compiler warning 4454 4455- Fix compiler warning: addition result could be truncated before cast to bigger sized type 4456 4457- Overhauled ares__get_hostent() 4458 4459 - Fixing out of bounds memory overwrite triggered with malformed /etc/hosts file. 4460 - Improving parsing of /etc/hosts file. 4461 - Validating requested address family. 4462 - Ensuring that failures always return a NULL pointer. 4463 - Adjusting header inclusions. 4464 4465- Fix ssize_t redefinition errors on WIN64 reported by Alexey Simak 4466 4467- more files to ignore 4468 4469- Check if _REENTRANT definition is required to 4470 make errno available as a preprocessor macro. 4471 4472- Attempt to silence bogus compiler warning: "Potential null pointer dereference" 4473 4474- ignore more files 4475 4476Gisle Vanem (7 Sep 2009) 4477- Suppress warnings about unused prototypes in Watt32 and Win32 programs. 4478 4479- Update email address. 4480 4481- Update my email address. Add ares_config.h as dependency for 'make depend'. 4482 4483Yang Tse (6 Sep 2009) 4484- T_SRV portability check 4485 4486Gunter Knauf (5 Sep 2009) 4487- changed includes to match style how we do with all other *.c files. 4488 4489- changed u_int16_t to unsigned short because it is the only place within ares and curl where such a type would be used; 4490 also it broke many autobuilds. We should probably introduce an ares_port_t if we want to use a type here. 4491 4492Gisle Vanem (5 Sep 2009) 4493- Replace 'uint16_t' with 'u_int16_t' since the latter is used in ares.h. 4494 4495- 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. 4496 4497Daniel Stenberg (4 Sep 2009) 4498- - Jakub Hrozek added ares_parse_srv_reply() for SRV parsing 4499 4500Steinar H. Gunderson (27 Aug 2009) 4501- Support lookup of IPv4 literals in ares_gethostbyname(), even when the address family is set to AF_INET6. 4502 4503Gisle Vanem (3 Aug 2009) 4504- Remove call to LoadLibrary(). (leftover from debugging). 4505 4506- Fix bad sentence. 4507 4508Daniel Stenberg (3 Aug 2009) 4509- - Timo Teras changed the reason code used in the resolve callback done when 4510 ares_cancel() is used, to be ARES_ECANCELLED instead of ARES_ETIMEOUT to 4511 better allow the callback to know what's happening. 4512 4513- - Joshua Kwan fixed the init routine to fill in the defaults for stuff that 4514 fails to get inited by other means. This fixes a case of when the c-ares 4515 init fails when internet access is fone. 4516 4517Gunter Knauf (16 Jul 2009) 4518- test if adding ../lib to includes can fix the current break ... 4519 4520- 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. 4521 4522Yang Tse (21 Jun 2009) 4523- Refactor how libraries are checked for connect() function, follow-up. 4524 4525- Refactor how libraries are checked for connect() function, 4526 and check for connect() as it is done for other functions. 4527 4528Gisle Vanem (20 Jun 2009) 4529- Remove unneeded defines. 4530 4531- Use select_s() and not select(). 4532 4533Yang Tse (19 Jun 2009) 4534- sclose() function-like macro definition used to close a socket, 4535 now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL 4536 config file preprocessor definitions. 4537 4538- add CloseSocket camel case function check 4539 4540- check for socket() and closesocket() as it is done for other functions 4541 4542- Remove HAVE_CONFIG_H definition from here, 4543 CFLAGS from common.dj already defines it. 4544 4545- initial step towards decoupling c-ares from libcurl for DOS 4546 4547- don't ignore these subdirs, they must be removed first 4548 4549- Remove DEBUGBUILD symbol definition, is not required for programs using the library. 4550 4551- DEBUGBUILD symbol definition for debug builds 4552 4553- ignore some subdirs 4554 4555- fix comment 4556 4557- Try to make more clear that --enable-curldebug has nothing to do with --enable-debug for this library. 4558 4559- Revert last change, it is inappropriate. 4560 4561Gisle Vanem (12 Jun 2009) 4562- Replace CURLDEBUG with DEBUGBUILD. 4563 4564Yang Tse (11 Jun 2009) 4565- when running automake copy missing files instead of symlinking them 4566 4567- Adjusted to take in account that... 4568 4569 With the curl memory tracking feature decoupled from the debug build feature, 4570 CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows: 4571 4572 CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug) 4573 4574 DEBUGBUILD used for debug enabled specific code (--enable-debug) 4575 4576- c-ares' --enable-debug --enable-curldebug decoupling follow-up 4577 4578- mention last changes 4579 4580- Remove buildconf.bat from release and daily snapshot archives. 4581 4582 buildconf.bat is only for CVS tree builds. 4583 4584- Ensure that buildconf.bat does nothing unless it is used with a CVS checkout. 4585 4586- CVS-INFO file only present in CVS tree, never in release nor daily snapshot 4587 archives. Used as a sentinel file in buildconf.bat to differentiate CVS builds. 4588 4589Gisle Vanem (8 Jun 2009) 4590- Update comment about "ML". Removed "-D_USE_32BIT_TIME_T" (not a requirement). 4591 4592Yang Tse (8 Jun 2009) 4593- just comment it out 4594 4595- For debugging purposes... 4596 4597 Disable the '-export-symbols-regex' to discard this as the origin 4598 of link failures related with shared libraries and non-GNU linkers. 4599 4600- c-ares Makefile.am back to using $(top_builddir) for *_LDADD 4601 4602- c-ares' -no-undefined and --enable-curldebug adjustments 4603 4604- Use relative path to built c-ares tree libtool library 4605 4606- John E. Malmberg noticed that the configure script was failing to detect the 4607 timeval struct on VMS when building with _XOPEN_SOURCE_EXTENDED undefined due 4608 to definition taking place in socket.h instead of time.h 4609 4610- Fix compiler warning: out of bound access 4611 4612- fix compilation on AIX 4613 4614- c-ares' --enable-curldebug adjustments 4615 4616- Remove temporarily introduced memory leak. 4617 4618- Temporarily introduce a memory leak to verify curl debug memory tracking works. 4619 4620- Allow curl debug memory tracking when building a shared library on 4621 systems which support external, undefined, symbols in shared libraries. 4622 4623Daniel Stenberg (26 May 2009) 4624- language fix 4625 4626Yang Tse (26 May 2009) 4627- Make ares_init(), ares_dup() and ares_init_options() return ARES_ENOTINITIALIZED 4628 if library initialization has not been performed calling ares_library_init(). 4629 4630- c-ares's --enable-curldebug configure option decoupled from c-ares's --enable-debug 4631 4632- Prevent copying 'sourced' manpages for build targets that don't use them. 4633 4634Daniel Stenberg (23 May 2009) 4635- minor edits 4636 4637Yang Tse (21 May 2009) 4638- Include .pdf versions of c-ares man pages in distribution tarball. 4639 4640- Allow generation of .html and .pdf versions of c-ares man pages. 4641 4642Gisle Vanem (21 May 2009) 4643- $(OBJ_DIR)/ares_getopt.o must be cleaned explicitly. 4644 4645Yang Tse (20 May 2009) 4646- Mention last changes 4647 4648- Initial ares_library_cleanup(3) man page 4649 4650- Update man page 4651 4652- Update man page 4653 4654- Initial ares_library_init(3) man page attempt 4655 4656- Force revision update, to force CVS to update the $Id date string format 4657 4658- Add same copyright notice as other c-ares files 4659 4660- Fix case 4661 4662- Remove run-time requirement for advapi32.dll since 4663 c-ares can work even with no advapi32.dll at all. 4664 4665- Intentionally avoid checking if the address of SystemFunction036, a.k.a. 4666 RtlGenRandom, has been located or not. This function is only available on 4667 WinXP and later. When unavailable c-ares uses portable rand() function. 4668 4669- - Provide in external interface preprocessor symbol definitions for 4670 CARES_HAVE_ARES_LIBRARY_INIT and CARES_HAVE_ARES_LIBRARY_CLEANUP 4671 to ease the use of new capabilities. 4672 4673 - Move ares_version() prototype to ares.h 4674 4675- Introduction of ares_library_init() and ares_library_cleanup() 4676 4677- Introduction of ares_library_init() and ares_library_cleanup() 4678 4679- remove outdated comment 4680 4681- Fix preprocessor conditional expression 4682 4683- fiX *__SOCKLEN_T definitions for remaining targets 4684 4685- *__SOCKLEN_T definitions for OS400 already fixed 4686 4687- fIX *__SOCKLEN_T definitions for SYMBIAN32 and VMS targets 4688 4689Daniel Stenberg (11 May 2009) 4690- - Gregor Jasny made c-ares link with libtool 's -export-symbols-regex option to 4691 only expose functions starting with ares_. 4692 4693Yang Tse (11 May 2009) 4694- Remove experimental check. Currently there's no need for it. 4695 4696- Fix an m4 overquoting triggering a spurious 'AS_TR_CPP' symbol definition 4697 attempt in generated config.h 4698 4699- Proper naming for the experimental compiler test and moved to *-compilers.m4 4700 4701- Moved *_CHECK_COMPILER_HALT_ON_ERROR and *_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE to *-compilers.m4 along with other *_CHECK_COMPILER_* 4702 4703- fIX *__SOCKLEN_T definitions for OS400 and generic GCC targets 4704 4705- fIX *__SOCKLEN_T definitions for MVS and 370 targets 4706 4707- fIX *__SOCKLEN_T definitions for several Windows target tool-chains 4708 4709- HP-UX's X/Open network library requirement check follow-up 4710 4711- HP-UX's X/Open network library requirement check follow-up 4712 4713- Use build-time configured ares_socklen_t instead of socklen_t 4714 4715- David McCreedy's "TPF-platform specific changes to various files" patch follow-up 4716 4717Daniel Stenberg (1 May 2009) 4718- s/libcurl/c-ares 4719 4720- version number typo fix 4721 4722Yang Tse (1 May 2009) 4723- David McCreedy's "TPF-platform specific changes to various files" patch 4724