aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index 0b338eca6dc0..2a3c0e08a090 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4686,6 +4686,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4686 struct sctp_endpoint *newep = newsp->ep; 4686 struct sctp_endpoint *newep = newsp->ep;
4687 struct sk_buff *skb, *tmp; 4687 struct sk_buff *skb, *tmp;
4688 struct sctp_ulpevent *event; 4688 struct sctp_ulpevent *event;
4689 int flags = 0;
4689 4690
4690 /* Migrate socket buffer sizes and all the socket level options to the 4691 /* Migrate socket buffer sizes and all the socket level options to the
4691 * new socket. 4692 * new socket.
@@ -4707,6 +4708,17 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4707 sctp_sk(newsk)->bind_hash = pp; 4708 sctp_sk(newsk)->bind_hash = pp;
4708 inet_sk(newsk)->num = inet_sk(oldsk)->num; 4709 inet_sk(newsk)->num = inet_sk(oldsk)->num;
4709 4710
4711 /* Copy the bind_addr list from the original endpoint to the new
4712 * endpoint so that we can handle restarts properly
4713 */
4714 if (assoc->peer.ipv4_address)
4715 flags |= SCTP_ADDR4_PEERSUPP;
4716 if (assoc->peer.ipv6_address)
4717 flags |= SCTP_ADDR6_PEERSUPP;
4718 sctp_bind_addr_copy(&newsp->ep->base.bind_addr,
4719 &oldsp->ep->base.bind_addr,
4720 SCTP_SCOPE_GLOBAL, GFP_KERNEL, flags);
4721
4710 /* Move any messages in the old socket's receive queue that are for the 4722 /* Move any messages in the old socket's receive queue that are for the
4711 * peeled off association to the new socket's receive queue. 4723 * peeled off association to the new socket's receive queue.
4712 */ 4724 */