]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: xprt_qstrm: define callback for ALPN retrieval
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 25 Mar 2026 08:03:41 +0000 (09:03 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 2 Apr 2026 12:02:04 +0000 (14:02 +0200)
Add get_alpn operation support for xprt_qstrm. This simply acts as a
passthrough method to the underlying XPRT layer.

This function is necessary for QMux when running above SSL, as mux-quic
will access ALPN during its initialization in order to instantiate the
proper application protocol layer.

src/xprt_qstrm.c

index 8fccacfb7f214bd887ae28f90e9825e12fe06895..c9ad39b1b9f210b7192b7f131bb9dfe5654b19ff 100644 (file)
@@ -103,11 +103,19 @@ static void xprt_qstrm_close(struct connection *conn, void *xprt_ctx)
        ABORT_NOW();
 }
 
+static int xprt_qstrm_get_alpn(const struct connection *conn, void *xprt_ctx,
+                               const char **str, int *len)
+{
+       struct xprt_qstrm_ctx *ctx = xprt_ctx;
+       return ctx->ops_lower->get_alpn(conn, ctx->ctx_lower, str, len);
+}
+
 struct xprt_ops xprt_qstrm = {
        .add_xprt  = xprt_qstrm_add_xprt,
        .init      = xprt_qstrm_init,
        .start     = xprt_qstrm_start,
        .close     = xprt_qstrm_close,
+       .get_alpn  = xprt_qstrm_get_alpn,
        .name      = "qstrm",
 };