You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2016/07/15 18:38:05 UTC
[Bug 59864] segfault when using route-redirect pairs and both
servers are disabled/in error mode
https://bz.apache.org/bugzilla/show_bug.cgi?id=59864
--- Comment #1 from Ruediger Pluem <rp...@apache.org> ---
Does the below patch fix your issue?
Index: modules/proxy/mod_proxy_balancer.c
===================================================================
--- modules/proxy/mod_proxy_balancer.c (revision 1752793)
+++ modules/proxy/mod_proxy_balancer.c (working copy)
@@ -212,7 +212,8 @@
/* Find the worker that has the 'route' defined
*/
static proxy_worker *find_route_worker(proxy_balancer *balancer,
- const char *route, request_rec *r)
+ const char *route, request_rec *r,
+ int recursion)
{
int i;
int checking_standby;
@@ -249,10 +250,15 @@
* This enables to safely remove the member from the
* balancer. Of course you will need some kind of
* session replication between those two remote.
+ * Also check that we haven't gone thru all the
+ * balancer members by means of redirects.
+ * This should avoid redirect cycles.
*/
- if (*worker->s->redirect) {
+ if ((*worker->s->redirect)
+ && (recursion < balancer->workers->nelts)) {
proxy_worker *rworker = NULL;
- rworker = find_route_worker(balancer,
worker->s->redirect, r);
+ rworker = find_route_worker(balancer,
worker->s->redirect,
+ r, recursion + 1);
/* Check if the redirect worker is usable */
if (rworker && !PROXY_WORKER_IS_USABLE(rworker)) {
/*
@@ -315,7 +321,7 @@
/* We have a route in path or in cookie
* Find the worker that has this route defined.
*/
- worker = find_route_worker(balancer, *route, r);
+ worker = find_route_worker(balancer, *route, r, 1);
if (worker && strcmp(*route, worker->s->route)) {
/*
* Notice that the route of the worker chosen is different from
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org