diff --git a/native/include/node.h b/native/include/node.h index 013118606..d527d161b 100644 --- a/native/include/node.h +++ b/native/include/node.h @@ -76,11 +76,7 @@ struct nodemess { }; typedef struct nodemess nodemess_t; -#if AP_MODULE_MAGIC_AT_LEAST(20101223,1) -#define SIZEOFSCORE 800 /* size of the proxy_worker_stat structure */ -#else -#define SIZEOFSCORE 200 /* size of the proxy_worker_stat structure */ -#endif +#define SIZEOFSCORE 1600 /* at least size of the proxy_worker_stat structure */ /* status of the node as read/store in httpd. */ struct nodeinfo { diff --git a/native/mod_proxy_cluster/mod_proxy_cluster.c b/native/mod_proxy_cluster/mod_proxy_cluster.c index 132484bbe..37b919704 100644 --- a/native/mod_proxy_cluster/mod_proxy_cluster.c +++ b/native/mod_proxy_cluster/mod_proxy_cluster.c @@ -1645,6 +1645,7 @@ static void update_workers_lbstatus(proxy_server_conf *conf, apr_pool_t *pool, s #if AP_MODULE_MAGIC_AT_LEAST(20101223,1) rnew->connection->log_id = "-"; rnew->log_id = "-"; + rnew->connection->conn_config = ap_create_conn_config(rrp); rnew->useragent_addr = apr_pcalloc(rrp, sizeof(apr_sockaddr_t)); #endif rnew->per_dir_config = server->lookup_defaults; @@ -2895,6 +2896,12 @@ static int proxy_cluster_post_config(apr_pool_t *p, apr_pool_t *plog, } #endif } + if (SIZEOFSCORE <= sizeof(proxy_worker_shared)) { + ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, + "SIZEOFSCORE too small for mod_proxy shared stat structure %d <= %d", + SIZEOFSCORE, sizeof(proxy_worker_shared)); + return HTTP_INTERNAL_SERVER_ERROR; + } /* Check that the mod_proxy_balancer.c is not loaded */ if (ap_find_linked_module("mod_proxy_balancer.c") != NULL) {