#define QUIC_FL_PKTNS_PKT_RECEIVED (1UL << 0)
/* Flag the packet number space as requiring an ACK frame to be sent. */
#define QUIC_FL_PKTNS_ACK_REQUIRED (1UL << 1)
+/* Flag the packet number space as needing probing */
+#define QUIC_FL_PKTNS_PROBE_NEEDED (1UL << 2)
/* The maximum number of dgrams which may be sent upon PTO expirations. */
#define QUIC_MAX_NB_PTO_DGRAMS 2
#define QUIC_FL_CONN_LISTENER (1U << 3)
#define QUIC_FL_CONN_ACCEPT_REGISTERED (1U << 4)
#define QUIC_FL_CONN_IDLE_TIMER_RESTARTED_AFTER_READ (1U << 6)
+#define QUIC_FL_CONN_RETRANS_NEEDED (1U << 7)
#define QUIC_FL_CONN_NOTIFY_CLOSE (1U << 27) /* MUX notified about quic-conn imminent closure (idle-timeout or CONNECTION_CLOSE emission/reception) */
#define QUIC_FL_CONN_EXP_TIMER (1U << 28) /* timer has expired, quic-conn can be freed */
#define QUIC_FL_CONN_CLOSING (1U << 29)
struct ssl_sock_ctx *conn_ctx;
struct quic_conn *qc;
struct quic_pktns *pktns;
- int i;
conn_ctx = task->context;
qc = conn_ctx->qc;
}
if (qc->path->in_flight) {
+ qc->flags |= QUIC_FL_CONN_RETRANS_NEEDED;
pktns = quic_pto_pktns(qc, qc->state >= QUIC_HS_ST_COMPLETE, NULL);
+ pktns->flags |= QUIC_FL_PKTNS_PROBE_NEEDED;
if (pktns == &qc->pktns[QUIC_TLS_PKTNS_INITIAL]) {
- pktns->tx.pto_probe = 1;
if (qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.in_flight)
- qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].tx.pto_probe = 1;
- }
- else {
- pktns->tx.pto_probe = 2;
+ qc->pktns[QUIC_TLS_PKTNS_HANDSHAKE].flags |= QUIC_FL_PKTNS_PROBE_NEEDED;
}
}
else if (!qc_is_listener(qc) && qc->state <= QUIC_HS_ST_COMPLETE) {
iel->pktns->tx.pto_probe = 1;
}
- for (i = QUIC_TLS_ENC_LEVEL_INITIAL; i < QUIC_TLS_ENC_LEVEL_MAX; i++) {
- if (i == QUIC_TLS_ENC_LEVEL_APP && !quic_peer_validated_addr(qc))
- continue;
-
- qc_prep_fast_retrans(&qc->els[i], qc);
- }
-
tasklet_wakeup(conn_ctx->wait_event.tasklet);
qc->path->loss.pto_count++;