]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: channel: Increase the stconn bytes_in value in channel_add_input()
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 08:42:25 +0000 (09:42 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 5 Mar 2026 14:34:47 +0000 (15:34 +0100)
This function is no longer used. So it is not really an bug. But it is still
available and could be used by legacy applets. In that case, we must take
care to increment the stconn bytes_in value accordingly when input data are
inserted.

This patch must be backported to 3.3.

include/haproxy/channel.h

index af2989416d6e44e6a2a49737f64df92457591237..6b8e793dcd23cde97c4a77ea0edbc5951ccc3698 100644 (file)
@@ -376,6 +376,7 @@ static inline void channel_add_input(struct channel *chn, unsigned int len)
                c_adv(chn, fwd);
        }
        /* notify that some data was read */
+       chn_prod(chn)->bytes_in += len;
        chn->flags |= CF_READ_EVENT;
 }