Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: e27cca9 ("xfrm: add espintcp (RFC 8229)") Reported-by: Andrew Cagney <[email protected]> Tested-by: Andrew Cagney <[email protected]> Signed-off-by: Sabrina Dubroca <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
- Loading branch information