You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.7 KiB

  1. From cac307c020db7a938b73d4fef27a3b4ad2ecdf6a Mon Sep 17 00:00:00 2001
  2. From: Willy Tarreau <w@1wt.eu>
  3. Date: Tue, 18 Nov 2014 15:04:29 +0100
  4. Subject: [PATCH 5/6] BUG/MINOR: config: don't inherit the default balance
  5. algorithm in frontends
  6. Tom Limoncelli from Stack Exchange reported a minor bug : the frontend
  7. inherits the LB parameters from the defaults sections. The impact is
  8. that if a "balance" directive uses any L7 parameter in the defaults
  9. sections and the frontend is in TCP mode, a warning is emitted about
  10. their incompatibility. The warning is harmless but a valid, sane config
  11. should never cause any warning to be reported.
  12. This fix should be backported into 1.5 and possibly 1.4.
  13. (cherry picked from commit 743c128580ee29c8f073b4a29771a5ce715f3721)
  14. ---
  15. src/cfgparse.c | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17. diff --git a/src/cfgparse.c b/src/cfgparse.c
  18. index 392a692..40d20ab 100644
  19. --- a/src/cfgparse.c
  20. +++ b/src/cfgparse.c
  21. @@ -2003,7 +2003,6 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
  22. curproxy->no_options = defproxy.no_options;
  23. curproxy->no_options2 = defproxy.no_options2;
  24. curproxy->bind_proc = defproxy.bind_proc;
  25. - curproxy->lbprm.algo = defproxy.lbprm.algo;
  26. curproxy->except_net = defproxy.except_net;
  27. curproxy->except_mask = defproxy.except_mask;
  28. curproxy->except_to = defproxy.except_to;
  29. @@ -2037,6 +2036,7 @@ int cfg_parse_listen(const char *file, int linenum, char **args, int kwm)
  30. }
  31. if (curproxy->cap & PR_CAP_BE) {
  32. + curproxy->lbprm.algo = defproxy.lbprm.algo;
  33. curproxy->fullconn = defproxy.fullconn;
  34. curproxy->conn_retries = defproxy.conn_retries;
  35. curproxy->max_ka_queue = defproxy.max_ka_queue;
  36. --
  37. 2.0.4