]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ring: maxlen warning reported as alert
authorAurelien DARRAGON <adarragon@haproxy.com>
Mon, 26 Jun 2023 12:22:12 +0000 (14:22 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 10 Jul 2023 16:28:08 +0000 (18:28 +0200)
When maxlen parameter exceeds sink size, a warning is generated and maxlen
is enforced to sink size. But the err_code is incorrectly set to ERR_ALERT

Indeed, being a "warning", ERR_WARN should be used here.

This may be backported as far as 2.2

src/sink.c

index e1149096156f903d12ca79b7c10b7c677c213232..136945eb07b2958cf5752131b6ab30ab56de3567 100644 (file)
@@ -1191,7 +1191,7 @@ int cfg_post_parse_ring()
                        ha_warning("ring '%s' event max length '%u' exceeds size, forced to size '%lu'.\n",
                                   cfg_sink->name, cfg_sink->maxlen, (unsigned long)b_size(&cfg_sink->ctx.ring->buf));
                        cfg_sink->maxlen = b_size(&cfg_sink->ctx.ring->buf);
-                       err_code |= ERR_ALERT;
+                       err_code |= ERR_WARN;
                }
 
                /* prepare forward server descriptors */