Commit 486f50ca authored by Brian Haley's avatar Brian Haley Committed by David S. Miller

SCTP: Change to use ipv6_addr_copy()

Change SCTP IPv6 code to use ipv6_addr_copy()
Signed-off-by: default avatarBrian Haley <brian.haley@hp.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f8438a8
...@@ -364,7 +364,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, ...@@ -364,7 +364,7 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
if (addr) { if (addr) {
addr->a.v6.sin6_family = AF_INET6; addr->a.v6.sin6_family = AF_INET6;
addr->a.v6.sin6_port = 0; addr->a.v6.sin6_port = 0;
addr->a.v6.sin6_addr = ifp->addr; ipv6_addr_copy(&addr->a.v6.sin6_addr, &ifp->addr);
addr->a.v6.sin6_scope_id = dev->ifindex; addr->a.v6.sin6_scope_id = dev->ifindex;
addr->valid = 1; addr->valid = 1;
INIT_LIST_HEAD(&addr->list); INIT_LIST_HEAD(&addr->list);
...@@ -405,7 +405,7 @@ static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk) ...@@ -405,7 +405,7 @@ static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk)
{ {
addr->v6.sin6_family = AF_INET6; addr->v6.sin6_family = AF_INET6;
addr->v6.sin6_port = 0; addr->v6.sin6_port = 0;
addr->v6.sin6_addr = inet6_sk(sk)->rcv_saddr; ipv6_addr_copy(&addr->v6.sin6_addr, &inet6_sk(sk)->rcv_saddr);
} }
/* Initialize sk->sk_rcv_saddr from sctp_addr. */ /* 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,7 +418,7 @@ static void sctp_v6_to_sk_saddr(union sctp_addr *addr, struct sock *sk)
inet6_sk(sk)->rcv_saddr.s6_addr32[3] = inet6_sk(sk)->rcv_saddr.s6_addr32[3] =
addr->v4.sin_addr.s_addr; addr->v4.sin_addr.s_addr;
} else { } else {
inet6_sk(sk)->rcv_saddr = addr->v6.sin6_addr; ipv6_addr_copy(&inet6_sk(sk)->rcv_saddr, &addr->v6.sin6_addr);
} }
} }
...@@ -431,7 +431,7 @@ static void sctp_v6_to_sk_daddr(union sctp_addr *addr, struct sock *sk) ...@@ -431,7 +431,7 @@ static void sctp_v6_to_sk_daddr(union sctp_addr *addr, struct sock *sk)
inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff); inet6_sk(sk)->daddr.s6_addr32[2] = htonl(0x0000ffff);
inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr; inet6_sk(sk)->daddr.s6_addr32[3] = addr->v4.sin_addr.s_addr;
} else { } else {
inet6_sk(sk)->daddr = addr->v6.sin6_addr; ipv6_addr_copy(&inet6_sk(sk)->daddr, &addr->v6.sin6_addr);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment