projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e2e0fb
)
before checking for network interfaces using if2ip(), check that the given
author
Daniel Stenberg
<daniel@haxx.se>
Mon, 12 May 2003 13:06:48 +0000
(13:06 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Mon, 12 May 2003 13:06:48 +0000
(13:06 +0000)
name isn't an ip address
lib/connect.c
patch
|
blob
|
history
diff --git
a/lib/connect.c
b/lib/connect.c
index
1b7a55b
..
125d388
100644
(file)
--- a/
lib/connect.c
+++ b/
lib/connect.c
@@
-213,7
+213,11
@@
static CURLcode bindlocal(struct connectdata *conn,
char myhost[256] = "";
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
*/