aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/event/ngx_event_quic.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/event/ngx_event_quic.c b/src/event/ngx_event_quic.c
index 1962019d5..9ff09cb05 100644
--- a/src/event/ngx_event_quic.c
+++ b/src/event/ngx_event_quic.c
@@ -1479,7 +1479,7 @@ bad_token:
qc->error = NGX_QUIC_ERR_INVALID_TOKEN;
qc->error_reason = "invalid_token";
- return NGX_ERROR;
+ return NGX_DECLINED;
}
@@ -2104,8 +2104,19 @@ ngx_quic_process_packet(ngx_connection_t *c, ngx_quic_conf_t *conf,
}
if (pkt->token.len) {
- if (ngx_quic_validate_token(c, pkt) != NGX_OK) {
+ rc = ngx_quic_validate_token(c, pkt);
+
+ if (rc == NGX_OK) {
+ qc->validated = 1;
+
+ } else if (rc == NGX_ERROR) {
return NGX_ERROR;
+
+ } else {
+ /* NGX_DECLINED */
+ if (conf->retry) {
+ return ngx_quic_send_retry(c);
+ }
}
} else if (conf->retry) {