forked from mirrors/linux
		
	sctp: change sk state to CLOSED instead of CLOSING in sctp_sock_migrate
Commitd46e416c11("sctp: sctp should change socket state when shutdown is received") may set sk_state CLOSING in sctp_sock_migrate, but inet_accept doesn't allow the sk_state other than ESTABLISHED/ CLOSED for sctp. So we will change sk_state to CLOSED, instead of CLOSING, as actually sk is closed already there. Fixes:d46e416c11("sctp: sctp should change socket state when shutdown is received") Reported-by: Ye Xiaolong <xiaolong.ye@intel.com> Signed-off-by: Xin Long <lucien.xin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									5fb384b066
								
							
						
					
					
						commit
						141ddefce7
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -7568,7 +7568,7 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
 | 
				
			||||||
	 * is called, set RCV_SHUTDOWN flag.
 | 
						 * is called, set RCV_SHUTDOWN flag.
 | 
				
			||||||
	 */
 | 
						 */
 | 
				
			||||||
	if (sctp_state(assoc, CLOSED) && sctp_style(newsk, TCP)) {
 | 
						if (sctp_state(assoc, CLOSED) && sctp_style(newsk, TCP)) {
 | 
				
			||||||
		newsk->sk_state = SCTP_SS_CLOSING;
 | 
							newsk->sk_state = SCTP_SS_CLOSED;
 | 
				
			||||||
		newsk->sk_shutdown |= RCV_SHUTDOWN;
 | 
							newsk->sk_shutdown |= RCV_SHUTDOWN;
 | 
				
			||||||
	} else {
 | 
						} else {
 | 
				
			||||||
		newsk->sk_state = SCTP_SS_ESTABLISHED;
 | 
							newsk->sk_state = SCTP_SS_ESTABLISHED;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue