mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 09:59:32 +00:00
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>
This commit is contained in:
parent
e33534d54f
commit
70dc78da2c
1 changed files with 2 additions and 3 deletions
|
@ -220,10 +220,9 @@ static int ip_map_parse(struct cache_detail *cd,
|
||||||
switch (address.sa.sa_family) {
|
switch (address.sa.sa_family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
/* Form a mapped IPv4 address in sin6 */
|
/* Form a mapped IPv4 address in sin6 */
|
||||||
memset(&sin6, 0, sizeof(sin6));
|
|
||||||
sin6.sin6_family = AF_INET6;
|
sin6.sin6_family = AF_INET6;
|
||||||
sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
|
ipv6_addr_set_v4mapped(address.s4.sin_addr.s_addr,
|
||||||
sin6.sin6_addr.s6_addr32[3] = address.s4.sin_addr.s_addr;
|
&sin6.sin6_addr);
|
||||||
break;
|
break;
|
||||||
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
|
||||||
case AF_INET6:
|
case AF_INET6:
|
||||||
|
|
Loading…
Reference in a new issue