]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: proxy: add a flag to memorize that the proxy's ID was forced
authorWilly Tarreau <w@1wt.eu>
Wed, 27 May 2015 14:44:02 +0000 (16:44 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 27 May 2015 14:51:28 +0000 (16:51 +0200)
This will be used to know if proxy's ID should be considered when names
mismatch upon check status reload.

include/types/proxy.h
src/cfgparse.c

index 290b02d5c2ea6732df34f201d7bba6c961b77cfc..fa640edb525214e6535a19c8e9d08f1e0d34aa2c 100644 (file)
@@ -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 */
index cf3c0931b186b8912090ca2b504feb31d1bf8681..1403bd19d61c51b6aecea7776d69e3170e4ce2af 100644 (file)
@@ -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",