summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2021-05-15 01:11:41 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2021-06-28 00:30:02 +0100
commit7f859392553419843336ac59ef2e98bafc2681bc (patch)
tree04d59060aacd6ca79ed628c815cade28bf9728b0
parent96f8f12e212bb3a98f2b1e9ab94a916a62ebd68b (diff)
downloadexim4-7f859392553419843336ac59ef2e98bafc2681bc.tar.gz
hostlist for router fallback_hosts must be mutable
-rw-r--r--src/src/route.c7
-rw-r--r--src/src/routers/manualroute.c4
2 files changed, 8 insertions, 3 deletions
diff --git a/src/src/route.c b/src/src/route.c
index 1d87b079a..5aed06b4f 100644
--- a/src/src/route.c
+++ b/src/src/route.c
@@ -288,7 +288,12 @@ for (router_instance * r = routers; r; r = r->next)
/* Build a host list if fallback hosts is set. */
- host_build_hostlist(&(r->fallback_hostlist), r->fallback_hosts, FALSE);
+ {
+ int old_pool = store_pool;
+ store_pool = POOL_PERM;
+ host_build_hostlist(&r->fallback_hostlist, r->fallback_hosts, FALSE);
+ store_pool = old_pool;
+ }
/* Check redirect_router and pass_router are valid */
diff --git a/src/src/routers/manualroute.c b/src/src/routers/manualroute.c
index 471b38566..01802714f 100644
--- a/src/src/routers/manualroute.c
+++ b/src/src/routers/manualroute.c
@@ -259,7 +259,7 @@ if (ob->route_list)
int sep = -(';'); /* Default is semicolon */
listptr = ob->route_list;
- while ((route_item = string_nextinlist(&listptr, &sep, NULL, 0)) != NULL)
+ while ((route_item = string_nextinlist(&listptr, &sep, NULL, 0)))
{
int rc;
@@ -468,7 +468,7 @@ if (!addr->host_list)
defined for these hosts. It will be a remote one, as a local transport is
dealt with above. However, we don't need one if verifying only. */
-if (transport == NULL && verify == v_none)
+if (!transport && verify == v_none)
{
log_write(0, LOG_MAIN, "Error in %s router: no transport defined",
rblock->name);