X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Frouters%2Fiplookup.c;h=37280078369af0c2c7cc1b1e5bf3814a43cdecef;hb=76146973f89f0e9265d85827285b9258910a56d7;hp=9dafd6fa536979afd02a90da23ec496b02638cc6;hpb=d515a9174a5ea517bc3d27bc4d40223b24d7a47f;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/routers/iplookup.c b/src/src/routers/iplookup.c index 9dafd6fa5..372800783 100644 --- a/src/src/routers/iplookup.c +++ b/src/src/routers/iplookup.c @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.7 2006/04/04 09:09:45 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -144,7 +142,7 @@ iplookup_router_entry( address_item **addr_succeed) /* put old address here on success */ { uschar *query = NULL; -uschar reply[256]; +uschar *reply; uschar *hostname, *reroute, *domain, *listptr; uschar host_buffer[256]; host_item *host = store_get(sizeof(host_item)); @@ -163,6 +161,8 @@ pw = pw; DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n", rblock->name, addr->address, addr->domain); +reply = store_get(256); + /* Build the query string to send. If not explicitly given, a default of "user@domain user@domain" is used. */ @@ -206,7 +206,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer, host->address = host->name; else { - int rc = host_find_byname(host, NULL, NULL, TRUE); + int rc = host_find_byname(host, NULL, HOST_FIND_QUALIFY_SINGLE, NULL, TRUE); if (rc == HOST_FIND_FAILED || rc == HOST_FIND_AGAIN) continue; } @@ -378,6 +378,9 @@ new_addr->parent = addr; copyflag(new_addr, addr, af_propagate); new_addr->p = addr->p; +if (addr->child_count == SHRT_MAX) + log_write(0, LOG_MAIN|LOG_PANIC_DIE, "%s router generated more than %d " + "child addresses for <%s>", rblock->name, SHRT_MAX, addr->address); addr->child_count++; new_addr->next = *addr_new; *addr_new = new_addr;