curl: make sure setopt CURLOPT_IPRESOLVE passes on a long

Previously, it would pass on a define (int) which could make libcurl
read junk as a value - which prevented the CURLOPT_IPRESOLVE option to
"take". This could then make test 2100 do two DoH requests instead of
one!

Fixes #6042
Closes #6043
This commit is contained in:
Daniel Stenberg 2020-10-04 23:05:21 +02:00
parent d3a3cacd3d
commit ec1cb755bf
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 3 additions and 8 deletions

View file

@ -1269,11 +1269,11 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
break;
case '4':
/* IPv4 */
config->ip_version = 4;
config->ip_version = CURL_IPRESOLVE_V4;
break;
case '6':
/* IPv6 */
config->ip_version = 6;
config->ip_version = CURL_IPRESOLVE_V6;
break;
case 'a':
/* This makes the FTP sessions use APPE instead of STOR */