mpm uri: remove unused function args

pull/2310/head
Victor Julien 10 years ago
parent c4dcb20522
commit d461c7888a

@ -57,14 +57,12 @@
* \retval ret number of matches * \retval ret number of matches
*/ */
static inline uint32_t UriPatternSearch(DetectEngineThreadCtx *det_ctx, static inline uint32_t UriPatternSearch(DetectEngineThreadCtx *det_ctx,
const uint8_t *uri, const uint16_t uri_len, const uint8_t *uri, const uint16_t uri_len)
const uint8_t flags)
{ {
SCEnter(); SCEnter();
uint32_t ret = 0; uint32_t ret = 0;
DEBUG_VALIDATE_BUG_ON(flags & STREAM_TOCLIENT);
DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_uri_ctx_ts == NULL); DEBUG_VALIDATE_BUG_ON(det_ctx->sgh->mpm_uri_ctx_ts == NULL);
if (uri_len >= det_ctx->sgh->mpm_uri_ctx_ts->minlen) { if (uri_len >= det_ctx->sgh->mpm_uri_ctx_ts->minlen) {
@ -88,12 +86,9 @@ static inline uint32_t UriPatternSearch(DetectEngineThreadCtx *det_ctx,
* \param f locked flow * \param f locked flow
* \param htp_state initialized htp state * \param htp_state initialized htp state
* *
* \warning Make sure the flow/state is locked
* \todo what should we return? Just the fact that we matched? * \todo what should we return? Just the fact that we matched?
*/ */
uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f, uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, void *txv)
HtpState *htp_state, uint8_t flags,
void *txv, uint64_t idx)
{ {
SCEnter(); SCEnter();
@ -105,8 +100,7 @@ uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f,
goto end; goto end;
cnt = UriPatternSearch(det_ctx, (const uint8_t *) cnt = UriPatternSearch(det_ctx, (const uint8_t *)
bstr_ptr(tx_ud->request_uri_normalized), bstr_ptr(tx_ud->request_uri_normalized),
bstr_len(tx_ud->request_uri_normalized), bstr_len(tx_ud->request_uri_normalized));
flags);
end: end:
SCReturnUInt(cnt); SCReturnUInt(cnt);

@ -24,6 +24,8 @@
#ifndef __DETECT_ENGINE_URICONTENT_H__ #ifndef __DETECT_ENGINE_URICONTENT_H__
#define __DETECT_ENGINE_URICONTENT_H__ #define __DETECT_ENGINE_URICONTENT_H__
uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, void *tx);
int DetectEngineInspectPacketUris(ThreadVars *tv, int DetectEngineInspectPacketUris(ThreadVars *tv,
DetectEngineCtx *de_ctx, DetectEngineCtx *de_ctx,
DetectEngineThreadCtx *det_ctx, DetectEngineThreadCtx *det_ctx,

@ -34,8 +34,4 @@ void DetectUricontentRegister (void);
uint32_t DetectUricontentMaxId(DetectEngineCtx *); uint32_t DetectUricontentMaxId(DetectEngineCtx *);
void DetectUricontentPrint(DetectContentData *); void DetectUricontentPrint(DetectContentData *);
uint32_t DetectUricontentInspectMpm(DetectEngineThreadCtx *det_ctx, Flow *f,
HtpState *htp_state, uint8_t flags,
void *tx, uint64_t idx);
#endif /* __DETECT_URICONTENT_H__ */ #endif /* __DETECT_URICONTENT_H__ */

@ -904,7 +904,7 @@ static inline void DetectMpmPrefilter(DetectEngineCtx *de_ctx,
if (tx_progress > HTP_REQUEST_LINE) { if (tx_progress > HTP_REQUEST_LINE) {
if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_URI) { if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_URI) {
PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_URI); PACKET_PROFILING_DETECT_START(p, PROF_DETECT_MPM_URI);
DetectUricontentInspectMpm(det_ctx, p->flow, alstate, flags, tx, idx); DetectUricontentInspectMpm(det_ctx, tx);
PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_URI); PACKET_PROFILING_DETECT_END(p, PROF_DETECT_MPM_URI);
} }
if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HRUD) { if (det_ctx->sgh->flags & SIG_GROUP_HEAD_MPM_HRUD) {

Loading…
Cancel
Save