From: Willy Tarreau Date: Wed, 27 May 2015 14:44:02 +0000 (+0200) Subject: MINOR: proxy: add a flag to memorize that the proxy's ID was forced X-Git-Tag: v1.6-dev2~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d1fdf7df57988e2f9de2751de8197b68b919ad1;p=thirdparty%2Fhaproxy.git MINOR: proxy: add a flag to memorize that the proxy's ID was forced This will be used to know if proxy's ID should be considered when names mismatch upon check status reload. --- diff --git a/include/types/proxy.h b/include/types/proxy.h index 290b02d5c2..fa640edb52 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -79,7 +79,7 @@ enum pr_mode { /* unused: 0x04, 0x08, 0x10 */ #define PR_O_PREF_LAST 0x00000020 /* prefer last server */ #define PR_O_DISPATCH 0x00000040 /* use dispatch mode */ -/* unused: 0x00000080 */ +#define PR_O_FORCED_ID 0x00000080 /* proxy's ID was forced in the configuration */ #define PR_O_FWDFOR 0x00000100 /* conditionally insert x-forwarded-for with client address */ #define PR_O_IGNORE_PRB 0x00000200 /* ignore empty requests (aborts and timeouts) */ #define PR_O_NULLNOLOG 0x00000400 /* a connect without request will not be logged */ diff --git a/src/cfgparse.c b/src/cfgparse.c index cf3c0931b1..1403bd19d6 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -2613,6 +2613,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm) curproxy->uuid = atol(args[1]); curproxy->conf.id.key = curproxy->uuid; + curproxy->options |= PR_O_FORCED_ID; if (curproxy->uuid <= 0) { Alert("parsing [%s:%d]: custom id has to be > 0.\n",