haproxy/include/types
Christopher Faulet 102854cbba BUG/MEDIUM: listener: Fix how unlimited number of consecutive accepts is handled
There is a bug when global.tune.maxaccept is set to -1 (no limit). It is pretty
visible with one process (nbproc sets to 1). The functions listener_accept() and
accept_queue_process() don't expect to handle negative maxaccept values. So
instead of accepting incoming connections without any limit, none are never
accepted and HAProxy loop infinitly in the scheduler.

When there are 2 or more processes, the bug is a bit more subtile. The limit for
a listener is set to 1. So only one connection is accepted at a time by a given
listener. This happens because the listener's maxaccept value is an unsigned
integer. In check_config_validity(), it is first set to UINT_MAX (-1 casted in
an unsigned integer), and then some calculations on it leads to an integer
overflow.

To fix the bug, the listener's maxaccept value is now a signed integer. So, if a
negative value is set for global.tune.maxaccept, we keep it untouched for the
listener and no calculation is made on it. Then, in the listener code, this
signed value is casted to a unsigned one. It simplifies all tests instead of
dealing with negative values. So, it limits the number of connections accepted
at a time to UINT_MAX at most. But, honestly, it not an issue.

This patch must be backported to 1.9 and 1.8.
2019-04-30 15:28:29 +02:00
..
acl.h
action.h MINOR: action: new '(http-request|tcp-request content) do-resolve' action 2019-04-23 11:41:52 +02:00
activity.h MINOR: activity: report context switch counts instead of rates 2019-04-30 14:55:18 +02:00
applet.h MINOR: applet: measure and report an appctx's call rate in "show sess" 2019-04-24 16:04:23 +02:00
arg.h MINOR: arg: Add support for ARGT_PBUF_FNUM arg type. 2019-02-26 16:27:05 +01:00
auth.h
backend.h MEDIUM: backend: move all LB algo parameters into an union 2019-01-14 19:33:17 +01:00
capture.h
channel.h MINOR: channel: Report EOI on the input channel if it was reached in the mux 2019-03-25 06:24:43 +01:00
checks.h MINOR: checks: Store the proxy in checks. 2019-01-14 11:15:11 +01:00
cli.h
compression.h
connection.h MEDIUM: connections: Provide a xprt_ctx for each xprt method. 2019-04-18 14:56:24 +02:00
counters.h MINOR: cache: report the number of cache lookups and cache hits 2018-12-14 14:00:25 +01:00
dns.h MINOR: dns: dns_requester structures are now in a memory pool 2019-04-23 11:33:48 +02:00
fd.h CLEANUP: Fix typos in the file descriptor subsystem 2018-12-02 18:43:25 +01:00
filters.h MAJOR: filters: Adapt filters API to be compatible with the HTX represenation 2018-12-01 17:37:27 +01:00
freq_ctr.h
global.h MEDIUM: connections: Add a way to control the number of idling connections. 2019-04-18 19:52:03 +02:00
hdr_idx.h
hlua.h REORG: h1: move the h1_state definition to proto_http 2018-12-11 17:15:13 +01:00
http_htx.h REORG: htx: merge types+proto into common/htx.h 2018-12-11 17:15:04 +01:00
lb_chash.h MINOR: backend: move hash_balance_factor out of chash 2019-01-14 19:33:17 +01:00
lb_fas.h
lb_fwlc.h
lb_fwrr.h
lb_map.h
listener.h BUG/MEDIUM: listener: Fix how unlimited number of consecutive accepts is handled 2019-04-30 15:28:29 +02:00
log.h MINOR: log: Enable the log sampling and load-balancing feature. 2019-04-30 09:25:09 +02:00
mailers.h
map.h
obj_type.h MINOR: obj_type: new object type for struct stream 2019-04-23 11:35:56 +02:00
pattern.h
peers.h MINOR: peers: Add a message for heartbeat. 2019-03-01 09:33:26 +01:00
pipe.h
port_range.h BUG/MEDIUM: port_range: Make the ring buffer lock-free. 2019-04-30 15:10:17 +02:00
proto_http.h MINOR: stats: Move stuff about the stats status codes in stats files 2019-03-15 14:34:59 +01:00
proto_udp.h
protocol_buffers.h MINOR: sample: Rework gRPC converter code. 2019-03-05 11:04:23 +01:00
protocol.h
proxy.h MINOR: backend: remap the balance uri settings to lbprm.arg_opt{1,2,3} 2019-01-14 19:33:17 +01:00
queue.h
sample.h
server.h MEDIUM: servers: Reorganize the way idle connections are cleaned. 2019-02-26 18:17:32 +01:00
session.h MEDIUM: sessions: Keep track of which connections are idle. 2018-12-28 19:16:03 +01:00
shctx.h
signal.h
spoe.h BUG/MEDIUM: spoe: arg len encoded in previous frag frame but len changed 2019-04-29 16:02:05 +02:00
ssl_sock.h BUG/MINOR: ssl: Fix 48 byte TLS ticket key rotation 2019-04-15 10:09:54 +02:00
stats.h MINOR: action: new '(http-request|tcp-request content) do-resolve' action 2019-04-23 11:41:52 +02:00
stick_table.h
stream_interface.h CLEANUP: muxes/stream-int: Remove flags CS_FL_READ_NULL and SI_FL_READ_NULL 2019-03-25 06:55:23 +01:00
stream.h MINOR: stream: measure and report a stream's call rate in "show sess" 2019-04-24 16:04:23 +02:00
task.h CLEANUP: task: move the task_per_thread definition to task.h 2019-04-30 14:36:47 +02:00
template.h
vars.h