From 197f99a1345cca3baf2a3bac8325463ae97d124a Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 5 Apr 2020 18:14:39 +0200 Subject: [PATCH] detect/ftpbounce: switch to inspect api v2 --- src/detect-ftpbounce.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/detect-ftpbounce.c b/src/detect-ftpbounce.c index 77ac3e9891..5e55676b27 100644 --- a/src/detect-ftpbounce.c +++ b/src/detect-ftpbounce.c @@ -57,11 +57,9 @@ static void DetectFtpbounceRegisterTests(void); #endif static int g_ftp_request_list_id = 0; -static int InspectFtpRequest(ThreadVars *tv, - DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, - const Signature *s, const SigMatchData *smd, - Flow *f, uint8_t flags, void *alstate, - void *txv, uint64_t tx_id); +static int InspectFtpRequest(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, + const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f, + uint8_t flags, void *alstate, void *txv, uint64_t tx_id); /** * \brief Registration function for ftpbounce: keyword @@ -81,19 +79,16 @@ void DetectFtpbounceRegister(void) g_ftp_request_list_id = DetectBufferTypeRegister("ftp_request"); - DetectAppLayerInspectEngineRegister("ftp_request", - ALPROTO_FTP, SIG_FLAG_TOSERVER, 0, - InspectFtpRequest); + DetectAppLayerInspectEngineRegister2( + "ftp_request", ALPROTO_FTP, SIG_FLAG_TOSERVER, 0, InspectFtpRequest, NULL); } -static int InspectFtpRequest(ThreadVars *tv, - DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, - const Signature *s, const SigMatchData *smd, - Flow *f, uint8_t flags, void *alstate, - void *txv, uint64_t tx_id) +static int InspectFtpRequest(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, + const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f, + uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { - return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd, - f, flags, alstate, txv, tx_id); + return DetectEngineInspectGenericList( + NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** -- 2.47.2