Mercurial > hg > nginx-quic
comparison src/event/ngx_event_quic_transport.c @ 7916: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 |
comparison
equal
deleted
inserted
replaced
7915:2bf17a829ddc | 7916:c206233d9c29 |
---|---|
1671 tp->max_idle_timeout); | 1671 tp->max_idle_timeout); |
1672 | 1672 |
1673 #if (NGX_QUIC_DRAFT_VERSION >= 28) | 1673 #if (NGX_QUIC_DRAFT_VERSION >= 28) |
1674 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | 1674 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); |
1675 len += ngx_quic_tp_strlen(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); | 1675 len += ngx_quic_tp_strlen(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); |
1676 | |
1677 if (tp->retry_scid.len) { | |
1678 len += ngx_quic_tp_strlen(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); | |
1679 } | |
1680 #else | |
1681 if (tp->original_dcid.len) { | |
1682 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | |
1683 } | |
1676 #endif | 1684 #endif |
1677 | |
1678 if (tp->retry) { | |
1679 #if (NGX_QUIC_DRAFT_VERSION >= 28) | |
1680 len += ngx_quic_tp_strlen(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); | |
1681 #else | |
1682 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | |
1683 #endif | |
1684 } | |
1685 | 1685 |
1686 if (pos == NULL) { | 1686 if (pos == NULL) { |
1687 return len; | 1687 return len; |
1688 } | 1688 } |
1689 | 1689 |
1712 tp->max_idle_timeout); | 1712 tp->max_idle_timeout); |
1713 | 1713 |
1714 #if (NGX_QUIC_DRAFT_VERSION >= 28) | 1714 #if (NGX_QUIC_DRAFT_VERSION >= 28) |
1715 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | 1715 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); |
1716 ngx_quic_tp_str(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); | 1716 ngx_quic_tp_str(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); |
1717 | |
1718 if (tp->retry_scid.len) { | |
1719 ngx_quic_tp_str(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); | |
1720 } | |
1721 #else | |
1722 if (tp->original_dcid.len) { | |
1723 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | |
1724 } | |
1717 #endif | 1725 #endif |
1718 | |
1719 if (tp->retry) { | |
1720 #if (NGX_QUIC_DRAFT_VERSION >= 28) | |
1721 ngx_quic_tp_str(NGX_QUIC_TP_RETRY_SCID, tp->retry_scid); | |
1722 #else | |
1723 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); | |
1724 #endif | |
1725 } | |
1726 | 1726 |
1727 return p - pos; | 1727 return p - pos; |
1728 } | 1728 } |
1729 | 1729 |
1730 | 1730 |