diff -Nur haproxy-1.3.13-orig/src/cfgparse.c haproxy-1.3.13-useonlybackeds/src/cfgparse.c --- haproxy-1.3.13-orig/src/cfgparse.c 2007-10-18 22:38:22.000000000 +0200 +++ haproxy-1.3.13-useonlybackeds/src/cfgparse.c 2007-10-19 14:51:46.000000000 +0200 @@ -2504,20 +2504,16 @@ struct proxy *target; for (target = proxy; target != NULL; target = target->next) { - if (strcmp(target->id, curproxy->defbe.name) == 0) + if ((target->cap & PR_CAP_BE) && !strcmp(target->id, curproxy->defbe.name)) break; } if (target == NULL) { - Alert("parsing %s : default backend '%s' in HTTP %s '%s' was not found !\n", + Alert("parsing %s: default proxy '%s' with backend capability in HTTP %s '%s' was not found!\n", file, curproxy->defbe.name, proxy_type_str(curproxy), curproxy->id); cfgerr++; } else if (target == curproxy) { Alert("parsing %s : loop detected for default backend %s !\n", file, curproxy->defbe.name); cfgerr++; - } else if (!(target->cap & PR_CAP_BE)) { - Alert("parsing %s : default backend '%s' in HTTP %s '%s' has no backend capability !\n", - file, curproxy->defbe.name, proxy_type_str(curproxy), curproxy->id); - cfgerr++; } else if (target->mode != curproxy->mode) { Alert("parsing %s : default backend '%s' in HTTP %s '%s' is not of same mode (tcp/http) !\n", file, curproxy->defbe.name, proxy_type_str(curproxy), curproxy->id); @@ -2537,20 +2533,16 @@ if (exp->action != ACT_SETBE) continue; for (target = proxy; target != NULL; target = target->next) { - if (strcmp(target->id, exp->replace) == 0) + if ((target->cap & PR_CAP_BE) && !strcmp(target->id, exp->replace)) break; } if (target == NULL) { - Alert("parsing %s : backend '%s' in HTTP %s '%s' was not found !\n", + Alert("parsing %s: proxy '%s' with backend capability in HTTP %s '%s' was not found!\n", file, exp->replace, proxy_type_str(curproxy), curproxy->id); cfgerr++; } else if (target == curproxy) { Alert("parsing %s : loop detected for backend %s !\n", file, exp->replace); cfgerr++; - } else if (!(target->cap & PR_CAP_BE)) { - Alert("parsing %s : target '%s' in HTTP %s '%s' has no backend capability !\n", - file, exp->replace, proxy_type_str(curproxy), curproxy->id); - cfgerr++; } else if (target->mode != PR_MODE_HTTP) { Alert("parsing %s : backend '%s' in HTTP %s '%s' is not HTTP (use 'mode http') !\n", file, exp->replace, proxy_type_str(curproxy), curproxy->id); @@ -2568,21 +2560,17 @@ struct proxy *target; for (target = proxy; target != NULL; target = target->next) { - if (strcmp(target->id, rule->be.name) == 0) + if ((target->cap & PR_CAP_BE) && !strcmp(target->id,