aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2010-10-05 12:48:02 -0400
committerJ. Bruce Fields <bfields@redhat.com>2010-10-11 20:00:17 -0400
commit70dc78da2cc76e7804c597fea3a0aff67ec8d7ad (patch)
tree2a547a8457b27a8efd9fe56488dd7ef73e81de6b /net
parente33534d54f1fde3e541f64fa5ad0dd379fc45fa7 (diff)
sunrpc: Use helper to set v4 mapped addr in ip_map_parse
Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/svcauth_unix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 8b378f91f255..560677d187f1 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,
220 switch (address.sa.sa_family) { 220 switch (address.sa.sa_family) {
221 case AF_INET: 221 case AF_INET:
222 /* Form a mapped IPv4 address in sin6 */ 222 /* Form a mapped IPv4 address in sin6 */
223 memset(&sin6, 0, sizeof(sin6));
224 sin6.sin6_family = AF_INET6; 223 sin6.sin6_family = AF_INET6;
225 sin6.sin6_addr.s6_addr32[2] = htonl(0xffff); 224 ipv6_addr_set_v4mapped(address.s4.sin_addr.s_addr,
226 sin6.sin6_addr.s6_addr32[3] = address.s4.sin_addr.s_addr; 225 &sin6.sin6_addr);
227 break; 226 break;
228#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 227#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
229 case AF_INET6: 228 case AF_INET6: