diff options
author | Roman Arutyunyan <arut@nginx.com> | 2023-05-14 12:30:11 +0400 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2023-05-14 12:30:11 +0400 |
commit | 0a3c79614521d7612b63eff4e09c25ed219fb65b (patch) | |
tree | c2a0827a7e914aacd3b6924e233fbedbffcc319f /src/stream/ngx_stream.c | |
parent | 779bfcff5f7544494c7c85ac73f41a033e749528 (diff) | |
download | nginx-0a3c79614521d7612b63eff4e09c25ed219fb65b.tar.gz nginx-0a3c79614521d7612b63eff4e09c25ed219fb65b.zip |
Common tree insert function for QUIC and UDP connections.
Previously, ngx_udp_rbtree_insert_value() was used for plain UDP and
ngx_quic_rbtree_insert_value() was used for QUIC. Because of this it was
impossible to initialize connection tree in ngx_create_listening() since
this function is not aware what kind of listening it creates.
Now ngx_udp_rbtree_insert_value() is used for both QUIC and UDP. To make
is possible, a generic key field is added to ngx_udp_connection_t. It keeps
client address for UDP and connection ID for QUIC.
Diffstat (limited to 'src/stream/ngx_stream.c')
-rw-r--r-- | src/stream/ngx_stream.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c index 2762786e2..3304c843c 100644 --- a/src/stream/ngx_stream.c +++ b/src/stream/ngx_stream.c @@ -518,11 +518,6 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports) ls->reuseport = addr[i].opt.reuseport; #endif -#if !(NGX_WIN32) - ngx_rbtree_init(&ls->rbtree, &ls->sentinel, - ngx_udp_rbtree_insert_value); -#endif - stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t)); if (stport == NULL) { return NGX_CONF_ERROR; |