Skip to content
Snippets Groups Projects
Commit a51258b6 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

before using if2ip(), check if the address is an ip address and skip it if

it is.
parent 8894bd07
No related branches found
No related tags found
No related merge requests found
......@@ -1212,7 +1212,13 @@ CURLcode ftp_use_port(struct connectdata *conn)
bool sa_filled_in = FALSE;
if(data->set.ftpport) {
if(Curl_if2ip(data->set.ftpport, myhost, sizeof(myhost))) {
in_addr_t in;
/* First check if the given name is an IP address */
in=inet_addr(data->set.ftpport);
if((in == CURL_INADDR_NONE) &&
Curl_if2ip(data->set.ftpport, myhost, sizeof(myhost))) {
h = Curl_resolv(data, myhost, 0);
}
else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment