tcp: Fix botched timeout comparison

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-10-04 22:17:22 +02:00
parent 98dfe1cdf4
commit 52054d8b37

2
tcp.c
View file

@ -3389,7 +3389,7 @@ static void tcp_timer_one(struct ctx *c, struct tcp_tap_conn *conn,
int tap_act = timespec_diff_ms(ts, &conn->ts_tap_act); int tap_act = timespec_diff_ms(ts, &conn->ts_tap_act);
int tap_data_noack; int tap_data_noack;
if (memcmp(&conn->tap_data_noack, &((struct timespec){ 0, 0 }), if (!memcmp(&conn->tap_data_noack, &((struct timespec){ 0, 0 }),
sizeof(struct timespec))) sizeof(struct timespec)))
tap_data_noack = 0; tap_data_noack = 0;
else else