Re: [nginx] QUIC: "handshake_timeout" configuration parameter.

2024-04-10 Thread Vladimir Homutov via nginx-devel
On Tue, Apr 09, 2024 at 03:02:21PM +0400, Roman Arutyunyan wrote: > Hello Vladimir, > > On Mon, Apr 08, 2024 at 03:03:27PM +0300, Vladimir Homutov via nginx-devel > wrote: > > On Fri, Sep 22, 2023 at 03:36:25PM +, Roman Arutyunyan wrote: > > > details: htt

Re: [nginx] QUIC: "handshake_timeout" configuration parameter.

2024-04-08 Thread Vladimir Homutov via nginx-devel
On Fri, Sep 22, 2023 at 03:36:25PM +, Roman Arutyunyan wrote: > details: https://hg.nginx.org/nginx/rev/ad3d34ddfdcc > branches: > changeset: 9158:ad3d34ddfdcc > user: Roman Arutyunyan > date: Wed Sep 13 17:59:37 2023 +0400 > description: > QUIC: "handshake_timeout" configuration

Re: [PATCH 00 of 12] HTTP/3 proxying to upstreams

2023-12-28 Thread Vladimir Homutov via nginx-devel
On Thu, Dec 28, 2023 at 04:31:41PM +0300, Maxim Dounin wrote: > Hello! > > On Wed, Dec 27, 2023 at 04:17:38PM +0300, Vladimir Homutov via nginx-devel > wrote: > > > On Wed, Dec 27, 2023 at 02:48:04PM +0300, Maxim Dounin wrote: > > > Hello! > > > > &g

Re: [PATCH 00 of 12] HTTP/3 proxying to upstreams

2023-12-27 Thread Vladimir Homutov via nginx-devel
On Wed, Dec 27, 2023 at 02:48:04PM +0300, Maxim Dounin wrote: > Hello! > > On Mon, Dec 25, 2023 at 07:52:41PM +0300, Vladimir Homutov via nginx-devel > wrote: > > > Hello, everyone, > > > > and Merry Christmas to all! > > > > I'm a developer of

[PATCH 11 of 12] Proxy: HTTP/3 support

2023-12-25 Thread Vladimir Homutov via nginx-devel
Example configuration: location /foo { proxy_http_version 3; proxy_pass https://http3-server.example.com:4433; } src/http/modules/ngx_http_proxy_module.c | 2276 - src/http/modules/ngx_http_upstream_keepalive_module.c |47 +-

[PATCH 10 of 12] Added host/host_set logic to proxy module

2023-12-25 Thread Vladimir Homutov via nginx-devel
Patch is to be merged with next. This is basically a copy from grpc proxy. src/http/modules/ngx_http_proxy_module.c | 67 1 files changed, 67 insertions(+), 0 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1703082897 -10800 # Wed Dec

[PATCH 09 of 12] HTTP/3: added $quic_connection variable

2023-12-25 Thread Vladimir Homutov via nginx-devel
The variable contains number of main quic connection (shared between streams). This is useful for keepalive tests. src/http/v3/ngx_http_v3_module.c | 40 1 files changed, 40 insertions(+), 0 deletions(-) # HG changeset patch # User Vladimir Khomutov

[PATCH 08 of 12] Upstream: separate function to handle upstream connection closing

2023-12-25 Thread Vladimir Homutov via nginx-devel
No functional changes. src/http/ngx_http_upstream.c | 91 --- 1 files changed, 43 insertions(+), 48 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1695647888 -10800 # Mon Sep 25 16:18:08 2023 +0300 # Node ID

[PATCH 07 of 12] Upstream: refactored upstream initialization

2023-12-25 Thread Vladimir Homutov via nginx-devel
No functional changes. This will be used by the following patches. src/http/ngx_http_upstream.c | 133 +++--- 1 files changed, 74 insertions(+), 59 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1703082747 -10800 # Wed Dec 20

[PATCH 05 of 12] QUIC: client loss detection updates

2023-12-25 Thread Vladimir Homutov via nginx-devel
Patch subject is complete summary. src/event/quic/ngx_event_quic_ack.c | 69 +++- 1 files changed, 66 insertions(+), 3 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1703081117 -10800 # Wed Dec 20 17:05:17 2023 +0300 # Node ID

[PATCH 06 of 12] HTTP/3: make http/3 request defines available

2023-12-25 Thread Vladimir Homutov via nginx-devel
Patch subject is complete summary. src/http/v3/ngx_http_v3.h | 20 src/http/v3/ngx_http_v3_filter_module.c | 20 +--- 2 files changed, 21 insertions(+), 19 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1703082710 -10800

[PATCH 04 of 12] QUIC: client support

2023-12-25 Thread Vladimir Homutov via nginx-devel
Patch subject is complete summary. src/event/quic/ngx_event_quic.c| 617 - src/event/quic/ngx_event_quic.h| 11 + src/event/quic/ngx_event_quic_ack.c| 13 + src/event/quic/ngx_event_quic_ack.h|2 +

[PATCH 02 of 12] QUIC: renamed "ctp" to "peer_tp"

2023-12-25 Thread Vladimir Homutov via nginx-devel
The "ctp" refers to "client transport parameters", but in the code that supports both client and server, the name is confusing, thus rename. src/event/quic/ngx_event_quic.c| 41 + src/event/quic/ngx_event_quic_ack.c| 8 ++--

[PATCH 03 of 12] QUIC: added a structure for stream limits/counters

2023-12-25 Thread Vladimir Homutov via nginx-devel
To simplify code dealing with stream states when both client and server are supported, instead of 8 named fields, use two structures split into uni/bidi and client/server. src/event/quic/ngx_event_quic.c| 8 ++-- src/event/quic/ngx_event_quic_ack.c| 4 +-

[PATCH 00 of 12] HTTP/3 proxying to upstreams

2023-12-25 Thread Vladimir Homutov via nginx-devel
Hello, everyone, and Merry Christmas to all! I'm a developer of an nginx fork Angie. Recently we implemented an HTTP/3 proxy support in our fork [1]. We'd like to contribute this functionality to nginx OSS community. Hence here is a patch series backported from Angie to the current head of

[PATCH 01 of 12] QUIC: fixed accounting of in-flight PING frames

2023-12-25 Thread Vladimir Homutov via nginx-devel
Previously, such frames were not accounted as in-flight, and they were not stored in sent queue. This prevented proper PTO calculation and ACK handling. src/event/quic/ngx_event_quic_ack.c | 62 +--- 1 files changed, 43 insertions(+), 19 deletions(-) # HG

Re: [PATCH 1 of 2] HTTP: uniform overflow checks in ngx_http_alloc_large_header_buffer

2023-11-29 Thread Vladimir Homutov via nginx-devel
On Tue, Nov 28, 2023 at 05:58:23AM +0300, Maxim Dounin wrote: > Hello! > > On Fri, Nov 10, 2023 at 12:11:54PM +0300, Vladimir Homutov via nginx-devel > wrote: > > > If URI is not fully parsed yet, some pointers are not set. > > As a result, the calculation of &qu

Re: [PATCH 2 of 2] HTTP: removed unused r->port_start

2023-11-29 Thread Vladimir Homutov via nginx-devel
On Tue, Nov 28, 2023 at 05:57:39AM +0300, Maxim Dounin wrote: > Hello! > > On Fri, Nov 10, 2023 at 12:11:55PM +0300, Vladimir Homutov via nginx-devel > wrote: > > > > > It is no longer used since the refactoring in 8e5bf1bc87e2 (2008). > > Neither r->port_

[PATCH 1 of 2] HTTP: uniform overflow checks in ngx_http_alloc_large_header_buffer

2023-11-10 Thread Vladimir Homutov via nginx-devel
If URI is not fully parsed yet, some pointers are not set. As a result, the calculation of "new + (ptr - old)" expression may overflow. In such a case, just avoid calculating it, as value will be set correctly later by the parser in any case. The issue was found by GCC undefined behaviour

[PATCH 0 of 2] [patch] some issues found by gcc undef sanitizer

2023-11-10 Thread Vladimir Homutov via nginx-devel
> As already noted off-list, this is certainly not the only field > which might be not yet set when > ngx_http_alloc_large_header_buffer() is called. From the patch > context as shown, at least r->method_end and r->uri_start might > not be set as well, leading to similar overflows. And

[PATCH 2 of 2] HTTP: removed unused r->port_start

2023-11-10 Thread Vladimir Homutov via nginx-devel
It is no longer used since the refactoring in 8e5bf1bc87e2 (2008). src/http/ngx_http_request.c | 3 +-- src/http/ngx_http_request.h | 1 - 2 files changed, 1 insertions(+), 3 deletions(-) # HG changeset patch # User Vladimir Khomutov # Date 1699603821 -10800 # Fri Nov 10 11:10:21 2023

Re: [patch] quic PTO counter fixes

2023-11-09 Thread Vladimir Homutov via nginx-devel
> On Thu, Oct 26, 2023 at 03:08:55AM +0400, Sergey Kandaurov wrote: > > # HG changeset patch > > # User Vladimir Khomutov > > # Date 1697031803 -10800 > > # Wed Oct 11 16:43:23 2023 +0300 > > # Node ID 9ba2840e88f62343b3bd794e43900781dab43686 > > # Parent

[PATCH 2 of 2] HTTP: suppressed possible overflow in interim r->uri_end calculation

2023-10-27 Thread Vladimir Homutov via nginx-devel
If URI is not fully parsed yet, the r->uri_end pointer is NULL. As a result, calculation of "new + (r->uri_end - old)" expression may overflow. In such case, just avoid calculating it, as r->uri_end will be set correctly later by the parser in any case. The issue was found by GCC undefined

[PATCH 1 of 2] Core: avoid calling memcpy() in edge cases

2023-10-27 Thread Vladimir Homutov via nginx-devel
Patch subject is complete summary. src/core/ngx_cycle.c | 10 ++ src/core/ngx_resolver.c | 2 +- src/core/ngx_string.c| 15 +++ src/http/modules/ngx_http_proxy_module.c | 4 ++-- src/http/ngx_http_file_cache.c

[PATCH 0 of 2] [patch] some issues found by gcc undef sanitizer

2023-10-27 Thread Vladimir Homutov via nginx-devel
Hello, Below are two patches, created by results of running nginx-tests with GCC undefined behaviour sanitizer enabled. The first one is about memcpy() with NULL second argument calls, which are considere undefined behaviour by sanitizer. While the actual harm is arguable, having such calls is

Re: [patch] quic PTO counter fixes

2023-10-26 Thread Vladimir Homutov via nginx-devel
On Fri, Oct 27, 2023 at 12:27:22AM +0400, Sergey Kandaurov wrote: > On Thu, Oct 26, 2023 at 05:20:39PM +0300, Vladimir Homutov wrote: > > On Thu, Oct 26, 2023 at 03:08:55AM +0400, Sergey Kandaurov wrote: > > > On Wed, Oct 11, 2023 at 04:58:47PM +0300, Vladimir Homutov via >

Re: [patch] quic PTO counter fixes

2023-10-26 Thread Vladimir Homutov via nginx-devel
On Thu, Oct 26, 2023 at 03:08:55AM +0400, Sergey Kandaurov wrote: > On Wed, Oct 11, 2023 at 04:58:47PM +0300, Vladimir Homutov via nginx-devel > wrote: [..] > > diff --git a/src/event/quic/ngx_event_quic_output.c > > b/src/event/quic/ngx_event_quic_output.c > &

[patch] quic PTO counter fixes

2023-10-11 Thread Vladimir Homutov via nginx-devel
Hello, a couple of patches in the quic code: first patch improves a bit debugging, and the second patch contains fixes for PTO counter calculation - see commit log for details. This helps with some clients in interop handshakeloss/handshakecorruption testcases # HG changeset patch # User

Re: [PATCH] QUIC openssl compat mode error handling

2023-09-22 Thread Vladimir Homutov via nginx-devel
On Fri, Sep 22, 2023 at 07:30:50PM +0400, Roman Arutyunyan wrote: > Hi Vladimir, > > On Fri, Sep 22, 2023 at 03:44:08PM +0300, Vladimir Homutov via nginx-devel > wrote: > > # HG changeset patch > > # User Vladimir Khomutov > > # Date 1695386443 -10800 > > #

[PATCH] QUIC openssl compat mode error handling

2023-09-22 Thread Vladimir Homutov via nginx-devel
# HG changeset patch # User Vladimir Khomutov # Date 1695386443 -10800 # Fri Sep 22 15:40:43 2023 +0300 # Node ID 974ba23e68909ba708616410aa77074213d4d1e5 # Parent 5741eddf82e826766cd0f5ec7c6fe383145ca581 QUIC: handle add_handhshake_data() callback errors in compat. The error may be

Re: [PATCH 2 of 4] QUIC: always add ACK frame to the queue head

2023-08-10 Thread Vladimir Homutov via nginx-devel
On Thu, Aug 10, 2023 at 08:02:06PM +0400, Sergey Kandaurov wrote: > > > On 27 Jul 2023, at 16:42, Roman Arutyunyan wrote: > > > > # HG changeset patch > > # User Roman Arutyunyan > > # Date 1690461509 -14400 > > # Thu Jul 27 16:38:29 2023 +0400 > > # Node ID

Enable QUIC with Tongsuo SSL library

2023-05-26 Thread Vladimir Homutov via nginx-devel
# HG changeset patch # User Vladimir Khomutov # Date 1677761453 -10800 # Thu Mar 02 15:50:53 2023 +0300 # Node ID 348772f63be2b77a893b8d101c6b6905382a5735 # Parent 8eae1b4f1c5528b063351804168a6085f5f50b42 QUIC: added support for the Tongsuo SSL library. For the needs of QUIC, this is

Re: QUIC: position of RTT and congestion

2022-11-30 Thread Vladimir Homutov via nginx-devel
On Wed, Nov 30, 2022 at 08:10:29PM +0800, Yu Zhu wrote: > > Hi, > > As described in "rfc 9002 6. Loss Detection", "RTT and congestion > control are properties of the path", so moves first_rtt, > latest_rtt, avg_rtt, min_rtt, rttvar and congestion from > ngx_quic_connection_t to

Re: [patch] ngx_cpp_test module build issue cleanup

2022-11-24 Thread Vladimir Homutov via nginx-devel
On Thu, Nov 24, 2022 at 06:46:15PM +0300, Maxim Dounin wrote: > Hello! > > On Thu, Nov 24, 2022 at 02:31:33PM +0300, Vladimir Homutov via nginx-devel > wrote: > > > On Thu, Nov 24, 2022 at 01:25:30PM +0400, Sergey Kandaurov wrote: > > > > > > > On 23 Nov

Re: [patch] ngx_cpp_test module build issue cleanup

2022-11-24 Thread Vladimir Homutov via nginx-devel
On Thu, Nov 24, 2022 at 01:25:30PM +0400, Sergey Kandaurov wrote: > > > On 23 Nov 2022, at 21:50, Vladimir Homutov via nginx-devel > > wrote: > > > > Hello, > > > > the simplest ./configure --with-cpp_test_module leads to build error > > aft

[patch] ngx_cpp_test module build issue cleanup

2022-11-23 Thread Vladimir Homutov via nginx-devel
Hello, the simplest ./configure --with-cpp_test_module leads to build error after successful configuration: src/misc/ngx_cpp_test_module.cpp:13:12: fatal error: ngx_mail.h: No such file or directory 13 | #include |^~~~ compilation terminated. # HG changeset

Re: how to avoid new quic connection distributed to old workers when nginx-quic reload

2022-05-30 Thread Vladimir Homutov via nginx-devel
On Mon, May 30, 2022 at 06:55:15PM +0800, 朱宇 wrote: > Hi, > > > in "src/event/quic/bpf/ngx_quic_reuseport_helper.c", if can not find socket > by dcid (cookie), udp packet will be distributed by kernel. > > > so when nginx-quic reload, how to avoid new quic connecion packet distributed > to old