diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 9f5d7930f54d..ea9649ca0b2a 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -6326,7 +6326,6 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6326 | struct sk_buff *skb, *tmp; | 6326 | struct sk_buff *skb, *tmp; |
6327 | struct sctp_ulpevent *event; | 6327 | struct sctp_ulpevent *event; |
6328 | struct sctp_bind_hashbucket *head; | 6328 | struct sctp_bind_hashbucket *head; |
6329 | int flags = 0; | ||
6330 | 6329 | ||
6331 | /* Migrate socket buffer sizes and all the socket level options to the | 6330 | /* Migrate socket buffer sizes and all the socket level options to the |
6332 | * new socket. | 6331 | * new socket. |
@@ -6356,15 +6355,8 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, | |||
6356 | /* Copy the bind_addr list from the original endpoint to the new | 6355 | /* Copy the bind_addr list from the original endpoint to the new |
6357 | * endpoint so that we can handle restarts properly | 6356 | * endpoint so that we can handle restarts properly |
6358 | */ | 6357 | */ |
6359 | if (PF_INET6 == assoc->base.sk->sk_family) | 6358 | sctp_bind_addr_dup(&newsp->ep->base.bind_addr, |
6360 | flags = SCTP_ADDR6_ALLOWED; | 6359 | &oldsp->ep->base.bind_addr, GFP_KERNEL); |
6361 | if (assoc->peer.ipv4_address) | ||
6362 | flags |= SCTP_ADDR4_PEERSUPP; | ||
6363 | if (assoc->peer.ipv6_address) | ||
6364 | flags |= SCTP_ADDR6_PEERSUPP; | ||
6365 | sctp_bind_addr_copy(&newsp->ep->base.bind_addr, | ||
6366 | &oldsp->ep->base.bind_addr, | ||
6367 | SCTP_SCOPE_GLOBAL, GFP_KERNEL, flags); | ||
6368 | 6360 | ||
6369 | /* Move any messages in the old socket's receive queue that are for the | 6361 | /* Move any messages in the old socket's receive queue that are for the |
6370 | * peeled off association to the new socket's receive queue. | 6362 | * peeled off association to the new socket's receive queue. |