Merge in SNORT/snort3 from ~OSHUMEIK/snort3:ips_option_ack to master
Squashed commit of the following:
commit
9001bca22553e7cd2a393a195ef0348b535bf5cc
Author: Oleksii Shumeiko <oshumeik@cisco.com>
Date: Wed Nov 1 13:35:11 2023 +0200
ips_options: fix ack option
Packet header contains ACK in network representation.
// cppcheck-suppress unreadVariable
RuleProfile profile(tcpAckPerfStats);
- if ( p->ptrs.tcph && config.eval(p->ptrs.tcph->th_ack) )
- return MATCH;
+ if ( !p->ptrs.tcph )
+ return NO_MATCH;
- return NO_MATCH;
+ auto ack = p->ptrs.tcph->ack();
+
+ return config.eval(ack) ? MATCH : NO_MATCH;
}
//-------------------------------------------------------------------------