[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 225/411: curl: make sure setopt CURLOPT_IPRESOLVE passes on a lo
From: |
gnunet |
Subject: |
[gnurl] 225/411: curl: make sure setopt CURLOPT_IPRESOLVE passes on a long |
Date: |
Wed, 13 Jan 2021 01:20:40 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit ec1cb755bf859fae0ae5cb80a577067b8e76947e
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Sun Oct 4 23:05:21 2020 +0200
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
---
src/tool_getparam.c | 4 ++--
src/tool_operate.c | 7 +------
2 files changed, 3 insertions(+), 8 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 */
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 54c99e3bc..e3fec0b4a 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1855,12 +1855,7 @@ static CURLcode single_transfer(struct GlobalConfig
*global,
my_setopt(curl, CURLOPT_MAXFILESIZE_LARGE,
config->max_filesize);
- if(4 == config->ip_version)
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
- else if(6 == config->ip_version)
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V6);
- else
- my_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_WHATEVER);
+ my_setopt(curl, CURLOPT_IPRESOLVE, config->ip_version);
/* new in curl 7.15.5 */
if(config->ftp_ssl_reqd)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 348/411: KNOWN_BUGS: cmake: generated .pc file contains strange entries, (continued)
- [gnurl] 348/411: KNOWN_BUGS: cmake: generated .pc file contains strange entries, gnunet, 2021/01/12
- [gnurl] 318/411: hsts: remove debug code leftovers, gnunet, 2021/01/12
- [gnurl] 331/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 374/411: runtests: make 'c-ares' a "feature" to depend on, gnunet, 2021/01/12
- [gnurl] 378/411: vquic/ngtcp2.h: define local_addr as sockaddr_storage, gnunet, 2021/01/12
- [gnurl] 200/411: HISTORY: add some 2020 events, gnunet, 2021/01/12
- [gnurl] 247/411: libcurl.pc: make it relocatable, gnunet, 2021/01/12
- [gnurl] 254/411: CURLOPT_TCP_NODELAY.3: fix comment in example code, gnunet, 2021/01/12
- [gnurl] 255/411: CURLOPT_URL.3: clarify SCP/SFTP URLs are for uploads as well, gnunet, 2021/01/12
- [gnurl] 216/411: checksrc: warn on space after exclamation mark, gnunet, 2021/01/12
- [gnurl] 225/411: curl: make sure setopt CURLOPT_IPRESOLVE passes on a long,
gnunet <=
- [gnurl] 239/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 214/411: runtests: allow generating a binary sequence from hex, gnunet, 2021/01/12
- [gnurl] 238/411: THANKS: from 7.73.0 and .mailmap fixes, gnunet, 2021/01/12
- [gnurl] 340/411: release-notes.pl: detect #[number] better for Ref: etc, gnunet, 2021/01/12
- [gnurl] 352/411: KNOWN_BUGS: cmake: libspsl is not supported, gnunet, 2021/01/12
- [gnurl] 284/411: tool_operate: bail out proper on errors for parallel setup, gnunet, 2021/01/12
- [gnurl] 288/411: acinclude: detect manually set minimum macos/ipod version, gnunet, 2021/01/12
- [gnurl] 375/411: test506: make it not run in c-ares builds, gnunet, 2021/01/12
- [gnurl] 306/411: rtsp: error out on empty Session ID, unified the code, gnunet, 2021/01/12
- [gnurl] 266/411: KNOWN_BUGS: mention the individual cmake issues, gnunet, 2021/01/12