From: Mike Stepanek (mstepane) Date: Thu, 28 Jan 2021 12:43:48 +0000 (+0000) Subject: Merge pull request #2723 in SNORT/snort3 from ~MDAGON/snort3:napth to master X-Git-Tag: 3.1.1.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f57ab5e8e252a2945592100ff889ca474d35d41;p=thirdparty%2Fsnort3.git Merge pull request #2723 in SNORT/snort3 from ~MDAGON/snort3:napth to master Squashed commit of the following: commit 3043fc34dfe875a1362407c007dfc5c07d80ae4e Author: mdagon Date: Tue Jan 26 15:59:22 2021 -0500 codecs: update tcp naptha check to make sure it is ipv4 traffic --- diff --git a/src/codecs/ip/cd_tcp.cc b/src/codecs/ip/cd_tcp.cc index cf5893d10..ebd677658 100644 --- a/src/codecs/ip/cd_tcp.cc +++ b/src/codecs/ip/cd_tcp.cc @@ -522,7 +522,8 @@ void TcpCodec::flag_tests(const tcp::TCPHdr* const tcph, { if ( tcph->th_flags == TH_SYN ) { - if ((tcph->th_seq == naptha_seq) and (snort.ip_api.get_ip4h()->ip_id == naptha_id)) + if ((tcph->th_seq == naptha_seq) and snort.ip_api.is_ip4() and + (snort.ip_api.get_ip4h()->ip_id == naptha_id)) { codec_event(codec, DECODE_DOS_NAPTHA); }