mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
MEDIUM: sink: don't perform implicit truncations when maxlen is not set
maxlen now defaults ~0 (instead of BUFSIZE) to make sure no implicit truncation will be performed when the option is not specified, since the doc doesn't mention any default value for maxlen. As such, if the payload is too big, it will be dropped (this is the default expected behavior).
This commit is contained in:
parent
fdf82d058b
commit
32f1db6d0d
@ -1190,7 +1190,7 @@ int cfg_post_parse_ring()
|
||||
|
||||
if (cfg_sink && (cfg_sink->type == SINK_TYPE_BUFFER)) {
|
||||
if (!cfg_sink->maxlen)
|
||||
cfg_sink->maxlen = BUFSIZE; // maxlen not set: use default value
|
||||
cfg_sink->maxlen = ~0; // maxlen not set: no implicit truncation
|
||||
else if (cfg_sink->maxlen > ring_max_payload(cfg_sink->ctx.ring)) {
|
||||
/* maxlen set by user however it doesn't fit: set to max value */
|
||||
ha_warning("ring '%s' event max length '%u' exceeds max payload size, forced to '%lu'.\n",
|
||||
|
Loading…
Reference in New Issue
Block a user