From: Willy Tarreau Date: Mon, 15 Mar 2021 08:12:41 +0000 (+0100) Subject: BUG/MINOR: cfgparse: use the GLOBAL not LISTEN keywords list for spell checking X-Git-Tag: v2.4-dev13~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=101df31503e7bef59cd6096cd9eb2d708de7471b;p=thirdparty%2Fhaproxy.git BUG/MINOR: cfgparse: use the GLOBAL not LISTEN keywords list for spell checking In commit a0e8eb8ca ("MINOR: cfgparse: suggest correct spelling for unknown words in global section") we got the ability to locate a better matching word in case of error. But it mistakenly used the CFG_LISTEN class of words instead of CFG_GLOBAL, resulting in proposing unsuitable matches in addition to the long hard-coded list. Now, "tune.dh-param" correctly proposes "tune.ssl.default-dh-param". No backport is needed. --- diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c index fc56fbf417..72b11c0330 100644 --- a/src/cfgparse-global.c +++ b/src/cfgparse-global.c @@ -1285,7 +1285,7 @@ int cfg_parse_global(const char *file, int linenum, char **args, int kwm) } } - best = cfg_find_best_match(args[0], &cfg_keywords.list, CFG_LISTEN, common_kw_list); + best = cfg_find_best_match(args[0], &cfg_keywords.list, CFG_GLOBAL, common_kw_list); if (best) ha_alert("parsing [%s:%d] : unknown keyword '%s' in '%s' section; did you mean '%s' maybe ?\n", file, linenum, args[0], cursection, best); else