aboutsummaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2014-12-16 13:29:01 +0100
committerPatrick Monnerat <pm@datasphere.ch>2014-12-16 13:52:06 +0100
commit9081014c2c467077723d5ae1d0081003b3eb3504 (patch)
treed7bd9122e6c111344321164b1e0048c1df3e7266 /lib/urldata.h
parent759d049ae819adc1e913950da4772b5a6163eb79 (diff)
IPV6: address scope != scope id
There was a confusion between these: this commit tries to disambiguate them. - Scope can be computed from the address itself. - Scope id is scope dependent: it is currently defined as 1-based local interface index for link-local scoped addresses, and as a site index(?) for (obsolete) site-local addresses. Linux only supports it for link-local addresses. The URL parser properly parses a scope id as an interface index, but stores it in a field named "scope": confusion. The field has been renamed into "scope_id". Curl_if2ip() used the scope id as it was a scope. This caused failures to bind to an interface. Scope is now computed from the addresses and Curl_if2ip() matches them. If redundantly specified in the URL, scope id is check for mismatch with the interface index. This commit should fix SF bug #1451.
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index a2dc1c362..79fcd9a4d 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -894,7 +894,7 @@ struct connectdata {
the ip_addr itself. */
char ip_addr_str[MAX_IPADR_LEN];
- unsigned int scope; /* address scope for IPv6 */
+ unsigned int scope_id; /* Scope id for IPv6 */
int socktype; /* SOCK_STREAM or SOCK_DGRAM */
@@ -1618,7 +1618,7 @@ struct UserDefined {
bool proxy_transfer_mode; /* set transfer mode (;type=<a|i>) when doing FTP
via an HTTP proxy */
char *str[STRING_LAST]; /* array of strings, pointing to allocated memory */
- unsigned int scope; /* address scope for IPv6 */
+ unsigned int scope_id; /* Scope id for IPv6 */
long allowed_protocols;
long redir_protocols;
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)