Fix tcp_option event

It was not being raised in all the cases it should have been due to
an incorrect/unnecessary truncation check.
This commit is contained in:
Jon Siwek 2019-10-03 17:55:07 -07:00
parent 8ba19cd7d1
commit 222e3ad3ea
4 changed files with 24 additions and 2 deletions

View file

@ -1186,8 +1186,7 @@ void TCP_Analyzer::DeliverPacket(int len, const u_char* data, bool is_orig,
GeneratePacketEvent(rel_seq, rel_ack, data, len, caplen, is_orig,
flags);
if ( tcp_option && tcp_hdr_len > sizeof(*tp) &&
tcp_hdr_len <= uint32_t(caplen) )
if ( tcp_option && tcp_hdr_len > sizeof(*tp) )
ParseTCPOptions(tp, TCPOptionEvent, this, is_orig, 0);
if ( DEBUG_tcp_data_sent )