BUG/MINOR: proxy/session: Be sure to have a listener to increment its counters
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Mar 2021 08:16:27 +0000 (09:16 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 12 Mar 2021 08:25:45 +0000 (09:25 +0100)
commit77e376783e891fe5dda4fe4e1198cf8dff0b118d
treee52fd98ffab9feff0fb03d04f675a060e809d440
parent24ec9434271345857b42cc5bd9c6b497ab01a7e4
BUG/MINOR: proxy/session: Be sure to have a listener to increment its counters

It is possible to have a session without a listener. It happens for applets
on the client side. Thus all accesses to the listener info from the session
must be guarded. It was the purpose of the commit 36119de18 ("BUG/MEDIUM:
session: NULL dereference possible when accessing the listener"). However,
some tests on the session's listener existence are missing in proxy_inc_*
functions.

This patch should fix the issues #1171, #1172, #1173, #1174 and #1175. It
must be backported with the above commit as far as 1.8.
include/haproxy/proxy.h