[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 <[EMAIL PROTECTED]>
Signed-off-by: Sridhar Samudrala <[EMAIL PROTECTED]>

---

 net/sctp/socket.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 48eeb26..b289f8a 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -5606,6 +5606,8 @@ static void sctp_sock_migrate(struct soc
        /* 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)


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to