{
int cfgerr = 0;
struct proxy *curproxy = NULL;
+ struct proxy *init_proxies_list = NULL;
struct stktable *t;
struct server *newsrv = NULL;
int err_code = 0;
proxies_list = next;
}
- for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {
+ /* starting to initialize the main proxies list */
+ init_proxies_list = proxies_list;
+
+init_proxies_list_stage1:
+ for (curproxy = init_proxies_list; curproxy; curproxy = curproxy->next) {
struct switching_rule *rule;
struct server_rule *srule;
struct sticking_rule *mrule;
case PR_MODE_CLI:
cfgerr += proxy_cfg_ensure_no_http(curproxy);
break;
+
case PR_MODE_SYSLOG:
+ /* this mode is initialized as the classic tcp proxy */
+ cfgerr += proxy_cfg_ensure_no_http(curproxy);
+ break;
+
case PR_MODE_PEERS:
case PR_MODES:
/* should not happen, bug gcc warn missing switch statement */
- ha_alert("%s '%s' cannot use peers or syslog mode for this proxy. NOTE: PLEASE REPORT THIS TO DEVELOPERS AS YOU'RE NOT SUPPOSED TO BE ABLE TO CREATE A CONFIGURATION TRIGGERING THIS!\n",
+ ha_alert("%s '%s' cannot initialize this proxy mode (peers) in this way. NOTE: PLEASE REPORT THIS TO DEVELOPERS AS YOU'RE NOT SUPPOSED TO BE ABLE TO CREATE A CONFIGURATION TRIGGERING THIS!\n",
proxy_type_str(curproxy), curproxy->id);
cfgerr++;
break;
}
}
+ /*
+ * We have just initialized the main proxies list
+ * we must also configure the log-forward proxies list
+ */
+ if (init_proxies_list == proxies_list) {
+ init_proxies_list = cfg_log_forward;
+ goto init_proxies_list_stage1;
+ }
+
/***********************************************************/
/* At this point, target names have already been resolved. */
/***********************************************************/
/* perform the final checks before creating tasks */
- for (curproxy = proxies_list; curproxy; curproxy = curproxy->next) {
+ /* starting to initialize the main proxies list */
+ init_proxies_list = proxies_list;
+
+init_proxies_list_stage2:
+ for (curproxy = init_proxies_list; curproxy; curproxy = curproxy->next) {
struct listener *listener;
unsigned int next_id;
}
}
+ /*
+ * We have just initialized the main proxies list
+ * we must also configure the log-forward proxies list
+ */
+ if (init_proxies_list == proxies_list) {
+ init_proxies_list = cfg_log_forward;
+ goto init_proxies_list_stage2;
+ }
+
if (diag_no_cluster_secret)
ha_diag_warning("No cluster secret was set. The stateless reset and Retry"
" features are disabled for all QUIC bindings.\n");