]> err.no Git - linux-2.6/commitdiff
[SCTP]: Fix IPv6 address flag setting when doing peel-off/accept.
authorVladislav Yasevich <vladislav.yasevich@hp.com>
Tue, 22 Aug 2006 07:23:13 +0000 (00:23 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 22 Sep 2006 21:55:18 +0000 (14:55 -0700)
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>
net/sctp/socket.c

index 85caf79638867cc48b8a9cda4136a6e4b1476a5b..30d2dbeebb43395098b3278adcfc1e806dc8874e 100644 (file)
@@ -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)