mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix reassembly of data w/ sizes beyond 32-bit capacities (BIT-348).
The main change is that reassembly code (e.g. for TCP) now uses int64/uint64 (signedness is situational) data types in place of int types in order to support delivering data to analyzers that pass 2GB thresholds. There's also changes in logic that accompany the change in data types, e.g. to fix TCP sequence space arithmetic inconsistencies. Another significant change is in the Analyzer API: the *Packet and *Undelivered methods now use a uint64 in place of an int for the relative sequence space offset parameter.
This commit is contained in:
parent
2f57c26d5b
commit
2b3c2bd394
75 changed files with 1627 additions and 1540 deletions
|
@ -119,7 +119,7 @@ struct ip6_rthdr {
|
|||
|
||||
// True if sequence # a is between b and c (b <= a <= c). It must be true
|
||||
// that b <= c in the sequence space.
|
||||
inline int seq_between(uint32 a, uint32 b, uint32 c)
|
||||
inline bool seq_between(uint32 a, uint32 b, uint32 c)
|
||||
{
|
||||
if ( b <= c )
|
||||
return a >= b && a <= c;
|
||||
|
@ -128,9 +128,9 @@ inline int seq_between(uint32 a, uint32 b, uint32 c)
|
|||
}
|
||||
|
||||
// Returns a - b, adjusted for sequence wraparound.
|
||||
inline int seq_delta(uint32 a, uint32 b)
|
||||
inline int32 seq_delta(uint32 a, uint32 b)
|
||||
{
|
||||
return int(a-b);
|
||||
return a - b;
|
||||
}
|
||||
|
||||
class IPAddr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue