MINOR: quic_sock: missing CO_FL_ADDR_TO_SET flag

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.
This commit is contained in:
Frédéric Lécaille 2021-11-05 11:40:50 +01:00
parent 3a8bbcc38e
commit d169efe52b

View File

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