summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-11-28 10:07:55 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-11-28 10:07:55 +0000
commit9677653466a1fa1f0b72a004e1202f0d4684d86e (patch)
tree03da708a9209f5ff51c8cf5f434d4fcb3aa37320
parent4bc97d56b39a0b4ac43e06e016f4c96e191323ee (diff)
Fix another case of bad comparison between IPv6 addresses that may or
may not be abbreviated.
-rw-r--r--doc/doc-txt/ChangeLog7
-rw-r--r--src/src/verify.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 75826bdac..a81309b3b 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.267 2005/11/21 12:04:23 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.268 2005/11/28 10:07:55 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -161,6 +161,11 @@ PH/19 Exim expands the IPv6 address given to -bh to its full non-abbreviated
by converting both addresses to binary, so now that is used instead of
the text comparison.
+PH/20 There was another similar case to PH/19, when a complete host name was
+ given in a host list; looking up its IP address could give an abbreviated
+ form, whereas the current host's name might or might not be abbreviated.
+ The same fix has been applied.
+
Exim version 4.54
-----------------
diff --git a/src/src/verify.c b/src/src/verify.c
index fb4382c24..b84044d0c 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/verify.c,v 1.28 2005/11/21 10:24:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/verify.c,v 1.29 2005/11/28 10:07:55 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2109,9 +2109,7 @@ if (*t == 0)
host_item *hh;
for (hh = &h; hh != NULL; hh = hh->next)
{
- if (Ustrcmp(hh->address, (Ustrchr(hh->address, ':') == NULL)?
- cb->host_ipv4 : cb->host_address) == 0)
- return OK;
+ if (host_is_in_net(hh->address, cb->host_address, 0)) return OK;
}
return FAIL;
}