mirror of
https://github.com/curl/curl.git
synced 2026-07-24 20:17:17 +03:00
socks5: use appropriate ATYP for numerical IP address host names
When not resolving the address locallly (known as socks5h). Add test 719 and 720 to verify. Reported-by: Peter Piekarski Fixes #8216 Closes #8217
This commit is contained in:
parent
53a3e90e06
commit
effd2bd7ba
5 changed files with 143 additions and 7 deletions
|
|
@ -5,7 +5,7 @@
|
|||
* | (__| |_| | _ <| |___
|
||||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -513,6 +513,7 @@ static curl_socket_t sockit(curl_socket_t fd)
|
|||
logmsg("Request too short: %d, expected %d", rc, 4 + len + 2);
|
||||
return CURL_SOCKET_BAD;
|
||||
}
|
||||
logmsg("Received ATYP %d", type);
|
||||
|
||||
if(!config.port) {
|
||||
unsigned char *portp = &buffer[SOCKS5_DSTADDR + len];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue