default:
debugmsg("nginx quic bpf_sk_select_reuseport err: %d key 0x%llx",
- rc, key);
+ rc, key);
goto failed;
}
/* this case also handles some errors from ngx_quic_run() */
- ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic close silent drain:%d timedout:%d",
- qc->draining, c->read->timedout);
+ ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
+ "quic close silent drain:%d timedout:%d",
+ qc->draining, c->read->timedout);
} else {
/*
{
/* packet comes from unknown path, possibly migration */
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic too early migration attempt");
+ "quic too early migration attempt");
return NGX_DONE;
}
}
for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) {
- ctx = &qc->send_ctx[i];
+ ctx = &qc->send_ctx[i];
if (ngx_queue_empty(&ctx->sent)) {
continue;
return NGX_OK;
}
- if (ctx->level == ssl_encryption_application) {
+ if (ctx->level == ssl_encryption_application) {
delay = ngx_current_msec - ctx->ack_delay_start;
qc = ngx_quic_get_connection(c);
}
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
- "quic stale PATH_RESPONSE ignored");
+ "quic stale PATH_RESPONSE ignored");
return NGX_OK;
{
size_t len;
- ngx_memcpy(c->sockaddr, path->sockaddr, path->socklen);
+ ngx_memcpy(c->sockaddr, path->sockaddr, path->socklen);
c->socklen = path->socklen;
if (c->addr_text.data) {
qc->tp.original_dcid.len = pkt->odcid.len;
qc->tp.original_dcid.data = ngx_pstrdup(c->pool, &pkt->odcid);
if (qc->tp.original_dcid.data == NULL) {
- return NGX_ERROR;
+ return NGX_ERROR;
}
/* socket to use for further processing (id auto-generated) */
#if defined(TLSEXT_TYPE_application_layer_protocol_negotiation)
- SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len);
+ SSL_get0_alpn_selected(ssl_conn, &alpn_data, &alpn_len);
- if (alpn_len == 0) {
- qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL;
- qc->error_reason = "unsupported protocol in ALPN extension";
+ if (alpn_len == 0) {
+ qc->error = 0x100 + SSL_AD_NO_APPLICATION_PROTOCOL;
+ qc->error_reason = "unsupported protocol in ALPN extension";
- ngx_log_error(NGX_LOG_INFO, c->log, 0,
- "quic unsupported protocol in ALPN extension");
- return 0;
- }
+ ngx_log_error(NGX_LOG_INFO, c->log, 0,
+ "quic unsupported protocol in ALPN extension");
+ return 0;
+ }
#endif
ngx_quic_new_sr_token(ngx_connection_t *c, ngx_str_t *cid, u_char *secret,
u_char *token)
{
- ngx_str_t tmp;
+ ngx_str_t tmp;
tmp.data = secret;
tmp.len = NGX_QUIC_SR_KEY_LEN;
/* flags, version, dcid and scid with lengths and zero-length token */
len = 5 + 2 + pkt->dcid.len + pkt->scid.len
- + (pkt->level == ssl_encryption_initial ? 1 : 0);
+ + (pkt->level == ssl_encryption_initial ? 1 : 0);
if (len > pkt_len) {
return 0;
goto error;
}
- p = ngx_quic_parse_int(p, end, &f->u.max_stream_data.limit);
+ p = ngx_quic_parse_int(p, end, &f->u.max_stream_data.limit);
if (p == NULL) {
goto error;
}
u_char *start;
ngx_uint_t type;
- type = ms->bidi ? NGX_QUIC_FT_MAX_STREAMS : NGX_QUIC_FT_MAX_STREAMS2;
+ type = ms->bidi ? NGX_QUIC_FT_MAX_STREAMS : NGX_QUIC_FT_MAX_STREAMS2;
if (p == NULL) {
len = ngx_quic_varint_len(type);