From df7e88f6cad8cc4e02c9275018a572fab59562c0 Mon Sep 17 00:00:00 2001 From: Xin Long Date: Sat, 30 Jul 2016 20:00:45 +0800 Subject: sctp: change to use TCP_CLOSE_WAIT as SCTP_SS_CLOSING Prior to this patch, sctp defined TCP_CLOSING as SCTP_SS_CLOSING. TCP_CLOSING is such a special sk state in TCP that inet common codes even exclude it. For instance, inet_accept thinks the accept sk's state never be TCP_CLOSING, or it will give a WARN_ON. TCP works well with that while SCTP may trigger the call trace, as CLOSING state in SCTP has different meaning from TCP. This fix is to change to use TCP_CLOSE_WAIT as SCTP_SS_CLOSING, instead of TCP_CLOSING. Some side-effects could be expected, regardless of not being used before. inet_accept will accept it now. I did all the func_tests in lksctp-tools and ran sctp codnomicon fuzzer tests against this patch, no regression or failure found. Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller --- include/net/sctp/constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/net') diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h index 8c337cd0e1e4..5b847e49f7e9 100644 --- a/include/net/sctp/constants.h +++ b/include/net/sctp/constants.h @@ -214,7 +214,7 @@ typedef enum { SCTP_SS_LISTENING = TCP_LISTEN, SCTP_SS_ESTABLISHING = TCP_SYN_SENT, SCTP_SS_ESTABLISHED = TCP_ESTABLISHED, - SCTP_SS_CLOSING = TCP_CLOSING, + SCTP_SS_CLOSING = TCP_CLOSE_WAIT, } sctp_sock_state_t; /* These functions map various type to printable names. */ -- cgit v1.2.3