mirror of
https://github.com/nginx/nginx.git
synced 2025-08-02 12:26:14 +08:00
QUIC: added debug message with final packet processing status.
This commit is contained in:
parent
783df73ba0
commit
5a07601a3c
@ -46,6 +46,11 @@
|
|||||||
#define NGX_QUIC_MIN_SR_PACKET 43 /* 5 random + 16 srt + 22 padding */
|
#define NGX_QUIC_MIN_SR_PACKET 43 /* 5 random + 16 srt + 22 padding */
|
||||||
#define NGX_QUIC_MAX_SR_PACKET 1200
|
#define NGX_QUIC_MAX_SR_PACKET 1200
|
||||||
|
|
||||||
|
#define ngx_quic_level_name(lvl) \
|
||||||
|
(lvl == ssl_encryption_application) ? "application" \
|
||||||
|
: (lvl == ssl_encryption_initial) ? "initial" \
|
||||||
|
: (lvl == ssl_encryption_handshake) ? "handshake" : "early_data"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
ngx_rbtree_t tree;
|
ngx_rbtree_t tree;
|
||||||
@ -1625,6 +1630,25 @@ ngx_quic_input(ngx_connection_t *c, ngx_buf_t *b, ngx_quic_conf_t *conf)
|
|||||||
|
|
||||||
rc = ngx_quic_process_packet(c, conf, &pkt);
|
rc = ngx_quic_process_packet(c, conf, &pkt);
|
||||||
|
|
||||||
|
#if (NGX_DEBUG)
|
||||||
|
if (pkt.parsed) {
|
||||||
|
ngx_quic_connection_t *qc;
|
||||||
|
|
||||||
|
qc = c->quic;
|
||||||
|
|
||||||
|
ngx_log_debug8(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
|
"quic pkt done %s decr:%d pn:%L pe:%ui rc:%i"
|
||||||
|
" closing:%d err:%d %s",
|
||||||
|
ngx_quic_level_name(pkt.level), pkt.decrypted,
|
||||||
|
pkt.pn, pkt.error, rc, (qc && qc->closing) ? 1 : 0,
|
||||||
|
qc ? qc->error : 0,
|
||||||
|
(qc && qc->error_reason) ? qc->error_reason : "");
|
||||||
|
} else {
|
||||||
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||||
|
"quic pkt done parse failed rc:%i", rc);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (rc == NGX_ERROR) {
|
if (rc == NGX_ERROR) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
}
|
}
|
||||||
@ -1687,6 +1711,8 @@ ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkt->parsed = 1;
|
||||||
|
|
||||||
c->log->action = "processing quic packet";
|
c->log->action = "processing quic packet";
|
||||||
|
|
||||||
qc = c->quic;
|
qc = c->quic;
|
||||||
@ -1838,6 +1864,8 @@ ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkt->decrypted = 1;
|
||||||
|
|
||||||
if (c->ssl == NULL) {
|
if (c->ssl == NULL) {
|
||||||
if (ngx_quic_init_connection(c) != NGX_OK) {
|
if (ngx_quic_init_connection(c) != NGX_OK) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
@ -311,6 +311,8 @@ typedef struct {
|
|||||||
unsigned need_ack:1;
|
unsigned need_ack:1;
|
||||||
unsigned key_phase:1;
|
unsigned key_phase:1;
|
||||||
unsigned key_update:1;
|
unsigned key_update:1;
|
||||||
|
unsigned parsed:1;
|
||||||
|
unsigned decrypted:1;
|
||||||
} ngx_quic_header_t;
|
} ngx_quic_header_t;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user