]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MEDIUM: sink: Set the sink ref for forwarders created during ring parsing
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Aug 2022 14:00:13 +0000 (16:00 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Aug 2022 15:10:28 +0000 (17:10 +0200)
A reference to the sink was added in every forwarder by the commit 2ae25ea24
("MINOR: sink: Add a ref to sink in the sink_forward_target structure"). But
this commit is incomplete. It is not performed for the forwarders created
during a ring parsing.

This patch must be backported to 2.6.

src/sink.c

index 0891bb34bd6226cb8b6f09224f036581b4e017c6..38a082ed43eb46000bd7b3f12ada088ab33f1d6e 100644 (file)
@@ -1102,6 +1102,7 @@ int cfg_post_parse_ring()
                                sft->srv = srv;
                                sft->appctx = NULL;
                                sft->ofs = ~0; /* init ring offset */
+                               sft->sink = cfg_sink;
                                sft->next = cfg_sink->sft;
                                HA_SPIN_INIT(&sft->lock);