QUIC: fixed indentation.
This commit is contained in:
parent
418ce3b294
commit
4ce2114724
|
@ -126,7 +126,7 @@ int ngx_quic_select_socket_by_dcid(struct sk_reuseport_md *ctx)
|
|||
|
||||
default:
|
||||
debugmsg("nginx quic bpf_sk_select_reuseport err: %d key 0x%llx",
|
||||
rc, key);
|
||||
rc, key);
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
|
|
@ -491,9 +491,9 @@ ngx_quic_close_connection(ngx_connection_t *c, ngx_int_t rc)
|
|||
|
||||
/* 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 {
|
||||
|
||||
/*
|
||||
|
@ -816,7 +816,7 @@ ngx_quic_handle_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
|
|||
{
|
||||
/* 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -834,7 +834,7 @@ ngx_quic_pto_handler(ngx_event_t *ev)
|
|||
|
||||
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;
|
||||
|
@ -1166,7 +1166,7 @@ ngx_quic_generate_ack(ngx_connection_t *c, ngx_quic_send_ctx_t *ctx)
|
|||
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);
|
||||
|
|
|
@ -108,7 +108,7 @@ ngx_quic_handle_path_response_frame(ngx_connection_t *c,
|
|||
}
|
||||
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||
"quic stale PATH_RESPONSE ignored");
|
||||
"quic stale PATH_RESPONSE ignored");
|
||||
|
||||
return NGX_OK;
|
||||
|
||||
|
@ -387,7 +387,7 @@ ngx_quic_set_connection_path(ngx_connection_t *c, ngx_quic_path_t *path)
|
|||
{
|
||||
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) {
|
||||
|
|
|
@ -38,7 +38,7 @@ ngx_quic_open_sockets(ngx_connection_t *c, ngx_quic_connection_t *qc,
|
|||
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) */
|
||||
|
|
|
@ -212,16 +212,16 @@ ngx_quic_add_handshake_data(ngx_ssl_conn_t *ssl_conn,
|
|||
|
||||
#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
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ ngx_int_t
|
|||
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;
|
||||
|
|
|
@ -588,7 +588,7 @@ ngx_quic_payload_size(ngx_quic_header_t *pkt, size_t pkt_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;
|
||||
|
@ -1052,7 +1052,7 @@ ngx_quic_parse_frame(ngx_quic_header_t *pkt, u_char *start, u_char *end,
|
|||
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;
|
||||
}
|
||||
|
@ -1555,7 +1555,7 @@ ngx_quic_create_max_streams(u_char *p, ngx_quic_max_streams_frame_t *ms)
|
|||
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);
|
||||
|
|
Loading…
Reference in New Issue