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.

34 lines
1.1 KiB

  1. From c8d57dec6173430bd5602bb76efff302c51e7803 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Cyril=20Bont=C3=A9?= <cyril.bonte@free.fr>
  3. Date: Thu, 2 Oct 2014 19:56:25 +0200
  4. Subject: [PATCH 20/20] BUG/MINOR: config: don't propagate process binding for
  5. dynamic use_backend
  6. A segfault was reported with the introduction of the propagate_processes()
  7. function. It was caused when a use_backend rule was declared with a dynamic
  8. name, using a log-format string. The backend is not resolved during the
  9. configuration, which lead to the segfault.
  10. The patch prevents the process binding propagation for such dynamic rules, it
  11. should also be backported to 1.5.
  12. (cherry picked from commit 51639696e0a112ea3612e905a5722ad912b3869f)
  13. ---
  14. src/cfgparse.c | 2 ++
  15. 1 file changed, 2 insertions(+)
  16. diff --git a/src/cfgparse.c b/src/cfgparse.c
  17. index 6e962c8..ec6d923 100644
  18. --- a/src/cfgparse.c
  19. +++ b/src/cfgparse.c
  20. @@ -6015,6 +6015,8 @@ void propagate_processes(struct proxy *from, struct proxy *to)
  21. /* use_backend */
  22. list_for_each_entry(rule, &from->switching_rules, list) {
  23. + if (rule->dynamic)
  24. + continue;
  25. to = rule->be.backend;
  26. propagate_processes(from, to);
  27. }
  28. --
  29. 2.0.4