* [PATCH 0/2] Fix IPv6 address handling in addr.c
@ 2010-01-12 22:40 Chuck Lever
[not found] ` <20100112223826.3167.13900.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2010-01-12 22:40 UTC (permalink / raw)
To: trond.myklebust; +Cc: linux-nfs
Two minor patches to net/sunrpc/addr.c to fix how sunrpc.ko handles
certain types of IPv6 addresses. Please consider these for 2.6.34.
---
Chuck Lever (2):
SUNRPC: Don't display zero scope IDs
SUNRPC: Deprecate support for site-local addresses
net/sunrpc/addr.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
--
chuck[dot]lever[at]oracle[dot]com
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <20100112223826.3167.13900.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>]
* [PATCH 1/2] SUNRPC: Deprecate support for site-local addresses [not found] ` <20100112223826.3167.13900.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> @ 2010-01-12 22:41 ` Chuck Lever 2010-01-12 22:41 ` [PATCH 2/2] SUNRPC: Don't display zero scope IDs Chuck Lever 1 sibling, 0 replies; 3+ messages in thread From: Chuck Lever @ 2010-01-12 22:41 UTC (permalink / raw) To: trond.myklebust; +Cc: linux-nfs RFC 3879 "formally deprecates" site-local IPv6 addresses. We interpret that to mean that the scope ID is ignored for all but link-local addresses. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Jeff Layton <jlayton@redhat.com> --- net/sunrpc/addr.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c index 6dcdd25..0756c5d 100644 --- a/net/sunrpc/addr.c +++ b/net/sunrpc/addr.c @@ -71,8 +71,7 @@ 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; rc = snprintf(scopebuf, sizeof(scopebuf), "%c%u", @@ -165,8 +164,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; ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] SUNRPC: Don't display zero scope IDs [not found] ` <20100112223826.3167.13900.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org> 2010-01-12 22:41 ` [PATCH 1/2] SUNRPC: Deprecate support for site-local addresses Chuck Lever @ 2010-01-12 22:41 ` Chuck Lever 1 sibling, 0 replies; 3+ messages in thread From: Chuck Lever @ 2010-01-12 22:41 UTC (permalink / raw) To: trond.myklebust; +Cc: linux-nfs 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> --- 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 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); ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-12 22:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-12 22:40 [PATCH 0/2] Fix IPv6 address handling in addr.c Chuck Lever
[not found] ` <20100112223826.3167.13900.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-01-12 22:41 ` [PATCH 1/2] SUNRPC: Deprecate support for site-local addresses Chuck Lever
2010-01-12 22:41 ` [PATCH 2/2] SUNRPC: Don't display zero scope IDs Chuck Lever
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.