From d231f3d467434e412160fa2d45dad8377a4f780e Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 30 Mar 2022 21:06:43 +0100 Subject: [Minor] Check enabled/disabled logic for the proxy upstreams/mirrors --- src/rspamd_proxy.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/rspamd_proxy.c') diff --git a/src/rspamd_proxy.c b/src/rspamd_proxy.c index 10f95e0bf..bdf3e1a14 100644 --- a/src/rspamd_proxy.c +++ b/src/rspamd_proxy.c @@ -334,6 +334,15 @@ rspamd_proxy_parse_upstream (rspamd_mempool_t *pool, return FALSE; } + if (!rspamd_config_is_enabled_from_ucl (pool, obj)) { + /* Upstream is valid but disabled */ + msg_info_pool_check("upstream %s is disabled", + ucl_object_lookup (obj, "name") ? + ucl_object_tostring(ucl_object_lookup (obj, "name")) : + ucl_object_key (obj)); + return TRUE; + } + up = rspamd_mempool_alloc0 (pool, sizeof (*up)); elt = ucl_object_lookup (obj, "name"); -- cgit v1.2.3