diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2011-11-20 22:39:03 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-22 16:43:32 -0500 |
commit | 4e3fd7a06dc20b2d8ec6892233ad2012968fe7b6 (patch) | |
tree | da3fbec7672ac6b967dfa31cec6c88f468a57fa2 /net/ipv6/af_inet6.c | |
parent | 40ba84993d66469d336099c5af74c3da5b73e28d (diff) |
net: remove ipv6_addr_copy()
C assignment can handle struct in6_addr copying.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r-- | net/ipv6/af_inet6.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index ee3319487c4f..7694c82e629d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -361,10 +361,10 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
361 | inet->inet_rcv_saddr = v4addr; | 361 | inet->inet_rcv_saddr = v4addr; |
362 | inet->inet_saddr = v4addr; | 362 | inet->inet_saddr = v4addr; |
363 | 363 | ||
364 | ipv6_addr_copy(&np->rcv_saddr, &addr->sin6_addr); | 364 | np->rcv_saddr = addr->sin6_addr; |
365 | 365 | ||
366 | if (!(addr_type & IPV6_ADDR_MULTICAST)) | 366 | if (!(addr_type & IPV6_ADDR_MULTICAST)) |
367 | ipv6_addr_copy(&np->saddr, &addr->sin6_addr); | 367 | np->saddr = addr->sin6_addr; |
368 | 368 | ||
369 | /* Make sure we are allowed to bind here. */ | 369 | /* Make sure we are allowed to bind here. */ |
370 | if (sk->sk_prot->get_port(sk, snum)) { | 370 | if (sk->sk_prot->get_port(sk, snum)) { |
@@ -458,14 +458,14 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr, | |||
458 | peer == 1) | 458 | peer == 1) |
459 | return -ENOTCONN; | 459 | return -ENOTCONN; |
460 | sin->sin6_port = inet->inet_dport; | 460 | sin->sin6_port = inet->inet_dport; |
461 | ipv6_addr_copy(&sin->sin6_addr, &np->daddr); | 461 | sin->sin6_addr = np->daddr; |
462 | if (np->sndflow) | 462 | if (np->sndflow) |
463 | sin->sin6_flowinfo = np->flow_label; | 463 | sin->sin6_flowinfo = np->flow_label; |
464 | } else { | 464 | } else { |
465 | if (ipv6_addr_any(&np->rcv_saddr)) | 465 | if (ipv6_addr_any(&np->rcv_saddr)) |
466 | ipv6_addr_copy(&sin->sin6_addr, &np->saddr); | 466 | sin->sin6_addr = np->saddr; |
467 | else | 467 | else |
468 | ipv6_addr_copy(&sin->sin6_addr, &np->rcv_saddr); | 468 | sin->sin6_addr = np->rcv_saddr; |
469 | 469 | ||
470 | sin->sin6_port = inet->inet_sport; | 470 | sin->sin6_port = inet->inet_sport; |
471 | } | 471 | } |
@@ -660,8 +660,8 @@ int inet6_sk_rebuild_header(struct sock *sk) | |||
660 | 660 | ||
661 | memset(&fl6, 0, sizeof(fl6)); | 661 | memset(&fl6, 0, sizeof(fl6)); |
662 | fl6.flowi6_proto = sk->sk_protocol; | 662 | fl6.flowi6_proto = sk->sk_protocol; |
663 | ipv6_addr_copy(&fl6.daddr, &np->daddr); | 663 | fl6.daddr = np->daddr; |
664 | ipv6_addr_copy(&fl6.saddr, &np->saddr); | 664 | fl6.saddr = np->saddr; |
665 | fl6.flowlabel = np->flow_label; | 665 | fl6.flowlabel = np->flow_label; |
666 | fl6.flowi6_oif = sk->sk_bound_dev_if; | 666 | fl6.flowi6_oif = sk->sk_bound_dev_if; |
667 | fl6.flowi6_mark = sk->sk_mark; | 667 | fl6.flowi6_mark = sk->sk_mark; |