template: remove -rust references

Ticket: 7315

Completes commit 4a7567b3f0

Allows keyword template.buffer to work properly when template
protocol is enabled
pull/11929/head
Philippe Antoine 2 years ago committed by Victor Julien
parent 09d604f7c3
commit 58556b7f8b

@ -78,11 +78,11 @@ static InspectionBuffer *GetData(DetectEngineThreadCtx *det_ctx,
void DetectTemplateRustBufferRegister(void)
{
/* TEMPLATE_START_REMOVE */
if (ConfGetNode("app-layer.protocols.template-rust") == NULL) {
if (ConfGetNode("app-layer.protocols.template") == NULL) {
return;
}
/* TEMPLATE_END_REMOVE */
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].name = "template_rust_buffer";
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].name = "template.buffer";
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].desc =
"Template content modifier to match on the template buffers";
sigmatch_table[DETECT_AL_TEMPLATE_BUFFER].Setup = DetectTemplateRustBufferSetup;
@ -144,14 +144,14 @@ static int DetectTemplateRustBufferTest(void)
/* This rule should match. */
s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any ("
"msg:\"TEMPLATE Test Rule\"; "
"template_rust_buffer; content:\"World!\"; "
"template.buffer; content:\"World!\"; "
"sid:1; rev:1;)");
FAIL_IF_NULL(s);
/* This rule should not match. */
s = DetectEngineAppendSig(de_ctx, "alert tcp any any -> any any ("
"msg:\"TEMPLATE Test Rule\"; "
"template_rust_buffer; content:\"W0rld!\"; "
"template.buffer; content:\"W0rld!\"; "
"sid:2; rev:1;)");
FAIL_IF_NULL(s);

@ -85,8 +85,6 @@ app-layer:\n\
enabled: yes\n\
template:\n\
enabled: yes\n\
template-rust:\n\
enabled: yes\n\
modbus:\n\
enabled: yes\n\
detection-ports:\n\

Loading…
Cancel
Save