diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-11-21 10:24:02 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2005-11-21 10:24:02 +0000 |
commit | df199fec8faee495664d153096dff38faf3ba3ad (patch) | |
tree | 65cd916594a23fac7d624674b039ae185a262787 /src | |
parent | 024bd3c2de076b332144a56498fbec54c763177d (diff) |
Recognize "net-" in match_ip lists (as documented).
Diffstat (limited to 'src')
-rw-r--r-- | src/src/verify.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/src/verify.c b/src/src/verify.c index 010ea84f1..fb4382c24 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/verify.c,v 1.27 2005/09/14 09:40:55 ph10 Exp $ */ +/* $Cambridge: exim/src/src/verify.c,v 1.28 2005/11/21 10:24:02 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1991,7 +1991,7 @@ if (string_is_ip_address(ss, &maskoffset) > 0) semicolon = Ustrchr(ss, ';'); /* If we are doing an IP address only match, then all lookups must be IP -address lookups. */ +address lookups, even if there is no "net-". */ if (isiponly) { @@ -1999,13 +1999,14 @@ if (isiponly) } /* Otherwise, if the item is of the form net[n]-lookup;<file|query> then it is -a lookup on a masked IP network, in textual form. The net- stuff really only -applies to single-key lookups where the key is implicit. For query-style -lookups the key is specified in the query. From release 4.30, the use of net- -for query style is no longer needed, but we retain it for backward -compatibility. */ - -else if (Ustrncmp(ss, "net", 3) == 0 && semicolon != NULL) +a lookup on a masked IP network, in textual form. We obey this code even if we +have already set iplookup, so as to skip over the "net-" prefix and to set the +mask length. The net- stuff really only applies to single-key lookups where the +key is implicit. For query-style lookups the key is specified in the query. +From release 4.30, the use of net- for query style is no longer needed, but we +retain it for backward compatibility. */ + +if (Ustrncmp(ss, "net", 3) == 0 && semicolon != NULL) { mlen = 0; for (t = ss + 3; isdigit(*t); t++) mlen = mlen * 10 + *t - '0'; |