From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Date: Sat, 11 Jun 2016 06:21:45 +0000 Subject: Re: [PATCHv4 net-next] sctp: sctp should change socket state when shutdown is received Message-Id: <20160610.232145.1944529062698358389.davem@davemloft.net> List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lucien.xin@gmail.com Cc: netdev@vger.kernel.org, linux-sctp@vger.kernel.org, marcelo.leitner@gmail.com, vyasevich@gmail.com, daniel@iogearbox.net, eric.dumazet@gmail.com From: Xin Long Date: Thu, 9 Jun 2016 22:48:18 +0800 > Now sctp doesn't change socket state upon shutdown reception. It changes > just the assoc state, even though it's a TCP-style socket. > > For some cases, if we really need to check sk->sk_state, it's necessary to > fix this issue, at least when we use ss or netstat to dump, we can get a > more exact information. > > As an improvement, we will change sk->sk_state when we change asoc->state > to SHUTDOWN_RECEIVED, and also do it in sctp_shutdown to keep consistent > with sctp_close. > > Signed-off-by: Xin Long Applied.