diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-01-12 17:41:20 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-02-10 08:30:53 -0500 |
commit | 7a88efe9760de3bc75bde61b0a4c56dbb6cf2494 (patch) | |
tree | 36a5691bda0105a57ab84c376adf0afa3346e0b0 /net/sunrpc | |
parent | f1a89a118299df9e5afbaaedf83e5709a28632b6 (diff) | |
download | linux-7a88efe9760de3bc75bde61b0a4c56dbb6cf2494.tar.gz linux-7a88efe9760de3bc75bde61b0a4c56dbb6cf2494.tar.bz2 linux-7a88efe9760de3bc75bde61b0a4c56dbb6cf2494.zip |
SUNRPC: Don't display zero scope IDs
A zero scope ID means that it wasn't set, so we don't need to append
it to presentation format 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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/addr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 0756c5da12f4..f845d9d72f73 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c @@ -73,6 +73,8 @@ static size_t rpc_ntop6(const struct sockaddr *sap, 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", IPV6_SCOPE_DELIMITER, sin6->sin6_scope_id); |