Welcome! Log In Create A New Profile

Advanced

Re: [PATCH 2 of 3] QUIC: relocated early streams initialization

Sergey Kandaurov
June 06, 2022 06:44AM
>
> On 2 Jun 2022, at 17:52, Roman Arutyunyan <arut@nginx.com> wrote:
>
> # HG changeset patch
> # User Roman Arutyunyan <arut@nginx.com>
> # Date 1654177819 -14400
> # Thu Jun 02 17:50:19 2022 +0400
> # Branch quic
> # Node ID d3857a6df35c7a1d063e1a5776b6392afde16db2
> # Parent 617ec472690620cc75c473f97555138a4bc7d38b
> QUIC: relocated early streams initialization.
>
> Previously, early streams initialization took place right after receiving early
> data keys. Now it's done after successful decryption of the first early data
> packet.
>
> The changes allows to perform operations in the streams initializer function,
> which require client transport parameters. An example of such operation is
> creating a server stream.
>
> diff --git a/src/event/quic/ngx_event_quic.c b/src/event/quic/ngx_event_quic.c
> --- a/src/event/quic/ngx_event_quic.c
> +++ b/src/event/quic/ngx_event_quic.c
> @@ -1032,6 +1032,12 @@ ngx_quic_handle_payload(ngx_connection_t
> return ngx_quic_send_cc(c);
> }
>
> + if (pkt->level == ssl_encryption_early_data) {
> + if (ngx_quic_init_streams(c) != NGX_OK) {
> + return NGX_ERROR;
> + }
> + }
> +
> pkt->received = ngx_current_msec;
>
> c->log->action = "handling payload";
> diff --git a/src/event/quic/ngx_event_quic_ssl.c b/src/event/quic/ngx_event_quic_ssl.c
> --- a/src/event/quic/ngx_event_quic_ssl.c
> +++ b/src/event/quic/ngx_event_quic_ssl.c
> @@ -80,12 +80,6 @@ ngx_quic_set_read_secret(ngx_ssl_conn_t
> return 0;
> }
>
> - if (level == ssl_encryption_early_data) {
> - if (ngx_quic_init_streams(c) != NGX_OK) {
> - return 0;
> - }
> - }
> -
> return 1;
> }
>
> @@ -150,14 +144,6 @@ ngx_quic_set_encryption_secrets(ngx_ssl_
> return 0;
> }
>
> - if (level == ssl_encryption_early_data) {
> - if (ngx_quic_init_streams(c) != NGX_OK) {
> - return 0;
> - }
> -
> - return 1;
> - }
> -

As discussed in private, it still needs surrounding condition.
Otherwise, seems to be good.

> #ifdef NGX_QUIC_DEBUG_CRYPTO
> ngx_log_debug3(NGX_LOG_DEBUG_EVENT, c->log, 0,
> "quic write secret len:%uz %*xs", secret_len,
>

--
Sergey Kandaurov_______________________________________________
nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[PATCH 0 of 2] QUIC connection reuse

Roman Arutyunyan 1405 May 18, 2022 03:00AM

[PATCH 1 of 2] QUIC: reusable and idle modes for main connection

Roman Arutyunyan 204 May 18, 2022 03:02AM

Re: [PATCH 1 of 2] QUIC: reusable and idle modes for main connection

Sergey Kandaurov 260 May 30, 2022 09:56AM

Re: [PATCH 1 of 2] QUIC: reusable and idle modes for main connection

Roman Arutyunyan 195 June 02, 2022 09:42AM

[PATCH 2 of 2] QUIC: init_streams() callback

Roman Arutyunyan 207 May 18, 2022 03:04AM

Re: [PATCH 2 of 2] QUIC: init_streams() callback

Sergey Kandaurov 209 May 30, 2022 05:56PM

Re: [PATCH 2 of 2] QUIC: init_streams() callback

Roman Arutyunyan 188 June 02, 2022 09:46AM

[PATCH 0 of 3] QUIC connection reuse

Roman Arutyunyan 195 June 02, 2022 09:54AM

[PATCH 2 of 3] QUIC: relocated early streams initialization

Roman Arutyunyan 201 June 02, 2022 09:54AM

Re: [PATCH 2 of 3] QUIC: relocated early streams initialization

Sergey Kandaurov 192 June 06, 2022 06:44AM

[PATCH 0 of 8] QUIC connection reuse

Roman Arutyunyan 171 June 23, 2022 12:00PM

[PATCH 2 of 8] QUIC: ngx_quic_terminate_connection() function

Roman Arutyunyan 201 June 23, 2022 12:00PM

[PATCH 1 of 8] QUIC: treat qc->error == -1 as a missing error

Roman Arutyunyan 318 June 23, 2022 12:00PM

Re: [PATCH 1 of 8] QUIC: treat qc->error == -1 as a missing error

Sergey Kandaurov 203 August 02, 2022 09:50AM

Re: [PATCH 1 of 8] QUIC: treat qc->error == -1 as a missing error

Roman Arutyunyan 143 August 23, 2022 08:22AM

[PATCH 4 of 8] QUIC: removed ngx_quic_shutdown_connection()

Roman Arutyunyan 225 June 23, 2022 12:00PM

Re: [PATCH 4 of 8] QUIC: removed ngx_quic_shutdown_connection()

Sergey Kandaurov 179 August 02, 2022 11:46AM

Re: [PATCH 4 of 8] QUIC: removed ngx_quic_shutdown_connection()

Roman Arutyunyan 144 August 23, 2022 08:30AM

[PATCH 5 of 8] HTTP/3: keepalive timer for hq mode

Roman Arutyunyan 175 June 23, 2022 12:00PM

[PATCH 8 of 8] QUIC: application init() callback

Roman Arutyunyan 174 June 23, 2022 12:00PM

[PATCH 3 of 8] QUIC: reusable mode for main connection

Roman Arutyunyan 167 June 23, 2022 12:00PM

[PATCH 7 of 8] HTTP/3: renamed functions

Roman Arutyunyan 163 June 23, 2022 12:00PM

[PATCH 6 of 8] QUIC: idle mode for main connection

Roman Arutyunyan 188 June 23, 2022 12:00PM

[PATCH 0 of 9] QUIC connection reuse

Roman Arutyunyan 153 August 23, 2022 08:52AM

[PATCH 5 of 9] QUIC: do not send MAX_STREAMS in shutdown state

Roman Arutyunyan 172 August 23, 2022 08:52AM

[PATCH 4 of 9] QUIC: defer stream removal until all its data is acked

Roman Arutyunyan 139 August 23, 2022 08:52AM

[PATCH 1 of 9] QUIC: treat qc->error == -1 as a missing error

Roman Arutyunyan 139 August 23, 2022 08:52AM

[PATCH 7 of 9] QUIC: idle mode for main connection

Roman Arutyunyan 144 August 23, 2022 08:52AM

[PATCH 8 of 9] HTTP/3: renamed functions

Roman Arutyunyan 173 August 23, 2022 08:52AM

[PATCH 9 of 9] QUIC: application init() callback

Roman Arutyunyan 162 August 23, 2022 08:54AM

[PATCH 6 of 9] HTTP/3: unified hq code with HTTP/3 code

Roman Arutyunyan 137 August 23, 2022 08:54AM

[PATCH 00 of 10] QUIC connection reuse

Roman Arutyunyan 139 September 08, 2022 05:08AM

[PATCH 06 of 10] QUIC: do not send MAX_STREAMS in shutdown state

Roman Arutyunyan 130 September 08, 2022 05:08AM

[PATCH 03 of 10] QUIC: post close event for connection close

Roman Arutyunyan 144 September 08, 2022 05:10AM

[PATCH 02 of 10] QUIC: made ngx_quic_finalize_connecion() more graceful

Roman Arutyunyan 138 September 08, 2022 05:10AM

[PATCH 07 of 10] HTTP/3: unified hq code with regular HTTP/3 code

Roman Arutyunyan 135 September 08, 2022 05:10AM

Re: [PATCH 07 of 10] HTTP/3: unified hq code with regular HTTP/3 code

Sergey Kandaurov 125 October 20, 2022 07:36AM

Re: [PATCH 07 of 10] HTTP/3: unified hq code with regular HTTP/3 code

Roman Arutyunyan 151 October 20, 2022 09:56AM

[PATCH 04 of 10] QUIC: reusable mode for main connection

Roman Arutyunyan 148 September 08, 2022 05:10AM

Re: [PATCH 04 of 10] QUIC: reusable mode for main connection

Sergey Kandaurov 111 November 28, 2022 11:12AM

[PATCH 08 of 10] QUIC: idle mode for main connection

Roman Arutyunyan 154 September 08, 2022 05:10AM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Sergey Kandaurov 158 October 20, 2022 07:52AM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Roman Arutyunyan 143 October 20, 2022 10:26AM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Roman Arutyunyan 195 November 24, 2022 10:18AM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Sergey Kandaurov 119 November 28, 2022 12:42PM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Roman Arutyunyan 113 November 29, 2022 09:02AM

Re: [PATCH 08 of 10] QUIC: idle mode for main connection

Roman Arutyunyan 132 November 30, 2022 05:14AM

[PATCH 05 of 10] QUIC: defer stream removal until all its data is acked

Roman Arutyunyan 141 September 08, 2022 05:10AM

[PATCH 10 of 10] QUIC: application init() callback

Roman Arutyunyan 142 September 08, 2022 05:10AM

Re: [PATCH 10 of 10] QUIC: application init() callback

Sergey Kandaurov 129 October 20, 2022 07:54AM

Re: [PATCH 10 of 10] QUIC: application init() callback

Roman Arutyunyan 160 October 20, 2022 10:34AM

Re: [PATCH 10 of 10] QUIC: application init() callback

Roman Arutyunyan 196 October 25, 2022 05:12AM

[PATCH 09 of 10] HTTP/3: renamed functions

Roman Arutyunyan 214 September 08, 2022 05:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 219
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready