Mercurial > hg > nginx-quic
diff src/event/ngx_event_quic.c @ 8135:eacca87c476e quic
QUIC: updated c->log->action strings to reflect proper state.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 07 Oct 2020 13:38:17 +0300 |
parents | 2b11bd029815 |
children | b38b41127489 |
line wrap: on
line diff
--- a/src/event/ngx_event_quic.c +++ b/src/event/ngx_event_quic.c @@ -643,8 +643,6 @@ ngx_quic_run(ngx_connection_t *c, ngx_qu ngx_log_debug0(NGX_LOG_DEBUG_EVENT, c->log, 0, "quic run"); - c->log->action = "QUIC initialization"; - rc = ngx_quic_input(c, c->buffer, conf); if (rc != NGX_OK) { ngx_quic_close_connection(c, rc == NGX_DECLINED ? NGX_DONE : NGX_ERROR); @@ -669,8 +667,6 @@ ngx_quic_new_connection(ngx_connection_t ngx_quic_client_id_t *cid; ngx_quic_connection_t *qc; - c->log->action = "creating new quic connection"; - qc = ngx_pcalloc(c->pool, sizeof(ngx_quic_connection_t)); if (qc == NULL) { return NULL; @@ -1300,6 +1296,8 @@ ngx_quic_input_handler(ngx_event_t *rev) ngx_quic_connection_t *qc; static u_char buf[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; + ngx_log_debug0(NGX_LOG_DEBUG_EVENT, rev->log, 0, "quic input handler"); + ngx_memzero(&b, sizeof(ngx_buf_t)); b.start = buf; b.end = buf + sizeof(buf); @@ -1309,7 +1307,7 @@ ngx_quic_input_handler(ngx_event_t *rev) c = rev->data; qc = c->quic; - ngx_log_debug0(NGX_LOG_DEBUG_EVENT, rev->log, 0, "quic input handler"); + c->log->action = "handling quic input"; if (rev->timedout) { ngx_log_error(NGX_LOG_INFO, c->log, NGX_ETIMEDOUT, @@ -1618,7 +1616,6 @@ ngx_quic_input(ngx_connection_t *c, ngx_ p = b->pos; while (p < b->last) { - c->log->action = "processing quic packet"; ngx_memzero(&pkt, sizeof(ngx_quic_header_t)); pkt.raw = b; @@ -1684,12 +1681,16 @@ ngx_quic_process_packet(ngx_connection_t static u_char buf[NGX_QUIC_MAX_UDP_PAYLOAD_SIZE]; + c->log->action = "parsing quic packet"; + rc = ngx_quic_parse_packet(pkt); if (rc == NGX_DECLINED || rc == NGX_ERROR) { return rc; } + c->log->action = "processing quic packet"; + qc = c->quic; if (qc) { @@ -1759,6 +1760,8 @@ ngx_quic_process_packet(ngx_connection_t if (pkt->level == ssl_encryption_initial) { + c->log->action = "creating quic connection"; + if (pkt->dcid.len < NGX_QUIC_CID_LEN_MIN) { /* 7.2. Negotiating Connection IDs */ ngx_log_error(NGX_LOG_INFO, c->log, 0, @@ -1800,6 +1803,8 @@ ngx_quic_process_packet(ngx_connection_t } } + c->log->action = "decrypting packet"; + keys = &qc->keys[pkt->level]; if (keys->client.key.len == 0) { @@ -1847,6 +1852,8 @@ ngx_quic_process_packet(ngx_connection_t ngx_gettimeofday(&pkt->received); } + c->log->action = "handling payload"; + if (pkt->level != ssl_encryption_application) { return ngx_quic_payload_handler(c, pkt); }