summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorVladimir Homutov <vl@nginx.com>2020-10-07 13:38:17 +0300
committerVladimir Homutov <vl@nginx.com>2020-10-07 13:38:17 +0300
commit7369bdc47c82329b03b63d6d764fe82678d093d9 (patch)
tree224147f4ac99e7fd4c9d86057a28fbc5fe30c63a
parent7250a7688da4ee9ad1a88fd1489bbb19ec2020ce (diff)
downloadnginx-7369bdc47c82329b03b63d6d764fe82678d093d9.tar.gz
nginx-7369bdc47c82329b03b63d6d764fe82678d093d9.tar.bz2
QUIC: updated c->log->action strings to reflect proper state.
-rw-r--r--src/event/ngx_event_quic.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index aff89b01d..7b253a563 100644
--- 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_quic_conf_t *conf)
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 *c, ngx_quic_conf_t *conf,
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_buf_t *b, ngx_quic_conf_t *conf)
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 *c, ngx_quic_conf_t *conf,
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 *c, ngx_quic_conf_t *conf,
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, ngx_quic_conf_t *conf,
}
}
+ 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 *c, ngx_quic_conf_t *conf,
ngx_gettimeofday(&pkt->received);
}
+ c->log->action = "handling payload";
+
if (pkt->level != ssl_encryption_application) {
return ngx_quic_payload_handler(c, pkt);
}