mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Refactor IP_Hdr class ctors (addresses #532).
They now take an explicit flag argument toggling whether the other pointer argument needs to be released on destruction.
This commit is contained in:
parent
ada5f38d04
commit
dfad686d7c
7 changed files with 16 additions and 26 deletions
|
@ -27,9 +27,9 @@ PacketSortElement::PacketSortElement(PktSrc* arg_src,
|
|||
{
|
||||
const struct ip* ip = (const struct ip*) (pkt + hdr_size);
|
||||
if ( ip->ip_v == 4 )
|
||||
ip_hdr = new IP_Hdr(ip);
|
||||
ip_hdr = new IP_Hdr(ip, false);
|
||||
else
|
||||
ip_hdr = new IP_Hdr((const struct ip6_hdr*) ip);
|
||||
ip_hdr = new IP_Hdr((const struct ip6_hdr*) ip, false);
|
||||
|
||||
if ( ip_hdr->NextProto() == IPPROTO_TCP &&
|
||||
// Note: can't sort fragmented packets
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue