From: Neil Horman <nhorman@redhat.com> Date: Thu, 9 Apr 2009 10:22:43 -0400 Subject: [net] sctp: allow sctp_getladdrs to work for IPv6 Message-id: 20090409142243.GB3145@shamino.rdu.redhat.com O-Subject: Re: [RHEL 5.4 PATCH] sctp: allow sctp_getladdrs to work for IPv6 ( bz 492633) Bugzilla: 492633 RH-Acked-by: Jiri Pirko <jpirko@redhat.com> RH-Acked-by: Rik van Riel <riel@redhat.com> RH-Acked-by: David Miller <davem@redhat.com> > >Hey all- > > 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. > > > >Backport from upstream commit eb5fa39f5ef490c72901b547ac5e7211efd47d56 > > > >Verified by SEG and customer. > > > >Neil > > > > diff --git a/net/sctp/socket.c b/net/sctp/socket.c index cdddff5..a60f7d8 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5695,6 +5695,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)