Skip to contentSkip to conversation

net/tls: Fix connection stall on partial tls record

PATCH Applied Andre Tomt 2 participants 2 messages May 7, 2018 – May 8, 2018

Subsystems (3)
lore
Share & tools
lore

Andre Tomt

author
#0 lore raw

PATCH 1/1 net/tls: Fix connection stall on partial tls record

In the case of writing a partial tls record we forgot to clear the ctx->in_tcp_sendpages flag, causing some connections to stall.

Fixes c212d2c7fc47 ("net/tls: Don't recursively call push_record during tls_write_space callbacks")
---
 net/tls/tls_main.c | 1 +
 1 file changed, 1 insertion(+)
net/tls/tls_main.c +1 -0
index cc03e00785c7..a02ebdfa0675 100644
@@ -135,6 +135,7 @@ int tls_push_sg(struct sock *sk,
 			offset -= sg->offset;
 			ctx->partially_sent_offset = offset;
 			ctx->partially_sent_record = (void *)sg;
+			ctx->in_tcp_sendpages = false;
 			return ret;
 		}
 
Signature · 1 line
2.17.0
maintainer Applied
#1 lore raw

From: Andre Tomt <[email protected]>
Date: Mon, 7 May 2018 04:24:39 +0200

Quoted 5 lines

In the case of writing a partial tls record we forgot to clear the ctx->in_tcp_sendpages flag, causing some connections to stall.

Fixes c212d2c7fc47 ("net/tls: Don't recursively call push_record during tls_write_space callbacks")

Applied, thanks Andre.