diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-10-04 22:17:22 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-10-04 22:21:21 +0200 |
commit | 52054d8b37b3ac45f98dfde783e5ec68e06ab717 (patch) | |
tree | 5902a23dfa7efb5ce950c619c7da8aec1effaa09 | |
parent | 98dfe1cdf499fd0aa0b123dce31389ab56924baf (diff) | |
download | passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar.gz passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar.bz2 passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar.lz passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar.xz passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.tar.zst passt-52054d8b37b3ac45f98dfde783e5ec68e06ab717.zip |
tcp: Fix botched timeout comparison
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3389,8 +3389,8 @@ 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_data_noack; - if (memcmp(&conn->tap_data_noack, &((struct timespec){ 0, 0 }), - sizeof(struct timespec))) + if (!memcmp(&conn->tap_data_noack, &((struct timespec){ 0, 0 }), + sizeof(struct timespec))) tap_data_noack = 0; else tap_data_noack = timespec_diff_ms(ts, &conn->tap_data_noack); |