From 561a0f989d2c8b58fe3dd56a94d0796775075c71 Mon Sep 17 00:00:00 2001 From: Thierry FOURNIER Date: Fri, 29 May 2015 17:29:14 +0200 Subject: [PATCH] MINOR: tcp: add custom actions that can continue tcp-(request|response) processing Actually, the tcp-request and tcp-response custom ation are always final actions. This patch create a new type of action that can permit to continue the evaluation of tcp-request and tcp-response processing. --- include/types/proto_tcp.h | 1 + src/proto_tcp.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/types/proto_tcp.h b/include/types/proto_tcp.h index ce21daefcb..f41933b5b0 100644 --- a/include/types/proto_tcp.h +++ b/include/types/proto_tcp.h @@ -40,6 +40,7 @@ enum { TCP_ACT_CLOSE, /* close at the sender's */ TCP_ACT_CAPTURE, /* capture a fetched sample */ TCP_ACT_CUSTOM, /* Use for custom registered keywords. */ + TCP_ACT_CUSTOM_CONT, /* Use for custom registered keywords. */ }; struct capture_prm { diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 38883786cf..4a4a806d15 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1221,8 +1221,10 @@ resume_execution: goto missing_data; } - /* otherwise accept */ - break; + /* accept */ + if (rule->action == TCP_ACT_CUSTOM) + break; + /* otherwise continue */ } } } @@ -1342,8 +1344,10 @@ resume_execution: return 0; } - /* otherwise accept */ - break; + /* accept */ + if (rule->action == TCP_ACT_CUSTOM) + break; + /* otherwise continue */ } } } -- 2.47.3