]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
libknot/QUIC: send RETRY packet if indicated also by ngtcp2_conn_read_pkt
authorLibor Peltan <libor.peltan@nic.cz>
Tue, 9 Sep 2025 08:16:55 +0000 (10:16 +0200)
committerLibor Peltan <libor.peltan@nic.cz>
Tue, 9 Sep 2025 08:16:55 +0000 (10:16 +0200)
src/libknot/quic/quic.c

index e19cb1f40c6e403a55e1548e1e0c6b4a8ce0a4c4..6cefb1084d855316875de2732ee9dfbf9c96ed0e 100644 (file)
@@ -719,7 +719,11 @@ int knot_quic_handle(knot_quic_table_t *table, knot_quic_reply_t *reply,
                                   reply->in_payload->iov_len, now);
 
        *out_conn = conn;
-       if (ret == NGTCP2_ERR_DRAINING) { // received CONNECTION_CLOSE from the counterpart
+       if (ret == NGTCP2_ERR_RETRY) {
+               ret = -QUIC_SEND_RETRY;
+               knot_quic_table_rem(conn, table);
+               goto finish;
+       } else if (ret == NGTCP2_ERR_DRAINING) { // received CONNECTION_CLOSE from the counterpart
                knot_quic_table_rem(conn, table);
                ret = KNOT_EOK;
                goto finish;