comparison src/event/quic/ngx_event_quic_transport.c @ 8293:75603531064a quic

QUIC: updated list of transport parameters to be sent. The "max_ack_delay", "ack_delay_exponent", and "max_udp_payload_size" transport parameters were not communicated to client. The "disable_active_migration" and "active_connection_id_limit" parameters were not saved into zero-rtt context.
author Vladimir Homutov <vl@nginx.com>
date Mon, 08 Feb 2021 20:48:25 +0300
parents e24e5650d7b4
children d4e02b3b734f
comparison
equal deleted inserted replaced
8292:e24e5650d7b4 8293:75603531064a
1892 tp->initial_max_stream_data_uni); 1892 tp->initial_max_stream_data_uni);
1893 1893
1894 len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_IDLE_TIMEOUT, 1894 len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
1895 tp->max_idle_timeout); 1895 tp->max_idle_timeout);
1896 1896
1897 if (clen) { 1897 len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_UDP_PAYLOAD_SIZE,
1898 *clen = len; 1898 tp->max_udp_payload_size);
1899 }
1900 1899
1901 if (tp->disable_active_migration) { 1900 if (tp->disable_active_migration) {
1902 len += ngx_quic_varint_len(NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION); 1901 len += ngx_quic_varint_len(NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION);
1903 len += ngx_quic_varint_len(0); 1902 len += ngx_quic_varint_len(0);
1904 } 1903 }
1905 1904
1906 len += ngx_quic_tp_len(NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT, 1905 len += ngx_quic_tp_len(NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT,
1907 tp->active_connection_id_limit); 1906 tp->active_connection_id_limit);
1908 1907
1908 /* transport parameters listed above will be saved in 0-RTT context */
1909 if (clen) {
1910 *clen = len;
1911 }
1912
1913 len += ngx_quic_tp_len(NGX_QUIC_TP_MAX_ACK_DELAY,
1914 tp->max_ack_delay);
1915
1916 len += ngx_quic_tp_len(NGX_QUIC_TP_ACK_DELAY_EXPONENT,
1917 tp->ack_delay_exponent);
1918
1909 #if (NGX_QUIC_DRAFT_VERSION >= 28) 1919 #if (NGX_QUIC_DRAFT_VERSION >= 28)
1910 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); 1920 len += ngx_quic_tp_strlen(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid);
1911 len += ngx_quic_tp_strlen(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); 1921 len += ngx_quic_tp_strlen(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid);
1912 1922
1913 if (tp->retry_scid.len) { 1923 if (tp->retry_scid.len) {
1946 tp->initial_max_stream_data_uni); 1956 tp->initial_max_stream_data_uni);
1947 1957
1948 ngx_quic_tp_vint(NGX_QUIC_TP_MAX_IDLE_TIMEOUT, 1958 ngx_quic_tp_vint(NGX_QUIC_TP_MAX_IDLE_TIMEOUT,
1949 tp->max_idle_timeout); 1959 tp->max_idle_timeout);
1950 1960
1961 ngx_quic_tp_vint(NGX_QUIC_TP_MAX_UDP_PAYLOAD_SIZE,
1962 tp->max_udp_payload_size);
1963
1951 if (tp->disable_active_migration) { 1964 if (tp->disable_active_migration) {
1952 ngx_quic_build_int(&p, NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION); 1965 ngx_quic_build_int(&p, NGX_QUIC_TP_DISABLE_ACTIVE_MIGRATION);
1953 ngx_quic_build_int(&p, 0); 1966 ngx_quic_build_int(&p, 0);
1954 } 1967 }
1955 1968
1956 ngx_quic_tp_vint(NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT, 1969 ngx_quic_tp_vint(NGX_QUIC_TP_ACTIVE_CONNECTION_ID_LIMIT,
1957 tp->active_connection_id_limit); 1970 tp->active_connection_id_limit);
1958 1971
1972 ngx_quic_tp_vint(NGX_QUIC_TP_MAX_ACK_DELAY,
1973 tp->max_ack_delay);
1974
1975 ngx_quic_tp_vint(NGX_QUIC_TP_ACK_DELAY_EXPONENT,
1976 tp->ack_delay_exponent);
1977
1959 #if (NGX_QUIC_DRAFT_VERSION >= 28) 1978 #if (NGX_QUIC_DRAFT_VERSION >= 28)
1960 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid); 1979 ngx_quic_tp_str(NGX_QUIC_TP_ORIGINAL_DCID, tp->original_dcid);
1961 ngx_quic_tp_str(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid); 1980 ngx_quic_tp_str(NGX_QUIC_TP_INITIAL_SCID, tp->initial_scid);
1962 1981
1963 if (tp->retry_scid.len) { 1982 if (tp->retry_scid.len) {