]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: config: emit a warning on a frontend without listener
authorWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2015 09:36:45 +0000 (11:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Aug 2015 10:17:41 +0000 (12:17 +0200)
commitf3934b8c6d85814e1f9eea889110a9197378fd6f
tree3ef43cbfbc23ef3b438de8e91b2a41144bfa3a45
parent80c2f2f024a104bb7e135cbed5ee923e4a6d8dba
MEDIUM: config: emit a warning on a frontend without listener

Commit c6678e2 ("MEDIUM: config: authorize frontend and listen without bind")
completely removed the test for bind lines in frontends in order to make it
easier for automated tools to generate configs (eg: replacing a bind with
another one passing via a temporary config without any bind line). The
problem is that some common mistakes are totally hidden now. For example,
this apparently valid entry is silently ignored :

       listen 1.2.3.4:8000
           server s1 127.0.0.1:8000

Hint: 1.2.3.4:8000 is mistakenly the proxy name here.

Thus instead we now emit a warning to indicate that a frontend was found
with no listener. This should be backported to 1.5 to help spot abnormal
configurations.
src/cfgparse.c