aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sunrpc/addr.c2
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,
73 73
74 if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)) 74 if (!(ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL))
75 return len; 75 return len;
76 if (sin6->sin6_scope_id == 0)
77 return len;
76 78
77 rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u", 79 rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u",
78 IPV6_SCOPE_DELIMITER, sin6->sin6_scope_id); 80 IPV6_SCOPE_DELIMITER, sin6->sin6_scope_id);