mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-12-09 19:51:36 +01:00
BUG/MEDIUM: quic-be: do not launch the connection migration process
At this time the connection migration is not supported by QUIC backends. This patch prevents this process to be launched for connections to QUIC backends. Furthermore, the connection migration process could be started systematically when connecting a backend to INADDR_ANY, leading to crashes into qc_handle_conn_migration() (when referencing qc->li). Thank you to @InputOutputZ for having reported this issue in GH #3178. This patch simply checks the connection type (listener or not) before checking if a connection migration must be started. No need to backport because support for QUIC backends is available from 3.3.
This commit is contained in:
parent
071e5063d8
commit
64e32a0767
@ -2295,6 +2295,7 @@ int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *from_qc,
|
||||
struct quic_conn *qc = NULL;
|
||||
unsigned char *pos, *end;
|
||||
struct list *tasklist_head = NULL;
|
||||
struct listener *li = objt_listener(o);
|
||||
|
||||
TRACE_ENTER(QUIC_EV_CONN_LPKT);
|
||||
|
||||
@ -2336,7 +2337,6 @@ int quic_dgram_parse(struct quic_dgram *dgram, struct quic_conn *from_qc,
|
||||
*/
|
||||
if (!qc) {
|
||||
int new_tid = -1;
|
||||
struct listener *li = objt_listener(o);
|
||||
|
||||
qc = from_qc ? from_qc : quic_rx_pkt_retrieve_conn(pkt, dgram, li, &new_tid);
|
||||
/* qc is NULL if receiving a non Initial packet for an
|
||||
@ -2375,7 +2375,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)) {
|
||||
if (li && 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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user