MINOR: listener: forbid most keywords for reverse HTTP bind
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 Oct 2023 14:49:03 +0000 (16:49 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 20 Oct 2023 15:28:08 +0000 (17:28 +0200)
commitf70cf28539803b2f33fbfa39156d7d47e3609614
tree3437189be7aa1c5dc645d2800e83480befeb5840
parent11ccd8d7cbc17744c0a8648cd86dc75681ac911d
MINOR: listener: forbid most keywords for reverse HTTP bind

Reverse HTTP bind is very specific in that in rely on a server to
initiate connection. All connection settings are defined on the server
line and ignored from the bind line.

Before this patch, most of keywords were silently ignored. This could
result in a configuration from doing unexpected things from the user
point of view. To improve this situation, add a new 'rhttp_ok' field in
bind_kw structure. If not set, the keyword is forbidden on a reverse
bind line and will cause a fatal config error.

For the moment, only the following keywords are usable with reverse bind
'id', 'name' and 'nbconn'.

This change is safe as it's already forbidden to mix reverse and
standard addresses on the same bind line.
include/haproxy/listener-t.h
src/listener.c