From Didier: bugfix for sequence number wrapping

svn path=/trunk/; revision=6303
This commit is contained in:
Ronnie Sahlberg 2002-09-18 12:08:28 +00:00
parent d0a0a41eaf
commit 3832f2a8c2
2 changed files with 6 additions and 5 deletions

View File

@ -102,6 +102,7 @@ Martin Maciaszek <fastjack[AT]i-s-o.net> {
Didier Jorand <Didier.Jorand[AT]alcatel.fr> {
SNMP support
TCP SEQ/ACK analysis bugfix for sequence number wrapping.
}
Jun-ichiro itojun Hagino <itojun[AT]itojun.org> {

View File

@ -1,7 +1,7 @@
/* packet-tcp.c
* Routines for TCP packet disassembly
*
* $Id: packet-tcp.c,v 1.159 2002/09/11 09:52:36 sahlberg Exp $
* $Id: packet-tcp.c,v 1.160 2002/09/18 12:08:28 sahlberg Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@ -134,10 +134,10 @@ struct tcp_unacked {
};
/* Idea for gt: either x > y, or y is much bigger (assume wrap) */
#define GT_SEQ(x, y) ((x > y) || ((y - x) > 0x80000000))
#define LT_SEQ(x, y) ((x < y) || ((x - y) > 0x80000000))
#define GE_SEQ(x, y) ((x >= y) || ((y - x) > 0x80000000))
#define LE_SEQ(x, y) ((x <= y) || ((x - y) > 0x80000000))
#define GT_SEQ(x, y) ((gint32)(y - x) < 0)
#define LT_SEQ(x, y) ((gint32)(x - y) < 0)
#define GE_SEQ(x, y) ((gint32)(y - x) <= 0)
#define LE_SEQ(x, y) ((gint32)(x - y) <= 0)
#define EQ_SEQ(x, y) (x == y)
static GMemChunk *tcp_acked_chunk = NULL;