if (!ngx_quic_pkt_in(pkt->flags)) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
- "quic invalid initial packet: 0x%xi", pkt->flags);
+ "quic invalid initial packet: 0x%xd", pkt->flags);
return NGX_ERROR;
}
if (!ngx_quic_pkt_in(pkt->flags)) {
ngx_log_error(NGX_LOG_INFO, c->log, 0,
- "quic invalid initial packet: 0x%xi", pkt->flags);
+ "quic invalid initial packet: 0x%xd", pkt->flags);
return NGX_ERROR;
}
frame->u.ack.largest = pkt->pn;
frame->u.ack.delay = ngx_quic_ack_delay(c, &pkt->received, frame->level);
- ngx_sprintf(frame->info, "ACK for PN=%d from frame handler level=%d",
+ ngx_sprintf(frame->info, "ACK for PN=%uL from frame handler level=%d",
pkt->pn, frame->level);
ngx_quic_queue_frame(c->quic, frame);
if (f->offset > fs->received) {
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic out-of-order frame: expecting %ui got %ui",
+ "quic out-of-order frame: expecting %uL got %uL",
fs->received, f->offset);
return ngx_quic_buffer_frame(c, fs, frame);
static ngx_int_t
ngx_quic_crypto_input(ngx_connection_t *c, ngx_quic_frame_t *frame, void *data)
{
- int sslerr;
- ssize_t n;
+ int n, sslerr;
ngx_ssl_conn_t *ssl_conn;
ngx_quic_send_ctx_t *ctx;
ngx_quic_crypto_frame_t *f;
if (sn == NULL) {
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi is new", f->stream_id);
+ "quic stream id 0x%xL is new", f->stream_id);
if (f->stream_id & NGX_QUIC_STREAM_SERVER_INITIATED) {
qc->error = NGX_QUIC_ERR_STREAM_STATE_ERROR;
if (sn == NULL) {
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi is new", f->id);
+ "quic stream id 0x%xL is new", f->id);
if (f->id & NGX_QUIC_STREAM_SERVER_INITIATED) {
qc->error = NGX_QUIC_ERR_STREAM_STATE_ERROR;
rev = c->read;
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi recv: eof:%d, avail:%z",
+ "quic stream id 0x%xL recv: eof:%d, avail:%z",
qs->id, rev->pending_eof, b->last - b->pos);
if (b->pos == b->last) {
}
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi recv() not ready", qs->id);
+ "quic stream id 0x%xL recv() not ready", qs->id);
return NGX_AGAIN;
}
}
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi recv: %z of %uz", qs->id, len, size);
+ "quic stream id 0x%xL recv: %z of %uz", qs->id, len, size);
if (!rev->pending_eof) {
frame = ngx_quic_alloc_frame(pc, 0);
ngx_quic_queue_frame(pc->quic, frame);
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi recv: increased max data: %ui",
+ "quic stream id 0x%xL recv: increased max data: %uL",
qs->id, qc->streams.recv_max_data);
}
}
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi send: %uz", qs->id, size);
+ "quic stream id 0x%xL send: %uz", qs->id, size);
/*
* we need to fit at least 1 frame into a packet, thus account head/tail;
p += fsize;
n += fsize;
- ngx_sprintf(frame->info, "stream 0x%xi len=%ui level=%d",
+ ngx_sprintf(frame->info, "stream 0x%xL len=%ui level=%d",
qs->id, fsize, frame->level);
ngx_quic_queue_frame(qc, frame);
qc = pc->quic;
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi cleanup", qs->id);
+ "quic stream id 0x%xL cleanup", qs->id);
ngx_rbtree_delete(&qc->streams.tree, &qs->node);
ngx_quic_free_frames(pc, &qs->fs.frames);
}
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stream id 0x%xi send fin", qs->id);
+ "quic stream id 0x%xL send fin", qs->id);
frame = ngx_quic_alloc_frame(pc, 0);
if (frame == NULL) {
frame->u.stream.length = 0;
frame->u.stream.data = NULL;
- ngx_sprintf(frame->info, "stream 0x%xi fin=1 level=%d",
+ ngx_sprintf(frame->info, "stream 0x%xL fin=1 level=%d",
qs->id, frame->level);
ngx_quic_queue_frame(qc, frame);
}
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic long packet flags:%xi version:%xD",
+ "quic long packet flags:%xd version:%xD",
pkt->flags, pkt->version);
if (!(pkt->flags & NGX_QUIC_PKT_FIXED_BIT)) {
if (pkt->version != NGX_QUIC_VERSION) {
ngx_log_error(NGX_LOG_INFO, pkt->log, 0,
- "quic unsupported version: 0x%xi", pkt->version);
+ "quic unsupported version: 0x%xD", pkt->version);
return NGX_ERROR;
}
}
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic short packet flags:%xi", pkt->flags);
+ "quic short packet flags:%xd", pkt->flags);
if (!(pkt->flags & NGX_QUIC_PKT_FIXED_BIT)) {
ngx_log_error(NGX_LOG_INFO, pkt->log, 0, "quic fixed bit is not set");
f->u.ack.ranges_end = p;
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in ACK largest:%ui delay:%ui"
- " count:%ui first:%ui", f->u.ack.largest,
+ "quic frame in ACK largest:%uL delay:%uL"
+ " count:%uL first:%uL", f->u.ack.largest,
f->u.ack.delay,
f->u.ack.range_count,
f->u.ack.first_range);
}
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic ACK ECN counters: %ui %ui %ui",
+ "quic ACK ECN counters: %uL %uL %uL",
f->u.ack.ect0, f->u.ack.ect1, f->u.ack.ce);
}
}
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: NCID seq:%ui retire:%ui len:%ui",
+ "quic frame in: NCID seq:%uL retire:%uL len:%ud",
f->u.ncid.seqnum, f->u.ncid.retire, f->u.ncid.len);
break;
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"quic frame in CONNECTION_CLOSE"
- " err:%s code:0x%xi type:0x%xi reason:'%V'",
+ " err:%s code:0x%xL type:0x%xL reason:'%V'",
ngx_quic_error_text(f->u.close.error_code),
f->u.close.error_code, f->u.close.frame_type,
&f->u.close.reason);
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"quic frame in: CONNECTION_CLOSE_APP:"
- " code:0x%xi reason:'%V'",
+ " code:0x%xL reason:'%V'",
f->u.close.error_code, &f->u.close.reason);
}
}
ngx_log_debug7(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: STREAM type:0x%xi id:0x%xi offset:0x%xi "
- "len:0x%xi bits off:%d len:%d fin:%d",
+ "quic frame in: STREAM type:0x%xi id:0x%xL offset:0x%xL "
+ "len:0x%xL bits off:%d len:%d fin:%d",
f->type, f->u.stream.stream_id, f->u.stream.offset,
f->u.stream.length, f->u.stream.off, f->u.stream.len,
f->u.stream.fin);
}
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: MAX_DATA max_data:%ui",
+ "quic frame in: MAX_DATA max_data:%uL",
f->u.max_data.max_data);
break;
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"quic frame in: RESET_STREAM"
- " id:0x%xi error_code:0x%xi final_size:0x%xi",
+ " id:0x%xL error_code:0x%xL final_size:0x%xL",
f->u.reset_stream.id, f->u.reset_stream.error_code,
f->u.reset_stream.final_size);
break;
}
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: STOP_SENDING id:0x%xi error_code:0x%xi",
+ "quic frame in: STOP_SENDING id:0x%xL error_code:0x%xL",
f->u.stop_sending.id, f->u.stop_sending.error_code);
break;
(f->type == NGX_QUIC_FT_STREAMS_BLOCKED) ? 1 : 0;
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: STREAMS_BLOCKED limit:%ui bidi:%d",
+ "quic frame in: STREAMS_BLOCKED limit:%uL bidi:%ui",
f->u.streams_blocked.limit,
f->u.streams_blocked.bidi);
f->u.max_streams.bidi = (f->type == NGX_QUIC_FT_MAX_STREAMS) ? 1 : 0;
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: MAX_STREAMS limit:%ui bidi:%d",
+ "quic frame in: MAX_STREAMS limit:%uL bidi:%ui",
f->u.max_streams.limit,
f->u.max_streams.bidi);
break;
}
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: MAX_STREAM_DATA id:%ui limit:%ui",
+ "quic frame in: MAX_STREAM_DATA id:%uL limit:%uL",
f->u.max_stream_data.id,
f->u.max_stream_data.limit);
break;
}
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic frame in: DATA_BLOCKED limit:%ui",
+ "quic frame in: DATA_BLOCKED limit:%uL",
f->u.data_blocked.limit);
break;
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"quic frame in: STREAM_DATA_BLOCKED"
- " id:%ui limit:%ui",
+ " id:%uL limit:%uL",
f->u.stream_data_blocked.id,
f->u.stream_data_blocked.limit);
break;
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
"quic frame in: RETIRE_CONNECTION_ID"
- " sequence_number:%ui",
+ " sequence_number:%uL",
f->u.retire_cid.sequence_number);
break;
ngx_log_error(NGX_LOG_INFO, pkt->log, 0,
"quic frame type 0x%xi is not "
- "allowed in packet with flags 0x%xi",
+ "allowed in packet with flags 0x%xd",
frame_type, pkt->flags);
return NGX_DECLINED;
}
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, pkt->log, 0,
- "quic ACK range: gap %ui range %ui", *gap, *range);
+ "quic ACK range: gap %uL range %uL", *gap, *range);
return p - start;
}
case NGX_QUIC_TP_STATELESS_RESET_TOKEN:
ngx_log_error(NGX_LOG_INFO, log, 0,
"quic client sent forbidden transport param"
- " id 0x%xi", id);
+ " id 0x%xL", id);
return NGX_ERROR;
}
if (p == NULL) {
ngx_log_error(NGX_LOG_INFO, log, 0,
"quic failed to parse"
- " transport param id 0x%xi length", id);
+ " transport param id 0x%xL length", id);
return NGX_ERROR;
}
if (rc == NGX_ERROR) {
ngx_log_error(NGX_LOG_INFO, log, 0,
"quic failed to parse"
- " transport param id 0x%xi data", id);
+ " transport param id 0x%xL data", id);
return NGX_ERROR;
}
if (rc == NGX_DECLINED) {
ngx_log_error(NGX_LOG_INFO, log, 0,
- "quic unknown transport param id 0x%xi,skipped", id);
+ "quic unknown transport param id 0x%xL, skipped", id);
}
p += len;