]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
quic/handler: bugfix: skip processing if no connection
authorLibor Peltan <libor.peltan@nic.cz>
Fri, 18 Aug 2023 09:50:28 +0000 (11:50 +0200)
committerDaniel Salzman <daniel.salzman@nic.cz>
Tue, 31 Oct 2023 06:01:35 +0000 (07:01 +0100)
src/knot/server/quic-handler.c

index 57a3856da5db47a69ff655390e954912e04d70b7..9526dc299f1bb1abdfe235aa7bfcbf5ada0e26a9 100644 (file)
@@ -84,11 +84,13 @@ void quic_handler(knotd_qdata_params_t *params, knot_layer_t *layer,
        knot_quic_conn_t *conn = NULL;
        (void)knot_quic_handle(table, &rpl, idle_close, &conn);
 
-       handle_quic_streams(conn, params, layer, NULL);
+       if (conn != NULL) {
+               handle_quic_streams(conn, params, layer, NULL);
 
-       (void)knot_quic_send(table, conn, &rpl, QUIC_MAX_SEND_PER_RECV, 0);
+               (void)knot_quic_send(table, conn, &rpl, QUIC_MAX_SEND_PER_RECV, 0);
 
-       knot_quic_cleanup(&conn, 1);
+               knot_quic_cleanup(&conn, 1);
+       }
 }
 
 knot_quic_table_t *quic_make_table(struct server *server)