diff options
author | Brian Haley <brian.haley@hp.com> | 2009-10-07 13:58:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-07 13:58:25 -0700 |
commit | b301e82cf8104cfddbe5452ebe625bab49597c64 (patch) | |
tree | 49d7f8c91833e0658bf4074c0022bbf34790ce47 /net/dccp | |
parent | 86c36ce45dc2e2f022562c6481cd778f4cc381a9 (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')
-rw-r--r-- | net/dccp/ipv6.c | 12 |
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, memcpy(newnp, np, sizeof(struct ipv6_pinfo)); - ipv6_addr_set(&newnp->daddr, 0, 0, htonl(0x0000FFFF), - newinet->daddr); + ipv6_addr_set_v4mapped(newinet->daddr, &newnp->daddr); - ipv6_addr_set(&newnp->saddr, 0, 0, htonl(0x0000FFFF), - newinet->saddr); + ipv6_addr_set_v4mapped(newinet->saddr, &newnp->saddr); ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); @@ -971,10 +969,8 @@ static int dccp_v6_connect(struct sock *sk, struct sockaddr *uaddr, sk->sk_backlog_rcv = dccp_v6_do_rcv; goto failure; } else { - ipv6_addr_set(&np->saddr, 0, 0, htonl(0x0000FFFF), - inet->saddr); - ipv6_addr_set(&np->rcv_saddr, 0, 0, htonl(0x0000FFFF), - inet->rcv_saddr); + ipv6_addr_set_v4mapped(inet->saddr, &np->saddr); + ipv6_addr_set_v4mapped(inet->rcv_saddr, &np->rcv_saddr); } return err; |