]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Useless test about datagram destination addresses
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 12 Jan 2023 09:36:26 +0000 (10:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 17 Jan 2023 15:35:20 +0000 (16:35 +0100)
There is no reason to check if the peer has modified the destination
address of its connection.

May be backported to 2.7.

src/quic_conn.c

index e3a8b4634677d0bd2ff105e445d5c7c646d34e44..72b8439cd4a4661a852f78955c9b802d2703975a 100644 (file)
@@ -7406,8 +7406,7 @@ int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *from_qc,
                }
 
                /* Detect QUIC connection migration. */
-               if (ipcmp(&qc->peer_addr, &dgram->saddr, 1) ||
-                   ipcmp(&qc->local_addr, &dgram->daddr, 1)) {
+               if (ipcmp(&qc->peer_addr, &dgram->saddr, 1)) {
                        if (qc_handle_conn_migration(qc, &dgram->saddr, &dgram->daddr)) {
                                /* Skip the entire datagram. */
                                TRACE_ERROR("error during connection migration, datagram dropped", QUIC_EV_CONN_LPKT, qc);