diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-06-17 19:04:18 -0500 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-06-17 19:04:18 -0500 |
commit | 3afa294c40013be5d8180005002e3f648d04d942 (patch) | |
tree | 8a8b7464fd8ee4901288afb3e9e8d761ef45647d /net/sctp/socket.c | |
parent | a1541d5af66d02426655b1498f814c52347dd7d3 (diff) | |
parent | 3237ee78fc00f786d5f5aec6f9310b0e39069f15 (diff) | |
download | linux-3afa294c40013be5d8180005002e3f648d04d942.tar.gz linux-3afa294c40013be5d8180005002e3f648d04d942.tar.bz2 linux-3afa294c40013be5d8180005002e3f648d04d942.zip |
merge by hand (qla_os.c mismerge)
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 12 |
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, 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. @@ -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. */ |