[BUG] conf: add tcp-request content rules to the correct list
Due to the change in commit 68c03, the tcp-request content rules were
unfortunately being added to the request rules.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 301666f..2670666 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -919,6 +919,7 @@
}
rule = (struct tcp_rule *)calloc(1, sizeof(*rule));
+ LIST_INIT(&rule->list);
arg = 1;
if (strcmp(args[1], "content") == 0) {
@@ -938,6 +939,7 @@
name);
warn++;
}
+ LIST_ADDQ(&curpx->tcp_req.inspect_rules, &rule->list);
}
else if (strcmp(args[1], "connection") == 0) {
arg++;
@@ -971,6 +973,7 @@
name);
warn++;
}
+ LIST_ADDQ(&curpx->tcp_req.l4_rules, &rule->list);
}
else {
retlen = snprintf(err, errlen,
@@ -979,8 +982,6 @@
goto error;
}
- LIST_INIT(&rule->list);
- LIST_ADDQ(&curpx->tcp_req.l4_rules, &rule->list);
return warn;
error:
free(rule);