comparison src/event/quic/ngx_event_quic.c @ 9153:8f7e6d8c061e

QUIC: use last client dcid to receive initial packets. Previously, original dcid was used to receive initial client packets in case server initial response was lost. However, last dcid should be used instead. These two are the same unless retry is used. In case of retry, client resends initial packet with a new dcid, that is different from the original dcid. If server response is lost, the client resends this packet again with the same dcid. This is shown in RFC 9000, 7.3. Authenticating Connection IDs, Figure 8. The issue manifested itself with creating multiple server sessions in response to each post-retry client initial packet, if server response is lost.
author Roman Arutyunyan <arut@nginx.com>
date Wed, 30 Aug 2023 11:09:21 +0400
parents 2880f60a80c3
children 36b59521a41c
comparison
equal deleted inserted replaced
9152:2880f60a80c3 9153:8f7e6d8c061e
1108 f = ngx_queue_data(q, ngx_quic_frame_t, queue); 1108 f = ngx_queue_data(q, ngx_quic_frame_t, queue);
1109 ngx_quic_free_frame(c, f); 1109 ngx_quic_free_frame(c, f);
1110 } 1110 }
1111 1111
1112 if (level == ssl_encryption_initial) { 1112 if (level == ssl_encryption_initial) {
1113 /* close temporary listener with odcid */ 1113 /* close temporary listener with initial dcid */
1114 qsock = ngx_quic_find_socket(c, NGX_QUIC_UNSET_PN); 1114 qsock = ngx_quic_find_socket(c, NGX_QUIC_UNSET_PN);
1115 if (qsock) { 1115 if (qsock) {
1116 ngx_quic_close_socket(c, qsock); 1116 ngx_quic_close_socket(c, qsock);
1117 } 1117 }
1118 } 1118 }