net/tls: Fix connection stall on partial tls record
authorAndre Tomt <andre@tomt.net>
Mon, 7 May 2018 02:24:39 +0000 (04:24 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 May 2018 03:47:58 +0000 (23:47 -0400)
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")
Signed-off-by: Andre Tomt <andre@tomt.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_main.c

index 74ed1e7af3d9da0f4074cb4ee5d7ed705f89c78b..20cd93be6236e03e2fbdbfc9e44cbb12d3261c84 100644 (file)
@@ -135,6 +135,7 @@ retry:
                        offset -= sg->offset;
                        ctx->partially_sent_offset = offset;
                        ctx->partially_sent_record = (void *)sg;
+                       ctx->in_tcp_sendpages = false;
                        return ret;
                }