From: Vladislav Yasevich Date: Tue, 22 Aug 2006 07:23:13 +0000 (-0700) Subject: [SCTP]: Fix IPv6 address flag setting when doing peel-off/accept. X-Git-Tag: v2.6.19-rc1~1272^2~229 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=eb5fa39f5ef490c72901b547ac5e7211efd47d56;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Sridhar Samudrala Signed-off-by: David S. Miller --- diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 85caf796388..30d2dbeebb4 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)