aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
| * | QUIC: relocated ngx_quic_init_streams() for 0-RTT.Roman Arutyunyan2023-01-10
| | | | | | | | | | | | | | | | | | | | | Previously, streams were initialized in early keys handler. However, client transport parameters may not be available by then. This happens, for example, when using QuicTLS. Now streams are initialized in ngx_quic_crypto_input() after calling SSL_do_handshake() for both 0-RTT and 1-RTT.
| * | HTTP/3: insert count block timeout.Roman Arutyunyan2023-01-05
| | | | | | | | | | | | | | | | | | Previously, there was no timeout for a request stream blocked on insert count, which could result in infinite wait. Now client_header_timeout is set when stream is first blocked.
| * | HTTP/3: trigger 400 (Bad Request) on stream error while blocked.Roman Arutyunyan2023-01-05
| | | | | | | | | | | | | | | Previously, stream was closed with NGX_HTTP_CLOSE. However, in a similar case when recv() returns eof or error, status 400 is triggered.
| * | QUIC: set stream error flag on reset.Roman Arutyunyan2023-01-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, when RESET_STREAM is sent or received, or when streams are closed, stream connection error flag is set. Previously, only stream state was changed, which resulted in setting the error flag only after calling recv()/send()/send_chain(). However, there are cases when none of these functions is called, but it's still important to know if the stream is being closed. For example, when an HTTP/3 request stream is blocked on insert count, receiving RESET_STREAM should trigger stream closure, which was not the case. The change also fixes ngx_http_upstream_check_broken_connection() and ngx_http_test_reading() with QUIC streams.
| * | QUIC: automatically add and never delete stream events.Roman Arutyunyan2023-01-10
| | | | | | | | | | | | | | | | | | | | | Previously, stream events were added and deleted by ngx_handle_read_event() and ngx_handle_write_event() in a way similar to level-triggered events. However, QUIC stream events are effectively edge-triggered and can stay active all time. Moreover, the events are now active since the moment a stream is created.
| * | HTTP/3: fixed $connection_time.Sergey Kandaurov2023-01-10
| | | | | | | | | | | | | | | | | | Previously, start_time wasn't set for a new stream. The fix is to derive it from the parent connection. Also it's used to simplify tracking keepalive_time.
| * | HTTP/3: handled insertion reference to a going to be evicted entry.Roman Arutyunyan2023-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per RFC 9204, section 3.2.2, a new entry can reference an entry in the dynamic table that will be evicted when adding this new entry into the dynamic table. Previously, such inserts resulted in use-after-free since the old entry was evicted before the insertion (ticket #2431). Now it's evicted after the insertion. This change fixes Insert with Name Reference and Duplicate encoder instructions.
| * | Merged with the default branch.Sergey Kandaurov2023-01-02
| |\ \
| * \ \ Merged with the default branch.Sergey Kandaurov2022-12-15
| |\ \ \
| * | | | HTTP/3: implement keepalive for hq.Roman Arutyunyan2022-10-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, keepalive timer was deleted in ngx_http_v3_wait_request_handler() and set in request cleanup handler. This worked for HTTP/3 connections, but not for hq connections. Now keepalive timer is deleted in ngx_http_v3_init_request_stream() and set in connection cleanup handler, which works both for HTTP/3 and hq.
| * | | | QUIC: application init() callback.Roman Arutyunyan2022-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's called after handshake completion or prior to the first early data stream creation. The callback should initialize application-level data before creating streams. HTTP/3 callback implementation sets keepalive timer and sends SETTINGS. Also, this allows to limit max handshake time in ngx_http_v3_init_stream().
| * | | | HTTP/3: renamed functions.Roman Arutyunyan2022-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | ngx_http_v3_init() is renamed ngx_http_v3_init_stream(). ngx_http_v3_reset_connection() is renamed to ngx_http_v3_reset_stream().
| * | | | QUIC: removed cancelable flag from QUIC and HTTP/3 events.Roman Arutyunyan2022-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All these events are created in context of a client connection and are deleted when the connection is closed. Setting ev->cancelable could trigger premature connection closure and a socket leak alert.
| * | | | QUIC: idle mode for main connection.Roman Arutyunyan2022-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now main QUIC connection for HTTP/3 always has c->idle flag set. This allows the connection to receive worker shutdown notification. It is passed to application level via a new conf->shutdown() callback. The HTTP/3 shutdown callback sends GOAWAY to client and gracefully shuts down the QUIC connection.
| * | | | HTTP/3: unified hq code with regular HTTP/3 code.Roman Arutyunyan2022-10-19
| | | | | | | | | | | | | | | | | | | | | | | | | The change removes hq-specific request handler. Now hq requests are handled by the HTTP/3 request handler.
| * | | | QUIC: do not send MAX_STREAMS in shutdown state.Roman Arutyunyan2022-09-07
| | | | | | | | | | | | | | | | | | | | No more streams are expected from client.
| * | | | QUIC: defer stream removal until all its data is acked.Roman Arutyunyan2022-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, stream was kept alive until all its data is sent. This resulted in disabling retransmission of final part of stream when QUIC connection was closed right after closing stream connection.
| * | | | QUIC: reusable mode for main connection.Roman Arutyunyan2022-11-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The connection is automatically switched to this mode by transport layer when there are no non-cancelable streams. Currently, cancelable streams are HTTP/3 encoder/decoder/control streams.
| * | | | QUIC: post close event for connection close.Roman Arutyunyan2022-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, close event was used only for close timeout, while read event was used for posting connection close.
| * | | | QUIC: made ngx_quic_finalize_connecion() more graceful.Roman Arutyunyan2022-08-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ngx_quic_finalize_connection() closed the connection with NGX_ERROR code, which resulted in immediate connection closure. Now the code is NGX_OK, which provides a more graceful shutdown with a timeout.
| * | | | QUIC: treat qc->error == -1 as a missing error.Roman Arutyunyan2022-09-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, zero was used for this purpose. However, NGX_QUIC_ERR_NO_ERROR is zero too. As a result, NGX_QUIC_ERR_NO_ERROR was changed to NGX_QUIC_ERR_INTERNAL_ERROR when closing a QUIC connection.
| * | | | QUIC: fixed computation of nonce with packet numbers beyond 2^32.Sergey Kandaurov2022-11-25
| | | | | | | | | | | | | | | | | | | | Prodded by Yu Zhu.
| * | | | HTTP/3: fixed build without NGX_PCRE (broken by 0f5fc7a320db).Jiuzhou Cui2022-11-25
| | | | |
| * | | | QUIC: fixed triggering stream read event (ticket #2409).Roman Arutyunyan2022-11-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a client packet carrying a stream data frame is not acked due to packet loss, the stream data is retransmitted later by client. It's also possible that the retransmitted range is bigger than before due to more stream data being available by then. If the original data was read out by the application, there would be no read event triggered by the retransmitted frame, even though it contains new data.
| * | | | QUIC: fixed C4334 MSVC warning about 32 to 64 bits conversion.Sergey Kandaurov2022-11-22
| | | | |
| * | | | QUIC: plug MSVC warning about potentially uninitialized variable.Sergey Kandaurov2022-11-22
| | | | |
| * | | | Added shutdown macros for win32 required for QUIC.Sergey Kandaurov2022-11-22
| | | | |
| * | | | QUIC: fixed C4389 MSVC warning about signed/unsigned mismatch.Sergey Kandaurov2022-11-22
| | | | |
| * | | | QUIC: avoid using C99 designated initializers.Sergey Kandaurov2022-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are not supported by MSVC till 2012. SSL_QUIC_METHOD initialization is moved to run-time to preserve portability among SSL library implementations, which allows to reduce its visibility. Note using of a static storage to keep SSL_set_quic_method() reference valid.
| * | | | QUIC: moved variable declaration to fix build with MSVC 2010.Sergey Kandaurov2022-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ngx_quic_hkdf_t variables used declaration with assignment in the middle of a function, which is not supported by MSVC 2010. Fixing this also required to rewrite the ngx_quic_hkdf_set macro and to switch to an explicit array size.
| * | | | QUIC: fixed C4706 warnings with MSVC 2010.Sergey Kandaurov2022-11-22
| | | | | | | | | | | | | | | | | | | | The fix is to avoid assignments within conditional expression.
| * | | | HTTP/3: fixed server_name regex captures (ticket #2407).Sergey Kandaurov2022-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, HTTP/3 stream connection didn't inherit the servername regex from the main QUIC connection saved when processing SNI and using regular expressions in server names. As a result, it didn't execute to set regex captures when choosing the virtual server while parsing HTTP/3 headers.
| * | | | Set default listen socket type in http.Roman Arutyunyan2022-11-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The type field was added in 7999d3fbb765 at early stages of QUIC implementation and was not initialized for default listen. Missing initialization resulted in default listen socket creation error.
| * | | | Merged with the default branch.Sergey Kandaurov2022-10-20
| |\ \ \ \
| * | | | | QUIC: removed compatibility with older BoringSSL API.Sergey Kandaurov2022-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL_CIPHER_get_protocol_id() appeared in BoringSSL somewhere between BORINGSSL_API_VERSION 12 and 13 for compatibility with OpenSSL 1.1.1. It was adopted without a proper macro test, which remained unnoticed. This justifies that such old BoringSSL API isn't widely used and its support can be dropped. While here, removed SSL_set_quic_use_legacy_codepoint() that became useless after the default was flipped in BoringSSL over a year ago.
| * | | | | QUIC: support for setting QUIC methods with LibreSSL.Sergey Kandaurov2022-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting QUIC methods is converted to use C99 designated initializers for simplicity, as LibreSSL 3.6.0 has different SSL_QUIC_METHOD layout. Additionally, only set_read_secret/set_write_secret callbacks are set. Although they are preferred in LibreSSL over set_encryption_secrets, better be on a safe side as LibreSSL has unexpectedly incompatible set_encryption_secrets calling convention expressed in passing read and write secrets split in separate calls, unlike this is documented in old BoringSSL sources. To avoid introducing further changes for the old API, it is simply disabled.
| * | | | | QUIC: using SSL_set_quic_early_data_enabled() only with QuicTLS.Sergey Kandaurov2022-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function is present in QuicTLS only. After SSL_READ_EARLY_DATA_SUCCESS became visible in LibreSSL together with experimental QUIC API, this required to revise the conditional compilation test to use more narrow macros.
| * | | | | QUIC: using native TLSv1.3 cipher suite constants.Sergey Kandaurov2022-10-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After BoringSSL aligned[1] with OpenSSL on TLS1_3_CK_* macros, and LibreSSL uses OpenSSL naming, our own variants can be dropped now. Compatibility is preserved with libraries that lack these macros. Additionally, transition to SSL_CIPHER_get_id() fixes build error with LibreSSL that doesn't implement SSL_CIPHER_get_protocol_id(). [1] https://boringssl.googlesource.com/boringssl/+/dfddbc4ded
| * | | | | QUIC: "info" logging level on insufficient client connection ids.Sergey Kandaurov2022-09-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently, this error is reported on NAT rebinding if client didn't previously send NEW_CONNECTION_ID to supply additional connection ids.
| * | | | | HTTP/3: skip empty request body buffers (ticket #2374).Roman Arutyunyan2022-08-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When client DATA frame header and its content come in different QUIC packets, it may happen that only the header is processed by the first ngx_http_v3_request_body_filter() call. In this case an empty request body buffer is added to r->request_body->bufs, which is later reused in a subsequent ngx_http_v3_request_body_filter() call without being removed from the body chain. As a result, rb->request_body->bufs ends up with two copies of the same buffer. The fix is to avoid adding empty request body buffers to r->request_body->bufs.
| * | | | | QUIC: avoided pool usage in token calculation.Vladimir Homutov2022-05-31
| | | | | |
| * | | | | QUIC: removed ngx_quic_keys_new().Vladimir Homutov2022-07-27
| | | | | | | | | | | | | | | | | | | | | | | | The ngx_quic_keys_t structure is now exposed.
| * | | | | QUIC: avoided pool usage in ngx_quic_protection.c.Vladimir Homutov2022-07-27
| | | | | |
| * | | | | QUIC: fixed-length buffers for secrets.Vladimir Homutov2022-07-27
| | | | | |
| * | | | | Merged with the default branch.Sergey Kandaurov2022-07-26
| |\ \ \ \ \
| * \ \ \ \ \ Merged with the default branch.Sergey Kandaurov2022-06-22
| |\ \ \ \ \ \
| * | | | | | | HTTP/3: updated SETTINGS_MAX_FIELD_SECTION_SIZE name.Sergey Kandaurov2022-06-08
| | | | | | | |
| * | | | | | | HTTP/3: require that field section base index is not negative.Roman Arutyunyan2022-05-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 9204 explicitly requires that.
| * | | | | | | QUIC: separate UDP framework for QUIC.Roman Arutyunyan2022-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, QUIC used the existing UDP framework, which was created for UDP in Stream. However the way QUIC connections are created and looked up is different from the way UDP connections in Stream are created and looked up. Now these two implementations are decoupled.
| * | | | | | | QUIC: fixed insertion at the end of buffer.Roman Arutyunyan2022-02-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, last buffer was tracked by keeping a pointer to the previous chain link "next" field. When the previous buffer was split and then removed, the pointer was no longer valid. Writing at this pointer resulted in broken data chains. Now last buffer is tracked by keeping a direct pointer to it.