pasta: Set spliced connection flag in epoll reference on compaction

...otherwise, we'll mix indices with non-spliced connections.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-15 10:41:31 +02:00
parent a041f6d920
commit 57d17292f9

4
tcp.c
View file

@ -1534,9 +1534,9 @@ static void tcp_conn_from_tap(struct ctx *c, int af, void *addr,
static void tcp_table_splice_compact(struct ctx *c, static void tcp_table_splice_compact(struct ctx *c,
struct tcp_splice_conn *hole) struct tcp_splice_conn *hole)
{ {
union epoll_ref ref_from = { .proto = IPPROTO_TCP, union epoll_ref ref_from = { .proto = IPPROTO_TCP, .tcp.splice = 1,
.tcp.index = hole - ts }; .tcp.index = hole - ts };
union epoll_ref ref_to = { .proto = IPPROTO_TCP, union epoll_ref ref_to = { .proto = IPPROTO_TCP, .tcp.splice = 1,
.tcp.index = hole - ts }; .tcp.index = hole - ts };
struct tcp_splice_conn *move; struct tcp_splice_conn *move;
struct epoll_event ev_from; struct epoll_event ev_from;