diff options
author | John Thacker <johnthacker@gmail.com> | 2022-11-10 20:18:00 -0500 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2022-11-16 12:58:27 +0000 |
commit | 8fd375cfad4dd70065cc8a5b4f3e9535a3c32a74 (patch) | |
tree | 6296f8e7e1fd54d7636f39869d0037f2c7535753 | |
parent | 9b644f7f84e4e7c11ab58b9e85f328f5dfcfe7b9 (diff) |
tcp: Use correct wraparound comparison in sequence analysis
maxseqtobeacked needs to be increased when it's lower than
nextseq, not the other way around, otherwise we can get repeated
extra TCP ACKed unseen segment messages.
Since sequence analysis is always on the absolute sequence
numbers, not relative, it needs to use LT_SEQ to handle wraparound.
Fix #18558. Fix #18633.
-rw-r--r-- | epan/dissectors/packet-tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-tcp.c b/epan/dissectors/packet-tcp.c index 175e976d4a..5ace517185 100644 --- a/epan/dissectors/packet-tcp.c +++ b/epan/dissectors/packet-tcp.c @@ -2382,7 +2382,7 @@ finished_fwd: /* update 'max seq to be acked' in the other direction so we don't get * this indication again. */ - if( tcpd->rev->tcp_analyze_seq_info->maxseqtobeacked > tcpd->rev->tcp_analyze_seq_info->nextseq ) { + if( LT_SEQ(tcpd->rev->tcp_analyze_seq_info->maxseqtobeacked, tcpd->rev->tcp_analyze_seq_info->nextseq) ) { tcpd->rev->tcp_analyze_seq_info->maxseqtobeacked=tcpd->rev->tcp_analyze_seq_info->nextseq; tcpd->ta->flags|=TCP_A_ACK_LOST_PACKET; } |