diff options
author | Brian Haley <brian.haley@hp.com> | 2009-10-07 16:58:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-07 16:58:25 -0400 |
commit | b301e82cf8104cfddbe5452ebe625bab49597c64 (patch) | |
tree | 49d7f8c91833e0658bf4074c0022bbf34790ce47 /net/ipv6/tcp_ipv6.c | |
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/ipv6/tcp_ipv6.c')
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 321aafd40dcb..451763059142 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -226,10 +226,8 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr, | |||
226 | #endif | 226 | #endif |
227 | goto failure; | 227 | goto failure; |
228 | } else { | 228 | } else { |
229 | ipv6_addr_set(&np->saddr, 0, 0, htonl(0x0000FFFF), | 229 | ipv6_addr_set_v4mapped(inet->saddr, &np->saddr); |
230 | inet->saddr); | 230 | ipv6_addr_set_v4mapped(inet->rcv_saddr, &np->rcv_saddr); |
231 | ipv6_addr_set(&np->rcv_saddr, 0, 0, htonl(0x0000FFFF), | ||
232 | inet->rcv_saddr); | ||
233 | } | 231 | } |
234 | 232 | ||
235 | return err; | 233 | return err; |
@@ -1293,11 +1291,9 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb, | |||
1293 | 1291 | ||
1294 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); | 1292 | memcpy(newnp, np, sizeof(struct ipv6_pinfo)); |
1295 | 1293 | ||
1296 | ipv6_addr_set(&newnp->daddr, 0, 0, htonl(0x0000FFFF), | 1294 | ipv6_addr_set_v4mapped(newinet->daddr, &newnp->daddr); |
1297 | newinet->daddr); | ||
1298 | 1295 | ||
1299 | ipv6_addr_set(&newnp->saddr, 0, 0, htonl(0x0000FFFF), | 1296 | ipv6_addr_set_v4mapped(newinet->saddr, &newnp->saddr); |
1300 | newinet->saddr); | ||
1301 | 1297 | ||
1302 | ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); | 1298 | ipv6_addr_copy(&newnp->rcv_saddr, &newnp->saddr); |
1303 | 1299 | ||