mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-19 21:45:33 +00:00
MEDIUM: config: authorize frontend and listen without bind.
This allows to easily add/remove "bind" entries to a frontend without being forced to remove it when the last entry is temporarily removed. While "disabled" may sometimes work in a frontend, it becomes trickier on "listen" sections which can also hold servers and be referenced by other frontends. Note that a "listen" section with no "bind" is equivalent to a "backend" section. Configs without any listeners are still reported as invalid and refuse to load.
This commit is contained in:
parent
f5da49392a
commit
c6678e21bb
@ -5731,12 +5731,6 @@ int check_config_validity()
|
||||
break;
|
||||
}
|
||||
|
||||
if ((curproxy->cap & PR_CAP_FE) && LIST_ISEMPTY(&curproxy->conf.listeners)) {
|
||||
Alert("config : %s '%s' has no listen address. Please either specify a valid address on the <listen> line, or use the <bind> keyword.\n",
|
||||
proxy_type_str(curproxy), curproxy->id);
|
||||
cfgerr++;
|
||||
}
|
||||
|
||||
if ((curproxy->cap & PR_CAP_BE) && (curproxy->mode != PR_MODE_HEALTH)) {
|
||||
if (curproxy->lbprm.algo & BE_LB_KIND) {
|
||||
if (curproxy->options & PR_O_TRANSP) {
|
||||
|
Loading…
Reference in New Issue
Block a user