Hi! I was investigating the correct behaviour around small receive window size and were slightly surprised to find that currently, if the recv buffer is too small to fit the entire record, TLS will report -EMSGSIZE once, and then block indefinitely on a subsequent call.
Perhaps naively I'd think that the error should keep being reported since the error condition is never cleared. One way or the other I'd like to engrave the correct behaviour into a selftest so I'd appreciate guidance on which one that is :) This set makes the TLS socket keep reporting the strparser error until it gets closed. Jakub Kicinski (2): net/tls: don't clear socket error if strparser aborted selftests/tls: test the small receive buffer case net/tls/tls_sw.c | 7 +++++-- tools/testing/selftests/net/tls.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) -- 2.21.0