aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
| * | | | | | | | QUIC: revised ngx_quic_handle_datagram() error codes.Vladimir Homutov2022-02-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NGX_DECLINED is replaced with NGX_DONE to match closer to return code of ngx_quic_handle_packet() and ngx_quic_close_connection() rc argument. The ngx_quic_close_connection() rc code is used only when quic connection exists, thus anything goes if qc == NULL. The ngx_quic_handle_datagram() does not return NG_OK in cases when quic connection is not yet created.
| * | | | | | | | QUIC: stream event setting function.Roman Arutyunyan2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function ngx_quic_set_event() is now called instead of posting events directly.
| * | | | | | | | QUIC: style.Roman Arutyunyan2022-01-31
| | | | | | | | |
| * | | | | | | | HTTP/3: proper uni stream closure detection.Roman Arutyunyan2022-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, closure detection for server-initiated uni streams was not properly implemented. Instead, HTTP/3 code relied on QUIC code posting the read event and setting rev->error when it needed to close the stream. Then, regular uni stream read handler called c->recv() and received error, which closed the stream. This was an ad-hoc solution. If, for whatever reason, the read handler was called earlier, c->recv() would return 0, which would also close the stream. Now server-initiated uni streams have a separate read event handler for tracking stream closure. The handler calls c->recv(), which normally returns 0, but may return error in case of closure.
| * | | | | | | | QUIC: introduced explicit stream states.Roman Arutyunyan2022-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to eliminate the usage of stream connection event flags for tracking stream state.
| * | | | | | | | HTTP/3: delayed Insert Count Increment instruction.Roman Arutyunyan2022-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sending the instruction is delayed until the end of the current event cycle. Delaying the instruction is allowed by quic-qpack-21, section 2.2.2.3. The goal is to reduce the amount of data sent back to client by accumulating several inserts in one instruction and sometimes not sending the instruction at all, if Section Acknowledgement was sent just before it.
| * | | | | | | | QUIC: allowed main QUIC connection for some operations.Roman Arutyunyan2022-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Operations like ngx_quic_open_stream(), ngx_http_quic_get_connection(), ngx_http_v3_finalize_connection(), ngx_http_v3_shutdown_connection() used to receive a QUIC stream connection. Now they can receive the main QUIC connection as well. This is useful when calling them from a stream context.
| * | | | | | | | QUIC: limited SSL_set_quic_use_legacy_codepoint() API usage.Sergey Kandaurov2022-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As advertised in BoringSSL a1d3bfb64fd7ef2cb178b5b515522ffd75d7b8c5, it may be dropped once callers implementing the draft versions cycle out.
| * | | | | | | | QUIC: style.Roman Arutyunyan2022-01-26
| | | | | | | | |
| * | | | | | | | QUIC: fixed handling of initial source connection id.Vladimir Homutov2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was broken in 1e2f4e9c8195. While there, adjusted formatting of debug message with socket seqnum.
| * | | | | | | | README: updated link to nginx-devel mailman.Sergey Kandaurov2022-01-26
| | | | | | | | |
| * | | | | | | | README: updated info about incomplete features.Sergey Kandaurov2022-01-26
| | | | | | | | |
| * | | | | | | | README: updated to QUICv1.Sergey Kandaurov2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While here, removed old browsers tips.
| * | | | | | | | QUIC: set to standard TLS codepoint after draft versions removal.Sergey Kandaurov2022-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is to ease transition with oldish BoringSSL versions, the default for SSL_set_quic_use_legacy_codepoint() has been flipped in BoringSSL a1d3bfb64fd7ef2cb178b5b515522ffd75d7b8c5.
| * | | | | | | | QUIC: removed draft versions support.Sergey Kandaurov2022-01-26
| | | | | | | | |
| * | | | | | | | HTTP/3: removed draft versions support in ALPN.Sergey Kandaurov2022-01-26
| | | | | | | | |
| * | | | | | | | QUIC: changed debug message.Roman Arutyunyan2022-01-21
| | | | | | | | |
| * | | | | | | | Merged with the default branch.Sergey Kandaurov2022-01-25
| |\ \ \ \ \ \ \ \
| * | | | | | | | | QUIC: fixed macro style.Vladimir Homutov2022-01-25
| | | | | | | | | |
| * | | | | | | | | QUIC: fixed chain returned from ngx_quic_write_chain().Roman Arutyunyan2022-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when input ended on a QUIC buffer boundary, input chain was not advanced to the next buffer. As a result, ngx_quic_write_chain() returned a chain with an empty buffer instead of NULL. This broke HTTP write filter, preventing it from closing the HTTP request and eventually timing out. Now input chain is always advanced to a buffer that has data, before checking QUIC buffer boundary condition.
| * | | | | | | | | QUIC: removed stale declaration.Vladimir Homutov2022-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ngx_quic_get_unconnected_socket() was removed in 1e2f4e9c8195.
| * | | | | | | | | QUIC: avoid logging error in case of version negotiation.Vladimir Homutov2022-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, "early error" message was logged in this case.
| * | | | | | | | | QUIC: additional limit for probing packets.Vladimir Homutov2022-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RFC 9000, 9.3. Responding to Connection Migration: An endpoint only changes the address to which it sends packets in response to the highest-numbered non-probing packet. The patch extends this requirement to probing packets. Although it may seem excessive, it helps with mitigation of reply attacks (when an off-path attacker has copied packet with PATH_CHALLENGE and uses different addresses to exhaust available connection ids).
| * | | | | | | | | QUIC: reworked migration handling.Vladimir Homutov2022-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The quic connection now holds active, backup and probe paths instead of sockets. The number of migration paths is now limited and cannot be inflated by a bad client or an attacker. The client id is now associated with path rather than socket. This allows to simplify processing of output and connection ids handling. New migration abandons any previously started migrations. This allows to free consumed client ids and request new for use in future migrations and make progress in case when connection id limit is hit during migration. A path now can be revalidated without losing its state. The patch also fixes various issues with NAT rebinding case handling: - paths are now validated (previously, there was no validation and paths were left in limited state) - attempt to reuse id on different path is now again verified (this was broken in 40445fc7c403) - former path is now validated in case of apparent migration
| * | | | | | | | | QUIC: the "quic_active_connection_id_limit" directive.Vladimir Homutov2022-01-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directive sets corresponding transport parameter and limits number of created client ids.
| * | | | | | | | | QUIC: introduced function ngx_quic_split_chain().Roman Arutyunyan2022-01-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function splits a buffer at given offset. The function is now called from ngx_quic_read_chain() and ngx_quic_write_chain(), which simplifies both functions.
| * | | | | | | | | QUIC: fixed format specifier after 3789f4a56d65.Roman Arutyunyan2022-01-16
| | | | | | | | | |
| * | | | | | | | | QUIC: return written size from ngx_quic_write_chain().Roman Arutyunyan2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to escape calculating it before calling the function.
| * | | | | | | | | README: documented QuicTLS support.Sergey Kandaurov2022-01-13
| | | | | | | | | |
| * | | | | | | | | QUIC: removed ngx_send_lowat() check for QUIC connections.Sergey Kandaurov2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 9ae239d2547d, ngx_quic_handle_write_event() no longer runs into ngx_send_lowat() for QUIC connections, so the check became excessive. It is assumed that external modules operating with SO_SNDLOWAT (I'm not aware of any) should do this check on their own.
| * | | | | | | | | HTTP/3: removed useless warning regarding OpenSSL library.Sergey Kandaurov2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After 0e6528551f26, it became impossible to run into this path.
| * | | | | | | | | QUIC: fixed handling stream input buffers.Roman Arutyunyan2022-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, ngx_quic_write_chain() treated each input buffer as a memory buffer, which is not always the case. Special buffers were not skipped, which is especially important when hitting the input byte limit. The issue manifested itself with ngx_quic_write_chain() returning a non-empty chain consisting of a special last_buf buffer when called from QUIC stream send_chain(). In order for this to happen, input byte limit should be equal to the chain length, and the input chain should end with an empty last_buf buffer. An easy way to achieve this is the following: location /empty { return 200; } When this non-empty chain was returned from send_chain(), it signalled to the caller that input was blocked, while in fact it wasn't. This prevented HTTP request from finalization, which prevented QUIC from sending STREAM FIN to the client. The QUIC stream was then reset after a timeout. Now special buffers are skipped and send_chain() returns NULL in the case above, which signals to the caller a successful operation. Also, original byte limit is now passed to ngx_quic_write_chain() from send_chain() instead of actual chain length to make sure it's never zero.
| * | | | | | | | | QUIC: fixed handling STREAM FIN.Roman Arutyunyan2022-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a STREAM FIN frame with no data bytes was received after all prior stream data were already read by the application layer, the frame was ignored and eof was not reported to the application.
| * | | | | | | | | HTTP/3: set c->error on read error in ngx_http_test_reading().Roman Arutyunyan2022-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to other error/eof cases.
| * | | | | | | | | HTTP/3: simplified code.Roman Arutyunyan2022-01-12
| | | | | | | | | |
| * | | | | | | | | QUIC: modified HTTP version test.Roman Arutyunyan2022-01-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new condition produces smaller diff to the default branch and is similar to HTTP/2 case.
| * | | | | | | | | HTTP/3: improved processing of multiple Cookie field lines.Sergey Kandaurov2021-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As per draft-ietf-quic-http, 4.1.1.2, and similar to HTTP/2 specification, they ought to be concatenated. This closely follows ngx_http_v2_module.
| * | | | | | | | | Style.Roman Arutyunyan2021-12-29
| | | | | | | | | |
| * | | | | | | | | Merged with the default branch.Sergey Kandaurov2021-12-29
| |\ \ \ \ \ \ \ \ \
| * | | | | | | | | | QUIC: got rid of ngx_quic_create_temp_socket().Vladimir Homutov2021-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was mostly copy of the ngx_quic_listen(). Now ngx_quic_listen() no longer generates server id and increments seqnum. Instead, the server id is generated when the socket is created. The ngx_quic_alloc_socket() function is renamed to ngx_quic_create_socket().
| * | | | | | | | | | Fixed a mismerge in 5c86189a1c1b.Ruslan Ermilov2021-12-28
| | | | | | | | | | |
| * | | | | | | | | | QUIC: renamed input handling functions.Roman Arutyunyan2021-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now these functions have names ngx_quic_handle_XXX(): - ngx_quic_process_stateless_reset() -> ngx_quic_handle_stateless_reset() - ngx_quic_input() -> ngx_quic_handle_datagram() - ngx_quic_process_packet() -> ngx_quic_handle_packet() - ngx_quic_process_payload() -> ngx_quic_handle_payload()
| * | | | | | | | | | QUIC: fixed format specifier after 6ccf3867959a.Roman Arutyunyan2021-12-28
| | | | | | | | | | |
| * | | | | | | | | | QUIC: fixed config test with bpf (ticket #2292).Vladimir Homutov2021-12-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SO_REUSEPORT socket option is not set during configuration testing, thus making the further module initialization impossible and meaningless.
| * | | | | | | | | | QUIC: refactored buffer allocation, spliting and freeing.Roman Arutyunyan2021-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, buffer lists was used to track used buffers. Now reference counter is used instead. The new implementation is simpler and faster with many buffer clones.
| * | | | | | | | | | QUIC: removed ngx_quic_copy_chain().Roman Arutyunyan2021-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function is unused.
| * | | | | | | | | | QUIC: renamed buffer-related functions.Roman Arutyunyan2021-12-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ngx_quic_alloc_buf() -> ngx_quic_alloc_chain(), ngx_quic_free_bufs() -> ngx_quic_free_chain(), ngx_quic_trim_bufs() -> ngx_quic_trim_chain()
| * | | | | | | | | | QUIC: refactored ngx_quic_order_bufs() and ngx_quic_split_bufs().Roman Arutyunyan2021-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are replaced with ngx_quic_write_chain() and ngx_quic_read_chain(). These functions represent the API to data buffering. The first function adds data of given size at given offset to the buffer. Now it returns the unwritten part of the chain similar to c->send_chain(). The second function returns data of given size from the beginning of the buffer. Its second argument and return value are swapped compared to ngx_quic_split_bufs() to better match ngx_quic_write_chain(). Added, returned and stored data are regular ngx_chain_t/ngx_buf_t chains. Missing data is marked with b->sync flag. The functions are now used in both send and recv data chains in QUIC streams.
| * | | | | | | | | | QUIC: avoid excessive buffer allocations in stream output.Roman Arutyunyan2021-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, when a few bytes were send to a QUIC stream by the application, a 4K buffer was allocated for these bytes. Then a STREAM frame was created and that entire buffer was used as data for that frame. The frame with the buffer were in use up until the frame was acked by client. Meanwhile, when more bytes were send to the stream, more buffers were allocated and assigned as data to newer STREAM frames. In this scenario most buffer memory is unused. Now the unused part of the stream output buffer is available for further stream output while earlier parts of the buffer are waiting to be acked. This is achieved by splitting the output buffer.
| * | | | | | | | | | QUIC: got rid of excessive "qsock" argument in ngx_quic_output.c.Vladimir Homutov2021-12-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output is always sent to the active path, which is stored in the quic connection. There is no need to pass it in arguments. When output has to be send to to a specific path (in rare cases, such as path probing), a separate method exists (ngx_quic_frame_sendto()).