diff options
author | Sabrina Dubroca <sd@queasysnail.net> | 2020-07-16 10:09:02 +0200 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2020-07-17 10:21:54 +0200 |
commit | e229c877cde141a4c46cb603a341ce8c909e9a98 (patch) | |
tree | c466baa45f43aa5b1497257a8d8617f3368dedab /net/xfrm/xfrm_policy.c | |
parent | ac1321efb14284f5572dcba57aa9da362faba751 (diff) | |
download | lwn-e229c877cde141a4c46cb603a341ce8c909e9a98.tar.gz lwn-e229c877cde141a4c46cb603a341ce8c909e9a98.zip |
espintcp: recv() should return 0 when the peer socket is closed
man 2 recv says:
RETURN VALUE
When a stream socket peer has performed an orderly shutdown, the
return value will be 0 (the traditional "end-of-file" return).
Currently, this works for blocking reads, but non-blocking reads will
return -EAGAIN. This patch overwrites that return value when the peer
won't send us any more data.
Fixes: e27cca96cd68 ("xfrm: add espintcp (RFC 8229)")
Reported-by: Andrew Cagney <cagney@libreswan.org>
Tested-by: Andrew Cagney <cagney@libreswan.org>
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/xfrm/xfrm_policy.c')
0 files changed, 0 insertions, 0 deletions