1
0
mirror of https://passt.top/passt synced 2024-12-22 13:45:32 +00:00

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>
This commit is contained in:
Stefano Brivio 2021-09-16 08:27:06 +02:00
parent e8540b3f26
commit 34dd4b28b0

4
tcp.c
View File

@ -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);