summaryrefslogtreecommitdiffstats
path: root/src/detect-engine-mpm.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:40:16 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:40:16 +0000
commitf71a078c8abe5e11d23ef451a4a6bae6e3dad9fe (patch)
treed2bd79992fcea321b48cff207d2d44f98f4bdf57 /src/detect-engine-mpm.c
parentReleasing progress-linux version 1:7.0.3-1~progress7.99u1. (diff)
downloadsuricata-f71a078c8abe5e11d23ef451a4a6bae6e3dad9fe.tar.xz
suricata-f71a078c8abe5e11d23ef451a4a6bae6e3dad9fe.zip
Merging upstream version 1:7.0.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/detect-engine-mpm.c')
-rw-r--r--src/detect-engine-mpm.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/detect-engine-mpm.c b/src/detect-engine-mpm.c
index f091a3d..ede3e59 100644
--- a/src/detect-engine-mpm.c
+++ b/src/detect-engine-mpm.c
@@ -772,18 +772,12 @@ int SignatureHasPacketContent(const Signature *s)
{
SCEnter();
- if (s == NULL) {
- SCReturnInt(0);
- }
-
if (!(s->proto.proto[IPPROTO_TCP / 8] & 1 << (IPPROTO_TCP % 8))) {
SCReturnInt(1);
}
- if ((s->init_data != NULL && s->init_data->smlists[DETECT_SM_LIST_PMATCH] == NULL) ||
- (s->init_data == NULL && s->sm_arrays[DETECT_SM_LIST_PMATCH] == NULL))
- {
- SCLogDebug("no mpm");
+ if (s->init_data->smlists[DETECT_SM_LIST_PMATCH] == NULL) {
+ SCLogDebug("no PMATCH");
SCReturnInt(0);
}
@@ -808,18 +802,12 @@ int SignatureHasStreamContent(const Signature *s)
{
SCEnter();
- if (s == NULL) {
- SCReturnInt(0);
- }
-
if (!(s->proto.proto[IPPROTO_TCP / 8] & 1 << (IPPROTO_TCP % 8))) {
SCReturnInt(0);
}
- if ((s->init_data != NULL && s->init_data->smlists[DETECT_SM_LIST_PMATCH] == NULL) ||
- (s->init_data == NULL && s->sm_arrays[DETECT_SM_LIST_PMATCH] == NULL))
- {
- SCLogDebug("no mpm");
+ if (s->init_data->smlists[DETECT_SM_LIST_PMATCH] == NULL) {
+ SCLogDebug("no PMATCH");
SCReturnInt(0);
}