diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-07-30 21:55:26 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-07-30 21:55:26 +0000 |
commit | 5aed78e183e843a6935679d3ebdafd0c10b41114 (patch) | |
tree | 5f9426759bda1e85565fd5dce82d6a60be8f6892 /lib/connect.c | |
parent | 011e5dd86447ffc8eb2e491020cbe5a3f4cd071b (diff) |
- Phil Blundell added the CURLOPT_SCOPE option, as well as adjusted the URL
parser to allow numerical IPv6-addresses to be specified with the scope
given, as per RFC4007 - with a percent letter that itself needs to be URL
escaped. For example, for an address of fe80::1234%1 the HTTP URL is:
"http://[fe80::1234%251]/"
Diffstat (limited to 'lib/connect.c')
-rw-r--r-- | lib/connect.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/connect.c b/lib/connect.c index 6c736a42c..4018eb042 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -773,6 +773,13 @@ singleipconnect(struct connectdata *conn, *connected = FALSE; /* default is not connected */ +#ifdef CURLRES_IPV6 + if (conn->scope && (addr->family == AF_INET6)) { + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)&addr->addr; + in6->sin6_scope_id = conn->scope; + } +#endif + /* FIXME: do we have Curl_printable_address-like with struct sockaddr* as argument? */ #if defined(HAVE_SYS_UN_H) && defined(AF_UNIX) |