]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: filters: Don't call TCP callbacks for HTX streams
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 8 Nov 2019 14:31:49 +0000 (15:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2019 12:43:08 +0000 (13:43 +0100)
For now, TCP callbacks are incompatible with the HTX streams because they are
designed to manipulate raw buffers. A new callback will probably be added to be
used in both modes, raw and HTX. So, for HTX streams, these callbacks are
ignored. This should not be a real problem because there is no known filters,
expect the trace filter, implementing these callbacks.

This patch must be backported to 2.0 and 1.9.

src/filters.c

index 23af163d30485d04a3059fdde1307103e9f59bf0..c7f3ebd791baf5b022c8a00d547a423054f3e642 100644 (file)
@@ -981,7 +981,7 @@ flt_xfer_data(struct stream *s, struct channel *chn, unsigned int an_bit)
        DBG_TRACE_ENTER(STRM_EV_STRM_ANA|STRM_EV_TCP_ANA|STRM_EV_FLT_ANA, s);
 
        /* If there is no "data" filters, we do nothing */
-       if (!HAS_DATA_FILTERS(s, chn))
+       if (!HAS_DATA_FILTERS(s, chn) || (s->flags & SF_HTX))
                goto end;
 
        /* Be sure that the output is still opened. Else we stop the data