aboutgitcodebugslistschat
path: root/tcp.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-09-16 08:27:06 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-09-16 08:50:02 +0200
commit34dd4b28b008bb8c6ec7c7b745b00c631563e9a4 (patch)
tree545463d70221c746352f8acd95e2c8a0fce1a940 /tcp.c
parente8540b3f2643cd07ad1745bb48b09fd9c208a706 (diff)
downloadpasst-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar.gz
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar.bz2
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar.lz
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar.xz
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.tar.zst
passt-34dd4b28b008bb8c6ec7c7b745b00c631563e9a4.zip
pasta, tcp: Don't set SPLICE_FIN_BOTH state on EPOLLHUP
EPOLLHUP just means we shut down one side of the connection on *one* socket: remember, we have two sockets here. Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tcp.c')
-rw-r--r--tcp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tcp.c b/tcp.c
index d5a45e4..6e4b99b 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2639,9 +2639,7 @@ void tcp_sock_handler_splice(struct ctx *c, union epoll_ref ref,
}
}
- if (events & EPOLLHUP) {
- tcp_splice_state(conn, SPLICE_FIN_BOTH);
- } else if (events & EPOLLRDHUP) {
+ if (events & EPOLLRDHUP) {
if (ref.s == conn->from) {
if (conn->state == SPLICE_ESTABLISHED)
tcp_splice_state(conn, SPLICE_FIN_FROM);