From: Cyril Bonté Date: Sun, 10 Jan 2010 16:01:47 +0000 (+0100) Subject: [MINOR] config: don't accept 'appsession' in defaults section X-Git-Tag: v1.4-dev7~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b7a369baa189aa851bed5ea92f5ed4cb5cb4418;p=thirdparty%2Fhaproxy.git [MINOR] config: don't accept 'appsession' in defaults section Maybe appsession should be forbidden in the 'defaults' section as it will not work in the backends. --- diff --git a/src/cfgparse.c b/src/cfgparse.c index 13e1cfdf8e..978162386e 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1580,6 +1580,12 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) else if (!strcmp(args[0], "appsession")) { /* cookie name */ int cur_arg; + if (curproxy == &defproxy) { + Alert("parsing [%s:%d] : '%s' not allowed in 'defaults' section.\n", file, linenum, args[0]); + err_code |= ERR_ALERT | ERR_FATAL; + goto out; + } + if (warnifnotcap(curproxy, PR_CAP_BE, file, linenum, args[0], NULL)) err_code |= ERR_WARN;