|
|
|
@ -313,6 +313,17 @@ static int SCHSAddPattern(MpmCtx *mpm_ctx, uint8_t *pat, uint16_t patlen,
|
|
|
|
|
|
|
|
|
|
|
|
mpm_ctx->pattern_cnt++;
|
|
|
|
mpm_ctx->pattern_cnt++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!(mpm_ctx->flags & MPMCTX_FLAGS_NODEPTH)) {
|
|
|
|
|
|
|
|
if (depth) {
|
|
|
|
|
|
|
|
mpm_ctx->maxdepth = MAX(mpm_ctx->maxdepth, depth);
|
|
|
|
|
|
|
|
SCLogDebug("%p: depth %u max %u", mpm_ctx, depth, mpm_ctx->maxdepth);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
mpm_ctx->flags |= MPMCTX_FLAGS_NODEPTH;
|
|
|
|
|
|
|
|
mpm_ctx->maxdepth = 0;
|
|
|
|
|
|
|
|
SCLogDebug("%p: alas, no depth for us", mpm_ctx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (mpm_ctx->maxlen < patlen)
|
|
|
|
if (mpm_ctx->maxlen < patlen)
|
|
|
|
mpm_ctx->maxlen = patlen;
|
|
|
|
mpm_ctx->maxlen = patlen;
|
|
|
|
|
|
|
|
|
|
|
|
|