[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 272/282: socks4: fix host resolve regression
From: |
gnunet |
Subject: |
[gnurl] 272/282: socks4: fix host resolve regression |
Date: |
Wed, 01 Apr 2020 14:32:17 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit f0e81605451b363617889820e17a35c262fdee78
Author: Daniel Stenberg <address@hidden>
AuthorDate: Sun Mar 8 17:24:50 2020 +0100
socks4: fix host resolve regression
1. The socks4 state machine was broken in the host resolving phase
2. The code now insists on IPv4-only when using SOCKS4 as the protocol
only supports that.
Regression from #4907 and 4a4b63d, shipped in 7.69.0
Reported-by: amishmm on github
Bug: https://github.com/curl/curl/issues/5053#issuecomment-596191594
Closes #5061
---
lib/socks.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/socks.c b/lib/socks.c
index 754726f6f..37099130e 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -205,6 +205,8 @@ CURLcode Curl_SOCKS4(const char *proxy_user,
switch(sx->state) {
case CONNECT_SOCKS_INIT:
+ /* SOCKS4 can only do IPv4, insist! */
+ conn->ip_version = CURL_IPRESOLVE_V4;
if(conn->bits.httpproxy)
infof(conn->data, "SOCKS4%s: connecting to HTTP proxy %s port %d\n",
protocol4a ? "a" : "", hostname, remote_port);
@@ -261,8 +263,8 @@ CURLcode Curl_SOCKS4(const char *proxy_user,
}
else {
result = Curl_resolv_check(data->conn, &dns);
- /* stay in the state or error out */
- return result;
+ if(!dns)
+ return result;
}
/* FALLTHROUGH */
CONNECT_RESOLVED:
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows, (continued)
- [gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows, gnunet, 2020/04/01
- [gnurl] 251/282: libssh: Fix matching user-specified MD5 hex key, gnunet, 2020/04/01
- [gnurl] 256/282: tool_cb_see: set correct copyright year range, gnunet, 2020/04/01
- [gnurl] 254/282: config-win32: Windows does not have ftruncate, gnunet, 2020/04/01
- [gnurl] 262/282: runtests: fix missing use of exe_ext helper function, gnunet, 2020/04/01
- [gnurl] 261/282: ares: store dns parameters for duphandle, gnunet, 2020/04/01
- [gnurl] 266/282: lib1564: reduce number of mid-wait wakeup calls, gnunet, 2020/04/01
- [gnurl] 260/282: version: make curl_version* thread-safe without using global context, gnunet, 2020/04/01
- [gnurl] 269/282: test 1560: avoid valgrind false positives, gnunet, 2020/04/01
- [gnurl] 271/282: silly web server: silent a compilation warning, gnunet, 2020/04/01
- [gnurl] 272/282: socks4: fix host resolve regression,
gnunet <=
- [gnurl] 263/282: mime: latch last read callback status., gnunet, 2020/04/01
- [gnurl] 246/282: multi: skip EINTR check on wakeup socket if it was closed, gnunet, 2020/04/01
- [gnurl] 253/282: pause: force a connection (re-)check after unpausing, gnunet, 2020/04/01
- [gnurl] 273/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 267/282: sha256: Added SecureTransport implementation, gnunet, 2020/04/01
- [gnurl] 265/282: mime: fix the binary encoder to handle large data properly, gnunet, 2020/04/01
- [gnurl] 275/282: runtests: log minimal and maximal used port numbers, gnunet, 2020/04/01
- [gnurl] 279/282: test1129: fix invalid case of closing XML-tag and Content-Length, gnunet, 2020/04/01
- [gnurl] 274/282: sftp: fix segfault regression introduced by #4747, gnunet, 2020/04/01
- [gnurl] 277/282: tests/data: fix static ip:port instead of dynamic values being used, gnunet, 2020/04/01