summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-10-04 23:05:21 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-10-05 10:06:58 +0200
commitec1cb755bf859fae0ae5cb80a577067b8e76947e (patch)
treeb7278d71a92a326e2916944f20fae07b4fabcfa2 /src/tool_getparam.c
parentd3a3cacd3d8e384ea0cf07d3b9d4e58ba488a6e1 (diff)
downloadcurl-ec1cb755bf859fae0ae5cb80a577067b8e76947e.tar.gz
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
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 7977c3dc6..910a5a2f9 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -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 */