]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic_sock: missing CO_FL_ADDR_TO_SET flag
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 5 Nov 2021 10:40:50 +0000 (11:40 +0100)
committerFrédéric Lécaille <flecaille@haproxy.com>
Fri, 19 Nov 2021 13:37:35 +0000 (14:37 +0100)
When allocating destination addresses for QUIC connections we did not set
this flag which denotes these addresses have been set. This had as side
effect to prevent the H3 request results from being returned to the QUIC clients.

Note that this bug was revealed by this commit:
  "MEDIUM: backend: Rely on addresses at stream level to init server connection"

Thanks to Christopher for having found the real cause of this issue.

src/quic_sock.c

index bb6cb6150ddfae542dcb88f12b3aab402a277ed1..a574de0c0de4e43b9902cf6a9662737fd82192d5 100644 (file)
@@ -92,19 +92,17 @@ static int new_quic_cli_conn(struct quic_conn *qc, struct listener *l,
                              struct sockaddr_storage *saddr)
 {
        struct connection *cli_conn;
-       struct sockaddr_storage *dst;
 
-       dst = NULL;
        if (unlikely((cli_conn = conn_new(&l->obj_type)) == NULL))
                goto out;
 
-       if (!sockaddr_alloc(&dst, saddr, sizeof *saddr))
+       if (!sockaddr_alloc(&cli_conn->dst, saddr, sizeof *saddr))
                goto out_free_conn;
 
+       cli_conn->flags |= CO_FL_ADDR_TO_SET;
        qc->conn = cli_conn;
        cli_conn->qc = qc;
 
-       cli_conn->dst = dst;
        cli_conn->handle.fd = l->rx.fd;
        cli_conn->target = &l->obj_type;