Commit 7a88efe9 authored by Chuck Lever's avatar Chuck Lever Committed by Trond Myklebust

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: default avatarChuck Lever <chuck.lever@oracle.com>
Acked-by: default avatarJeff Layton <jlayton@redhat.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent f1a89a11
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment