]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Wrong datagram dispatch because of qc_check_dcid()
authorFrédéric Lécaille <flecaille@haproxy.com>
Mon, 13 Feb 2023 15:14:24 +0000 (16:14 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Mon, 13 Feb 2023 15:14:24 +0000 (16:14 +0100)
There was a parenthesis placed in the wrong place for a memcmp().
As a consequence, clients could not reuse a UDP address for a new connection.

Must be backported to 2.7.

src/quic_conn.c

index bf0581cfc14c437dd3cc709b07267d86f1a2de7d..a73f7c0575d59041b364db6544b736e13ea87fdc 100644 (file)
@@ -7542,7 +7542,7 @@ int qc_check_dcid(struct quic_conn *qc, unsigned char *dcid, size_t dcid_len)
        if ((qc->scid.len == dcid_len &&
             memcmp(qc->scid.data, dcid, dcid_len) == 0) ||
            (qc->odcid.len == dcid_len &&
-            memcmp(qc->odcid.data, dcid, dcid_len)) == 0) {
+            memcmp(qc->odcid.data, dcid, dcid_len) == 0)) {
                return 1;
        }