mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
before checking for network interfaces using if2ip(), check that the given
name isn't an ip address
This commit is contained in:
parent
2e2e0fba60
commit
871358a6e5
@ -213,7 +213,11 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|||||||
char myhost[256] = "";
|
char myhost[256] = "";
|
||||||
in_addr_t in;
|
in_addr_t in;
|
||||||
|
|
||||||
if(Curl_if2ip(data->set.device, myhost, sizeof(myhost))) {
|
/* First check if the given name is an IP address */
|
||||||
|
in=inet_addr(data->set.device);
|
||||||
|
|
||||||
|
if((in == INADDR_NONE) &&
|
||||||
|
Curl_if2ip(data->set.device, myhost, sizeof(myhost))) {
|
||||||
/*
|
/*
|
||||||
* We now have the numerical IPv4-style x.y.z.w in the 'myhost' buffer
|
* We now have the numerical IPv4-style x.y.z.w in the 'myhost' buffer
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user