MINOR: proxy: Be able to reference the defaults section used by a proxy
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 13 Oct 2021 07:50:53 +0000 (09:50 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Oct 2021 12:12:19 +0000 (14:12 +0200)
commit27c8d20451e800a03ad639887fd0feee25a44a9d
treee8beb18022adf2f3789a04030f209f9f0bfba689
parentb40542000dcd29057f734baf89226637c0a1ca6f
MINOR: proxy: Be able to reference the defaults section used by a proxy

A proxy may now references the defaults section it is used. To do so, a
pointer on the default proxy was added in the proxy structure. And a
refcount must be used to track proxies using a default proxy. A default
proxy is destroyed iff its refcount is equal to zero and when it drops to
zero.

All this stuff must be performed during init/deinit staged for now. All
unreferenced default proxies are removed after the configuration parsing.

This patch is mandatory to support TCP/HTTP rules in defaults sections.
include/haproxy/proxy-t.h
include/haproxy/proxy.h
src/haproxy.c
src/proxy.c