]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: partially revert fix transition through disconnect with close
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 1 Aug 2019 21:36:01 +0000 (14:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Aug 2019 20:15:30 +0000 (13:15 -0700)
commitf2890b2c046e91231e562fecae432142f5cbcd36
tree41e1a228876173203fce25c0dd5affc20557e683
parentba5e27225b7ed47ef20fb256df7233219178fff1
net/tls: partially revert fix transition through disconnect with close

Looks like we were slightly overzealous with the shutdown()
cleanup. Even though the sock->sk_state can reach CLOSED again,
socket->state will not got back to SS_UNCONNECTED once
connections is ESTABLISHED. Meaning we will see EISCONN if
we try to reconnect, and EINVAL if we try to listen.

Only listen sockets can be shutdown() and reused, but since
ESTABLISHED sockets can never be re-connected() or used for
listen() we don't need to try to clean up the ULP state early.

Fixes: e854a8850fc1 ("net/tls: fix transition through disconnect with close")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Documentation/networking/tls-offload.rst
include/net/tls.h
net/tls/tls_main.c