﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1656	It may be a  bug of udp rbtree init in function ngx_set_inherited_sockets	chronolaw@…		"Nginx 1.15.0 introduce udp session feature, but when we update new binary then function ngx_set_inherited_sockets has not init rbtree properly.

So I commit a patch try to fix it, thanks all.

# HG changeset patch
# User chronolaw <chronolaw@gmail.com>
# Date 1539836512 -28800
#      Thu Oct 18 12:21:52 2018 +0800
# Node ID 7f75bc03620617a93185935a8f04db6e018c20e5
# Parent  8b68d50090e4f134a35da60146fefd5e63770759
Fix the bug of udp rbtree init in ngx_set_inherited_sockets

diff -r 8b68d50090e4 -r 7f75bc036206 src/core/ngx_connection.c
--- a/src/core/ngx_connection.c	Wed Oct 03 14:08:51 2018 +0300
+++ b/src/core/ngx_connection.c	Thu Oct 18 12:21:52 2018 +0800
@@ -214,6 +214,10 @@
 
         ls[i].addr_text.len = len;
 
+#if !(NGX_WIN32)
+        ngx_rbtree_init(&ls[i].rbtree, &ls[i].sentinel, ngx_udp_rbtree_insert_value);
+#endif
+
         ls[i].backlog = NGX_LISTEN_BACKLOG;
 
         olen = sizeof(int);
"	defect	closed	minor	nginx-1.15	nginx-core	1.15.x	invalid	udp listen			nginx version: nginx/1.15.3
