diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-07-19 13:29:15 -0400 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-07-22 10:04:16 -0400 |
commit | ac78fc148d8249dbf382c2127456dd08ec5b161c (patch) | |
tree | c73cfa9cf409ada44aeeeddfbf76c329af02e7c6 /net/tls | |
parent | 318892ac068397f40ff81d9155898da01493b1d2 (diff) |
net/tls: don't call tls_sk_proto_close for hw record offload
The deprecated TOE offload doesn't actually do anything in
tls_sk_proto_close() - all TLS code is skipped and context
not freed. Remove the callback to make it easier to refactor
tls_sk_proto_close().
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_main.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c index 85a9d7d57b32..7ab682ed99fa 100644 --- a/net/tls/tls_main.c +++ b/net/tls/tls_main.c | |||
@@ -271,9 +271,6 @@ static void tls_sk_proto_close(struct sock *sk, long timeout) | |||
271 | lock_sock(sk); | 271 | lock_sock(sk); |
272 | sk_proto_close = ctx->sk_proto_close; | 272 | sk_proto_close = ctx->sk_proto_close; |
273 | 273 | ||
274 | if (ctx->tx_conf == TLS_HW_RECORD && ctx->rx_conf == TLS_HW_RECORD) | ||
275 | goto skip_tx_cleanup; | ||
276 | |||
277 | if (ctx->tx_conf == TLS_BASE && ctx->rx_conf == TLS_BASE) { | 274 | if (ctx->tx_conf == TLS_BASE && ctx->rx_conf == TLS_BASE) { |
278 | free_ctx = true; | 275 | free_ctx = true; |
279 | goto skip_tx_cleanup; | 276 | goto skip_tx_cleanup; |
@@ -766,7 +763,6 @@ static void build_protos(struct proto prot[TLS_NUM_CONFIG][TLS_NUM_CONFIG], | |||
766 | prot[TLS_HW_RECORD][TLS_HW_RECORD] = *base; | 763 | prot[TLS_HW_RECORD][TLS_HW_RECORD] = *base; |
767 | prot[TLS_HW_RECORD][TLS_HW_RECORD].hash = tls_hw_hash; | 764 | prot[TLS_HW_RECORD][TLS_HW_RECORD].hash = tls_hw_hash; |
768 | prot[TLS_HW_RECORD][TLS_HW_RECORD].unhash = tls_hw_unhash; | 765 | prot[TLS_HW_RECORD][TLS_HW_RECORD].unhash = tls_hw_unhash; |
769 | prot[TLS_HW_RECORD][TLS_HW_RECORD].close = tls_sk_proto_close; | ||
770 | } | 766 | } |
771 | 767 | ||
772 | static int tls_init(struct sock *sk) | 768 | static int tls_init(struct sock *sk) |