summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Pennock <pdp@exim.org>2014-07-14 02:49:33 -0400
committerPhil Pennock <pdp@exim.org>2014-07-14 02:49:33 -0400
commit66be95e02b2ba6a834a6dbee16061176ad85019a (patch)
tree45a95ee9b3eead2136cd65278be1e1f5638ca50a
parent0df4ab80579544db421576d92e8a9b783edb1a58 (diff)
Rename T_APL to T_ADDRESSES
Fixes Github issue #15 Known DNS RRTYPE aliases can be found at <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml> and `T_APL` conflicts with the `APL` RRTYPE, Address Prefix List, in experimental RFC 3123. Issue reported compilation issues on OpenBSD. Instead, use `T_ADDRESSES`.
-rw-r--r--doc/doc-txt/ChangeLog4
-rw-r--r--src/src/exim.h7
-rw-r--r--src/src/lookups/dnsdb.c14
3 files changed, 17 insertions, 8 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index ac8fce5f9..8dda80a10 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -144,6 +144,10 @@ TL/14 Enhance documentation of ${run expansion and how it parses the
JH/27 The TLS SNI feature was broken in 4.82. Fix it.
+PP/02 Fix internal collision of T_APL on systems which support RFC3123
+ by renaming away from it. Addresses GH issue 15, reported by
+ Jasper Wallace.
+
Exim version 4.82
-----------------
diff --git a/src/src/exim.h b/src/src/exim.h
index b824b48f3..2b3f6434e 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -364,12 +364,17 @@ side, put in definitions for all the ones that Exim uses. */
. T_CSA gets the domain's Client SMTP Authorization SRV record
+ . T_ADDRESSES looks up both AAAA (or A6) and A records
+
+If any of these names appear in the RRtype list at:
+ <http://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml>
+then we should rename Exim's private type away from the conflict.
*/
#define T_ZNS (-1)
#define T_MXH (-2)
#define T_CSA (-3)
-#define T_APL (-4)
+#define T_ADDRESSES (-4)
/* The resolv.h header defines __P(x) on some Solaris 2.5.1 systems (without
checking that it is already defined, in fact). This conflicts with other
diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c
index 02c597b16..6b4d55c4d 100644
--- a/src/src/lookups/dnsdb.c
+++ b/src/src/lookups/dnsdb.c
@@ -54,7 +54,7 @@ static const char *type_names[] = {
static int type_values[] = {
T_A,
#if HAVE_IPV6
- T_APL, /* Private type for AAAA + A */
+ T_ADDRESSES, /* Private type for AAAA + A */
T_AAAA,
#ifdef SUPPORT_A6
T_A6,
@@ -328,9 +328,9 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
DEBUG(D_lookup) debug_printf("dnsdb key: %s\n", domain);
/* Do the lookup and sort out the result. There are four special types that
- are handled specially: T_CSA, T_ZNS, T_APL and T_MXH.
+ are handled specially: T_CSA, T_ZNS, T_ADDRESSES and T_MXH.
The first two are handled in a special lookup function so that the facility
- could be used from other parts of the Exim code. T_APL is handled by looping
+ could be used from other parts of the Exim code. T_ADDRESSES is handled by looping
over the types of A lookup. T_MXH affects only what happens later on in
this function, but for tidiness it is handled by the "special". If the
lookup fails, continue with the next domain. In the case of DEFER, adjust
@@ -338,9 +338,9 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
found = domain;
#if HAVE_IPV6
- if (type == T_APL) /* NB cannot happen unless HAVE_IPV6 */
+ if (type == T_ADDRESSES) /* NB cannot happen unless HAVE_IPV6 */
{
- if (searchtype == T_APL)
+ if (searchtype == T_ADDRESSES)
# if defined(SUPPORT_A6)
searchtype = T_A6;
# else
@@ -389,7 +389,7 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
type == T_A6 ||
#endif
type == T_AAAA ||
- type == T_APL)
+ type == T_ADDRESSES)
{
dns_address *da;
for (da = dns_address_from_rr(&dnsa, rr); da != NULL; da = da->next)
@@ -527,7 +527,7 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
} /* Loop for list of returned records */
/* Loop for set of A-lookupu types */
- } while (type == T_APL && searchtype != T_A);
+ } while (type == T_ADDRESSES && searchtype != T_A);
} /* Loop for list of domains */