Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1975
b: refs/heads/master
c: 4243cac
h: refs/heads/master
i:
  1973: 4847156
  1971: 9f98a5e
  1967: bd75302
v: v3
  • Loading branch information
Vladislav Yasevich authored and David S. Miller committed Jun 13, 2005
1 parent 329e55e commit 45dd6e4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77bd91967a97e5b94ae36113efe1d9e4f68a716e
refs/heads/master: 4243cac1e76228f7ba916d5df9e75a219352160a
12 changes: 12 additions & 0 deletions trunk/net/sctp/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -4686,6 +4686,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
struct sctp_endpoint *newep = newsp->ep;
struct sk_buff *skb, *tmp;
struct sctp_ulpevent *event;
int flags = 0;

/* Migrate socket buffer sizes and all the socket level options to the
* new socket.
Expand All @@ -4707,6 +4708,17 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
sctp_sk(newsk)->bind_hash = pp;
inet_sk(newsk)->num = inet_sk(oldsk)->num;

/* Copy the bind_addr list from the original endpoint to the new
* endpoint so that we can handle restarts properly
*/
if (assoc->peer.ipv4_address)
flags |= SCTP_ADDR4_PEERSUPP;
if (assoc->peer.ipv6_address)
flags |= SCTP_ADDR6_PEERSUPP;
sctp_bind_addr_copy(&newsp->ep->base.bind_addr,
&oldsp->ep->base.bind_addr,
SCTP_SCOPE_GLOBAL, GFP_KERNEL, flags);

/* Move any messages in the old socket's receive queue that are for the
* peeled off association to the new socket's receive queue.
*/
Expand Down

0 comments on commit 45dd6e4

Please sign in to comment.