Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions native/include/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
7 changes: 7 additions & 0 deletions native/mod_proxy_cluster/mod_proxy_cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down