2498 Commits

Author SHA1 Message Date
Amaury Denoyelle
33afba0dda BUG/MINOR: quic: split max-idle-timeout option for FE/BE usage
Streamline max-idle-timeout option. Rename it to use the newer cohesive
naming scheme 'tune.quic.fe|be.'.

Two different fields were already defined in global struct. These fields
are moved into quic_tune along with other QUIC settings. However, no
parser was defined for backend option, this commit fixes this.

No need to backport this.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
5bc659a4a2 MINOR: quic: rename frontend sock-per-conn setting
On frontend side, a quic_conn can have a dedicated FD or use the
listener one. These different modes can be activated via a global QUIC
tune setting.

This patch adjusts the option. First, it is renamed to the more
meaningful name 'tune.quic.fe.sock-per-conn'. Also, arguments are now
either 'default-on' or 'force-off'. The objective is to better highlight
reliationship with 'quic-socket' bind option.

The older option is deprecated and will be removed in 3.5.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
a14c6cee17 MINOR: quic: rename retry-threshold setting
A QUIC global tune setting is defined to be able to force Retry emission
prior to handshake. By definition, this ability is only supported by
QUIC servers, hence it is a frontend option only.

Rename the option to use "fe" prefix. The old option name is deprecated
and will be removed in 3.5
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
d248c5bd21 MINOR: quic: rename max Tx mem setting
QUIC global memory can be limited across the entire process via a global
tune setting. Previously, this setting used to misleading "frontend"
prefix. As this is applied as a sum between all QUIC connections, both
from frontend and backend sides, remove the prefix. The new option name
is "tune.quic.mem.tx-max".

The older option name is deprecated and will be removed in 3.5.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
9bfe9b9e21 MINOR: quic: split Tx options for FE/BE usage
This patch is similar to the previous one, except that it is focused on
Tx QUIC settings. It is now possible to toggle GSO and pacing on
frontend and backend sides independently.

As with previous patch, option are renamed to use "fe/be" unified
prefixes. This is part of the current serie of commits which unify QUI
settings. Older options are deprecated and will be removed on 3.5
release.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
33a8cb87a9 MINOR: quic: split congestion controler options for FE/BE usage
Various settings can be configured related to QUIC congestion controler.
This patch duplicates them to be able to set independent values on
frontend and backend sides.

As with previous patch, option are renamed to use "fe/be" unified
prefixes. This is part of the current serie of commits which unify QUIC
settings. Older options are deprecated and will be removed on 3.5
release.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
7640e9a9ee MINOR: quic: duplicate glitches FE option on BE side
Previously, QUIC glitches support was only implemented for frontend
side. Extend this so that the option can be specified separately both on
frontend and backend sides. Function _qcc_report_glitch() now retrieves
the relevant max value based on connection side.

In addition to this, option has been renamed to use "fe/be" prefixes.
This is part of the current serie of commits which unify QUIC settings.
Older options are deprecated and will be removed on 3.5 release.
2025-10-23 16:49:20 +02:00
Amaury Denoyelle
b34cd0b506 MINOR: quic: rename "no-quic" to "tune.quic.listen"
Rename the option to quickly enable/disable every QUIC listeners. It now
takes an argument on/off. The documentation is extended to reflect the
fact that QUIC backend are not impacted by this option.

The older keyword is simply removed. Deprecation is considered
unnecessary as this setting is only useful during debugging.
2025-10-23 16:47:58 +02:00
Willy Tarreau
aa259f5b42 [RELEASE] Released version 3.3-dev10
Released version 3.3-dev10 with the following main changes :
    - BUG/MEDIUM: connections: Only avoid creating a mux if we have one
    - BUG/MINOR: sink: retry attempt for sft server may never occur
    - CLEANUP: mjson: remove MJSON_ENABLE_RPC code
    - CLEANUP: mjson: remove MJSON_ENABLE_PRINT code
    - CLEANUP: mjson: remove MJSON_ENABLE_NEXT code
    - CLEANUP: mjson: remove MJSON_ENABLE_BASE64 code
    - CLEANUP: mjson: remove unused defines and math.h
    - BUG/MINOR: http-ana: Reset analyse_exp date after 'wait-for-body' action
    - CLEANUP: mjson: remove unused defines from mjson.h
    - BUG/MINOR: acme: avoid overflow when diff > notAfter
    - DEV: patchbot: use git reset+checkout instead of pull
    - MINOR: proxy: explicitly permit abortonclose on frontends and clarify the doc
    - REGTESTS: fix h2_desync_attacks to wait for the response
    - REGTESTS: http-messaging: fix the websocket and upgrade tests not to close early
    - MINOR: proxy: only check abortonclose through a dedicated function
    - MAJOR: proxy: enable abortonclose by default on HTTP proxies
    - MINOR: proxy: introduce proxy_abrt_close_def() to pass the desired default
    - MAJOR: proxy: enable abortonclose by default on TLS listeners
    - MINOR: h3/qmux: Set QC_SF_UNKNOWN_PL_LENGTH flag on QCS when headers are sent
    - MINOR: stconn: Add two fields in sedesc to replace the HTX extra value
    - MINOR: h1-htx: Increment body len when parsing a payload with no xfer length
    - MINOR: mux-h1: Set known input payload length during demux
    - MINOR: mux-fcgi: Set known input payload length during demux
    - MINOR: mux-h2: Use <body_len> H2S field for payload without content-length
    - MINOR: mux-h2: Set known input payload length of the sedesc
    - MINOR: h3: Set known input payload length of the sedesc
    - MINOR: stconn: Move data from kip to kop when data are sent to the consumer
    - MINOR: filters: Reset knwon input payload length if a data filter is used
    - MINOR: hlua/http-fetch: Use <kip> instead of HTX extra field to get body size
    - MINOR: cache: Use the <kip> value to check too big objects
    - MINOR: compression: Use the <kip> value to check body size
    - MEDIUM: mux-h1: Stop to use HTX extra value when formatting message
    - MEDIUM: htx: Remove the HTX extra field
    - MEDIUM: acme: don't insert acme account key in ckchs_tree
    - BUG/MINOR: acme: memory leak from the config parser
    - CI: cirrus-ci: bump FreeBSD image to 14-3
    - BUG/MEDIUM: ssl: take care of second client hello
    - BUG/MINOR: ssl: always clear the remains of the first hello for the second one
    - BUG/MEDIUM: stconn: Properly forward kip to the opposite SE descriptor
    - MEDIUM: applet: Forward <kip> to applets
    - DEBUG: mux-h1: Dump <kip> and <kop> values with sedesc info
    - BUG/MINOR: ssl: leak in ssl-f-use
    - BUG/MINOR: ssl: leak crtlist_name in ssl-f-use
    - BUILD: makefile: disable tail calls optimizations with memory profiling
    - BUG/MEDIUM: apppet: Improve spinning loop detection with the new API
    - BUG/MINOR: ssl: Free global_ssl structure contents during deinit
    - BUG/MINOR: ssl: Free key_base from global_ssl structure during deinit
    - MEDIUM: jwt: Remove certificate support in jwt_verify converter
    - MINOR: jwt: Add new jwt_verify_cert converter
    - MINOR: jwt: Do not look into ckch_store for jwt_verify converter
    - MINOR: jwt: Add new "jwt" certificate option
    - MINOR: jwt: Add specific error code for known but unavailable certificate
    - DOC: jwt: Add doc about "jwt_verify_cert" converter
    - MINOR: ssl: Dump options in "show ssl cert"
    - MINOR: jwt: Add new "add/del/show ssl jwt" CLI commands
    - REGTEST: jwt: Test new CLI commands
    - BUG/MINOR: ssl: Potential NULL deref in trace macro
    - MINOR: regex: use a thread-local match pointer for pcre2
    - BUG/MEDIUM: pools: fix bad freeing of aligned pools in UAF mode
    - MEDIUM: pools: detect() when munmap() fails in UAF mode
    - TESTS: quic: useless param for b_quic_dec_int()
    - BUG/MEDIUM: pools: fix crash on filtered "show pools" output
    - BUG/MINOR: pools: don't report "limited to the first X entries" by default
    - BUG/MAJOR: lb-chash: fix key calculation when using default hash-key id
    - BUG/MEDIUM: stick-tables: Don't forget to dec count on failure.
    - BUG/MINOR: quic: check applet_putchk() for 'show quic' first line
    - TESTS: quic: fix uninit of quic_cc_path const member
    - BUILD: ssl: can't build when using -DLISTEN_DEFAULT_CIPHERS
    - BUG/MAJOR: quic: uninitialized quic_conn_closed struct members
    - BUG/MAJOR: quic: do not reset QUIC backends fds in closing state
    - BUG/MINOR: quic: SSL counters not handled
    - DOC: clarify the experimental status for certain features
    - MINOR: config: remove experimental status on tune.disable-fast-forward
    - MINOR: tree-wide: add missing TAINTED flags for some experimental directives
    - MEDIUM: config: warn when expose-experimental-directives is used for no reason
    - BUG/MEDIUM: threads/config: drop absent threads from thread groups
    - REGTESTS: remove experimental from quic/retry.vtc
2025-10-18 11:24:05 +02:00
Willy Tarreau
8b7a82cd30 MEDIUM: config: warn when expose-experimental-directives is used for no reason
If users start to enable expose-experimental-directives for the purpose
of testing one specific feature, there are chances that the option remains
forever and hides the experimental status of other options.

Let's emit a warning if the option appears and is not used. This will
remind users that they can now drop it, and help keep configs safe for
future upgrades.
2025-10-17 19:00:21 +02:00
Willy Tarreau
d3881e61ac MINOR: config: remove experimental status on tune.disable-fast-forward
The option was turned to off by default in 2.8 with commit 2f7c82bfd
("BUG/MINOR: haproxy: Fix option to disable the fast-forward"), however
at the same time it should have dropped its experimental status since
the feature is enabled by default. The only goal of the option is to
debug something, like many other tune.xxx options. The option should
still normally not be used without being invited to do so by developers
looking for something specific though.

This could be backported if desired to simplify debugging, though this
has never been needed for now.
2025-10-17 18:59:47 +02:00
Willy Tarreau
e7c8deb810 DOC: clarify the experimental status for certain features
Certain features require "expose-experimental-directives" to be set in
the global section. Let's clarify that experimental featuers are only
maintained in best effort mode, may break during the stable cycle, and
are generally not maintained beyond the release of the next LTS branch
since it is extremely challenging, and early adopters are expected to
upgrade to benefit from improvements anyway.
2025-10-17 18:41:13 +02:00
Remi Tricot-Le Breton
d4bb9983fa MINOR: jwt: Add new "add/del/show ssl jwt" CLI commands
The new "add/del ssl jwt <file>" commands allow to change the "jwt" flag
of an already loaded certificate. It allows to delete certificates used
for JWT validation, which was not yet possible.
The "show ssl jwt" command iterates over all the ckch_stores and dumps
the ones that have the option set.
2025-10-13 10:38:52 +02:00
Remi Tricot-Le Breton
0f35b46124 DOC: jwt: Add doc about "jwt_verify_cert" converter
Add information about the new "jwt_verify_cert" converter and update the
existing "jwt_converter" doc to remove mentions of certificates from it.
Add information about the new "jwt" certificate option.
2025-10-13 10:38:52 +02:00
Willy Tarreau
00b27a993f MAJOR: proxy: enable abortonclose by default on TLS listeners
In the continuity of https://github.com/orgs/haproxy/discussions/3146,
we must also enable abortonclose by default for TLS listeners so as not
to needlessly compute TLS handshakes on dead connections. The change is
very small (just set the default value to 1 in the TLS code when neither
the option nor its opposite were set).

It may possibly cause some TLS handshakes to start failing with 3.3 in
certain legacy environments (e.g. TLS health-checks performed using only
a client hello and closing afterwards), and in this case it is sufficient
to disable the option using "no option abortonclose" in either the
affected frontend or the "defaults" section it derives from.
2025-10-08 10:36:59 +02:00
Willy Tarreau
644b3dc7d8 MAJOR: proxy: enable abortonclose by default on HTTP proxies
As discussed on https://github.com/orgs/haproxy/discussions/3146 and on
the mailing list, there's a marked preference for having abortonclose
enabled by default when relevant. The point being that with todays'
internet, the large majority of requests sent with a closed input
channel are aborted requests, and that it's pointless to waste resources
processing them.

This patch now considers both "option abortonclose" and its opposite
"no option abortonclose" to figure whether abortonclose is enabled or
disabled in a backend. When neither are set (thus not even inherited
from a defaults section), then it considers the proxy's mode, and HTTP
mode implies abortonclose by default.

This may make some legacy services fail starting with 3.3. In this case
it will be sufficient to add "no option abortonclose" in either the
affected backend or the defaults section it derives from. But for
internet-facing proxies it's better to stay with the option enabled.
2025-10-08 10:29:41 +02:00
Willy Tarreau
c42e62d890 MINOR: proxy: explicitly permit abortonclose on frontends and clarify the doc
The "abortonclose" option was recently deprecated in frontends because its
action was essentially limited to the backend part (queuing etc). But in
3.3 we started to support it for TLS on frontends, though it would only
work when placed in a defaults section. Let's officially support it in
frontends, and take this opportunity to clarify the documentation on this
topic, which was incomplete regarding frontend and TLS support. Now the
doc tries to better cover the different use cases.
2025-10-08 10:29:41 +02:00
Christopher Faulet
d0084cb873 [RELEASE] Released version 3.3-dev9
Released version 3.3-dev9 with the following main changes :
    - BUG/MINOR: acl: Fix error message about several '-m' parameters
    - MINOR: server: Parse sni and pool-conn-name expressions in a dedicated function
    - BUG/MEDIUM: server: Use sni as pool connection name for SSL server only
    - BUG/MINOR: server: Update healthcheck when server settings are changed via CLI
    - OPTIM: backend: Don't set SNI for non-ssl connections
    - OPTIM: proto_rhttp: Don't set SNI for non-ssl connections
    - OPTIM: tcpcheck: Don't set SNI and ALPN for non-ssl connections
    - BUG/MINOR: tcpcheck: Don't use sni as pool-conn-name for non-SSL connections
    - MEDIUM: server/ssl: Base the SNI value to the HTTP host header by default
    - MEDIUM: httpcheck/ssl: Base the SNI value on the HTTP host header by default
    - OPTIM: tcpcheck: Reorder tcpchek_connect structure fields to fill holes
    - REGTESTS: ssl: Add a script to test the automatic SNI selection
    - MINOR: quic: add useful trace about padding params values
    - BUG/MINOR: quic: too short PADDING frame for too short packets
    - BUG/MINOR: cpu_topo: work around a small bug in musl's CPU_ISSET()
    - BUG/MEDIUM: ssl: Properly initialize msg_controllen.
    - MINOR: quic: SSL session reuse for QUIC
    - BUG/MEDIUM: proxy: fix crash with stop_proxy() called during init
    - MINOR: stats-file: use explicit unsigned integer bitshift for user slots
    - CLEANUP: quic: fix typo in quic_tx trace
    - TESTS: quic: add unit-tests for QUIC TX part
    - MINOR: quic: restore QUIC_HP_SAMPLE_LEN constant
    - REGTESTS: ssl: Fix the script about automatic SNI selection
    - BUG/MINOR: pools: Fix the dump of pools info to deal with buffers limitations
    - MINOR: pools: Don't dump anymore info about pools when purge is forced
    - BUG/MINOR: quic: properly support GSO on backend side
    - BUG/MEDIUM: mux-h2: Reset MUX blocking flags when a send error is caught
    - BUG/MEDIUM: mux-h2; Don't block reveives in H2_CS_ERROR and H2_CS_ERROR2 states
    - BUG/MEDIUM: mux-h2: Restart reading when mbuf ring is no longer full
    - BUG/MINOR: mux-h2: Remove H2_CF_DEM_DFULL flags when the demux buffer is reset
    - BUG/MEDIUM: mux-h2: Report RST/error to app-layer stream during 0-copy fwding
    - BUG/MEDIUM: mux-h2: Reinforce conditions to report an error to app-layer stream
    - BUG/MINOR: hq-interop: adjust parsing/encoding on backend side
    - OPTIM: check: do not delay MUX for ALPN if SSL not active
    - BUG/MEDIUM: checks: fix ALPN inheritance from server
    - BUG/MINOR: check: ensure checks are compatible with QUIC servers
    - MINOR: check: reject invalid check config on a QUIC server
    - MINOR: debug: report the process id in warnings and panics
    - DEBUG: stream: count the number of passes in the connect loop
    - MINOR: debug: report the number of loops and ctxsw for each thread
    - MINOR: debug: report the time since last wakeup and call
    - DEBUG: peers: export functions that use locks
    - MINOR: stick-table: permit stksess_new() to temporarily allocate more entries
    - MEDIUM: stick-tables: relax stktable_trash_oldest() to only purge what is needed
    - MEDIUM: stick-tables: give up on lock contention in process_table_expire()
    - MEDIUM: stick-tables: don't wait indefinitely in stktable_add_pend_updates()
    - MEDIUM: peers: don't even try to process updates under contention
    - BUG/MEDIUM: h1: Allow reception if we have early data
    - BUG/MEDIUM: ssl: create the mux immediately on early data
    - MINOR: ssl: Add a flag to let it known we have an ALPN negociated
    - MINOR: ssl: Use the new flag to know when the ALPN has been set.
    - MEDIUM: server: Introduce the concept of path parameters
    - CLEANUP: backend: clarify the role of the init_mux variable in connect_server()
    - CLEANUP: backend: invert the condition to start the mux in connect_server()
    - CLEANUP: backend: simplify the complex ifdef related to 0RTT in connect_server()
    - CLEANUP: backend: clarify the cases where we want to use early data
    - MEDIUM: server: Make use of the stored ALPN stored in the server
    - BUILD: ssl: address a recent build warning when QUIC is enabled
    - BUG/MINOR: activity: fix reporting of task latency
    - MINOR: activity: indicate the number of calls on "show tasks"
    - MINOR: tools: don't emit "+0" for symbol names which exactly match known ones
    - BUG/MEDIUM: stick-tables: don't loop on non-expirable entries
    - DEBUG: stick-tables: export stktable_add_pend_updates() for better reporting
    - BUG/MEDIUM: ssl: Fix a crash when using QUIC
    - BUG/MEDIUM: ssl: Fix a crash if we failed to create the mux
    - MEDIUM: dns: bind the nameserver sockets to the initiating thread
    - MEDIUM: resolvers: make the process_resolvers() task single-threaded
    - BUG/MINOR: stick-table: make sure never to miss a process_table_expire update
    - MEDIUM: stick-table: move process_table_expire() to a single thread
    - MEDIUM: peers: move process_peer_sync() to a single thread
    - BUG/MAJOR: stream: Force channel analysis on successful synchronous send
    - MINOR: quic: get rid of ->target quic_conn struct member
    - MINOR: quic-be: make SSL/QUIC objects use their own indexes (ssl_qc_app_data_index)
    - MINOR: quic: display build warning for compat layer on recent OpenSSL
    - DOC: quic: clarifies limited-quic support
    - BUG/MINOR: acme: null pointer dereference upon allocation failure
    - BUG/MEDIUM: jws: return size_t in JWS functions
    - BUG/MINOR: ssl: Potential NULL deref in trace macro
    - BUG/MINOR: ssl: Fix potential NULL deref in trace callback
    - BUG/MINOR: ocsp: prototype inconsistency
    - MINOR: ocsp: put internal functions as static ones
    - MINOR: ssl: set functions as static when no protypes in the .h
    - BUILD: ssl: functions defined but not used
    - BUG/MEDIUM: resolvers: Properly cache do-resolv resolution
    - BUG/MINOR: resolvers: Restore round-robin selection on records in DNS answers
    - MINOR: activity: don't report the lat_tot column for show profiling tasks
    - MINOR: activity: add a new lkw_avg column to show profiling stats
    - MINOR: activity: collect time spent waiting on a lock for each task
    - MINOR: thread: add a lock level information in the thread_ctx
    - MINOR: activity: add a new lkd_avg column to show profiling stats
    - MINOR: activity: collect time spent with a lock held for each task
    - MINOR: activity: add a new mem_avg column to show profiling stats
    - MINOR: activity: collect CPU time spent on memory allocations for each task
    - MINOR: activity/memory: count allocations performed under a lock
    - DOC: proxy-protocol: Add TLS group and sig scheme TLVs
    - BUG/MEDIUM: resolvers: Test for empty tree when getting a record from DNS answer
    - BUG/MEDIUM: resolvers: Make resolution owns its hostname_dn value
    - BUG/MEDIUM: resolvers: Accept to create resolution without hostname
    - BUG/MEDIUM: resolvers: Wake resolver task up whne unlinking a stream requester
    - BUG/MINOR: ocsp: Crash when updating CA during ocsp updates
    - Revert "BUG/MINOR: ocsp: Crash when updating CA during ocsp updates"
    - BUG/MEDIUM: http_ana: fix potential NULL deref in http_process_req_common()
    - MEDIUM: log/proxy: store log-steps selection using a bitmask, not an eb tree
    - BUG/MINOR: ocsp: Crash when updating CA during ocsp updates
    - BUG/MINOR: resolvers: always normalize FQDN from response
    - BUILD: makefile: implement support for running a command in range
    - IMPORT: cebtree: import version 0.5.0 to support duplicates
    - MEDIUM: migrate the patterns reference to cebs_tree
    - MEDIUM: guid: switch guid to more compact cebuis_tree
    - MEDIUM: server: switch addr_node to cebis_tree
    - MEDIUM: server: switch conf.name to cebis_tree
    - MEDIUM: server: switch the host_dn member to cebis_tree
    - MEDIUM: proxy: switch conf.name to cebis_tree
    - MEDIUM: stktable: index table names using compact trees
    - MINOR: proxy: add proxy_get_next_id() to find next free proxy ID
    - MINOR: listener: add listener_get_next_id() to find next free listener ID
    - MINOR: server: add server_get_next_id() to find next free server ID
    - CLEANUP: server: use server_find_by_id() when looking for already used IDs
    - MINOR: server: add server_index_id() to index a server by its ID
    - MINOR: listener: add listener_index_id() to index a listener by its ID
    - MINOR: proxy: add proxy_index_id() to index a proxy by its ID
    - MEDIUM: proxy: index proxy ID using compact trees
    - MEDIUM: listener: index listener ID using compact trees
    - MEDIUM: server: index server ID using compact trees
    - CLEANUP: server: slightly reorder fields in the struct to plug holes
    - CLEANUP: proxy: slightly reorganize fields to plug some holes
    - CLEANUP: backend: factor the connection lookup loop
    - CLEANUP: server: use eb64_entry() not ebmb_entry() to convert an eb64
    - MINOR: server: pass the server and thread to srv_migrate_conns_to_remove()
    - CLEANUP: backend: use a single variable for removed in srv_cleanup_idle_conns()
    - MINOR: connection: pass the thread number to conn_delete_from_tree()
    - MEDIUM: connection: move idle connection trees to ceb64
    - MEDIUM: connection: reintegrate conn_hash_node into connection
    - CLEANUP: tools: use the item API for the file names tree
    - CLEANUP: vars: use the item API for the variables trees
    - BUG/MEDIUM: pattern: fix possible infinite loops on deletion
    - CI: scripts: add support for git in openssl builds
    - CI: github: add an OpenSSL + ECH job
    - CI: scripts: mkdir BUILDSSL_TMPDIR
    - Revert "BUG/MEDIUM: pattern: fix possible infinite loops on deletion"
    - BUG/MEDIUM: pattern: fix possible infinite loops on deletion (try 2)
    - CLEANUP: log: remove deadcode in px_parse_log_steps()
    - MINOR: counters: document that tg shared counters are tied to shm-stats-file mapping
    - DOC: internals: document the shm-stats-file format/mapping
    - IMPORT: ebtree: delete unusable ebpttree.c
    - IMPORT: eb32/eb64: reorder the lookup loop for modern CPUs
    - IMPORT: eb32/eb64: use a more parallelizable check for lack of common bits
    - IMPORT: eb32: drop the now useless node_bit variable
    - IMPORT: eb32/eb64: place an unlikely() on the leaf test
    - IMPORT: ebmb: optimize the lookup for modern CPUs
    - IMPORT: eb32/64: optimize insert for modern CPUs
    - IMPORT: ebtree: only use __builtin_prefetch() when supported
    - IMPORT: ebst: use prefetching in lookup() and insert()
    - IMPORT: ebtree: Fix UB from clz(0)
    - IMPORT: ebtree: add a definition of offsetof()
    - IMPORT: ebtree: replace hand-rolled offsetof to avoid UB
    - MINOR: listener: add the "cc" bind keyword to set the TCP congestion controller
    - MINOR: server: add the "cc" keyword to set the TCP congestion controller
    - BUG/MEDIUM: ring: invert the length check to avoid an int overflow
    - MINOR: trace: don't call strlen() on the thread-id numeric encoding
    - MINOR: trace: don't call strlen() on the function's name
    - OPTIM: sink: reduce contention on sink_announce_dropped()
    - OPTIM: sink: don't waste time calling sink_announce_dropped() if busy
    - CLEANUP: ring: rearrange the wait loop in ring_write()
    - OPTIM: ring: always relax in the ring lock and leader wait loop
    - OPTIM: ring: check the queue's owner using a CAS on x86
    - OPTIM: ring: avoid reloading the tail_ofs value before the CAS in ring_write()
    - BUG/MEDIUM: sink: fix unexpected double postinit of sink backend
    - MEDIUM: stats: consider that shared stats pointers may be NULL
    - BUG/MEDIUM: http-client: Fix the test on the response start-line
    - MINOR: acme: acme-vars allow to pass data to the dpapi sink
    - MINOR: acme: check acme-vars allocation during escaping
    - BUG/MINOR: acme/cli: wrong description for "acme challenge_ready"
    - CI: move VTest preparation & friends to dedicated composite action
    - BUG/MEDIUM: stick-tables: Don't let table_process_entry() handle refcnt
    - BUG/MINOR: compression: Test payload size only if content-length is specified
    - BUG/MINOR: pattern: Properly flag virtual maps as using samples
    - BUG/MINOR: acme: possible overflow on scheduling computation
    - BUG/MINOR: acme: possible overflow in acme_will_expire()
    - CLEANUP: acme: acme_will_expire() uses acme_schedule_date()
    - BUG/MINOR: pattern: Fix pattern lookup for map with opt@ prefix
    - CI: scripts: build curl with ECH support
    - CI: github: add curl+ech build into openssl-ech job
    - BUG/MEDIUM: ssl: ca-file directory mode must read every certificates of a file
    - MINOR: acme: provider-name for dpapi sink
    - BUILD: acme: fix false positive null pointer dereference
    - MINOR: backend: srv_queue helper
    - MINOR: backend: srv_is_up converter
    - BUILD: halog: misleading indentation in halog.c
    - CI: github: build halog on the vtest job
    - BUG/MINOR: acme: don't unlink from acme_ctx_destroy()
    - BUG/MEDIUM: acme: cfg_postsection_acme() don't init correctly acme sections
    - MINOR: acme: implement "reuse-key" option
    - ADMIN: haproxy-dump-certs: implement a certificate dumper
    - ADMIN: dump-certs: don't update the file if it's up to date
    - ADMIN: dump-certs: create files in a tmpdir
    - ADMIN: dump-certs: fix lack of / in -p
    - ADMIN: dump-certs: use same error format as haproxy
    - ADMIN: reload: add a synchronous reload helper
    - BUG/MEDIUM: acme: free() of i2d_X509_REQ() with AWS-LC
    - ADMIN: reload: introduce verbose and silent mode
    - ADMIN: reload: introduce -vv mode
    - MINOR: mt_list: Implement MT_LIST_POP_LOCKED()
    - BUG/MEDIUM: stick-tables: Make sure not to free a pending entry
    - MINOR: sched: let's permit to share the local ctx between threads
    - MINOR: sched: pass the thread number to is_sched_alive()
    - BUG/MEDIUM: wdt: improve stuck task detection accuracy
    - MINOR: ssl: add the ssl_bc_sni sample fetch function to retrieve backend SNI
    - MINOR: rawsock: introduce CO_RFL_TRY_HARDER to detect closures on complete reads
    - MEDIUM: ssl: don't always process pending handshakes on closed connections
    - MEDIUM: servers: Schedule the server requeue target on creation
    - MEDIUM: fwlc: Make it so fwlc_srv_reposition works with unqueued srv
    - BUG/MEDIUM: fwlc: Handle memory allocation failures.
    - DOC: config: clarify some known limitations of the json_query() converter
    - BUG/CRITICAL: mjson: fix possible DoS when parsing numbers
    - BUG/MINOR: h2: forbid 'Z' as well in header field names checks
    - BUG/MINOR: h3: forbid 'Z' as well in header field names checks
    - BUG/MEDIUM: resolvers: break an infinite loop in resolv_get_ip_from_response()
2025-10-03 12:12:51 +02:00
Willy Tarreau
67603162c1 DOC: config: clarify some known limitations of the json_query() converter
Oula Kivalo reported that different JSON libraries may process duplicate
keys differently and that most JSON libraries usually decode the stream
before extracting keys, while the current mjson implementation decodes the
contents during extraction instead. Let's document this point so that
users are aware of the limitations and do not rely on the current behavior
and do not use it for what it's not made for (e.g. content sanitization).

This is also the case for jwt_header_query(), jwt_payload_query() and
jwt_verify(), which already refer to this converter for specificities.
2025-10-02 08:57:39 +02:00
Willy Tarreau
dae4cfe8c5 MINOR: ssl: add the ssl_bc_sni sample fetch function to retrieve backend SNI
Sometimes in order to debug certain difficult situations it can be useful
to know what SNI was configured on a connection going to a server, for
example to match it against what the server saw or to detect cases where
a server would route on SNI instead of Host. This sample fetch function
simply retrieves the SNI configured on the backend connection, if any.
2025-10-01 10:18:53 +02:00
William Lallemand
b70c7f48fa MINOR: acme: implement "reuse-key" option
The new "reuse-key" option in the "acme" section, allows to keep the
private key instead of generating a new one at each renewal.
2025-09-27 21:41:39 +02:00
Chris Staite
54f53bc875 MINOR: backend: srv_is_up converter
There is currently an srv_queue converter which is capable of taking the
output of a dynamic name and determining the queue length for a given
server.  In addition there is a sample fetcher for whether a server is
currently up.  This simply combines the two such that srv_is_up can be
used as a converter too.

Future work might extend this to other sample fetchers for servers, but
this is probably the most useful for acl routing.
2025-09-26 10:46:48 +02:00
Chris Staite
faba98c85f MINOR: backend: srv_queue helper
In preparation of providing further server converters, split the code
for finding the server from the sample out.

Additionally, update the documentation for srv_queue converter to note
security concerns.
2025-09-26 10:46:48 +02:00
Willy Tarreau
8c077c17eb MINOR: server: add the "cc" keyword to set the TCP congestion controller
It is possible on at least Linux and FreeBSD to set the congestion control
algorithm to be used with outgoing connections, among the list of supported
and permitted ones. Let's expose this setting with "cc". Unknown or
forbidden algorithms will be ignored and the default one will continue to
be used.
2025-09-17 17:19:33 +02:00
Willy Tarreau
4ed3cf295d MINOR: listener: add the "cc" bind keyword to set the TCP congestion controller
It is possible on at least Linux and FreeBSD to set the congestion control
algorithm to be used with incoming connections, among the list of supported
and permitted ones. Let's expose this setting with "cc". Permission issues
might be reported (as warnings).
2025-09-17 17:03:42 +02:00
Amaury Denoyelle
c15129f7dc DOC: quic: clarifies limited-quic support
This patch extends the documentation for "limited-quic" global keyword.
It mentions first that it relies on USE_QUIC_OPENSSL_COMPAT=1 build
option.

Compatibility with TLS libraries is now clearly exposed. In particular,
it highlights the fact that it is mostly targetted at OpenSSL version
prior to 3.5.2, and that it should be disabled if a recent OpenSSL
release is available. It also states that limited-quic does nothing if
USE_QUIC_OPENSSL_COMPAT is not set during compilation.
2025-09-11 10:11:12 +02:00
Christopher Faulet
ffc1f096e0 MEDIUM: httpcheck/ssl: Base the SNI value on the HTTP host header by default
Similarly to the automic SNI selection for regulat SSL traffic, the SNI of
health-checks HTTPS connection is now automatically set by default by using
the host header value. "check-sni-auto" and "no-check-sni-auto" server
settings were added to change this behavior.

Only implicit HTTPS health-checks can take advantage of this feature. In
this case, the host header value from the "option httpchk" directive is used
to extract the SNI. It is disabled if http-check rules are used. So, the SNI
must still be explicitly specified via a "http-check connect" rule.

This patch with should paritally fix the issue #3081.
2025-09-05 15:56:42 +02:00
Christopher Faulet
668916c1a2 MEDIUM: server/ssl: Base the SNI value to the HTTP host header by default
For HTTPS outgoing connections, the SNI is now automatically set using the
Host header value if no other value is already set (via the "sni" server
keyword). It is now the default behavior. It could be disabled with the
"no-sni-auto" server keyword. And eventually "sni-auto" server keyword may
be used to reset any previous "no-sni-auto" setting. This option can be
inherited from "default-server" settings. Finally, if no connection name is
set via "pool-conn-name" setting, the selected value is used.

The automatic selection of the SNI is enabled by default for all outgoing
connections. But it is concretely used for HTTPS connections only. The
expression used is "req.hdr(host),host_only".

This patch should paritally fix the issue #3081. It only covers the server
part. Another patch will add the feature for HTTP health-checks.
2025-09-05 15:56:42 +02:00
Willy Tarreau
b167d545cf [RELEASE] Released version 3.3-dev8
Released version 3.3-dev8 with the following main changes :
    - BUG/MEDIUM: mux-h2: fix crash on idle-ping due to unwanted ABORT_NOW
    - BUG/MINOR: quic-be: missing Initial packet number space discarding
    - BUG/MEDIUM: quic-be: crash after backend CID allocation failures
    - BUG/MEDIUM: ssl: apply ssl-f-use on every "ssl" bind
    - BUG/MAJOR: stream: Remove READ/WRITE events on channels after analysers eval
    - MINOR: dns: dns_connect_nameserver: fix fd leak at error path
    - BUG/MEDIUM: quic: reset padding when building GSO datagrams
    - BUG/MINOR: quic: do not emit probe data if CONNECTION_CLOSE requested
    - BUG/MAJOR: quic: fix INITIAL padding with probing packet only
    - BUG/MINOR: quic: don't coalesce probing and ACK packet of same type
    - MINOR: quic: centralize padding for HP sampling on packet building
    - MINOR: http_ana: fix typo in http_res_get_intercept_rule
    - BUG/MEDIUM: http_ana: handle yield for "stats http-request" evaluation
    - MINOR: applet: Rely on applet flag to detect the new api
    - MINOR: applet: Add function to test applet flags from the appctx
    - MINOR: applet: Add a flag to know an applet is using HTX buffers
    - MINOR: applet: Make some applet functions HTX aware
    - MEDIUM: applet: Set .rcv_buf and .snd_buf functions on default ones if not set
    - BUG/MEDIUM: mux-spop: Reject connection attempts from a non-spop frontend
    - REGTESTS: jwt: create dynamically "cert.ecdsa.pem"
    - BUG/MEDIUM: spoe: Improve error detection in SPOE applet on client abort
    - MINOR: haproxy: abort config parsing on fatal errors for post parsing hooks
    - MEDIUM: server: split srv_init() in srv_preinit() + srv_postinit()
    - MINOR: proxy: handle shared listener counters preparation from proxy_postcheck()
    - DOC: configuration: reword 'generate-certificates'
    - BUG/MEDIUM: quic-be: avoid crashes when releasing Initial pktns
    - BUG/MINOR: quic: reorder fragmented RX CRYPTO frames by their offsets
    - MINOR: ssl: diagnostic warning when both 'default-crt' and 'strict-sni' are used
    - MEDIUM: ssl: convert diag to warning for strict-sni + default-crt
    - DOC: configuration: clarify 'default-crt' and implicit default certificates
    - MINOR: quic: remove ->offset qf_crypto struct field
    - BUG/MINOR: mux-quic: trace with non initialized qcc
    - BUG/MINOR: acl: set arg_list->kw to aclkw->kw string literal if aclkw is found
    - BUG/MEDIUM: mworker: fix startup and reload on macOS
    - BUG/MINOR: connection: rearrange union list members
    - BUG/MINOR: connection: remove extra session_unown_conn() on reverse
    - MINOR: cli: display failure reason on wait command
    - BUG/MINOR: server: decrement session idle_conns on del server
    - BUG/MINOR: mux-quic: do not access conn after idle list insert
    - MINOR: session: document explicitely that session_add_conn() is safe
    - MINOR: session: uninline functions related to BE conns management
    - MINOR: session: refactor alloc/lookup of sess_conns elements
    - MEDIUM: session: protect sess conns list by idle_conns_lock
    - MINOR: server: shard by thread sess_conns member
    - MEDIUM: server: close new idle conns if server in maintenance
    - MEDIUM: session: close new idle conns if server in maintenance
    - MINOR: server: cleanup idle conns for server in maint already stopped
    - MINOR: muxes: enforce thread-safety for private idle conns
    - MEDIUM: conn/muxes/ssl: reinsert BE priv conn into sess on IO completion
    - MEDIUM: conn/muxes/ssl: remove BE priv idle conn from sess on IO
    - MEDIUM: mux-quic: enforce thread-safety of backend idle conns
    - MAJOR: server: implement purging of private idle connections
    - MEDIUM: session: account on server idle conns attached to session
    - MAJOR: server: do not remove idle conns in del server
    - BUILD: mworker: fix ignoring return value of ‘read’
    - DOC: unreliable sockpair@ on macOS
    - MINOR: muxes: adjust takeover with buf_wait interaction
    - OPTIM: backend: set release on takeover for strict maxconn
    - DOC: configuration: confuse "strict-mode" with "zero-warning"
    - MINOR: doc: add missing statistics column
    - MINOR: doc: add missing statistics column
    - MINOR: stats: display new curr_sess_idle_conns server counter
    - MINOR: proxy: extend "show servers conn" output
    - MEDIUM: proxy: Reject some header names for 'http-send-name-header' directive
    - BUG/BUILD: stats: fix build due to missing stat enum definition
    - DOC: proxy-protocol: Make example for PP2_SUBTYPE_SSL_SIG_ALG accurate
    - CLEANUP: quic: remove a useless CRYPTO frame variable assignment
    - BUG/MEDIUM: quic: CRYPTO frame freeing without eb_delete()
    - BUG/MAJOR: mux-quic: fix crash on reload during emission
    - MINOR: conn/muxes/ssl: add ASSUME_NONNULL() prior to _srv_add_idle
    - REG-TESTS: map_redirect: Don't use hdr_dom in ACLs with "-m end" matching method
    - MINOR: acl: Only allow one '-m' matching method
    - MINOR: acl; Warn when matching method based on a suffix is overwritten
    - BUG/MEDIUM: server: Duplicate healthcheck's alpn inherited from default server
    - BUG/MINOR: server: Duplicate healthcheck's sni inherited from default server
    - BUG/MINOR: acl: Properly detect overwritten matching method
    - BUG/MINOR: halog: Add OOM checks for calloc() in filter_count_srv_status() and filter_count_url()
    - BUG/MINOR: log: Add OOM checks for calloc() and malloc() in logformat parser and dup_logger()
    - BUG/MINOR: acl: Add OOM check for calloc() in smp_fetch_acl_parse()
    - BUG/MINOR: cfgparse: Add OOM check for calloc() in cfg_parse_listen()
    - BUG/MINOR: compression: Add OOM check for calloc() in parse_compression_options()
    - BUG/MINOR: tools: Add OOM check for malloc() in indent_msg()
    - BUG/MINOR: quic: ignore AGAIN ncbuf err when parsing CRYPTO frames
    - MINOR: quic/flags: complete missing flags
    - BUG/MINOR: quic: fix room check if padding requested
    - BUG/MINOR: quic: fix padding issue on INITIAL retransmit
    - BUG/MINOR: quic: pad Initial pkt with CONNECTION_CLOSE on client
    - MEDIUM: quic: strengthen BUG_ON() for unpad Initial packet on client
    - DOC: configuration: rework the jwt_verify keyword documentation
    - BUG/MINOR: haproxy: be sure not to quit too early on soft stop
    - BUILD: acl: silence a possible null deref warning in parse_acl_expr()
    - MINOR: quic: Add more information about RX packets
    - CI: fix syntax of Quic Interop pipelines
    - MEDIUM: cfgparse: warn when using user/group when built statically
    - BUG/MEDIUM: stick-tables: don't leave the expire loop with elements deleted
    - BUG/MINOR: stick-tables: never leave used entries without expiration
    - BUG/MEDIUM: peers: don't fail twice to grab the update lock
    - MINOR: stick-tables: limit the number of visited nodes during expiration
    - OPTIM: stick-tables: exit expiry faster when the update lock is held
    - MINOR: counters: retrieve detailed errmsg upon failure with counters_{fe,be}_shared_prepare()
    - MINOR: stats-file: introduce shm-stats-file directive
    - MEDIUM: stats-file: processes share the same clock source from shm-stats-file
    - MINOR: stats-file: add process slot management for shm stats file
    - MEDIUM: stats-file/counters: store and preload stats counters as shm file objects
    - DOC: config: document "shm-stats-file" directive
    - OPTIM: stats-file: don't unnecessarily die hard on shm_stats_file_reuse_object()
    - MINOR: compiler: add ALWAYS_PAD() macro
    - BUILD: stats-file: fix aligment issues
    - MINOR: stats-file: reserve some bytes in exported structs
    - MEDIUM: stats-file: add some BUG_ON() guards to ensure exported structs are not changed by accident
    - BUG/MINOR: check: ensure check-reuse is compatible with SSL
    - BUG/MINOR: check: fix dst address when reusing a connection
    - REGTESTS: explicitly use "balance roundrobin" where RR is needed
    - MAJOR: backend: switch the default balancing algo to "random"
    - BUG/MEDIUM: conn: fix UAF on connection after reversal on edge
    - BUG/MINOR: connection: streamline conn detach from lists
    - BUG/MEDIUM: quic-be: too early SSL_SESSION initialization
    - BUG/MINOR: log: fix potential memory leak upon error in add_to_logformat_list()
    - MEDIUM: init: always warn when running as root without being asked to
    - MINOR: sample: Add base2 converter
    - MINOR: version: add -vq, -vqb, and -vqs flags for concise version output
    - BUILD: trace: silence a bogus build warning at -Og
    - MINOR: trace: accept trace spec right after "-dt" on the command line
    - BUILD: makefile: bump the default minimum linux version to 4.17
2025-09-05 09:54:34 +02:00
Willy Tarreau
85ac6a6f7b BUILD: makefile: bump the default minimum linux version to 4.17
As explained during the 3.3-dev7 announcement below:
  https://www.mail-archive.com/haproxy@formilux.org/msg46073.html

no regularly maintained distro supports a kernel older than 4.18 anymore,
and KTLS is supported since 4.17. So it's about the right moment to bump
the default minimum kernel version supported by glibc and musl to
automatically cover new features. The linux-glibc-legacy target still
supports 2.6.28 and above.
2025-09-05 09:44:56 +02:00
Maximilian Moehl
5d9abc68b4 MINOR: sample: Add base2 converter
This commit adds the base2 converter to turn binary input into it's
string representation. Each input byte is converted into a series of
eight characters which are either 0s and 1s by bit-wise comparison.
2025-09-05 08:51:51 +02:00
Willy Tarreau
93cc18ac42 MAJOR: backend: switch the default balancing algo to "random"
For many years, an unset load balancing algorithm would use "roundrobin".
It was shown several times that "random" with at least 2 draws (the
default) generally provides better performance and fairness in that
it will automatically adapt to the server's load and capacity. This
was further described with numbers in this discussion:

  https://www.mail-archive.com/haproxy@formilux.org/msg46011.html
  https://github.com/orgs/haproxy/discussions/3042

BTW there were no objection and only support for the change.

The goal of this patch is to change the default algo when none is
specified, from "roundrobin" to "random". This way, users who don't
care and don't set the load balancing algorithm will benefit from a
better one in most cases, while those who have good reasons to prefer
roundrobin (for session affinity or for reproducible sequences like used
in regtests) can continue to specify it.

The vast majority of users should not notice a difference.
2025-09-04 08:30:35 +02:00
Aurelien DARRAGON
16abfb6e06 DOC: config: document "shm-stats-file" directive
Add some documentation for "shm-stats-file" and
"shm-stats-file-max-objects" experimental directives related to the use
of shared memory for storing stats counters (see previous commits for
implementation details)
2025-09-03 15:59:42 +02:00
William Lallemand
ce57f11991 DOC: configuration: rework the jwt_verify keyword documentation
Split the documentation in multiple sections:

- Explanation about what it does and how
- <alg> parameter with array of parameters
- <key> parameter with details about certificates and public keys
- Return value

Others changes:

- certificates does not need to be known during configuration parsing
- differences between public key and certificate
2025-09-02 11:16:42 +02:00
Christopher Faulet
6ea50ba462 MINOR: acl; Warn when matching method based on a suffix is overwritten
From time to time, issues are reported about string matching based on suffix
(for instance path_beg). Each time, it appears these ACLs are used in
conjunction with a converter or followed by an explicit matching method
(-m).

Unfortunatly, it is not an issue but an expected behavior, while it is not
obvious. matching suffixes can be consider as aliases on the corresponding
'-m' matching method. Thus "path_beg" is equivalent to "path -m beg". When a
converter is used the original matching (string) is used and the suffix is
lost. When followed by an explicit matching method, it overwrites the
matching method based on the suffix.

It is expected but confusing. Thus now a warning is emitted because it is a
configuration issue for sure. Following sample fetch functions are concerned:

 * base
 * path
 * req.cook
 * req.hdr
 * res.hdr
 * url
 * urlp

The configuration manual was modified to make it less ambiguous.
2025-09-01 15:45:05 +02:00
Christopher Faulet
8f3b537547 MEDIUM: proxy: Reject some header names for 'http-send-name-header' directive
From time to time, we saw the 'http-send-name-header' directive used to
overwrite the Host header to workaround limitations of a buggy application.
Most of time, this led to troubles. This was never officially supported and
each time we strongly discouraged anyone to do so. We already thought to
deprecate this directive, but it seems to be still used by few people. So
for now, we decided to strengthen the tests performed on it.

The header name is now checked during the configuration parsing to forbid
some risky names. 'Host', 'Content-Length', 'Transfer-Encoding' and
'Connection' header names are now rejected. But more headers could be added
in future.
2025-08-29 09:27:01 +02:00
William Lallemand
e0ec01849f DOC: configuration: confuse "strict-mode" with "zero-warning"
4b10302fd8 ("MINOR: cfgparse: implement a simple if/elif/else/endif
macro block handler") introduces a confusion between "strict-mode" and
"zero-warning".

This patch fixes the issue by changing "strict-mode" by "zero-warning"
in section 2.4. Conditional blocks.

Must be backported as far as 2.4.
2025-08-28 17:35:06 +02:00
William Lallemand
8a456399db DOC: unreliable sockpair@ on macOS
We discovered that the sockpair@ protocol is unreliable in macOS, this
is the same problem that we fixed in d7f6819. But it's not possible to
implement a acknowledgment once the socket are in non-blocking mode.

The problem was discovered in issue #3045.

Must be backported in every stable versions.
2025-08-28 15:35:17 +02:00
William Lallemand
2ed515c632 DOC: configuration: clarify 'default-crt' and implicit default certificates
Clarify the behavior of implicit default certificates when used on the
same line as the default-crt keyword.

Should be backported as far as 3.2
2025-08-27 17:09:02 +02:00
William Lallemand
c36e4fb17f DOC: configuration: reword 'generate-certificates'
Reword the 'generate-certificates' keyword documentation to clarify
what's happening upon error.

This was discussed in ticket #3082.
2025-08-27 13:42:29 +02:00
William Lallemand
7b3b3d7146 BUG/MEDIUM: ssl: apply ssl-f-use on every "ssl" bind
This patch introduces a change of behavior in the configuration parsing.

Previously the "ssl-f-use" lines were only applied on "ssl" bind lines
that does not have any "crt" configured.
Since there is no warning and you could mix bind lines with and without
crt, this is really confusing.

This patch applies the "ssl-f-use" lines on every "ssl" bind lines.

This was discussed in ticket #3082.

Must be backported in 3.2.
2025-08-21 14:58:06 +02:00
Willy Tarreau
82b002a225 [RELEASE] Released version 3.3-dev7
Released version 3.3-dev7 with the following main changes :
    - MINOR: quic: duplicate GSO unsupp status from listener to conn
    - MINOR: quic: define QUIC_FL_CONN_IS_BACK flag
    - MINOR: quic: prefer qc_is_back() usage over qc->target
    - BUG/MINOR: cfgparse: immediately stop after hard error in srv_init()
    - BUG/MINOR: cfgparse-listen: update err_code for fatal error on proxy directive
    - BUG/MINOR: proxy: avoid NULL-deref in post_section_px_cleanup()
    - MINOR: guid: add guid_get() helper
    - MINOR: guid: add guid_count() function
    - MINOR: clock: add clock_set_now_offset() helper
    - MINOR: clock: add clock_get_now_offset() helper
    - MINOR: init: add REGISTER_POST_DEINIT_MASTER() hook
    - BUILD: restore USE_SHM_OPEN build option
    - BUG/MINOR: stick-table: cap sticky counter idx with tune.nb_stk_ctr instead of MAX_SESS_STKCTR
    - MINOR: sock: update broken accept4 detection for older hardwares.
    - CI: vtest: add os name to OT cache key
    - CI: vtest: add Ubuntu arm64 builds
    - BUG/MEDIUM: ssl: Fix 0rtt to the server
    - BUG/MEDIUM: ssl: fix build with AWS-LC
    - MEDIUM: acme: use lowercase for challenge names in configuration
    - BUG/MINOR: init: Initialize random seed earlier in the init process
    - DOC: management: clarify usage of -V with -c
    - MEDIUM: ssl/cli: relax crt insertion in crt-list of type directory
    - MINOR: tools: implement ha_aligned_zalloc()
    - CLEANUP: fd: make use of ha_aligned_alloc() for the fdtab
    - MINOR: pools: distinguish the requested alignment from the type-specific one
    - MINOR: pools: permit to optionally specify extra size and alignment
    - MINOR: pools: always check that requested alignment matches the type's
    - DOC: api: update the pools API with the alignment and typed declarations
    - MEDIUM: tree-wide: replace most DECLARE_POOL with DECLARE_TYPED_POOL
    - OPTIM: tasks: align task and tasklet pools to 64
    - OPTIM: buffers: align the buffer pool to 64
    - OPTIM: queue: align the pendconn pools to 64
    - OPTIM: connection: align connection pools to 64
    - OPTIM: server: start to use aligned allocs in server
    - DOC: management: fix typo in commit f4f93c56
    - DOC: config: recommend single quoting passwords
    - MINOR: tools: also implement ha_aligned_alloc_typed()
    - MEDIUM: server: introduce srv_alloc()/srv_free() to alloc/free a server
    - MINOR: server: align server struct to 64 bytes
    - MEDIUM: ring: always allocate properly aligned ring structures
    - CI: Update to actions/checkout@v5
    - MINOR: quic: implement qc_ssl_do_hanshake()
    - BUG/MEDIUM: quic: listener connection stuck during handshakes (OpenSSL 3.5)
    - BUG/MINOR: mux-h1: fix wrong lock label
    - MEDIUM: dns: don't call connect to dest socket for AF_INET*
    - BUG/MINOR: spoe: Properly detect and skip empty NOTIFY frames
    - BUG/MEDIUM: cli: Report inbuf is no longer full when a line is consumed
    - BUG/MEDIUM: quic: crash after quic_conn allocation failures
    - BUG/MEDIUM: quic-be: do not initialize ->conn too early
    - BUG/MEDIUM: mworker: more verbose error upon loading failure
    - MINOR: xprt: Add recvmsg() and sendmsg() parameters to rcv_buf() and snd_buf().
    - MINOR: ssl: Add a "flags" field to ssl_sock_ctx.
    - MEDIUM: xprt: Add a "get_capability" method.
    - MEDIUM: mux_h1/mux_pt: Use XPRT_CAN_SPLICE to decide if we should splice
    - MINOR: cfgparse: Add a new "ktls" option to bind and server.
    - MINOR: ssl: Define HAVE_VANILLA_OPENSSL if openssl is used.
    - MINOR: build: Add a new option, USE_KTLS.
    - MEDIUM: ssl: Add kTLS support for OpenSSL.
    - MEDIUM: splice: Don't consider EINVAL to be a fatal error
    - MEDIUM: ssl: Add splicing with SSL.
    - MEDIUM: ssl: Add ktls support for AWS-LC.
    - MEDIUM: ssl: Add support for ktls on TLS 1.3 with AWS-LC
    - MEDIUM: ssl: Handle non-Application data record with AWS-LC
    - MINOR: ssl: Add a way to globally disable ktls.
2025-08-20 21:52:39 +02:00
Olivier Houchard
6f21c5631a MINOR: ssl: Add a way to globally disable ktls.
Add a new global option, "noktls", as well as a command line option,
"-dT", to totally disable ktls usage, even if it is activated on servers
or binds in the configuration.
That makes it easier to quickly figure out if a problem is related to
ktls or not.
2025-08-20 18:33:11 +02:00
Olivier Houchard
e8674658ae MINOR: cfgparse: Add a new "ktls" option to bind and server.
Add a new "ktls" option to bind and server. Valid values are "on" and
"off".
It currently does nothing, but when kTLS will be implemented, it will
enable or disable kTLS for the corresponding sockets.
It is marked as experimental for now.
2025-08-20 18:33:10 +02:00
Lukas Tribus
9432e7d688 DOC: config: recommend single quoting passwords
Suggests single quoting passwords and update examples to avoid unexpected
behaviors due to special characters.

Should be backported to stable versions.

Link: https://discourse.haproxy.org/t/enhance-documentation-for-insecure-passwords-and-invald-characters/11959
2025-08-13 09:08:25 +02:00
William Lallemand
84589a9f48 MEDIUM: acme: use lowercase for challenge names in configuration
Both the RFC and the IANA registry refers to challenge names in
lowercase. If we need to implement more challenges, it's better to
use the correct naming.

In order to keep the compatibility with the previous configurations, the
parsing does a strcasecmp() instead of a strcmp().

Also rename every occurence in the code and doc in lowercase.

This was discussed in issue #1864
2025-08-11 15:09:18 +02:00
Willy Tarreau
d76ee72d03 [RELEASE] Released version 3.3-dev6
Released version 3.3-dev6 with the following main changes :
    - MINOR: acme: implement traces
    - BUG/MINOR: hlua: take default-path into account with lua-load-per-thread
    - CLEANUP: counters: rename counters_be_shared_init to counters_be_shared_prepare
    - MINOR: clock: make global_now_ms a pointer
    - MINOR: clock: make global_now_ns a pointer as well
    - MINOR: mux-quic: release conn after shutdown on BE reuse failure
    - MINOR: session: strengthen connection attach to session
    - MINOR: session: remove redundant target argument from session_add_conn()
    - MINOR: session: strengthen idle conn limit check
    - MINOR: session: do not release conn in session_check_idle_conn()
    - MINOR: session: streamline session_check_idle_conn() usage
    - MINOR: muxes: refactor private connection detach
    - BUG/MEDIUM: mux-quic: ensure Early-data header is set
    - BUILD: acme: avoid declaring TRACE_SOURCE in acme-t.h
    - MINOR: acme: emit a log for DNS-01 challenge response
    - MINOR: acme: emit the DNS-01 challenge details on the dpapi sink
    - MEDIUM: acme: allow to wait and restart the task for DNS-01
    - MINOR: acme: update the log for DNS-01
    - BUG/MINOR: acme: possible integer underflow in acme_txt_record()
    - BUG/MEDIUM: hlua_fcn: ensure systematic watcher cleanup for server list iterator
    - MINOR: sample: Add le2dec (little endian to decimal) sample fetch
    - BUILD: fcgi: fix the struct name of fcgi_flt_ctx
    - BUILD: compat: provide relaxed versions of the MIN/MAX macros
    - BUILD: quic: use _MAX() to avoid build issues in pools declarations
    - BUILD: compat: always set _POSIX_VERSION to ease comparisons
    - MINOR: implement ha_aligned_alloc() to return aligned memory areas
    - MINOR: pools: support creating a pool from a pool registration
    - MINOR: pools: add a new flag to declare static registrations
    - MINOR: pools: force the name at creation time to be a const.
    - MEDIUM: pools: change the static pool creation to pass a registration
    - DEBUG: pools: store the pool registration file name and line number
    - DEBUG: pools: also retrieve file and line for direct callers of create_pool()
    - MEDIUM: pools: add an alignment property
    - MINOR: pools: add macros to register aligned pools
    - MINOR: pools: add macros to declare pools based on a struct type
    - MEDIUM: pools: respect pool alignment in allocations
2025-08-06 21:50:00 +02:00
Alexander Stephan
ffbb3cc306 MINOR: sample: Add le2dec (little endian to decimal) sample fetch
This commit introduces a sample fetch, `le2dec`, to convert
little-endian binary input samples into their decimal representations.
The function converts the input into a string containing unsigned
integer numbers, with each number derived from a specified number of
input bytes. The numbers are separated using a user-defined separator.

This new sample is achieved by adding a parametrized sample_conv_2dec
function, unifying the logic for be2dec and le2dec converters.

Co-authored-by: Christian Norbert Menges <christian.norbert.menges@sap.com>
[wt: tracked as GH issue #2915]
Signed-off-by: Willy Tarreau <w@1wt.eu>
2025-08-05 13:47:53 +02:00
Willy Tarreau
cedb4f0461 [RELEASE] Released version 3.3-dev5
Released version 3.3-dev5 with the following main changes :
    - BUG/MEDIUM: queue/stats: also use stream_set_srv_target() for pendconns
    - DOC: list missing global QUIC settings
2025-07-28 11:26:22 +02:00
Amaury Denoyelle
7fa812a1ac DOC: list missing global QUIC settings
Complete list of global keywords with missing QUIC entries.

This could be backported to stable versions. This requires to take into
account the version of introduction for each keyword.
* limited-quic, introduced in 2.8
* no-quic, introduced in 2.8
* tune.quic.cc.cubic.min-losses, introduced in 3.1
2025-07-28 11:22:35 +02:00