From: Chuck Lever Date: Tue, 12 Jan 2010 22:41:20 +0000 (-0500) Subject: SUNRPC: Don't display zero scope IDs X-Git-Tag: v2.6.34-rc1~190^2~29 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a88efe9760de3bc75bde61b0a4c56dbb6cf2494;p=platform%2Fupstream%2Fkernel-adaptation-pc.git 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 Acked-by: Jeff Layton Signed-off-by: Trond Myklebust --- diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 0756c5d..f845d9d 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);