mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2026-01-16 22:31:42 +01:00
[BUG] the "source" keyword must first clear optional settings
Problem reported by John Lauro. When "source ... usesrc ..." is set in the defaults section, it is not possible anymore to remove the "usesrc" part when declaring a more precise "source" in a backend. The only workaround was to declare it by server. We need to clear optional settings when declaring a new "source". (cherry picked from commit 368480cf4570a0d6448741c704aebd53ac467aa9) (cherry picked from commit 15b939fbdd5885b6814454c273e64b8cd348b59d)
This commit is contained in:
parent
47773d51ae
commit
bf8768f345
@ -1789,7 +1789,10 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int inv)
|
||||
#endif
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
/* we must first clear any optional default setting */
|
||||
curproxy->options &= ~PR_O_TPXY_MASK;
|
||||
|
||||
curproxy->source_addr = *str2sa(args[1]);
|
||||
curproxy->options |= PR_O_BIND_SRC;
|
||||
if (!strcmp(args[2], "usesrc")) { /* address to use outside */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user