- 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]/"
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user