]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: lua: initialize the correct idle conn lists for the SSL sockets
authorWilly Tarreau <w@1wt.eu>
Thu, 7 Feb 2019 13:48:24 +0000 (14:48 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Feb 2019 14:08:13 +0000 (15:08 +0100)
Commit 40a007cf2 ("MEDIUM: threads/server: Make connection list
(priv/idle/safe) thread-safe") made a copy-paste error when initializing
the Lua sockets, as the TCP one was initialized twice. Fortunately it has
no impact because the pointers are set to NULL after a memset(0) and are
not changed in between.

This must be backported to 1.9 and 1.8.

src/hlua.c

index b9df9265fb7c022a1f3f6d7d788f93e1845738c9..3d09d27abf3d9df8c0669c4fe4bd8ba9d1bc6a56 100644 (file)
@@ -8892,9 +8892,9 @@ void hlua_init(void)
        socket_ssl.obj_type = OBJ_TYPE_SERVER;
        LIST_INIT(&socket_ssl.actconns);
        socket_ssl.pendconns = EB_ROOT;
-       socket_tcp.priv_conns = NULL;
-       socket_tcp.idle_conns = NULL;
-       socket_tcp.safe_conns = NULL;
+       socket_ssl.priv_conns = NULL;
+       socket_ssl.idle_conns = NULL;
+       socket_ssl.safe_conns = NULL;
        socket_ssl.next_state = SRV_ST_RUNNING; /* early server setup */
        socket_ssl.last_change = 0;
        socket_ssl.id = "LUA-SSL-CONN";