diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-01-03 17:44:01 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-01-03 17:44:01 +0100 |
commit | 87fad50310f2bd0dcc990e80e23b09768918cf5b (patch) | |
tree | 68550f66228a82a37f6efdbb02ae864fd15cbc07 /random | |
parent | 29a30c44bb8cecb341df211bcb3b330f515c9003 (diff) |
Backport Linux changes for proper TCP EOF handling
Notably when remote eagerly sends a RST: we want to return EOF to the
application, not EPIPE.
* pfinet/linux-src/net/ipv4/tcp_output.c (tcp_connect): Set sk->done to 0.
* pfinet/linux-src/net/ipv4/tcp_input.c (tcp_fin): Set RCV_SHUTDOWN, and
sk->done to 1.
* pfinet/linux-src/net/ipv4/tcp.c (tcp_recv_urg): Only return ENOTCONN when
we never actually connect. Always return 0 when reception is closed.
(tcp_recvmsg): When any data is available, ignore errors and EOF. When no
data is available, first check for reception being closed, then for errors.
Diffstat (limited to 'random')
0 files changed, 0 insertions, 0 deletions