From: Christopher Faulet Date: Thu, 23 Nov 2017 21:23:08 +0000 (+0100) Subject: BUG/MINOR: listener: Allow multiple "process" options on "bind" lines X-Git-Tag: v1.8.0~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=15eb3a9a08639a53e477dd4cc73f63f559fbafda;p=thirdparty%2Fhaproxy.git BUG/MINOR: listener: Allow multiple "process" options on "bind" lines The documentation specifies that you can have several "process" options to define several ranges on "bind" lines (or "stats socket" lines). It is uncommon, but it should be possible. So the bind_proc bitmask in bind_conf structure must not be overwritten at each new "process" option parsed. This bug also exists in 1.7, 1.6 and 1.5. So it may be backported. But no one seems to have noticed it, so it was probably never hitted. --- diff --git a/src/listener.c b/src/listener.c index 7cb4d6aa25..aede0d32df 100644 --- a/src/listener.c +++ b/src/listener.c @@ -944,7 +944,7 @@ static int bind_parse_process(char **args, int cur_arg, struct proxy *px, struct unsigned int low, high; if (strcmp(args[cur_arg + 1], "all") == 0) { - set = 0; + set |= ~0UL; } else if (strcmp(args[cur_arg + 1], "odd") == 0) { set |= ~0UL/3UL; /* 0x555....555 */ @@ -977,7 +977,7 @@ static int bind_parse_process(char **args, int cur_arg, struct proxy *px, struct return ERR_ALERT | ERR_FATAL; } - conf->bind_proc = set; + conf->bind_proc |= set; return 0; }