aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ipv6.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index e48ca5d45658..a2afb553d8b3 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -510,11 +510,9 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk,
510 510
511 memcpy(newnp, np, sizeof(struct ipv6_pinfo)); 511 memcpy(newnp, np, sizeof(struct ipv6_pinfo));
512 512
513 ipv6_addr_set(&newnp->daddr, 0, 0, htonl(0x0000FFFF), 513 ipv6_addr_set_v4mapped(newinet->daddr, &newnp->daddr);
514 newinet->daddr);
515 514
516 ipv6_addr_set(&newnp->saddr, 0, 0, htonl(0x0000FFFF), 515 ipv6_addr_set_v4mapped(newinet->saddr, &newnp->saddr);
517 newinet->saddr);
518 516
519 ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); 517 ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr);
520 518
@@ -971,10 +969,8 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
971 sk->sk_backlog_rcv = dccp_v6_do_rcv; 969 sk->sk_backlog_rcv = dccp_v6_do_rcv;
972 goto failure; 970 goto failure;
973 } else { 971 } else {
974 ipv6_addr_set(&np->saddr, 0, 0, htonl(0x0000FFFF), 972 ipv6_addr_set_v4mapped(inet->saddr, &np->saddr);
975 inet->saddr); 973 ipv6_addr_set_v4mapped(inet->rcv_saddr, &np->rcv_saddr);
976 ipv6_addr_set(&np->rcv_saddr, 0, 0, htonl(0x0000FFFF),
977 inet->rcv_saddr);
978 } 974 }
979 975
980 return err; 976 return err;