]> git.ipfire.org Git - thirdparty/curl.git/commit
hostip: move code to resolve IP address literals to `Curl_resolv`
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 6 Jan 2020 11:56:44 +0000 (12:56 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Fri, 10 Jan 2020 16:57:16 +0000 (17:57 +0100)
commit875314ed0bf3b7c156e8762f30e1a2c11fb301ba
tree7bef5ef432dd5cd66f35d68b452e4e59a8301ea8
parent062eaa63b57fb30d893ee718015eae277ec5e300
hostip: move code to resolve IP address literals to `Curl_resolv`

The code was duplicated in the various resolver backends.

Also, it was called after the call to `Curl_ipvalid`, which matters in
case of `CURLRES_IPV4` when called from `connect.c:bindlocal`. This
caused test 1048 to fail on classic MinGW.

The code ignores `conn->ip_version` as done previously in the
individual resolver backends.

Move the call to the `resolver_start` callback up to appease test 655,
which wants it to be called also for literal addresses.

Closes https://github.com/curl/curl/pull/4798
lib/asyn-ares.c
lib/asyn-thread.c
lib/hostip.c
lib/hostip4.c