Corrected several mis-calls of is_ip_address() that treated the result
[exim.git] / src / src / routers / ipliteral.c
index fa41cc41152cbab6c5a2cf26a3d2352858f359a1..b091c4e61c8ae5e363cd641fd2d7b6f8a1a12d2f 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.1 2004/10/07 13:10:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/routers/ipliteral.c,v 1.4 2005/01/11 15:51:03 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2004 */
+/* Copyright (c) University of Cambridge 1995 - 2005 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 
@@ -118,7 +118,7 @@ host name to "(unnamed)". */
 if (domain[0] != '[' || domain[len-1] != ']') return DECLINE;
 domain[len-1] = 0;  /* temporarily */
 
-if (!string_is_ip_address(domain+1, NULL))
+if (string_is_ip_address(domain+1, NULL) == 0)
   {
   domain[len-1] = ']';
   return DECLINE;
@@ -127,7 +127,7 @@ if (!string_is_ip_address(domain+1, NULL))
 /* It seems unlikely that ignore_target_hosts will be used with this router,
 but if it is set, it should probably work. */
 
-if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, NULL,
+if (verify_check_this_host(&(rblock->ignore_target_hosts), NULL, domain,
       domain + 1, NULL) == OK)
   {
   DEBUG(D_route)