]> git.ipfire.org Git - thirdparty/haproxy.git/log
thirdparty/haproxy.git
24 hours agoCLEANUP: assorted typo fixes in the code, commits and doc master
Ilia Shipitsin [Thu, 25 Dec 2025 18:06:04 +0000 (19:06 +0100)] 
CLEANUP: assorted typo fixes in the code, commits and doc

2 days agoMINOR: tcp_sample: implement the fc_saved_syn sample fetch function
Willy Tarreau [Wed, 24 Dec 2025 17:37:11 +0000 (18:37 +0100)] 
MINOR: tcp_sample: implement the fc_saved_syn sample fetch function

This function retrieves the copy of a SYN packet that the system has
kept for us when bind option "tcp-ss" was set to 1 or above. It's
recommended to copy it to a local variable because it will be freed
after being read. It allows to inspect all parts of an incoming SYN
packet, provided that it was preserved (e.g. not possible with SYN
cookies). The doc provides examples of how to use it.

2 days agoMINOR: tcp: implement the get_opt() function
Willy Tarreau [Wed, 24 Dec 2025 16:04:22 +0000 (17:04 +0100)] 
MINOR: tcp: implement the get_opt() function

It relies on the generic sock_conn_get_opt() function and will permit
sample fetch functions to retrieve generic TCP-level info.

2 days agoMINOR: protocol: support a generic way to call getsockopt() on a connection
Willy Tarreau [Wed, 24 Dec 2025 15:54:15 +0000 (16:54 +0100)] 
MINOR: protocol: support a generic way to call getsockopt() on a connection

It's regularly needed to call getsockopt() on a connection, but each
time the calling code has to do all the job by itself. This commit adds
a "get_opt()" callback on the protocol struct, that directly calls
getsockopt() on the connection's FD. A generic implementation for
standard sockets is provided, though QUIC would likely require a
different approach, or maybe a mapping. Due to the overlap between
IP/TCP/socket option values, it is necessary for the caller to indicate
both the level and the option. An abstraction of the level could be
done, but the caller would nonetheless have to know the optname, which
is generally defined in the same include files. So for now we'll
consider that this callback is only for very specific use.

The levels and optnames are purposely passed as signed ints so that it
is possible to further extend the API by using negative levels for
internal namespaces.

2 days agoMINOR: tcp: add new bind option "tcp-ss" to instruct the kernel to save the SYN
Willy Tarreau [Wed, 24 Dec 2025 10:35:09 +0000 (11:35 +0100)] 
MINOR: tcp: add new bind option "tcp-ss" to instruct the kernel to save the SYN

This option enables TCP_SAVE_SYN on the listening socket, which will
cause the kernel to try to save a copy of the SYN packet header (L2,
IP and TCP are supported). This can permit to check the source MAC
address of a client, or find certain TCP options such as a source
address encapsulated using RFC7974. It could also be used as an
alternate approach to retrieving the source and destination addresses
and ports. For now setting the option is enabled, but sample fetch
functions and converters will be needed to extract info.

2 days agoOPTIM: patterns: cache the current generation
Maxime Henrion [Mon, 22 Dec 2025 14:12:40 +0000 (09:12 -0500)] 
OPTIM: patterns: cache the current generation

This makes a significant difference when loading large files and during
commit and clear operations, thanks to improved cache locality. In the
measurements below, master refers to the code before any of the changes
to the patterns code, not the code before this one commit.

Timing the replacement of 10M entries from the CLI with this command
which also reports timestamps at start, end of upload and end of clear:

  $ (echo "prompt i"; echo "show activity"; echo "prepare acl #0";
     awk '{print "add acl @1 #0",$0}' < bad-ip.map; echo "show activity";
     echo "commit acl @1 #0"; echo "clear acl @0 #0";echo "show activity") |
    socat -t 10 - /tmp/sock1 | grep ^uptim

master, on a 3.7 GHz EPYC, 3 samples:

  uptime_now: 6.087030
  uptime_now: 25.981777  => 21.9 sec insertion time
  uptime_now: 29.286368  => 3.3 sec commit+clear

  uptime_now: 5.748087
  uptime_now: 25.740675  => 20.0s insertion time
  uptime_now: 29.039023  => 3.3 s commit+clear

  uptime_now: 7.065362
  uptime_now: 26.769596  => 19.7s insertion time
  uptime_now: 30.065044  => 3.3s commit+clear

And after this commit:

  uptime_now: 6.119215
  uptime_now: 25.023019  => 18.9 sec insertion time
  uptime_now: 27.155503  => 2.1 sec commit+clear

  uptime_now: 5.675931
  uptime_now: 24.551035  => 18.9s insertion
  uptime_now: 26.652352  => 2.1s commit+clear

  uptime_now: 6.722256
  uptime_now: 25.593952  => 18.9s insertion
  uptime_now: 27.724153  => 2.1s commit+clear

Now timing the startup time with a 10M entries file (on another machine)
on master, 20 samples:

Standard Deviation, s: 0.061652677408033
Mean:        4.217

And after this commit:

Standard Deviation, s: 0.081821371548669
Mean:        3.78

2 days agoCLEANUP: patterns: remove dead code
Maxime Henrion [Tue, 23 Dec 2025 15:57:22 +0000 (10:57 -0500)] 
CLEANUP: patterns: remove dead code

Situations where we are iterating over elements and find one with a
different generation ID cannot arise anymore since the elements are kept
per-generation.

2 days agoMEDIUM: patterns: reorganize pattern reference elements
Maxime Henrion [Thu, 18 Dec 2025 04:37:44 +0000 (23:37 -0500)] 
MEDIUM: patterns: reorganize pattern reference elements

Instead of a global list (and tree) of pattern reference elements, we
now have an intermediate pat_ref_gen structure and store the elements in
those. This simplifies the logic of some operations such as commit and
clear, and improves performance in some cases - numbers to be provided
in a subsequent commit after one important optimization is added.

A lot of the changes are due to adding an extra level of indirection,
changing many cases where we iterate over all elements to an outer loop
iterating over the generation and an inner one iterating over the
elements of the current generation. It is therefore easier to read this
patch using 'git diff -w'.

2 days agoMINOR: patterns: preliminary changes for reorganization
Maxime Henrion [Thu, 18 Dec 2025 04:31:29 +0000 (23:31 -0500)] 
MINOR: patterns: preliminary changes for reorganization

Safe and non-functional changes that only add currently unused
structures, field, functions and macros, in preparation of larger
changes that alter the way pattern reference elements are stored.

This includes code to create and lookup generation objects, and
macros to iterate over the generations of a pattern reference.

3 days agoOPTIM/MINOR: proxy: do not init proxy management task if unused quic-interop
Amaury Denoyelle [Tue, 2 Dec 2025 16:29:19 +0000 (17:29 +0100)] 
OPTIM/MINOR: proxy: do not init proxy management task if unused

Each proxy has its owned task for internal purpose. Currently, it is
only used either by frontends or if a stick-table is present.

This commit rendres the task allocation optional to only the required
case. Thus, it is not allocated anymore for backend only proxies without
stick-table.

3 days agoMINOR: cfgparse: remove useless checks on no server in backend
Amaury Denoyelle [Mon, 22 Dec 2025 14:20:39 +0000 (15:20 +0100)] 
MINOR: cfgparse: remove useless checks on no server in backend

A legacy check could be activated at compile time to reject backends
without servers. In practice this is not used anymore and does not have
much sense with the introduction of dynamic servers.

3 days agoMEDIUM: cfgparse: acknowledge that proxy ID auto numbering starts at 2
Amaury Denoyelle [Tue, 23 Dec 2025 14:40:42 +0000 (15:40 +0100)] 
MEDIUM: cfgparse: acknowledge that proxy ID auto numbering starts at 2

Each frontend/backend/listen proxies is assigned an unique ID. It can
either be set explicitely via 'id' keyword, or automatically assigned on
post parsing depending on the available values.

It was expected that the first automatically assigned value would start
at '1'. However, due to a legacy bug this is not the case as this value
is always skipped. Thus, automatically assigned proxies always start at
'2' or more.

To avoid breaking the current existing state, this situation is now
acknowledged with the current patch. The code is rewritten with an
explicit warning to ensure that this won't be fixed without knowing the
current status. A new regtest also ensures this.

6 days agoMINOR: mux-h1: perform a graceful close at 75% glitches threshold
Willy Tarreau [Sat, 20 Dec 2025 15:48:15 +0000 (16:48 +0100)] 
MINOR: mux-h1: perform a graceful close at 75% glitches threshold

This avoids hitting the hard wall for connections with non-compliant
peers that are accumulating errors. We recycle the connection early
enough to permit to reset the counter. Example below with a threshold
set to 100:

Before, 1% errors:
  $ h1load -H "Host : blah" -c 1 -n 10000000 0:4445
  #     time conns tot_conn  tot_req      tot_bytes    err  cps  rps  bps   ttfb
           1     1     1039   103872        6763365   1038 1k03 103k 54M1 9.426u
           2     1     2128   212793       14086140   2127 1k08 108k 58M5 8.963u
           3     1     3215   321465       21392137   3214 1k08 108k 58M3 8.982u
           4     1     4307   430684       28735013   4306 1k09 109k 58M6 8.935u
           5     1     5390   538989       36016294   5389 1k08 108k 58M1 9.021u

After, no more errors:
  $ h1load -H "Host : blah" -c 1 -n 10000000 0:4445
  #     time conns tot_conn  tot_req      tot_bytes    err  cps  rps  bps   ttfb
           1     1     1509   113161        7487809      0 1k50 113k 59M9 8.482u
           2     1     3002   225101       15114659      0 1k49 111k 60M9 8.582u
           3     1     4508   338045       22809911      0 1k50 112k 61M5 8.523u
           4     1     5971   447785       30286861      0 1k46 109k 59M7 8.772u
           5     1     7472   560335       37955271      0 1k49 112k 61M2 8.537u

6 days agoMEDIUM: mux-h1: implement basic glitches support
Willy Tarreau [Fri, 19 Dec 2025 22:38:24 +0000 (23:38 +0100)] 
MEDIUM: mux-h1: implement basic glitches support

We now count glitches for each parsing error, including those that
have been accepted via accept-unsafe-violations-*. Front and back
are considered and the connection gets killed on error once if the
threshold is reached or passed and the CPU usage is beyond the
configured limit (0 by default). This was tested with:

   curl -ivH "host : blah" 0:4445{,,,,,,,,,}

which sends 10 requests to a configuration having a threshold of 5.
The global keywords are named similarly to H2 and quic:

     tune.h1.be.glitches-threshold xxxx
     tune.h1.fe.glitches-threshold xxxx

The glitches count of each connection is also reported when non-null
in the connection dumps (e.g. "show fd").

6 days agoMINOR: mux-h2: perform a graceful close at 75% glitches threshold
Willy Tarreau [Sat, 20 Dec 2025 17:53:08 +0000 (18:53 +0100)] 
MINOR: mux-h2: perform a graceful close at 75% glitches threshold

This avoids hitting the hard wall for connections with non-compliant
peers that would be accumulating errors over long connections. We now
permit to recycle the connection early enough to reset the connection
counter.

This was tested artificially by adding this to h2c_frt_handle_headers():

  h2c_report_glitch(h2c, 1, "new stream");

or this to h2_detach():

  h2c_report_glitch(h2c, 1, "detaching");

and injecting using h2load -c 1 -n 1000 0:4445 on a config featuring
tune.h2.fe.glitches-threshold 1000:

  finished in 8.74ms, 85802.54 req/s, 686.62MB/s
  requests: 1000 total, 751 started, 751 done, 750 succeeded, 250 failed, 250 errored, 0 timeout
  status codes: 750 2xx, 0 3xx, 0 4xx, 0 5xx
  traffic: 6.00MB (6293303) total, 132.57KB (135750) headers (space savings 29.84%), 5.86MB (6144000) data
                       min         max         mean         sd        +/- sd
  time for request:        9us       178us        10us         6us    99.47%
  time for connect:      139us       139us       139us         0us   100.00%
  time to 1st byte:      339us       339us       339us         0us   100.00%
  req/s           :   87477.70    87477.70    87477.70        0.00   100.00%

The failures are due to h2load not supporting reconnection.

6 days agoMINOR: mux-h2: add missing glitch count for non-decodable H2 headers
Willy Tarreau [Sat, 20 Dec 2025 16:34:05 +0000 (17:34 +0100)] 
MINOR: mux-h2: add missing glitch count for non-decodable H2 headers

One rare error case could produce a protocol error on the stream when
not being able to decode response headers wasn't being accounted as a
glitch, so let's fix it.

7 days agoMINOR: tools: add a secure implementation of memset 20251219-memset_s
Maxime Henrion [Fri, 19 Dec 2025 15:40:38 +0000 (10:40 -0500)] 
MINOR: tools: add a secure implementation of memset

This guarantees that the compiler will not optimize away the memset()
call if it detects a dead store.

Use this to clear SSL passphrases.

No backport needed.

7 days agoDOC: config: fix number of values for "cpu-affinity"
Willy Tarreau [Fri, 19 Dec 2025 10:19:22 +0000 (11:19 +0100)] 
DOC: config: fix number of values for "cpu-affinity"

It said "accepts 2 values" then goes on enumerating 5 since more were
added one at a time. Let's fix it by removing the number. No backport
is needed.

7 days agoBUG/MINOR: cpu-topo: fix -Wlogical-not-parentheses build with clang
William Lallemand [Fri, 19 Dec 2025 09:10:08 +0000 (10:10 +0100)] 
BUG/MINOR: cpu-topo: fix -Wlogical-not-parentheses build with clang

src/cpu_topo.c:1325:15: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
 1325 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^                      ~
src/cpu_topo.c:1325:15: note: add parentheses after the '!' to evaluate the bitwise operator first
 1325 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^
      |                                     (                                                     )
src/cpu_topo.c:1325:15: note: add parentheses around left hand side expression to silence this warning
 1325 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^
      |                                    (                     )
src/cpu_topo.c:1533:15: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]
 1533 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^                      ~
src/cpu_topo.c:1533:15: note: add parentheses after the '!' to evaluate the bitwise operator first
 1533 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^
      |                                     (                                                     )
src/cpu_topo.c:1533:15: note: add parentheses around left hand side expression to silence this warning
 1533 |                         } else if (!cpu_policy_conf.flags & CPU_POLICY_ONE_THREAD_PER_CORE)
      |                                    ^
      |                                    (                     )

No backport needed.

8 days agoMEDIUM: cpu-topo: Add the "per-ccx" cpu_affinity
Olivier Houchard [Thu, 18 Dec 2025 14:48:49 +0000 (15:48 +0100)] 
MEDIUM: cpu-topo: Add the "per-ccx" cpu_affinity

Add a new cpu-affinity keyword, "per-ccx".
If used, each thread will be bound to all the hardware threads available
in one CCX of the threads group.

8 days agoMEDIUM: cpu-topo: Add the "per-thread" cpu_affinity
Olivier Houchard [Wed, 17 Dec 2025 17:58:51 +0000 (18:58 +0100)] 
MEDIUM: cpu-topo: Add the "per-thread" cpu_affinity

Add a new cpu-affinity keyword, "per-thread".
If used, each thread will be bound to only one hardware thread of the
thread group.
If used in conjonction with the "threads-per-core 1" cpu_policy, then
each thread will be bound on a different core.

8 days agoMEDIUM: cpu-topo: Add a new "max-threads-per-group" global keyword
Olivier Houchard [Mon, 8 Dec 2025 22:13:19 +0000 (23:13 +0100)] 
MEDIUM: cpu-topo: Add a new "max-threads-per-group" global keyword

Add a new global keyword, max-threads-per-group. It sets the maximum number of
threads a thread group can contain. Unless the number of thread groups
is fixed with "thread-groups", haproxy will just create more thread
groups as needed.
The default and maximum value is 64.

8 days agoMEDIUM: cpu-topo: Add a "cpu-affinity" option
Olivier Houchard [Mon, 1 Dec 2025 13:51:22 +0000 (14:51 +0100)] 
MEDIUM: cpu-topo: Add a "cpu-affinity" option

Add a new global option, "cpu-affinity", which controls how threads are
bound.
It currently accepts three values, "per-core", which will bind one thread to
each hardware thread of a given core, and "per-group" which will use all
the available hardware threads of the thread group, and "auto", the
default, which will use "per-group", unless "threads-per-core 1" has
been specified in cpu_policy, in which case it will use per-core.

8 days agoMEDIUM: cpu-topo: Add a "threads-per-core" keyword to cpu-policy
Olivier Houchard [Thu, 27 Nov 2025 22:33:48 +0000 (23:33 +0100)] 
MEDIUM: cpu-topo: Add a "threads-per-core" keyword to cpu-policy

Add a new, optional key-word to "cpu-policy", "threads-per-core".
It takes one argument, "1" or "auto". If "1" is used, then only one
thread per core will be created, no matter how many hardware thread each
core has. If "auto" is used, then one thread will be created per
hardware thread, as is the case by default.

for example: cpu-policy performance threads-per-core 1

8 days agoMINOR: cpu-topo: Turn the cpu policy configuration into a struct
Olivier Houchard [Wed, 26 Nov 2025 17:13:14 +0000 (18:13 +0100)] 
MINOR: cpu-topo: Turn the cpu policy configuration into a struct

Turn the cpu policy configuration into a struct. Right now it just
contains an int, that represents the policy used, but will get more
information soon.

8 days agoREGTESTS: fix error when no test are skipped
William Lallemand [Thu, 18 Dec 2025 16:23:23 +0000 (17:23 +0100)] 
REGTESTS: fix error when no test are skipped

Since commit 1ed2c9d ("REGTESTS: list all skipped tests including
'feature cmd' ones"), the script emits some error when trying to display
the list of skipped tests when there are none.

No backport needed.

8 days agoBUG/MEDIUM: mux-h2: synchronize all conditions to create a new backend stream
Willy Tarreau [Thu, 18 Dec 2025 14:57:48 +0000 (15:57 +0100)] 
BUG/MEDIUM: mux-h2: synchronize all conditions to create a new backend stream

In H2 the conditions to create a new stream differ for a client and a
server when a GOAWAY was exchanged. While on the server, any stream
whose ID is lower than or equal to the one advertised in GOAWAY is
valid, for a client it's forbidden to create any stream after receipt
of a GOAWAY, even if its ID is lower than or equal to the last one,
despite the server not being able to tell the difference from the
number of streams in flight.

Unfortunately, the logic in the code did not always reflect this
specificity of the client (the backend code in our case), and most
often considered that it was still permitted to create a new stream
until the max_id was greater than or equal to the advertised last_id.
This is for example what h2c_is_dead() and h2c_streams_left() do. In
other places, such as h2_avail_streams(), the rule is properly taken
into account. Very often the advertised last_id is the same, and this
is also what haproxy does (which explains why it's impossible to
reproduce the issue by chaining two haproxy layers), but a server may
wish to advertise any ID including 2^31-1 as mentioned in the spec,
and in this case the functions would behave differently.

This discrepancy results in a corner case where a GOAWAY received on
an idle connection will cause the next stream creation to be initially
accepted but then rejected via h2_avail_streams(), and the connection
left in a bad state, still attached to the session due to http-reuse
safe, but not reinserted into idle list, since the backend code
currently is not able to properly recover from this situation. Worse,
the idle flags are no longer on it but TASK_F_USR1 still is, and this
makes the recently added BUG_ON() rightfully trigger since this case
is not supposed to happen.

Admittedly more of the backend recovery code needs to be reworked,
however the mux must consistently decide whether or not a connection
may be reused or needs to be released.

This commit fixes the affected logic by introducing a new function
"h2c_reached_last_stream()" which says if a connection has reached its
last stream, regardless of the side, and using this one everywhere
max_id was compared to last_id. This is sufficient to address the
corner case that be_reuse_connection() currently cannot recover from.

This is in relation to GH issue #3215 and it should be sufficient to
fix the issue there. Thanks to Chris Staite for reporting the issue
and kudos to Amaury for spotting the events sequence that can lead
to this situation.

This patch must be backported to 3.3 first, then to older versions
later. It's worth noting that it's much more difficult to observe
the issue before 3.3 because the BUG_ON() is not there, and the
possibly non-released connection might end up being killed for other
reasons (timeouts etc). But one possible visible effect might be the
impossibility to delete a server (which Chris observed in 3.3).

8 days agoCI: github: use git prefix for openssl-master.yml
William Lallemand [Thu, 18 Dec 2025 15:13:04 +0000 (16:13 +0100)] 
CI: github: use git prefix for openssl-master.yml

Uses the git- prefix in order to get the latest tarball for the master
branch on github.

8 days agoBUG/MEDIUM: backend: Do not remove CO_FL_SESS_IDLE in assign_server()
Olivier Houchard [Thu, 18 Dec 2025 15:04:28 +0000 (16:04 +0100)] 
BUG/MEDIUM: backend: Do not remove CO_FL_SESS_IDLE in assign_server()

Back in the mists of time, commit e91a526c8f decided that if we were trying
to stay on the same server than the previous request, and if there were
a connection available in the session, we'd remove its CO_FL_SESS_IDLE.
The reason for doing that has been long lost, probably it fixed a bug at some
point, but it was most probably not the right place to do that. And starting
with 3.3, this triggers a BUG_ON() because that flag is expected later on.
So just revert the commit, if the ancient bug shows up again, it will be
fixed another way.

This should be backported to 3.3. There is little reason to backport it
to previous versions, unless other patches depend on it.

8 days agoCI: github: openssl-master.yml misses actions/checkout
William Lallemand [Thu, 18 Dec 2025 15:03:20 +0000 (16:03 +0100)] 
CI: github: openssl-master.yml misses actions/checkout

The job can't run setup-vtest because the actions/checkout use line is
missing.

8 days agoCI: github: add a job to test the master branch of OpenSSL 20251218-openssl-ci
William Lallemand [Thu, 18 Dec 2025 14:43:06 +0000 (15:43 +0100)] 
CI: github: add a job to test the master branch of OpenSSL

vtest.yml only builds the releases of OpenSSL for now, there's no way to
check if we still have issues with the API before a pre-release version
is released.

This job builds the master branch of OpenSSL.

It is run everyday at 3 AM.

8 days agoCI: github: remove openssl no-deprecated job
William Lallemand [Thu, 18 Dec 2025 14:22:27 +0000 (15:22 +0100)] 
CI: github: remove openssl no-deprecated job

Remove the openssl no-deprecated job which was used for 1.1.0 API.
It's not useful anymore since it uses the OpenSSL version of the
distributions.

Checking depreciations in the API is still useful when using newest
version of the library. A job for the OpenSSL master branch would be
more useful than that.

9 days agoREGTESTS: list all skipped tests including 'feature cmd' ones 20251217-skipped-tests
William Lallemand [Tue, 9 Dec 2025 16:18:42 +0000 (17:18 +0100)] 
REGTESTS: list all skipped tests including 'feature cmd' ones

The script for running regression tests is modified to improve the
visibility of skipped tests.

Previously, the reasons for skipping tests were only visible during the
test discovery phase when grepping the vtc (REQUIRE, EXCLUDE, etc).
But reg-tests skipped by vtest with the 'feature cmd' keywords were not
listed.

This change introduces the following:
  - vtest does not remove the logs itself anymore, because it is not
    able to let the log available when a test is skipped. So the -L
    parameter is now always passed to vtest
  - All skipped tests during the discovery phase are now logged to a
    'skipped.log' file within the test directory
  - The script now parses vtest logs to find tests that were skipped
    due to missing features (via the 'feature cmd' in .vtc files)
    and adds them to the skipped list.

11 days agoREGTESTS: quic: fix a TLS stack usage
Frederic Lecaille [Thu, 11 Dec 2025 12:23:18 +0000 (13:23 +0100)] 
REGTESTS: quic: fix a TLS stack usage

This issue was reported in GH #3214 where quic/tls13_ssl_crt-list_filters.vtc
QUIC reg test was run without haproxy QUIC support due to OPENSSL_AWSLC enabled
featured.

This is due to the fact that when ssl/tls13_ssl_crt-list_filters.vtc has been
ported to QUIC the feature(OPENSSL) was silly replaced by feature(QUIC) leading
the script to be run even without QUIC support if OR'ed OPENSSL_AWSLC feature is
enabled.

A good method to port these feature() commands to QUIC would have been
to add a feature(QUIC) command seperated from the one used for the supported
TLS stacks identified by the original underlying ssl reg tests (in reg-tests/ssl).
This is what is done by this patch.

Thank you to @idl0r for having reported this issue.

11 days agoCLEANUP: ssl-sock: Remove useless tests on connection when resuming TLS session
Christopher Faulet [Mon, 15 Dec 2025 07:16:57 +0000 (08:16 +0100)] 
CLEANUP: ssl-sock: Remove useless tests on connection when resuming TLS session

In ssl_sock_srv_try_reuse_sess(), the connection is always defined, to TCP
and QUIC connections. No reason to test it. Because it is not so obvious for
the QUIC part, a BUG_ON() could be added here. For now, just remove useless
tests.

This patch should fix a Coverity report from #3213.

11 days agoCLEANUP: tcpcheck: Remove useless test on the xprt used for healthchecks
Christopher Faulet [Mon, 15 Dec 2025 07:01:20 +0000 (08:01 +0100)] 
CLEANUP: tcpcheck: Remove useless test on the xprt used for healthchecks

The xprt used to perform a healthcheck is always defined and cannot be NULL.
So there is no reason to test it. It could lead to wrong assumptions later
in the code.

This patch should fix a Coverity report from #3213.

11 days agoCLEANUP: backend: Remove useless test on server's xprt
Christopher Faulet [Mon, 15 Dec 2025 06:56:52 +0000 (07:56 +0100)] 
CLEANUP: backend: Remove useless test on server's xprt

The server's xprt is always defined and cannot be NULL. So there is no
reason to test it. It could lead to wrong assumptions later in the code.

This patch should fix a Coverity report from #3213.

12 days agoBUG/MEDIUM: quic: Don't try to use hystart if not implemented
Olivier Houchard [Sun, 14 Dec 2025 15:10:21 +0000 (16:10 +0100)] 
BUG/MEDIUM: quic: Don't try to use hystart if not implemented

Not every CC algos implement hystart, so only call the method if it is
actually there. Failure to do so will cause crashes if hystart is on,
and the algo doesn't implement it.

This should fix github issue #3218

This should be backported up to 3.0.

2 weeks agoBUG/MEDIUM: stconn: Don't report abort from SC if read0 was already received
Christopher Faulet [Thu, 11 Dec 2025 16:11:36 +0000 (17:11 +0100)] 
BUG/MEDIUM: stconn: Don't report abort from SC if read0 was already received

SC_FL_ABRT_DONE flag should never be set when SC_FL_EOS was already
set. These both flags were introduced to replace the old CF_SHUTR and to
have a flag for shuts driven by the stream and a flag for the read0 received
by the mux. So both flags must not be seen at same time on a SC. It is
espeically important because some processing are performed when these flags
are set. And wrong decisions may be made.

This patch must be backproted as far as 2.8.

2 weeks agoBUG/MEDIUM: http-ana: Properly detect client abort when forwarding response (v2)
Christopher Faulet [Thu, 11 Dec 2025 14:21:01 +0000 (15:21 +0100)] 
BUG/MEDIUM: http-ana: Properly detect client abort when forwarding response (v2)

The first attempt to fix this issue (c672b2a29 "BUG/MINOR: http-ana:
Properly detect client abort when forwarding the response") was not fully
correct and could be responsible to false report of client abort during the
response forwarding. I guess it is possible to truncate the response.

Instead, we must also take care that the client closed on its side, by
checking SC_FL_EOS flag on the front SC. Indeed, if the client has aborted,
this flag should be set.

This patch should be backported as far as 2.8.

2 weeks agoBUG/MEDIUM: mworker/listener: ambiguous use of RX_F_INHERITED with shards
William Lallemand [Thu, 11 Dec 2025 15:53:18 +0000 (16:53 +0100)] 
BUG/MEDIUM: mworker/listener: ambiguous use of RX_F_INHERITED with shards

The RX_F_INHERITED flag was ambiguous, as it was used to mark both
listeners inherited from the parent process and listeners duplicated
from another local receiver. This could lead to incorrect behavior
concerning socket unbinding and suspension.

This commit refactors the handling of inherited listeners by splitting
the RX_F_INHERITED flag into two more specific flags:

- RX_F_INHERITED_FD: Indicates a listener inherited from the parent
  process via its file descriptor. These listeners should not be unbound
  by the master.

- RX_F_INHERITED_SOCK: Indicates a listener that shares a socket with
  another one, either by being inherited from the parent or by being
  duplicated from another local listener. These listeners should not be
  suspended or resumed individually.

Previously, the sharding code was unconditionally using RX_F_INHERITED
when duplicating a file descriptor. In HAProxy versions prior to 3.1,
this led to a file descriptor leak for duplicated unix stats sockets in
the master process. This would eventually cause the master to crash with
a BUG_ON in fd_insert() once the file descriptor limit was reached.

This must be backported as far as 3.0. Branches earlier than 3.0 are
affected but would need a different patch as the logic is different.

2 weeks ago[RELEASE] Released version 3.4-dev1 v3.4-dev1
Willy Tarreau [Wed, 10 Dec 2025 15:52:30 +0000 (16:52 +0100)] 
[RELEASE] Released version 3.4-dev1

Released version 3.4-dev1 with the following main changes :
    - BUG/MINOR: jwt: Missing "case" in switch statement
    - DOC: configuration: ECH support details
    - Revert "MINOR: quic: use dynamic cc_algo on bind_conf"
    - MINOR: quic: define quic_cc_algo as const
    - MINOR: quic: extract cc-algo parsing in a dedicated function
    - MINOR: quic: implement cc-algo server keyword
    - BUG/MINOR: quic-be: Missing keywords array NULL termination
    - REGTESTS: ssl enable tls12_reuse.vtc for AWS-LC
    - REGTESTS: ssl: split tls*_reuse in stateless and stateful resume tests
    - BUG/MEDIUM: connection: fix "bc_settings_streams_limit" typo
    - BUG/MEDIUM: config: ignore empty args in skipped blocks
    - DOC: config: mention clearer that the cache's total-max-size is mandatory
    - DOC: config: reorder the cache section's keywords
    - BUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces
    - BUG/MINOR: quic-be: handshake errors without connection stream closure
    - MINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()
    - REGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory
    - REGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC
    - REGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC
    - REGTESTS: quic: issuers_chain_path.vtc supported by QUIC
    - REGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC
    - REGTESTS: quic: ocsp_auto_update.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC
    - MINOR: quic: avoid code duplication in TLS alert callback
    - BUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send
    - REGTESTS: quic: set_ssl_cafile.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_cert.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC
    - REGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC
    - REGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC
    - REGTESTS: quic: ssl_client_auth.vtc supported by QUIC
    - REGTESTS: quic: ssl_client_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_default_server.vtc supported by QUIC
    - REGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC
    - REGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_server_samples.vtc supported by QUIC
    - REGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC
    - REGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC
    - REGTESTS: quic: ssl_curve_name.vtc supported by QUIC
    - REGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC
    - REGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)
    - BUG/MINOR: quic: do not set first the default QUIC curves
    - REGTESTS: quic/ssl: Add ssl_curves_selection.vtc
    - BUG/MINOR: ssl: Don't allow to set NULL sni
    - MEDIUM: quic: Add connection as argument when qc_new_conn() is called
    - MINOR: ssl: Add a function to hash SNIs
    - MINOR: ssl: Store hash of the SNI for cached TLS sessions
    - MINOR: ssl: Compare hashes instead of SNIs when a session is cached
    - MINOR: connection/ssl: Store the SNI hash value in the connection itself
    - MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
    - BUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs
    - MEDIUM: ssl/server: No longer store the SNI of cached TLS sessions
    - BUG/MINOR: log: Dump good %B and %U values in logs
    - BUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode
    - DOC: config: Fix description of the spop mode
    - DOC: config: Improve spop mode documentation
    - MINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version
    - REGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC
    - BUG/MEDIUM: h3: do not access QCS <sd> if not allocated
    - CLEANUP: mworker/cli: remove useless variable
    - BUG/MINOR: mworker/cli: 'show proc' is limited by buffer size
    - BUG/MEDIUM: ssl: Always check the ALPN after handshake
    - MINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag
    - BUG/MEDIUM: ssl: Don't store the ALPN for check connections
    - BUG/MEDIUM: ssl: Don't resume session for check connections
    - CLEANUP: improvements to the alignment macros
    - CLEANUP: use the automatic alignment feature
    - CLEANUP: more conversions and cleanups for alignment
    - BUG/MEDIUM: h3: fix access to QCS <sd> definitely
    - MINOR: h2/trace: emit a trace of the received RST_STREAM type

2 weeks agoMINOR: h2/trace: emit a trace of the received RST_STREAM type
Willy Tarreau [Wed, 10 Dec 2025 14:56:34 +0000 (15:56 +0100)] 
MINOR: h2/trace: emit a trace of the received RST_STREAM type

Right now we don't get any state trace when receiving an RST_STREAM, and
this is not convenient because RST_STREAM(0) is not visible at all, except
in developer level because the function is entered and left.

Let's extract the RST code first and always log it using TRACE_PRINTF()
(along with h2c/h2s) so that it's possible to detect certain codes being
used.

2 weeks agoBUG/MEDIUM: h3: fix access to QCS <sd> definitely
Amaury Denoyelle [Wed, 10 Dec 2025 10:57:34 +0000 (11:57 +0100)] 
BUG/MEDIUM: h3: fix access to QCS <sd> definitely

The previous patch tried to fix access to QCS <sd> member, as the latter
is not always allocated anymore on the frontend side.

  a15f0461a016a664427f5aaad2227adcc622c882
  BUG/MEDIUM: h3: do not access QCS <sd> if not allocated

In particular, access was prevented after HEADERS parsing in case
h3_req_headers_to_htx() returned an error, which indicates that the
stream-endpoint allocation was not performed. However, this still is not
enough when QCS instance is already closed at this step. Indeed, in this
case, h3_req_headers_to_htx() returns OK but stream-endpoint allocation
is skipped as an optimization as no data exchange will be performed.

To definitely fix this kind of problems, add checks on qcs <sd> member
before accessing it in H3 layer. This method is the safest one to ensure
there is no NULL dereferencement.

This should fix github issue #3211.

This must be backported along the above mentionned patch.

2 weeks agoCLEANUP: more conversions and cleanups for alignment
Maxime Henrion [Tue, 9 Dec 2025 16:26:02 +0000 (11:26 -0500)] 
CLEANUP: more conversions and cleanups for alignment

- Convert additional cases to use the automatic alignment feature for
  the THREAD_ALIGN(ED) macros. This includes some cases that are less
  obviously correct where it seems we wanted to align only in the
  USE_THREAD case but were not using the thread specific macros.
- Also move some alignment requirements to the structure definition
  instead of having it on variable declaration.

2 weeks agoCLEANUP: use the automatic alignment feature
Maxime Henrion [Tue, 9 Dec 2025 16:08:58 +0000 (11:08 -0500)] 
CLEANUP: use the automatic alignment feature

- Use the automatic alignment feature instead of hardcoding 64 all over
  the code.
- This also converts a few bare __attribute__((aligned(X))) to using the
  ALIGNED macro.

2 weeks agoCLEANUP: improvements to the alignment macros
Maxime Henrion [Tue, 9 Dec 2025 15:51:33 +0000 (10:51 -0500)] 
CLEANUP: improvements to the alignment macros

- It is now possible to use the THREAD_ALIGN and THREAD_ALIGNED macros
  without a parameter. In this case, we automatically align on the cache
  line size.
- The cache line size is set to 64 by default to match the current code,
  but it can be overridden on the command line.
- This required moving the DEFVAL/DEFNULL/DEFZERO macros to compiler.h
  instead of tools-t.h, to avoid namespace pollution if we included
  tools-t.h from compiler.h.

2 weeks agoBUG/MEDIUM: ssl: Don't resume session for check connections
Olivier Houchard [Tue, 9 Dec 2025 15:25:40 +0000 (16:25 +0100)] 
BUG/MEDIUM: ssl: Don't resume session for check connections

Don't attempt to use stored sessions when creating new check
connections, as the check SSL parameters might be different from the
server's ones.
This has not been proven to be a problem yet, but it doesn't mean it
can't be, and this should be backported up to 2.8 along with
dcce9369129f6ca9b8eed6b451c0e20c226af2e3 if it is.

2 weeks agoBUG/MEDIUM: ssl: Don't store the ALPN for check connections
Olivier Houchard [Tue, 9 Dec 2025 15:17:08 +0000 (16:17 +0100)] 
BUG/MEDIUM: ssl: Don't store the ALPN for check connections

When establishing check connections, do not store the negociated ALPN
into the server's path_param if the connection is a check connection, as
it may use different SSL parameters than the regular connections. To do
so, only store them if the CO_FL_SSL_NO_CACHED_INFO is not set.
Otherwise, the check ALPN may be stored, and the wrong mux can be used
for regular connections, which will end up generating 502s.

This should fix Github issue #3207

This should be backported to 3.3.

2 weeks agoMINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag
Olivier Houchard [Tue, 9 Dec 2025 15:10:24 +0000 (16:10 +0100)] 
MINOR: connections: Add a new CO_FL_SSL_NO_CACHED_INFO flag

Add a new flag to connections, CO_FL_SSL_NO_CACHED_INFO, and set it for
checks.
It lets the ssl layer know that he should not use cached informations,
such as the ALPN as stored in the server, or cached sessions.
This wlil be used for checks, as checks may target different servers, or
used a different SSL configuration, so we can't assume the stored
informations are correct.

This should be backported to 3.3, and may be backported up to 2.8 if the
attempts to do session resume by checks is proven to be a problem.

2 weeks agoBUG/MEDIUM: ssl: Always check the ALPN after handshake
Olivier Houchard [Tue, 9 Dec 2025 15:02:00 +0000 (16:02 +0100)] 
BUG/MEDIUM: ssl: Always check the ALPN after handshake

Move the code that is responsible for checking the ALPN, and updating
the one stored in the server's path_param, from after we created the
mux, to after we did an handshake. Once we did it once, the mux will not
be created by the ssl code anymore, as when we know which mux to use
thanks to the ALPN, it will be done earlier in connect_server(), so in
the unlikely event it changes, we would not detect it anymore, and we'd
keep on creating the wrong mux.
This can be reproduced by doing a first request, and then changing the
ALPN of the server without haproxy noticing (ie without haproxy noticing
that the server went down).

This should be backported to 3.3.

2 weeks agoBUG/MINOR: mworker/cli: 'show proc' is limited by buffer size
William Lallemand [Mon, 8 Dec 2025 17:05:36 +0000 (18:05 +0100)] 
BUG/MINOR: mworker/cli: 'show proc' is limited by buffer size

In ticket #3204, it was reported that "show proc" is not able to display
more than 202 processes. Indeed the bufsize is 16k by default in the
master, and can't be changed anymore since 3.1.

This patch allows the 'show proc' to start again to dump when the buffer
is full, based on the timestamp of the last PID it attempted to dump.
Using pointers or count the number of processes might not be a good idea
since the list can change between calls.

Could be backported in all stable branche.

2 weeks agoCLEANUP: mworker/cli: remove useless variable
William Lallemand [Mon, 8 Dec 2025 17:06:24 +0000 (18:06 +0100)] 
CLEANUP: mworker/cli: remove useless variable

The msg variable is declared and free but never used, this patch removes it.

2 weeks agoBUG/MEDIUM: h3: do not access QCS <sd> if not allocated
Amaury Denoyelle [Tue, 9 Dec 2025 10:18:54 +0000 (11:18 +0100)] 
BUG/MEDIUM: h3: do not access QCS <sd> if not allocated

Since the following commit, allocation of QCS stream-endpoint on FE side
has been delayed. The objective is to allocate it only for QCS attached
to an upper stream object. Stream-endpoint allocation is now performed
on qcs_attach_sc() called during HEADERS parsing.

  commit e6064c561684d9b079e3b5725d38dc3b5c1b5cd5
  OPTIM: mux-quic: delay FE sedesc alloc to stream creation

Also, stream-endpoint is accessed through the QCS instance after HEADERS
or DATA frames parsing, to update the known input payload length. The
above patch triggered regressions as in some code paths, <sd> field is
dereferenced while still being NULL.

This patch fixes this by restricting access to <sd> field after newer
conditions.

First, after HEADERS parsing, known input length is only updated if
h3_req_headers_to_htx() previously returned a success value, which
guarantee that qcs_attach_sc() has been executed.

After DATA parsing, <sd> is only accessed after the frame validity
check. This ensures that HEADERS were already parsed, thus guaranteing
that stream-endpoint is allocated.

This should fix github issue #3211.

This must be backported up to 3.3. This is sufficient, unless above
patch is backported to previous releases, in which case the current one
must be picked with it.

2 weeks agoREGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC
Frederic Lecaille [Mon, 8 Dec 2025 16:39:45 +0000 (17:39 +0100)] 
REGTESTS: quic: tls13_ssl_crt-list_filters.vtc supported by QUIC

ssl/tls13_ssl_crt-list_filters.vtc was renamed to ssl/tls13_ssl_crt-list_filters.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then tls13_ssl_crt-list_filters.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoMINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version
Frederic Lecaille [Mon, 8 Dec 2025 15:59:12 +0000 (16:59 +0100)] 
MINOR: ssl: Split ssl_crt-list_filters.vtc in two files by TLS version

Seperate the section from ssl_crt-list_filters.vtc which supports TLS 1.2 and 1.3
versions to produce tls12_ssl_crt-list_filters.vtc and tls13_ssl_crt-list_filters.vtc.

2 weeks agoDOC: config: Improve spop mode documentation
Christopher Faulet [Mon, 8 Dec 2025 14:24:00 +0000 (15:24 +0100)] 
DOC: config: Improve spop mode documentation

The spop mode description was a bit confusing. So let's improve it.

Thanks to @NickMRamirez.

This patch shoud fix issue #3206. It could be backported as far as 3.1.

2 weeks agoDOC: config: Fix description of the spop mode
Christopher Faulet [Fri, 5 Dec 2025 14:33:02 +0000 (15:33 +0100)] 
DOC: config: Fix description of the spop mode

It was mentionned that the spop mode turned the backend into a "log"
backend. It is obviously wrong. It turns the backend into a spop backend.

This patch should be backported as far as 3.1.

2 weeks agoBUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode
Christopher Faulet [Mon, 8 Dec 2025 14:07:03 +0000 (15:07 +0100)] 
BUG/MEDIUM: http-ana: Don't close server connection on read0 in TUNNEL mode

It is a very old bug (2012), dating from the introduction of the keep-alive
support to HAProxy. When a request is fully received, the SC on backend side
is switched to NOHALF mode. It means that when the read0 is received from
the server, the server connection is immediately closed. It is expected to
do so at the end of a classical request. However, it must not be performed
if the session is switched to the TUNNEL mode (after an HTTP/1 upgrade or a
CONNECT). The client may still have data to send to the server. And closing
brutally the server connection this way will be handled as an error on
client side.

This bug is especially visible when a H2 connection on client side because a
RST_STREAM is emitted and a "SD--" is reported in logs.

Thanks to @chrisstaite

This patch should fix the issue #3205. It must be backported to all stable
versions.

2 weeks agoBUG/MINOR: log: Dump good %B and %U values in logs
Christopher Faulet [Mon, 8 Dec 2025 13:52:59 +0000 (14:52 +0100)] 
BUG/MINOR: log: Dump good %B and %U values in logs

When per-stream "bytes_in" and "bytes_out" counters where replaced in 3.3,
the wrong counters were used for %B and %U values in logs. In the
configuration manual and the commit message, it was specificed that
"bytes_in" was replaced by "req_in" and "bytes_out" by "res_in", but in the
code, wrong counters were used. It is now fixed.

This patch should fix the issue #3208. It must be backported to 3.3.

2 weeks agoMEDIUM: ssl/server: No longer store the SNI of cached TLS sessions
Christopher Faulet [Fri, 5 Dec 2025 16:35:53 +0000 (17:35 +0100)] 
MEDIUM: ssl/server: No longer store the SNI of cached TLS sessions

Thanks to the previous patch, "BUG/MEDIUM: ssl: Don't reuse TLS session
if the connection's SNI differs", it is no useless to store the SNI of
cached TLS sessions. This SNI is no longer tested and new connections
reusing a session must have the same SNI.

The main change here is for the ssl_sock_set_servername() function. It is no
longer possible to compare the SNI of the reused session with the one of the
new connection. So, the SNI is always set, with no other processing. Mainly,
the session is not destroyed when SNIs don't match. It means the commit
119a4084bf ("BUG/MEDIUM: ssl: for a handshake when server-side SNI changes")
is implicitly reverted.

It is good to note that it is unclear for me when and why the reused session
should be destroyed. Because I'm unable to reproduce any issue fixed by the
commit above.

This patch could be backported as far as 3.0 with the commit above.

2 weeks agoBUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs
Christopher Faulet [Fri, 5 Dec 2025 10:16:46 +0000 (11:16 +0100)] 
BUG/MEDIUM: ssl: Don't reuse TLS session if the connection's SNI differs

When a new SSL server connection is created, if no SNI is set, it is
possible to inherit from the one of the reused TLS session. The bug was
introduced by the commit 95ac5fe4a ("MEDIUM: ssl_sock: always use the SSL's
server name, not the one from the tid"). The mixup is possible between
regular connections but also with health-checks connections.

But it is only the visible part of the bug. If the SNI of the cached TLS
session does not match the one of the new connection, no reuse must be
performed at all.

To fix the bug, hash of the SNI of the reused session is compared with the
one of the new connection. The TLS session is reused only if the hashes are
the same.

This patch should fix the issue #3195. It must be slowly backported as far
as 3.0. it relies on the following series:

  * MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
  * MINOR: connection/ssl: Store the SNI hash value in the connection itself
  * MEDIUM: ssl: Store hash of the SNI for cached TLS sessions
  * MINOR: ssl: Add a function to hash SNIs
  * MEDIUM: quic: Add connection as argument when qc_new_conn() is called
  * BUG/MINOR: ssl: Don't allow to set NULL sni

2 weeks agoMEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx
Christopher Faulet [Fri, 5 Dec 2025 10:10:53 +0000 (11:10 +0100)] 
MEDIUM: tcpcheck/backend: Get the connection SNI before initializing SSL ctx

The SNI of a new connection is now retrieved earlier, before the
initialization of the SSL context. So, concretely, it is now performed
before calling conn_prepare(). The SNI is then set just after.

2 weeks agoMINOR: connection/ssl: Store the SNI hash value in the connection itself
Christopher Faulet [Fri, 5 Dec 2025 10:04:21 +0000 (11:04 +0100)] 
MINOR: connection/ssl: Store the SNI hash value in the connection itself

When a SNI is set on a new connection, its hash is now saved in the
connection itself. To do so, a dedicated field was added into the connection
strucutre, called sni_hash. For now, this value is only used when the TLS
session is cached.

2 weeks agoMINOR: ssl: Compare hashes instead of SNIs when a session is cached
Christopher Faulet [Fri, 5 Dec 2025 15:23:53 +0000 (16:23 +0100)] 
MINOR: ssl: Compare hashes instead of SNIs when a session is cached

This patch relies on the commit "MINOR: ssl: Store hash of the SNI for
cached TLS sessions". We now use the hash of the SNIs instead of the SNIs
themselves to know if we must update the cached SNI or not.

2 weeks agoMINOR: ssl: Store hash of the SNI for cached TLS sessions
Christopher Faulet [Fri, 5 Dec 2025 09:37:27 +0000 (10:37 +0100)] 
MINOR: ssl: Store hash of the SNI for cached TLS sessions

For cached TLS sessions, in addition to the SNI itself, its hash is now also
saved. No changes are expected here because this hash is not used for now.

This commit relies on:

  * MINOR: ssl: Add a function to hash SNIs

2 weeks agoMINOR: ssl: Add a function to hash SNIs
Christopher Faulet [Fri, 5 Dec 2025 08:28:56 +0000 (09:28 +0100)] 
MINOR: ssl: Add a function to hash SNIs

This patch only adds the function ssl_sock_sni_hash() that can be used to
get the hash value corresponding to an SNI. A global seed, sni_hash_seed, is
used.

2 weeks agoMEDIUM: quic: Add connection as argument when qc_new_conn() is called
Christopher Faulet [Wed, 3 Dec 2025 13:30:30 +0000 (14:30 +0100)] 
MEDIUM: quic: Add connection as argument when qc_new_conn() is called

This patch reverts the commit efe60745b ("MINOR: quic: remove connection arg
from qc_new_conn()"). The connection will be mandatory when the QUIC
connection is created on backend side to fix an issue when we try to reuse a
TLS session.

So, the connection is again an argument of qc_new_conn(), the 4th
argument. It is NULL for frontend QUIC connections but there is no special
check on it.

2 weeks agoBUG/MINOR: ssl: Don't allow to set NULL sni
Christopher Faulet [Fri, 5 Dec 2025 08:41:03 +0000 (09:41 +0100)] 
BUG/MINOR: ssl: Don't allow to set NULL sni

ssl_sock_set_servername() function was documented to support NULL sni to
unset it. However, the man page of SSL_get_servername() does not mentionned
it is supported or not. And it is in fact not supported by WolfSSL and leads
to a crash if we do so.

For now, this function is never called with a NULL sni, so it better and
safer to forbid this case. Now, if the sni is NULL, the function does
nothing.

This patch could be backported to all stable versions.

2 weeks agoREGTESTS: quic/ssl: Add ssl_curves_selection.vtc
Frederic Lecaille [Fri, 5 Dec 2025 18:25:40 +0000 (19:25 +0100)] 
REGTESTS: quic/ssl: Add ssl_curves_selection.vtc

This reg test ensures the curves may be correctly set for frontend
and backends by "ssl-default-bind-curves" and "ssl-default-server-curves"
as global options or with "curves" options on "bind" and "server" lines.

2 weeks agoBUG/MINOR: quic: do not set first the default QUIC curves
Frederic Lecaille [Tue, 25 Nov 2025 19:45:27 +0000 (20:45 +0100)] 
BUG/MINOR: quic: do not set first the default QUIC curves

This patch impacts both the QUIC frontends and listeners.

Note that "ssl-default-bind-ciphersuites", "ssl-default-bind-curves",
are not ignored by QUIC by the frontend. This is also the case for the
backends with "ssl-default-server-ciphersuites" and "ssl-default-server-curves".

These settings are set by ssl_sock_prepare_ctx() for the frontends and
by ssl_sock_prepare_srv_ssl_ctx() for the backends. But ssl_quic_initial_ctx()
first sets the default QUIC frontends (see <quic_ciphers> and <quic_groups>)
before these ssl_sock.c function are called, leading some TLS stack to
refuse them if they do not support them. This is the case for some OpenSSL 3.5
stack with FIPS support. They do not support X25519.

To fix this, set the default QUIC ciphersuites and curves only if not already
set by the settings mentioned above.

Rename <quic_ciphers> global variable to <default_quic_ciphersuites>
and <quic_groups> to <default_quic_curves> to reflect the OpenSSL API naming.

These options are taken into an account by ssl_quic_initial_ctx()
which inspects these four variable before calling SSL_CTX_set_ciphersuites()
with <default_quic_ciphersuites> as parameter and SSL_CTX_set_curves() with
<default_quic_curves> as parameter if needed, that is to say, if no ciphersuites
and curves were set by "ssl-default-bind-ciphersuites", "ssl-default-bind-curves"
as global options  or "ciphersuites", "curves" as "bind" line options.
Note that the bind_conf struct is not modified when no "ciphersuites" or
"curves" option are used on "bind" lines.

On backend side, rely on ssl_sock_init_srv() to set the server ciphersuites
and curves. This function is modified to use respectively <default_quic_ciphersuites>
and <default_quic_curves> if no ciphersuites  and curves were set by
"ssl-default-server-ciphersuites", "ssl-default-server-curves" as global options
or "ciphersuites", "curves" as "server" line options.

Thank to @rwagoner for having reported this issue in GH #3194 when using
an OpenSSL 3.5.4 stack with FIPS support.

Must be backported as far as 2.6

2 weeks agoREGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)
Frederic Lecaille [Thu, 4 Dec 2025 20:05:23 +0000 (21:05 +0100)] 
REGTESTS: add ssl_ciphersuites.vtc (TCP & QUIC)

This reg test ensures the ciphersuites may be correctly set for frontend
and backends by "ssl-default-bind-ciphersuites" and "ssl-default-server-ciphersuites"
as global options or with "ciphersuites" options on "bind" and "server" lines.

2 weeks agoREGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC
Frederic Lecaille [Wed, 3 Dec 2025 10:33:39 +0000 (11:33 +0100)] 
REGTESTS: quic: add_ssl_crt-list.vtc supported by QUIC

ssl/add_ssl_crt-list.vtc was renamed to ssl/add_ssl_crt-list.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then add_ssl_crt-list.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_curve_name.vtc supported by QUIC
Frederic Lecaille [Wed, 3 Dec 2025 09:37:48 +0000 (10:37 +0100)] 
REGTESTS: quic: ssl_curve_name.vtc supported by QUIC

ssl/ssl_curve_name.vtc was renamed to ssl/ssl_curve_name.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_curve_name.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

Note that this script works by chance for QUIC because the curves
selection matches the default ones used by QUIC.

2 weeks agoREGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC
Frederic Lecaille [Tue, 2 Dec 2025 16:36:33 +0000 (17:36 +0100)] 
REGTESTS: quic: ssl_sni_auto.vtc code provision for QUIC

ssl/ssl_sni_auto.vtc was renamed to ssl/ssl_sni_auto.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_sni_auto.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

Mark the test as broken for QUIC

2 weeks agoREGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 08:44:00 +0000 (09:44 +0100)] 
REGTESTS: quic: ssl_simple_crt-list.vtc supported by QUIC

ssl/ssl_simple_crt-list.vtc was renamed to ssl/ssl_simple_crt-list.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_simple_crt-list.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_server_samples.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 07:00:53 +0000 (08:00 +0100)] 
REGTESTS: quic: ssl_server_samples.vtc supported by QUIC

ssl/ssl_server_samples.vtc was renamed to ssl/ssl_server_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_server_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 06:45:07 +0000 (07:45 +0100)] 
REGTESTS: quic: ssl_frontend_samples.vtc supported by QUIC

ssl/ssl_frontend_samples.vtc was renamed to ssl/ssl_frontend_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_frontend_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC
Frederic Lecaille [Tue, 2 Dec 2025 06:28:32 +0000 (07:28 +0100)] 
REGTESTS: quic: new_del_ssl_crlfile.vtc supported by QUIC

ssl/new_del_ssl_crlfile.vtc was renamed to ssl/new_del_ssl_crlfile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then new_del_ssl_crlfile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_default_server.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 18:12:03 +0000 (19:12 +0100)] 
REGTESTS: quic: ssl_default_server.vtc supported by QUIC

ssl/ssl_default_server.vtc was renamed to ssl/ssl_default_server.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_default_server.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_client_samples.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:50:36 +0000 (18:50 +0100)] 
REGTESTS: quic: ssl_client_samples.vtc supported by QUIC

ssl/ssl_client_samples.vtc was renamed to ssl/ssl_client_samples.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_client_samples.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ssl_client_auth.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:44:56 +0000 (18:44 +0100)] 
REGTESTS: quic: ssl_client_auth.vtc supported by QUIC

ssl/ssl_client_auth.vtc was renamed to ssl/ssl_client_auth.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ssl_client_auth.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:37:35 +0000 (18:37 +0100)] 
REGTESTS: quic: show_ssl_ocspresponse.vtc supported by QUIC

ssl/show_ssl_ocspresponse.vtc was renamed to ssl/show_ssl_ocspresponse.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then show_ssl_ocspresponse.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:31:19 +0000 (18:31 +0100)] 
REGTESTS: quic: set_ssl_server_cert.vtc supported by QUIC

ssl/set_ssl_server_cert.vtc was renamed to ssl/set_ssl_server_cert.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_server_cert.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:25:01 +0000 (18:25 +0100)] 
REGTESTS: quic: set_ssl_crlfile.vtc supported by QUIC

ssl/set_ssl_crlfile.vtc was renamed to ssl/set_ssl_crlfile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_crlfile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: set_ssl_cert.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 17:03:55 +0000 (18:03 +0100)] 
REGTESTS: quic: set_ssl_cert.vtc supported by QUIC

ssl/set_ssl_cert.vtc was renamed to ssl/set_ssl_cert.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cert.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 16:52:24 +0000 (17:52 +0100)] 
REGTESTS: quic: set_ssl_cert_noext.vtc supported by QUIC

ssl/set_ssl_cert_noext.vtc was renamed to ssl/set_ssl_cert_noext.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cert_noext.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: set_ssl_cafile.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 14:47:40 +0000 (15:47 +0100)] 
REGTESTS: quic: set_ssl_cafile.vtc supported by QUIC

ssl/set_ssl_cafile.vtc was renamed to ssl/set_ssl_cafile.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_cafile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoBUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send
Frederic Lecaille [Mon, 1 Dec 2025 15:42:52 +0000 (16:42 +0100)] 
BUG/MINOR: quic-be: missing connection stream closure upon TLS alert to send

This is the same issue as the one fixed by this commit:
   BUG/MINOR: quic-be: handshake errors without connection stream closure
But this time this is when the client has to send an alert to the server.
The fix consists in creating the mux after having set the handshake connection
error flag and error_code.

This bug was revealed by ssl/set_ssl_cafile.vtc reg test.

Depends on this commit:
     MINOR: quic: avoid code duplication in TLS alert callback

Must be backported to 3.3

2 weeks agoMINOR: quic: avoid code duplication in TLS alert callback
Frederic Lecaille [Mon, 1 Dec 2025 15:35:58 +0000 (16:35 +0100)] 
MINOR: quic: avoid code duplication in TLS alert callback

Both the OpenSSL QUIC API TLS alert callback ha_quic_ossl_alert() does exactly
the same thing than the one for quictls API, even if the parameter have different
types.

Call ha_quic_send_alert() quictls callback from ha_quic_ossl_alert OpenSSL
QUIC API callback to avoid such code duplication.

2 weeks agoREGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 14:27:01 +0000 (15:27 +0100)] 
REGTESTS: quic: set_ssl_bug_2265.vtc supported by QUIC

ssl/set_ssl_bug_2265.vtc was renamed to ssl/set_ssl_bug_2265.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then set_ssl_bug_2265.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: ocsp_auto_update.vtc supported by QUIC
Frederic Lecaille [Mon, 1 Dec 2025 10:47:05 +0000 (11:47 +0100)] 
REGTESTS: quic: ocsp_auto_update.vtc supported by QUIC

ssl/ocsp_auto_update.vtc was renamed to ssl/ocsp_auto_update.vtci
to produce a common part runnable both for QUIC and TCP listeners.
Then ocsp_auto_update.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC listeners and "stream" for TCP listeners);

2 weeks agoREGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 16:37:43 +0000 (17:37 +0100)] 
REGTESTS: quic: new_del_ssl_cafile.vtc supported by QUIC

ssl/new_del_ssl_cafile.vtc was rename to ssl/new_del_ssl_cafile.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then new_del_ssl_cafile.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC connection and "stream" for TCP connections);

2 weeks agoREGTESTS: quic: issuers_chain_path.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 16:06:43 +0000 (17:06 +0100)] 
REGTESTS: quic: issuers_chain_path.vtc supported by QUIC

ssl/issuers_chain_path.vtc was rename to ssl/issuers_chain_path.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then issuers_chain_path.vtc files were created both under ssl and quic directories
to call this .vtci file with correct VTC_SOCK_TYPE environment values
("quic" for QUIC connection and "stream" for TCP connections);

2 weeks agoREGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC
Frederic Lecaille [Fri, 28 Nov 2025 15:43:41 +0000 (16:43 +0100)] 
REGTESTS: quic: dynamic_server_ssl.vtc supported by QUIC

ssl/dynamic_server_ssl.vtc was rename to ssl/dynamic_server_ssl.vtci
to produce a common part runnable both for QUIC and TCP connections.
Then dynamic_server_ssl.vtc were created both under ssl and quic directories
to call the .vtci file with correct VTC_SOCK_TYPE environment value.

Note that VTC_SOCK_TYPE may be resolved in haproxy -cli { } sections.

2 weeks agoREGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC
Frederic Lecaille [Wed, 26 Nov 2025 17:03:48 +0000 (18:03 +0100)] 
REGTESTS: quic/ssl: ssl/del_ssl_crt-list.vtc supported by QUIC

Extract from ssl/del_ssl_crt-list.vtc the common part to produce
ssl/del_ssl_crt-list.vtci which may be reused by QUIC and TCP
from respectively quic/del_ssl_crt-list.vtc and ssl/del_ssl_crt-list.vtc
thanks to "include" VTC command and VTC_SOCK_TYPE special vtest environment
variable.

2 weeks agoREGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory
Frederic Lecaille [Wed, 26 Nov 2025 14:21:51 +0000 (15:21 +0100)] 
REGTESTS: ssl: Move all the SSL certificates, keys, crt-lists inside "certs" directory

Move all these files and others for OCSP tests found into reg-tests/ssl
to reg-test/ssl/certs and adapt all the VTC files which use them.

This patch is needed by other tests which have to include the SSL tests.
Indeed, some VTC commands contain paths to these files which cannot
be customized with environment variables, depending on the location the VTC file
is runi from, because VTC does not resolve the environment variables. Only macros
as ${testdir} can be resolved.

For instance this command run from a VTC file from reg-tests/ssl directory cannot
be reused from another directory, except if we add a symbolic link for each certs,
key etc.

 haproxy h1 -cli {
   send "del ssl crt-list ${testdir}/localhost.crt-list ${testdir}/common.pem:1"
 }

This is not what we want. We add a symbolic link to reg-test/ssl/certs to the
directory and modify the command above as follows:

 haproxy h1 -cli {
   send "del ssl crt-list ${testdir}/certs/localhost.crt-list ${testdir}/certs/common.pem:1"
 }

2 weeks agoMINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()
Frederic Lecaille [Fri, 28 Nov 2025 10:54:23 +0000 (11:54 +0100)] 
MINOR: quic: Add useful debugging traces in qc_idle_timer_do_rearm()

Traces were missing in this function.
Also add information about the connection struct from qc->conn when
initialized for all the traces.

Should be easily backported as far as 2.6.

2 weeks agoBUG/MINOR: quic-be: handshake errors without connection stream closure
Frederic Lecaille [Fri, 28 Nov 2025 10:27:54 +0000 (11:27 +0100)] 
BUG/MINOR: quic-be: handshake errors without connection stream closure

This bug was revealed on backend side by reg-tests/ssl/del_ssl_crt-list.vtc when
run wich QUIC connections. As expected by the test, a TLS alert is generated on
servsr side. This latter sands a CONNECTION_CLOSE frame with a CRYPTO error
(>= 0x100). In this case the client closes its QUIC connection. But
the stream connection was not informed. This leads the connection to
be closed after the server timeout expiration. It shouls be closed asap.
This is the reason why reg-tests/ssl/del_ssl_crt-list.vtc could succeeds
or failed, but only after a 5 seconds delay.

To fix this, mimic the ssl_sock_io_cb() for TCP/SSL connections. Call
the same code this patch implements with ssl_sock_handle_hs_error()
to correctly handle the handshake errors. Note that some SSL counters
were not incremented for both the backends and frontends. After such
errors, ssl_sock_io_cb() start the mux after the connection has been
flagged in error. This has as side effect to close the stream
in conn_create_mux().

Must be backported to 3.3 only for backends. This is not sure at this time
if this bug may impact the frontends.

2 weeks agoBUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces
Frederic Lecaille [Thu, 27 Nov 2025 10:22:46 +0000 (11:22 +0100)] 
BUG/MINOR: quic/ssl: crash in ClientHello callback ssl traces

Such crashes may occur for QUIC frontends only when the SSL traces are enabled.

ssl_sock_switchctx_cbk() ClientHello callback may be called without any connection
initialize (<conn>) for QUIC connections leading to crashes when passing
conn->err_code to TRACE_ERROR().

Modify the TRACE_ERROR() statement to pass this parameter only when <conn> is
initialized.

Must be backported as far as 3.2.