Mercurial > hg > nginx
diff src/event/ngx_event_quic_protection.c @ 8536:c6b963de0c00 quic
QUIC: pass return code from ngx_quic_decrypt() to the caller.
It is required to distinguish internal errors from corrupted packets and
perform actions accordingly: drop the packet or close the connection.
While there, made processing of ngx_quic_decrypt() erorrs similar and
removed couple of protocol violation errors.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 02 Sep 2020 22:34:15 +0300 |
parents | b13141d6d250 |
children | d3489d225f8f |
line wrap: on
line diff
--- a/src/event/ngx_event_quic_protection.c +++ b/src/event/ngx_event_quic_protection.c @@ -1026,7 +1026,6 @@ ngx_quic_decrypt(ngx_quic_header_t *pkt, if (ngx_quic_tls_hp(pkt->log, ciphers.hp, secret, mask, sample) != NGX_OK) { - pkt->error = NGX_QUIC_ERR_PROTOCOL_VIOLATION; return NGX_DECLINED; } @@ -1103,7 +1102,6 @@ ngx_quic_decrypt(ngx_quic_header_t *pkt, #endif if (rc != NGX_OK) { - pkt->error = NGX_QUIC_ERR_PROTOCOL_VIOLATION; return NGX_DECLINED; }