]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: quic: flag listener for local accept
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 26 Jan 2022 10:56:48 +0000 (11:56 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 26 Jan 2022 10:59:12 +0000 (11:59 +0100)
QUIC connections are distributed accross threads by xprt-quic according
to their CIDs. As such disable the thread selection in listener_accept
for QUIC listeners.

This prevents connection from migrating to another threads after its
allocation which can results in unexpected side-effects.

src/proto_quic.c

index 29ae209bde25bfe1c08a95e0a7d1b8c45c0014da..283484596cef73d4ae1f9928bce13991ae0a3681 100644 (file)
@@ -524,6 +524,7 @@ static void quic_add_listener(struct protocol *proto, struct listener *listener)
        MT_LIST_INIT(&listener->rx.pkts);
        listener->rx.odcids = EB_ROOT_UNIQUE;
        listener->rx.cids = EB_ROOT_UNIQUE;
+       listener->rx.flags |= RX_F_LOCAL_ACCEPT;
        HA_RWLOCK_INIT(&listener->rx.cids_lock);
        default_add_listener(proto, listener);
 }