diff options
author | Yang Tse <yangsita@gmail.com> | 2008-11-17 19:08:35 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-11-17 19:08:35 +0000 |
commit | a15b6a6f86229de50f7622e23a6b19c040d3d4e1 (patch) | |
tree | dc93d77360b88ca4ba23482fe5592d5c06b92c3a /lib/if2ip.c | |
parent | 20d3e2b9675d4158625e8e413e5c09f65cb80cab (diff) | |
download | curl-a15b6a6f86229de50f7622e23a6b19c040d3d4e1.tar.gz |
the IP address we want/request/use from the interface is the 'local'
address, the one on the box libcurl is running, not the 'remote' one.
Diffstat (limited to 'lib/if2ip.c')
-rw-r--r-- | lib/if2ip.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/if2ip.c b/lib/if2ip.c index 1c82373f1..842cd9947 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -137,7 +137,7 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size) else { struct in_addr in; - struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr; + struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_addr; memcpy(&in, &s->sin_addr, sizeof(in)); ip = (char *) Curl_inet_ntop(s->sin_family, &in, buf, buf_size); } |