Mercurial > hg > nginx
comparison src/event/quic/ngx_event_quic.c @ 9152:2880f60a80c3
QUIC: posted generating TLS Key Update next keys.
Since at least f9fbeb4ee0de and certainly after 924882f42dea, which
TLS Key Update support predates, queued data output is deferred to a
posted push handler. To address timing signals after these changes,
generating next keys is now posted to run after the push handler.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Fri, 25 Aug 2023 13:51:38 +0400 |
parents | 58afcd72446f |
children | 8f7e6d8c061e |
comparison
equal
deleted
inserted
replaced
9151:933f37273282 | 9152:2880f60a80c3 |
---|---|
281 | 281 |
282 qc->path_validation.log = c->log; | 282 qc->path_validation.log = c->log; |
283 qc->path_validation.data = c; | 283 qc->path_validation.data = c; |
284 qc->path_validation.handler = ngx_quic_path_handler; | 284 qc->path_validation.handler = ngx_quic_path_handler; |
285 | 285 |
286 qc->key_update.log = c->log; | |
287 qc->key_update.data = c; | |
288 qc->key_update.handler = ngx_quic_keys_update; | |
289 | |
286 qc->conf = conf; | 290 qc->conf = conf; |
287 | 291 |
288 if (ngx_quic_init_transport_params(&qc->tp, conf) != NGX_OK) { | 292 if (ngx_quic_init_transport_params(&qc->tp, conf) != NGX_OK) { |
289 return NULL; | 293 return NULL; |
290 } | 294 } |
558 ngx_del_timer(&qc->path_validation); | 562 ngx_del_timer(&qc->path_validation); |
559 } | 563 } |
560 | 564 |
561 if (qc->push.posted) { | 565 if (qc->push.posted) { |
562 ngx_delete_posted_event(&qc->push); | 566 ngx_delete_posted_event(&qc->push); |
567 } | |
568 | |
569 if (qc->key_update.posted) { | |
570 ngx_delete_posted_event(&qc->key_update); | |
563 } | 571 } |
564 | 572 |
565 if (qc->close.timer_set) { | 573 if (qc->close.timer_set) { |
566 return; | 574 return; |
567 } | 575 } |
1053 rc = ngx_quic_handle_frames(c, pkt); | 1061 rc = ngx_quic_handle_frames(c, pkt); |
1054 if (rc != NGX_OK) { | 1062 if (rc != NGX_OK) { |
1055 return rc; | 1063 return rc; |
1056 } | 1064 } |
1057 | 1065 |
1058 return ngx_quic_keys_update(c, qc->keys); | 1066 ngx_post_event(&qc->key_update, &ngx_posted_events); |
1067 | |
1068 return NGX_OK; | |
1059 } | 1069 } |
1060 | 1070 |
1061 | 1071 |
1062 void | 1072 void |
1063 ngx_quic_discard_ctx(ngx_connection_t *c, enum ssl_encryption_level_t level) | 1073 ngx_quic_discard_ctx(ngx_connection_t *c, enum ssl_encryption_level_t level) |