Search(det_ctx->sgh->mpm_uri_ctx_ts,
&det_ctx->mtcu, &det_ctx->pmq, uri, uri_len);
} else {
- if (det_ctx->sgh->mpm_uri_ctx_tc == NULL)
- SCReturnUInt(0U);
-
- ret = mpm_table[det_ctx->sgh->mpm_uri_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_uri_ctx_tc,
- &det_ctx->mtcu, &det_ctx->pmq, uri, uri_len);
+ BUG_ON(1);
}
//PrintRawDataFp(stdout, uri, uri_len);
Search(det_ctx->sgh->mpm_hcbd_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, body, body_len);
} else {
- if (det_ctx->sgh->mpm_hcbd_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hcbd_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_hcbd_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, body, body_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
uint32_t ret;
if (flags & STREAM_TOSERVER) {
- if (det_ctx->sgh->mpm_hsbd_ctx_ts == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hsbd_ctx_ts->mpm_type].
- Search(det_ctx->sgh->mpm_hsbd_ctx_ts, &det_ctx->mtcu,
- &det_ctx->pmq, body, body_len);
+ BUG_ON(1);
} else {
if (det_ctx->sgh->mpm_hsbd_ctx_tc == NULL)
SCReturnUInt(0);
Search(det_ctx->sgh->mpm_hmd_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, raw_method, raw_method_len);
} else {
- if (det_ctx->sgh->mpm_hmd_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hmd_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_hmd_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, raw_method, raw_method_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
Search(det_ctx->sgh->mpm_hrud_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, uri, uri_len);
} else {
- if (det_ctx->sgh->mpm_hrud_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hrud_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_hrud_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, uri, uri_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
uint32_t ret;
if (flags & STREAM_TOSERVER) {
- if (det_ctx->sgh->mpm_hsmd_ctx_ts == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hsmd_ctx_ts->mpm_type].
- Search(det_ctx->sgh->mpm_hsmd_ctx_ts, &det_ctx->mtcu,
- &det_ctx->pmq, stat_msg, stat_msg_len);
+ BUG_ON(1);
} else {
if (det_ctx->sgh->mpm_hsmd_ctx_tc == NULL)
SCReturnUInt(0);
uint32_t ret;
if (flags & STREAM_TOSERVER) {
- if (det_ctx->sgh->mpm_hscd_ctx_ts == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hscd_ctx_ts->mpm_type].
- Search(det_ctx->sgh->mpm_hscd_ctx_ts, &det_ctx->mtcu,
- &det_ctx->pmq, stat_code, stat_code_len);
+ BUG_ON(1);
} else {
if (det_ctx->sgh->mpm_hscd_ctx_tc == NULL)
SCReturnUInt(0);
Search(det_ctx->sgh->mpm_huad_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, ua, ua_len);
} else {
- if (det_ctx->sgh->mpm_huad_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_huad_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_huad_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, ua, ua_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
Search(det_ctx->sgh->mpm_hhhd_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, hh, hh_len);
} else {
- if (det_ctx->sgh->mpm_hhhd_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hhhd_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_hhhd_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, hh, hh_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
Search(det_ctx->sgh->mpm_hrhhd_ctx_ts, &det_ctx->mtcu,
&det_ctx->pmq, hrh, hrh_len);
} else {
- if (det_ctx->sgh->mpm_hrhhd_ctx_tc == NULL)
- SCReturnUInt(0);
-
- ret = mpm_table[det_ctx->sgh->mpm_hrhhd_ctx_tc->mpm_type].
- Search(det_ctx->sgh->mpm_hrhhd_ctx_tc, &det_ctx->mtcu,
- &det_ctx->pmq, hrh, hrh_len);
+ BUG_ON(1);
}
SCReturnUInt(ret);
if (det_ctx->sgh->mpm_uri_ctx_ts != NULL && mpm_table[det_ctx->sgh->mpm_uri_ctx_ts->mpm_type].Cleanup != NULL) {
mpm_table[det_ctx->sgh->mpm_uri_ctx_ts->mpm_type].Cleanup(&det_ctx->mtcu);
}
- if (det_ctx->sgh->mpm_uri_ctx_tc != NULL && mpm_table[det_ctx->sgh->mpm_uri_ctx_tc->mpm_type].Cleanup != NULL) {
- mpm_table[det_ctx->sgh->mpm_uri_ctx_tc->mpm_type].Cleanup(&det_ctx->mtcu);
- }
/* stream content */
if (det_ctx->sgh->mpm_stream_ctx_ts != NULL && mpm_table[det_ctx->sgh->mpm_stream_ctx_ts->mpm_type].Cleanup != NULL) {
}
/* uricontent */
- if ((sh->mpm_uri_ctx_ts != NULL || sh->mpm_uri_ctx_tc != NULL) &&
- !(sh->flags & SIG_GROUP_HEAD_MPM_URI_COPY)) {
+ if ((sh->mpm_uri_ctx_ts != NULL) && !(sh->flags & SIG_GROUP_HEAD_MPM_URI_COPY)) {
if (sh->mpm_uri_ctx_ts != NULL) {
SCLogDebug("destroying mpm_uri_ctx %p (sh %p)", sh->mpm_uri_ctx_ts, sh);
if (!sh->mpm_uri_ctx_ts->global) {
/* ready for reuse */
sh->mpm_uri_ctx_ts = NULL;
}
- if (sh->mpm_uri_ctx_tc != NULL) {
- SCLogDebug("destroying mpm_uri_ctx %p (sh %p)", sh->mpm_uri_ctx_tc, sh);
- if (!sh->mpm_uri_ctx_tc->global) {
- mpm_table[sh->mpm_uri_ctx_tc->mpm_type].DestroyCtx(sh->mpm_uri_ctx_tc);
- SCFree(sh->mpm_uri_ctx_tc);
- }
- /* ready for reuse */
- sh->mpm_uri_ctx_tc = NULL;
- }
}
/* stream content */
}
}
- if (sh->mpm_hcbd_ctx_ts != NULL || sh->mpm_hcbd_ctx_tc != NULL) {
+ if (sh->mpm_hcbd_ctx_ts != NULL) {
if (sh->mpm_hcbd_ctx_ts != NULL) {
if (!sh->mpm_hcbd_ctx_ts->global) {
mpm_table[sh->mpm_hcbd_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hcbd_ctx_ts);
}
sh->mpm_hcbd_ctx_ts = NULL;
}
- if (sh->mpm_hcbd_ctx_tc != NULL) {
- if (!sh->mpm_hcbd_ctx_tc->global) {
- mpm_table[sh->mpm_hcbd_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hcbd_ctx_tc);
- SCFree(sh->mpm_hcbd_ctx_tc);
- }
- sh->mpm_hcbd_ctx_tc = NULL;
- }
}
- if (sh->mpm_hsbd_ctx_ts != NULL || sh->mpm_hsbd_ctx_tc != NULL) {
- if (sh->mpm_hsbd_ctx_ts != NULL) {
- if (!sh->mpm_hsbd_ctx_ts->global) {
- mpm_table[sh->mpm_hsbd_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hsbd_ctx_ts);
- SCFree(sh->mpm_hsbd_ctx_ts);
- }
- sh->mpm_hsbd_ctx_ts = NULL;
- }
+ if (sh->mpm_hsbd_ctx_tc != NULL) {
if (sh->mpm_hsbd_ctx_tc != NULL) {
if (!sh->mpm_hsbd_ctx_tc->global) {
mpm_table[sh->mpm_hsbd_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hsbd_ctx_tc);
}
}
- if (sh->mpm_hmd_ctx_ts != NULL || sh->mpm_hmd_ctx_tc != NULL) {
+ if (sh->mpm_hmd_ctx_ts != NULL) {
if (sh->mpm_hmd_ctx_ts != NULL) {
if (!sh->mpm_hmd_ctx_ts->global) {
mpm_table[sh->mpm_hmd_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hmd_ctx_ts);
}
sh->mpm_hmd_ctx_ts = NULL;
}
- if (sh->mpm_hmd_ctx_tc != NULL) {
- if (!sh->mpm_hmd_ctx_tc->global) {
- mpm_table[sh->mpm_hmd_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hmd_ctx_tc);
- SCFree(sh->mpm_hmd_ctx_tc);
- }
- sh->mpm_hmd_ctx_tc = NULL;
- }
}
if (sh->mpm_hcd_ctx_ts != NULL || sh->mpm_hcd_ctx_tc != NULL) {
}
}
- if (sh->mpm_hrud_ctx_ts != NULL || sh->mpm_hrud_ctx_tc != NULL) {
+ if (sh->mpm_hrud_ctx_ts != NULL) {
if (sh->mpm_hrud_ctx_ts != NULL) {
if (!sh->mpm_hrud_ctx_ts->global) {
mpm_table[sh->mpm_hrud_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hrud_ctx_ts);
}
sh->mpm_hrud_ctx_ts = NULL;
}
- if (sh->mpm_hrud_ctx_tc != NULL) {
- if (!sh->mpm_hrud_ctx_tc->global) {
- mpm_table[sh->mpm_hrud_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hrud_ctx_tc);
- SCFree(sh->mpm_hrud_ctx_tc);
- }
- sh->mpm_hrud_ctx_tc = NULL;
- }
}
- if (sh->mpm_hsmd_ctx_ts != NULL || sh->mpm_hsmd_ctx_tc != NULL) {
- if (sh->mpm_hsmd_ctx_ts != NULL) {
- if (!sh->mpm_hsmd_ctx_ts->global) {
- mpm_table[sh->mpm_hsmd_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hsmd_ctx_ts);
- SCFree(sh->mpm_hsmd_ctx_ts);
- }
- sh->mpm_hsmd_ctx_ts = NULL;
- }
+ if (sh->mpm_hsmd_ctx_tc != NULL) {
if (sh->mpm_hsmd_ctx_tc != NULL) {
if (!sh->mpm_hsmd_ctx_tc->global) {
mpm_table[sh->mpm_hsmd_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hsmd_ctx_tc);
}
}
- if (sh->mpm_hscd_ctx_ts != NULL || sh->mpm_hscd_ctx_tc != NULL) {
- if (sh->mpm_hscd_ctx_ts != NULL) {
- if (!sh->mpm_hscd_ctx_ts->global) {
- mpm_table[sh->mpm_hscd_ctx_ts->mpm_type].DestroyCtx(sh->mpm_hscd_ctx_ts);
- SCFree(sh->mpm_hscd_ctx_ts);
- }
- sh->mpm_hscd_ctx_ts = NULL;
- }
+ if (sh->mpm_hscd_ctx_tc != NULL) {
if (sh->mpm_hscd_ctx_tc != NULL) {
if (!sh->mpm_hscd_ctx_tc->global) {
mpm_table[sh->mpm_hscd_ctx_tc->mpm_type].DestroyCtx(sh->mpm_hscd_ctx_tc);
}
}
- if (sh->mpm_huad_ctx_ts != NULL || sh->mpm_huad_ctx_tc != NULL) {
+ if (sh->mpm_huad_ctx_ts != NULL) {
if (sh->mpm_huad_ctx_ts != NULL) {
if (!sh->mpm_huad_ctx_ts->global) {
mpm_table[sh->mpm_huad_ctx_ts->mpm_type].DestroyCtx(sh->mpm_huad_ctx_ts);
}
sh->mpm_huad_ctx_ts = NULL;
}
- if (sh->mpm_huad_ctx_tc != NULL) {
- if (!sh->mpm_huad_ctx_tc->global) {
- mpm_table[sh->mpm_huad_ctx_tc->mpm_type].DestroyCtx(sh->mpm_huad_ctx_tc);
- SCFree(sh->mpm_huad_ctx_tc);
- }
- sh->mpm_huad_ctx_tc = NULL;
- }
}
/* dns query */
if (sm_list == DETECT_SM_LIST_UMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_uri_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_uri_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_URI;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
} else if (sm_list == DETECT_SM_LIST_HCBDMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_hcbd_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_hcbd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HCBD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
sig_flags |= SIG_FLAG_MPM_APPLAYER_NEG;
} else if (sm_list == DETECT_SM_LIST_HSBDMATCH) {
- if (s->flags & SIG_FLAG_TOSERVER)
- mpm_ctx_ts = sgh->mpm_hsbd_ctx_ts;
if (s->flags & SIG_FLAG_TOCLIENT)
mpm_ctx_tc = sgh->mpm_hsbd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HSBD;
} else if (sm_list == DETECT_SM_LIST_HMDMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_hmd_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_hmd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HMD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
} else if (sm_list == DETECT_SM_LIST_HRUDMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_hrud_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_hrud_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HRUD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
sig_flags |= SIG_FLAG_MPM_APPLAYER_NEG;
} else if (sm_list == DETECT_SM_LIST_HSMDMATCH) {
- if (s->flags & SIG_FLAG_TOSERVER)
- mpm_ctx_ts = sgh->mpm_hsmd_ctx_ts;
if (s->flags & SIG_FLAG_TOCLIENT)
mpm_ctx_tc = sgh->mpm_hsmd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HSMD;
if (cd->flags & DETECT_CONTENT_NEGATED)
sig_flags |= SIG_FLAG_MPM_APPLAYER_NEG;
} else if (sm_list == DETECT_SM_LIST_HSCDMATCH) {
- if (s->flags & SIG_FLAG_TOSERVER)
- mpm_ctx_ts = sgh->mpm_hscd_ctx_ts;
if (s->flags & SIG_FLAG_TOCLIENT)
mpm_ctx_tc = sgh->mpm_hscd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HSCD;
} else if (sm_list == DETECT_SM_LIST_HUADMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_huad_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_huad_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HUAD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
} else if (sm_list == DETECT_SM_LIST_HHHDMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_hhhd_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_hhhd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HHHD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
} else if (sm_list == DETECT_SM_LIST_HRHHDMATCH) {
if (s->flags & SIG_FLAG_TOSERVER)
mpm_ctx_ts = sgh->mpm_hrhhd_ctx_ts;
- if (s->flags & SIG_FLAG_TOCLIENT)
- mpm_ctx_tc = sgh->mpm_hrhhd_ctx_tc;
sgh_flags = SIG_GROUP_HEAD_MPM_HRHHD;
sig_flags |= SIG_FLAG_MPM_APPLAYER;
if (cd->flags & DETECT_CONTENT_NEGATED)
if (has_co_uri) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_uri_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_uri, 0);
- sh->mpm_uri_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_uri, 1);
} else {
sh->mpm_uri_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_uri_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_uri_ctx_ts == NULL || sh->mpm_uri_ctx_tc == NULL) {
+ if (sh->mpm_uri_ctx_ts == NULL) {
SCLogDebug("sh->mpm_uri_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_uri_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_uri_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hcbd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_hcbd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hcbd, 0);
- sh->mpm_hcbd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hcbd, 1);
} else {
sh->mpm_hcbd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_hcbd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hcbd_ctx_ts == NULL || sh->mpm_hcbd_ctx_tc == NULL) {
+ if (sh->mpm_hcbd_ctx_ts == NULL) {
SCLogDebug("sh->mpm_hcbd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_hcbd_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_hcbd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hsbd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
- sh->mpm_hsbd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hsbd, 0);
sh->mpm_hsbd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hsbd, 1);
} else {
- sh->mpm_hsbd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
sh->mpm_hsbd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hsbd_ctx_ts == NULL || sh->mpm_hsbd_ctx_tc == NULL) {
+ if (sh->mpm_hsbd_ctx_tc == NULL) {
SCLogDebug("sh->mpm_hsbd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
- MpmInitCtx(sh->mpm_hsbd_ctx_ts, de_ctx->mpm_matcher);
MpmInitCtx(sh->mpm_hsbd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hmd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_hmd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hmd, 0);
- sh->mpm_hmd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hmd, 1);
} else {
sh->mpm_hmd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_hmd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hmd_ctx_ts == NULL || sh->mpm_hmd_ctx_tc == NULL) {
+ if (sh->mpm_hmd_ctx_ts == NULL) {
SCLogDebug("sh->mpm_hmd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_hmd_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_hmd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hcd) {
if (has_co_hrud) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_hrud_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hrud, 0);
- sh->mpm_hrud_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hrud, 1);
} else {
sh->mpm_hrud_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_hrud_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hrud_ctx_ts == NULL || sh->mpm_hrud_ctx_tc == NULL) {
+ if (sh->mpm_hrud_ctx_ts == NULL) {
SCLogDebug("sh->mpm_hrud_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_hrud_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_hrud_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hsmd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
- sh->mpm_hsmd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hsmd, 0);
sh->mpm_hsmd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hsmd, 1);
} else {
- sh->mpm_hsmd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
sh->mpm_hsmd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hsmd_ctx_ts == NULL || sh->mpm_hsmd_ctx_tc == NULL) {
+ if (sh->mpm_hsmd_ctx_tc == NULL) {
SCLogDebug("sh->mpm_hsmd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
- MpmInitCtx(sh->mpm_hsmd_ctx_ts, de_ctx->mpm_matcher);
MpmInitCtx(sh->mpm_hsmd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hscd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
- sh->mpm_hscd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hscd, 0);
sh->mpm_hscd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hscd, 1);
} else {
- sh->mpm_hscd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
sh->mpm_hscd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hscd_ctx_ts == NULL || sh->mpm_hscd_ctx_tc == NULL) {
+ if (sh->mpm_hscd_ctx_tc == NULL) {
SCLogDebug("sh->mpm_hscd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
- MpmInitCtx(sh->mpm_hscd_ctx_ts, de_ctx->mpm_matcher);
MpmInitCtx(sh->mpm_hscd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_huad) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_huad_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_huad, 0);
- sh->mpm_huad_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_huad, 1);
} else {
sh->mpm_huad_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_huad_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_huad_ctx_ts == NULL || sh->mpm_huad_ctx_tc == NULL) {
+ if (sh->mpm_huad_ctx_ts == NULL) {
SCLogDebug("sh->mpm_huad_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_huad_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_huad_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hhhd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_hhhd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hhhd, 0);
- sh->mpm_hhhd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hhhd, 1);
} else {
sh->mpm_hhhd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_hhhd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hhhd_ctx_ts == NULL || sh->mpm_hhhd_ctx_tc == NULL) {
+ if (sh->mpm_hhhd_ctx_ts == NULL) {
SCLogDebug("sh->mpm_hhhd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_hhhd_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_hhhd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_hrhhd) {
if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_SINGLE) {
sh->mpm_hrhhd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hrhhd, 0);
- sh->mpm_hrhhd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, de_ctx->sgh_mpm_context_hrhhd, 1);
} else {
sh->mpm_hrhhd_ctx_ts = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 0);
- sh->mpm_hrhhd_ctx_tc = MpmFactoryGetMpmCtxForProfile(de_ctx, MPM_CTX_FACTORY_UNIQUE_CONTEXT, 1);
}
- if (sh->mpm_hrhhd_ctx_ts == NULL || sh->mpm_hrhhd_ctx_tc == NULL) {
+ if (sh->mpm_hrhhd_ctx_ts == NULL) {
SCLogDebug("sh->mpm_hrhhd_ctx == NULL. This should never happen");
exit(EXIT_FAILURE);
}
MpmInitCtx(sh->mpm_hrhhd_ctx_ts, de_ctx->mpm_matcher);
- MpmInitCtx(sh->mpm_hrhhd_ctx_tc, de_ctx->mpm_matcher);
}
if (has_co_dnsquery) {
}
}
}
- if (sh->mpm_uri_ctx_tc != NULL) {
- if (sh->mpm_uri_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_uri_ctx_tc);
- sh->mpm_uri_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_uri_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_uri_ctx_tc->mpm_type].Prepare(sh->mpm_uri_ctx_tc);
- }
- }
- }
if (sh->mpm_hcbd_ctx_ts != NULL) {
if (sh->mpm_hcbd_ctx_ts->pattern_cnt == 0) {
}
}
}
- if (sh->mpm_hcbd_ctx_tc != NULL) {
- if (sh->mpm_hcbd_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hcbd_ctx_tc);
- sh->mpm_hcbd_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hcbd_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hcbd_ctx_tc->mpm_type].Prepare(sh->mpm_hcbd_ctx_tc);
- }
- }
- }
- if (sh->mpm_hsbd_ctx_ts != NULL) {
- if (sh->mpm_hsbd_ctx_ts->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsbd_ctx_ts);
- sh->mpm_hsbd_ctx_ts = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hsbd_ctx_ts->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hsbd_ctx_ts->mpm_type].Prepare(sh->mpm_hsbd_ctx_ts);
- }
- }
- }
if (sh->mpm_hsbd_ctx_tc != NULL) {
if (sh->mpm_hsbd_ctx_tc->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsbd_ctx_tc);
}
}
}
- if (sh->mpm_hmd_ctx_tc != NULL) {
- if (sh->mpm_hmd_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hmd_ctx_tc);
- sh->mpm_hmd_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hmd_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hmd_ctx_tc->mpm_type].Prepare(sh->mpm_hmd_ctx_tc);
- }
- }
- }
if (sh->mpm_hcd_ctx_ts != NULL) {
if (sh->mpm_hcd_ctx_ts->pattern_cnt == 0) {
}
}
}
- if (sh->mpm_hrud_ctx_tc != NULL) {
- if (sh->mpm_hrud_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrud_ctx_tc);
- sh->mpm_hrud_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hrud_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hrud_ctx_tc->mpm_type].Prepare(sh->mpm_hrud_ctx_tc);
- }
- }
- }
- if (sh->mpm_hsmd_ctx_ts != NULL) {
- if (sh->mpm_hsmd_ctx_ts->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsmd_ctx_ts);
- sh->mpm_hsmd_ctx_ts = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hsmd_ctx_ts->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hsmd_ctx_ts->mpm_type].Prepare(sh->mpm_hsmd_ctx_ts);
- }
- }
- }
+
if (sh->mpm_hsmd_ctx_tc != NULL) {
if (sh->mpm_hsmd_ctx_tc->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsmd_ctx_tc);
}
}
}
- if (sh->mpm_hscd_ctx_ts != NULL) {
- if (sh->mpm_hscd_ctx_ts->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hscd_ctx_ts);
- sh->mpm_hscd_ctx_ts = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hscd_ctx_ts->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hscd_ctx_ts->mpm_type].Prepare(sh->mpm_hscd_ctx_ts);
- }
- }
- }
+
if (sh->mpm_hscd_ctx_tc != NULL) {
if (sh->mpm_hscd_ctx_tc->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hscd_ctx_tc);
}
}
}
+
if (sh->mpm_huad_ctx_ts != NULL) {
if (sh->mpm_huad_ctx_ts->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_huad_ctx_ts);
}
}
}
- if (sh->mpm_huad_ctx_tc != NULL) {
- if (sh->mpm_huad_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_huad_ctx_tc);
- sh->mpm_huad_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_huad_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_huad_ctx_tc->mpm_type].Prepare(sh->mpm_huad_ctx_tc);
- }
- }
- }
+
if (sh->mpm_hhhd_ctx_ts != NULL) {
if (sh->mpm_hhhd_ctx_ts->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hhhd_ctx_ts);
}
}
}
- if (sh->mpm_hhhd_ctx_tc != NULL) {
- if (sh->mpm_hhhd_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hhhd_ctx_tc);
- sh->mpm_hhhd_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hhhd_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hhhd_ctx_tc->mpm_type].Prepare(sh->mpm_hhhd_ctx_tc);
- }
- }
- }
+
if (sh->mpm_hrhhd_ctx_ts != NULL) {
if (sh->mpm_hrhhd_ctx_ts->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrhhd_ctx_ts);
}
}
}
- if (sh->mpm_hrhhd_ctx_tc != NULL) {
- if (sh->mpm_hrhhd_ctx_tc->pattern_cnt == 0) {
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrhhd_ctx_tc);
- sh->mpm_hrhhd_ctx_tc = NULL;
- } else {
- if (de_ctx->sgh_mpm_context == ENGINE_SGH_MPM_FACTORY_CONTEXT_FULL) {
- if (mpm_table[sh->mpm_hrhhd_ctx_tc->mpm_type].Prepare != NULL)
- mpm_table[sh->mpm_hrhhd_ctx_tc->mpm_type].Prepare(sh->mpm_hrhhd_ctx_tc);
- }
- }
- }
+
if (sh->mpm_dnsquery_ctx_ts != NULL) {
if (sh->mpm_dnsquery_ctx_ts->pattern_cnt == 0) {
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_dnsquery_ctx_ts);
sh->mpm_hcd_ctx_ts = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrud_ctx_ts);
sh->mpm_hrud_ctx_ts = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsmd_ctx_ts);
- sh->mpm_hsmd_ctx_ts = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hscd_ctx_ts);
- sh->mpm_hscd_ctx_ts = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_huad_ctx_ts);
sh->mpm_huad_ctx_ts = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hhhd_ctx_ts);
sh->mpm_proto_udp_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_stream_ctx_tc);
sh->mpm_stream_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_uri_ctx_tc);
- sh->mpm_uri_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hcbd_ctx_tc);
- sh->mpm_hcbd_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hhd_ctx_tc);
sh->mpm_hhd_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrhd_ctx_tc);
sh->mpm_hrhd_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hmd_ctx_tc);
- sh->mpm_hmd_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hcd_ctx_tc);
sh->mpm_hcd_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrud_ctx_tc);
- sh->mpm_hrud_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hsmd_ctx_tc);
sh->mpm_hsmd_ctx_tc = NULL;
MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hscd_ctx_tc);
sh->mpm_hscd_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_huad_ctx_tc);
- sh->mpm_huad_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hhhd_ctx_tc);
- sh->mpm_hhhd_ctx_tc = NULL;
- MpmFactoryReClaimMpmCtx(de_ctx, sh->mpm_hrhhd_ctx_tc);
- sh->mpm_hrhhd_ctx_tc = NULL;
}
return 0;