Skip to content

Commit

Permalink
SUNRPC: Deprecate support for site-local addresses
Browse files Browse the repository at this point in the history
RFC 3879 "formally deprecates" site-local IPv6 addresses.  We
interpret that to mean that the scope ID is ignored for all but
link-local addresses.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Feb 10, 2010
1 parent 97cefcc commit f1a89a1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/sunrpc/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ static size_t rpc_ntop6(const struct sockaddr *sap,
if (unlikely(len == 0))
return len;

if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) &&
!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_SITELOCAL))
if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL))
return len;

rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u",
Expand Down Expand Up @@ -165,8 +164,7 @@ static int rpc_parse_scope_id(const char *buf, const size_t buflen,
if (*delim != IPV6_SCOPE_DELIMITER)
return 0;

if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL) &&
!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_SITELOCAL))
if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL))
return 0;

len = (buf + buflen) - delim - 1;
Expand Down

0 comments on commit f1a89a1

Please sign in to comment.