aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/ipv6.c
diff options
context:
space:
mode:
authorBrian Haley <brian.haley@hp.com>2009-10-07 16:58:25 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-07 16:58:25 -0400
commitb301e82cf8104cfddbe5452ebe625bab49597c64 (patch)
tree49d7f8c91833e0658bf4074c0022bbf34790ce47 /net/dccp/ipv6.c
parent86c36ce45dc2e2f022562c6481cd778f4cc381a9 (diff)
IPv6: use ipv6_addr_set_v4mapped()
Might as well use the ipv6_addr_set_v4mapped() inline we created last year. Signed-off-by: Brian Haley <brian.haley@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/ipv6.c')
-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;