From f64908294c807cf3efdb16f23df6629c24752e7d Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 21 Sep 2017 19:43:21 +0200 Subject: [PATCH] MINOR: mux: register the pass-through mux for any ALPN string The pass-through mux is the fallback used on any incoming connection unless another mux claims the ALPN name and the proxy mode. Thus mux_pt registers ALPN token "" (empty name) which catches everything. --- src/mux_pt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mux_pt.c b/src/mux_pt.c index 603c3603e..64aae14ba 100644 --- a/src/mux_pt.c +++ b/src/mux_pt.c @@ -59,3 +59,13 @@ const struct mux_ops mux_pt_ops = { .wake = mux_pt_wake, .name = "PASS", }; + +/* ALPN selection : default mux has empty name */ +static struct alpn_mux_list alpn_mux_pt = + { .token = IST(""), .mode = ALPN_MODE_ANY, .mux = &mux_pt_ops }; + +__attribute__((constructor)) +static void __mux_pt_init(void) +{ + alpn_register_mux(&alpn_mux_pt); +}