From: Willy Tarreau Date: Fri, 8 Apr 2022 12:34:31 +0000 (+0200) Subject: BUG/MINOR: quic: set the source not the destination address on accept() X-Git-Tag: v2.6-dev5~24 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cc88c3075ca13c90268eabc83ae121f47848f40;p=thirdparty%2Fhaproxy.git BUG/MINOR: quic: set the source not the destination address on accept() When a QUIC connection is accepted, the wrong field is set from the client's source address, it's the destination instead of the source. No backport needed. --- diff --git a/src/quic_sock.c b/src/quic_sock.c index 9128fd7fc0..f3faa64f57 100644 --- a/src/quic_sock.c +++ b/src/quic_sock.c @@ -98,10 +98,10 @@ static int new_quic_cli_conn(struct quic_conn *qc, struct listener *l, if (unlikely((cli_conn = conn_new(&l->obj_type)) == NULL)) goto out; - if (!sockaddr_alloc(&cli_conn->dst, saddr, sizeof *saddr)) + if (!sockaddr_alloc(&cli_conn->src, saddr, sizeof *saddr)) goto out_free_conn; - cli_conn->flags |= CO_FL_ADDR_TO_SET; + cli_conn->flags |= CO_FL_ADDR_FROM_SET; qc->conn = cli_conn; cli_conn->qc = qc;