diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-03 15:49:14 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 15:49:14 -0700 |
commit | 87e8b821ed8db3dab03d96cd542e29666bf210aa (patch) | |
tree | 0027060473aafbbb125655ba027319c8a1a665fc /net/sunrpc/addr.c | |
parent | 33cd9dfa3a13e3d8e41aef225a9f98169816723b (diff) | |
parent | 5e11611a5d22252f3f9c169a3c9377eac0c32033 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'net/sunrpc/addr.c')
-rw-r--r-- | net/sunrpc/addr.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 6dcdd251781..f845d9d72f7 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c @@ -71,8 +71,9 @@ 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; + if (sin6->sin6_scope_id == 0) return len; rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u", @@ -165,8 +166,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; |