From: Willy Tarreau Date: Thu, 21 Sep 2017 17:43:21 +0000 (+0200) Subject: MINOR: mux: register the pass-through mux for any ALPN string X-Git-Tag: v1.8-rc1~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f64908294c807cf3efdb16f23df6629c24752e7d;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/mux_pt.c b/src/mux_pt.c index 603c3603ea..64aae14bad 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); +}