aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-04 22:17:22 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-04 22:21:21 +0200
commit52054d8b37b3ac45f98dfde783e5ec68e06ab717 (patch)
tree5902a23dfa7efb5ce950c619c7da8aec1effaa09
parent98dfe1cdf499fd0aa0b123dce31389ab56924baf (diff)
downloadpasst-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tcp.c b/tcp.c
index 3d52106..cbfad28 100644
--- a/tcp.c
+++ b/tcp.c
@@ -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);