* [PATCH] sunrpc: Use helper to set v4 mapped addr in ip_map_parse
@ 2010-10-05 16:48 Pavel Emelyanov
2010-10-12 0:02 ` J. Bruce Fields
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Emelyanov @ 2010-10-05 16:48 UTC (permalink / raw)
To: J. Bruce Fields, linux-nfs@vger.kernel.org
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/sunrpc/svcauth_unix.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 8b378f9..560677d 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -220,10 +220,9 @@ static int ip_map_parse(struct cache_detail *cd,
switch (address.sa.sa_family) {
case AF_INET:
/* Form a mapped IPv4 address in sin6 */
- memset(&sin6, 0, sizeof(sin6));
sin6.sin6_family = AF_INET6;
- sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
- sin6.sin6_addr.s6_addr32[3] = address.s4.sin_addr.s_addr;
+ ipv6_addr_set_v4mapped(address.s4.sin_addr.s_addr,
+ &sin6.sin6_addr);
break;
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
case AF_INET6:
--
1.5.5.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] sunrpc: Use helper to set v4 mapped addr in ip_map_parse
2010-10-05 16:48 [PATCH] sunrpc: Use helper to set v4 mapped addr in ip_map_parse Pavel Emelyanov
@ 2010-10-12 0:02 ` J. Bruce Fields
0 siblings, 0 replies; 2+ messages in thread
From: J. Bruce Fields @ 2010-10-12 0:02 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: linux-nfs@vger.kernel.org
On Tue, Oct 05, 2010 at 08:48:02PM +0400, Pavel Emelyanov wrote:
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Thanks, applying.
(Assuming someone else is testing for ipv6 regressions, though--I don't
have a setup for it currently.)
--b.
> ---
> net/sunrpc/svcauth_unix.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
> index 8b378f9..560677d 100644
> --- a/net/sunrpc/svcauth_unix.c
> +++ b/net/sunrpc/svcauth_unix.c
> @@ -220,10 +220,9 @@ static int ip_map_parse(struct cache_detail *cd,
> switch (address.sa.sa_family) {
> case AF_INET:
> /* Form a mapped IPv4 address in sin6 */
> - memset(&sin6, 0, sizeof(sin6));
> sin6.sin6_family = AF_INET6;
> - sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
> - sin6.sin6_addr.s6_addr32[3] = address.s4.sin_addr.s_addr;
> + ipv6_addr_set_v4mapped(address.s4.sin_addr.s_addr,
> + &sin6.sin6_addr);
> break;
> #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> case AF_INET6:
> --
> 1.5.5.6
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-12 0:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 16:48 [PATCH] sunrpc: Use helper to set v4 mapped addr in ip_map_parse Pavel Emelyanov
2010-10-12 0:02 ` J. Bruce Fields
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).