mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-27 20:01:15 -05:00
The QUIC mux requires "application operations" (app ops), which are a list of callbacks associated with the application level (i.e., h3, h0.9) and derived from the ALPN. For 0-RTT, when the session cache cannot be reused before activation, the current code fails to reach the initialization of these app ops, causing the mux to crash during its initialization. To fix this, this patch restores the behavior of ssl_sock_srv_try_reuse_sess(), whose purpose was to reuse sessions stored in the session cache regardless of whether 0-RTT was enabled, prior to this commit: MEDIUM: quic-be: modify ssl_sock_srv_try_reuse_sess() to reuse backend sessions (0-RTT) With this patch, this function now does only one thing: attempt to reuse a session, and that's it! This patch allows ignoring whether a session was successfully reused from the cache or not. This directly fixes the issue where app ops initialization was skipped upon a session cache reuse failure. From a functional standpoint, starting a mux without reusing the session cache has no negative impact; the mux will start, but with no early data to send. Finally, there is the case where the ALPN is reset when the backend is stopped. It is critical to continue locking read access to the ALPN to secure shared access, which this patch does. It is indeed possible for the server to be stopped between the call to connect_server() and quic_reuse_srv_params(). But this cannot prevent the mux to start without app ops. This is why a 'TODO' section was added, as a reminder that a race condition regarding the ALPN reset still needs to be fixed. Must be backported to 3.3 |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||
| make | ||