mirror of
https://github.com/nginx/nginx.git
synced 2025-02-25 18:55:26 -06:00
QUIC: fixed output context restoring.
The cd8018bc81a5 fixed unintended send of non-padded initial packets, but failed to restore context properly: only processed contexts need to be restored. As a consequence, a packet number could be restored from uninitialized value.
This commit is contained in:
parent
90b19bf65d
commit
72d0668627
@ -165,7 +165,7 @@ ngx_quic_create_datagrams(ngx_connection_t *c)
|
|||||||
if (min > len) {
|
if (min > len) {
|
||||||
/* padding can't be applied - avoid sending the packet */
|
/* padding can't be applied - avoid sending the packet */
|
||||||
|
|
||||||
for (i = 0; i < NGX_QUIC_SEND_CTX_LAST; i++) {
|
while (i-- > 0) {
|
||||||
ctx = &qc->send_ctx[i];
|
ctx = &qc->send_ctx[i];
|
||||||
ngx_quic_revert_send(c, ctx, preserved_pnum[i]);
|
ngx_quic_revert_send(c, ctx, preserved_pnum[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user