]> git.ipfire.org Git - thirdparty/curl.git/commit
CURLOPT_IPRESOLVE: preventing wrong IP version from being used
authorLucas Clemente Vella <lvella@gmail.com>
Sat, 24 Apr 2021 19:04:53 +0000 (20:04 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 20 May 2021 14:58:31 +0000 (16:58 +0200)
commit84d2839740ca78041ac7419d9aaeac55c1e1c729
treeaee6202a7815b0cce0e1a2b9179c3b4421e7fb9a
parentac54b10933749d4c17d9568532ff2f1ed64c119a
CURLOPT_IPRESOLVE: preventing wrong IP version from being used

In some situations, it was possible that a transfer was setup to
use an specific IP version, but due do DNS caching or connection
reuse, it ended up using a different IP version from requested.

This commit changes the effect of CURLOPT_IPRESOLVE from simply
restricting address resolution to preventing the wrong connection
type being used, when choosing a connection from the pool, and
to restricting what addresses could be used when establishing
a new connection.

It is important that all addresses versions are resolved, even if
not used in that transfer in particular, because the result is
cached, and could be useful for a different transfer with a
different CURLOPT_IPRESOLVE setting.

Closes #6853
docs/libcurl/curl_easy_setopt.3
docs/libcurl/opts/CURLOPT_IPRESOLVE.3
docs/libcurl/opts/CURLOPT_RESOLVE.3
include/curl/curl.h
lib/asyn-ares.c
lib/asyn-thread.c
lib/connect.c
lib/doh.c
lib/hostip6.c
lib/url.c
tests/data/test1082