]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: set the source not the destination address on accept()
authorWilly Tarreau <w@1wt.eu>
Fri, 8 Apr 2022 12:34:31 +0000 (14:34 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 8 Apr 2022 12:43:27 +0000 (14:43 +0200)
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.

src/quic_sock.c

index 9128fd7fc05cd88b51a1a7ea7c281bbbdeb0727b..f3faa64f575570b4c44754dac3ac4d1d66524bb4 100644 (file)
@@ -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;