From 0a3c79614521d7612b63eff4e09c25ed219fb65b Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Sun, 14 May 2023 12:30:11 +0400 Subject: 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. --- src/http/ngx_http.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/http/ngx_http.c') diff --git a/src/http/ngx_http.c b/src/http/ngx_http.c index 34bfc539e..d835f896e 100644 --- a/src/http/ngx_http.c +++ b/src/http/ngx_http.c @@ -1883,14 +1883,7 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr) ls->wildcard = addr->opt.wildcard; #if (NGX_HTTP_V3) - ls->quic = addr->opt.quic; - - if (ls->quic) { - ngx_rbtree_init(&ls->rbtree, &ls->sentinel, - ngx_quic_rbtree_insert_value); - } - #endif return ls; -- cgit