From: Emeric Brun Date: Mon, 1 Oct 2012 15:10:30 +0000 (+0200) Subject: MEDIUM: config: authorize frontend and listen without bind. X-Git-Tag: v1.5-dev13~236 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6678e21bb88a65e9b05de2f7f4920db1a514ba8;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index c6260e1e88..91b4b7f13f 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -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 line, or use the 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) {