BUG/MINOR: filters: Forward everything if no data filters are called
If a filter enable the data filtering, in TCP or in HTTP, but it does not
defined the corresponding callback function (so http_payload() or
tcp_payload()), it will be ignored. If all configured data filter do the same,
we must be sure to forward everything. Otherwise nothing will be forwarded at
all.
This patch must be forwarded as far as 1.9.
diff --git a/src/filters.c b/src/filters.c
index c4601fe..e275050 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -611,8 +611,9 @@
struct filter *filter;
unsigned long long *strm_off = &FLT_STRM_OFF(s, msg->chn);
unsigned int out = co_data(msg->chn);
- int ret = 0, data = len - out;
+ int ret, data;
+ ret = data = len - out;
DBG_TRACE_ENTER(STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA|STRM_EV_FLT_ANA, s, s->txn, msg);
list_for_each_entry(filter, &strm_flt(s)->filters, list) {
/* Call "data" filters only */
@@ -875,8 +876,9 @@
struct filter *filter;
unsigned long long *strm_off = &FLT_STRM_OFF(s, chn);
unsigned int out = co_data(chn);
- int ret = 0, data = len - out;
+ int ret, data;
+ ret = data = len - out;
DBG_TRACE_ENTER(STRM_EV_TCP_ANA|STRM_EV_FLT_ANA, s);
list_for_each_entry(filter, &strm_flt(s)->filters, list) {
/* Call "data" filters only */