summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2007-05-08 13:08:22 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2007-05-08 13:08:22 +0000
commit6a3bceb1162da6104bf656ecde9890c03cc2328d (patch)
tree59120e2245a0579bf15bd0761ab1e1e3b2ee1f90 /src
parenteb4c0de6a9078df61b580ee20e575f1a40ddb242 (diff)
Use colon, not dot, as IPv6 separator in host-list lookups that use the
iplsearch lookup type.
Diffstat (limited to 'src')
-rw-r--r--src/src/verify.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/src/verify.c b/src/src/verify.c
index 666790601..23f63d803 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/verify.c,v 1.49 2007/03/01 11:17:00 ph10 Exp $ */
+/* $Cambridge: exim/src/src/verify.c,v 1.50 2007/05/08 13:08:22 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2201,7 +2201,8 @@ if (iplookup)
name, we have to fish the file off the start of the query. For a single-key
lookup, the key is the current IP address, masked appropriately, and
reconverted to text form, with the mask appended. For IPv6 addresses, specify
- dot separators instead of colons. */
+ dot separators instead of colons, except when the lookup type is "iplsearch".
+ */
if (mac_islookup(search_type, lookup_absfilequery))
{
@@ -2216,11 +2217,13 @@ if (iplookup)
filename = NULL;
key = semicolon + 1;
}
- else
+ else /* Single-key style */
{
+ int sep = (Ustrcmp(lookup_list[search_type].name, "iplsearch") == 0)?
+ ':' : '.';
insize = host_aton(cb->host_address, incoming);
host_mask(insize, incoming, mlen);
- (void)host_nmtoa(insize, incoming, mlen, buffer, '.');
+ (void)host_nmtoa(insize, incoming, mlen, buffer, sep);
key = buffer;
filename = semicolon + 1;
}