aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorVladislav Yasevich <vladislav.yasevich@hp.com>2006-08-22 00:23:13 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-22 14:55:18 -0700
commiteb5fa39f5ef490c72901b547ac5e7211efd47d56 (patch)
treed580df5be11d8a0be0fa45c90588622925046db2 /net/sctp/socket.c
parent[SCTP]: Cleanup nomem handling in the state functions. (diff)
downloadlinux-dev-eb5fa39f5ef490c72901b547ac5e7211efd47d56.tar.xz
linux-dev-eb5fa39f5ef490c72901b547ac5e7211efd47d56.zip
[SCTP]: Fix IPv6 address flag setting when doing peel-off/accept.
During accept/peeloff we try to copy the list of bound addresses from the original endpoint to the new one. However, we forgot to set the flag to say that IPv6 is allowed on the new endpoint. Signed-off-by: Vladislav Yasevich <vladislav.yasevich@hp.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 85caf7963886..30d2dbeebb43 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5619,6 +5619,8 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
/* Copy the bind_addr list from the original endpoint to the new
* endpoint so that we can handle restarts properly
*/
+ if (PF_INET6 == assoc->base.sk->sk_family)
+ flags = SCTP_ADDR6_ALLOWED;
if (assoc->peer.ipv4_address)
flags |= SCTP_ADDR4_PEERSUPP;
if (assoc->peer.ipv6_address)