X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/753739fdef6d9753ee4a7e89afd959a4034d2ad9..38965d80d70cacd0c944d32f7107549a3a272b35:/src/src/routers/manualroute.c?ds=sidebyside diff --git a/src/src/routers/manualroute.c b/src/src/routers/manualroute.c index 01802714f..45378ce3d 100644 --- a/src/src/routers/manualroute.c +++ b/src/src/routers/manualroute.c @@ -2,12 +2,15 @@ * Exim - an Internet mail transport agent * *************************************************/ +/* Copyright (c) The Exim Maintainers 2020 - 2022 */ /* Copyright (c) University of Cambridge 1995 - 2018 */ -/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #include "../exim.h" + +#ifdef ROUTER_MANUALROUTE #include "rf_functions.h" #include "manualroute.h" @@ -117,8 +120,8 @@ if (ob->hai_code < 0) /* One of route_list or route_data must be specified */ -if ((ob->route_list == NULL && ob->route_data == NULL) || - (ob->route_list != NULL && ob->route_data != NULL)) +if ( !ob->route_list && !ob->route_data + || ob->route_list && ob->route_data) log_write(0, LOG_PANIC_DIE|LOG_CONFIG_FOR, "%s router:\n " "route_list or route_data (but not both) must be specified", rblock->name); @@ -290,6 +293,7 @@ string, decline. */ else { + GET_OPTION("route_data"); if (!(route_item = rf_expand_data(addr, ob->route_data, &rc))) return rc; (void) parse_route_item(route_item, NULL, &hostlist, &options); @@ -399,7 +403,7 @@ if (transport && transport->info->local) if (hostlist[0]) { host_item *h; - addr->host_list = h = store_get(sizeof(host_item), FALSE); + addr->host_list = h = store_get(sizeof(host_item), GET_UNTAINTED); h->name = string_copy(hostlist); h->address = NULL; h->port = PORT_NONE; @@ -486,5 +490,6 @@ addr->transport = transport; return OK; } -#endif /*!MACRO_PREDEF*/ +#endif /*!MACRO_PREDEF*/ +#endif /*ROUTER_MANUALROUTE*/ /* End of routers/manualroute.c */