Mercurial > hg > nginx
diff src/event/ngx_event_quic_transport.c @ 8421:c206233d9c29 quic
Fixed transport parameters on a new connection with a valid token.
Previously, the retry transport parameter was sent regardless.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Mon, 01 Jun 2020 19:16:44 +0300 |
parents | 6633f17044eb |
children | 90b02ff6b003 |
line wrap: on
line diff
--- a/src/event/ngx_event_quic_transport.c Fri May 29 12:42:23 2020 +0300 +++ b/src/event/ngx_event_quic_transport.c Mon Jun 01 19:16:44 2020 +0300 @@ -1673,15 +1673,15 @@ #if (NGX_QUIC_DRAFT_VERSION >= 28) len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); len += ngx_quic_tp_strlen(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); -#endif - if (tp->retry) { -#if (NGX_QUIC_DRAFT_VERSION >= 28) + if (tp->retry_scid.len) { len += ngx_quic_tp_strlen(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); + } #else + if (tp->original_dcid.len) { len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); + } #endif - } if (pos == NULL) { return len; @@ -1714,15 +1714,15 @@ #if (NGX_QUIC_DRAFT_VERSION >= 28) ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); ngx_quic_tp_str(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); -#endif - if (tp->retry) { -#if (NGX_QUIC_DRAFT_VERSION >= 28) + if (tp->retry_scid.len) { ngx_quic_tp_str(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); + } #else + if (tp->original_dcid.len) { ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); + } #endif - } return p - pos; }