ngx_quic_connection_t *qc;
static u_char buf[NGX_QUIC_DEFAULT_MAX_PACKET_SIZE];
+ ngx_memzero(&b, sizeof(ngx_buf_t));
b.start = buf;
b.end = buf + sizeof(buf);
b.pos = b.last = b.start;
c->log->action = "retrying quic connection";
- qc = c->quic;
-
if (ngx_buf_size(pkt->raw) < NGX_QUIC_MIN_INITIAL_SIZE) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
"quic UDP datagram is too small for initial packet");
qc = c->quic;
now = ngx_current_msec;
- wait = 0;
if (ngx_queue_empty(&ctx->sent)) {
*waitp = 0;
if (frame->data) {
ngx_free(frame->data);
+ frame->data = NULL;
}
ngx_queue_insert_head(&qc->free_frames, &frame->queue);
ad.len = ngx_quic_create_retry_itag(pkt, ad.data, &start);
itag.data = ad.data + ad.len;
+ itag.len = EVP_GCM_TLS_TAG_LEN;
#ifdef NGX_QUIC_DEBUG_CRYPTO
ngx_quic_hexdump(pkt->log, "quic retry itag", ad.data, ad.len);
*pos = p;
expected_pn = *largest_pn + 1;
- pn_win = 1 << pn_nbits;
+ pn_win = 1ULL << pn_nbits;
pn_hwin = pn_win / 2;
pn_mask = pn_win - 1;