diff options
-rw-r--r-- | net/sctp/ipv6.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 216d88f27236..db1c767e509e 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -364,7 +364,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, | |||
364 | if (addr) { | 364 | if (addr) { |
365 | addr->a.v6.sin6_family = AF_INET6; | 365 | addr->a.v6.sin6_family = AF_INET6; |
366 | addr->a.v6.sin6_port = 0; | 366 | addr->a.v6.sin6_port = 0; |
367 | addr->a.v6.sin6_addr = ifp->addr; | 367 | ipv6_addr_copy(&addr->a.v6.sin6_addr, &ifp->addr); |
368 | addr->a.v6.sin6_scope_id = dev->ifindex; | 368 | addr->a.v6.sin6_scope_id = dev->ifindex; |
369 | addr->valid = 1; | 369 | addr->valid = 1; |
370 | INIT_LIST_HEAD(&addr->list); | 370 | INIT_LIST_HEAD(&addr->list); |
@@ -405,7 +405,7 @@ static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk) | |||
405 | { | 405 | { |
406 | addr->v6.sin6_family = AF_INET6; | 406 | addr->v6.sin6_family = AF_INET6; |
407 | addr->v6.sin6_port = 0; | 407 | addr->v6.sin6_port = 0; |
408 | addr->v6.sin6_addr = inet6_sk(sk)->rcv_saddr; | 408 | ipv6_addr_copy(&addr->v6.sin6_addr, &inet6_sk(sk)->rcv_saddr); |
409 | } | 409 | } |
410 | 410 | ||
411 | /* Initialize sk->sk_rcv_saddr from sctp_addr. */ | 411 | /* Initialize sk->sk_rcv_saddr from sctp_addr. */ |
@@ -418,7 +418,7 @@ static void sctp_v6_to_sk_saddr(union sctp_addr *addr, struct sock *sk) | |||
418 | inet6_sk(sk)->rcv_saddr.s6_addr32[3] = | 418 | inet6_sk(sk)->rcv_saddr.s6_addr32[3] = |
419 | addr->v4.sin_addr.s_addr; | 419 | addr->v4.sin_addr.s_addr; |
420 | } else { | 420 | } else { |
421 | inet6_sk(sk)->rcv_saddr = addr->v6.sin6_addr; | 421 | ipv6_addr_copy(&inet6_sk(sk)->rcv_saddr, &addr->v6.sin6_addr); |
422 | } | 422 | } |
423 | } | 423 | } |
424 | 424 | ||
@@ -431,7 +431,7 @@ static void sctp_v6_to_sk_daddr(union sctp_addr *addr, struct sock *sk) | |||
431 | inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff); | 431 | inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff); |
432 | inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr; | 432 | inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr; |
433 | } else { | 433 | } else { |
434 | inet6_sk(sk)->daddr = addr->v6.sin6_addr; | 434 | ipv6_addr_copy(&inet6_sk(sk)->daddr, &addr->v6.sin6_addr); |
435 | } | 435 | } |
436 | } | 436 | } |
437 | 437 | ||