]> Pileus Git - ~andy/fetchmail/commitdiff
Work around systems returning obsolete EAI_NODATA.
authorMatthias Andree <matthias.andree@gmx.de>
Sun, 3 Feb 2013 14:54:58 +0000 (15:54 +0100)
committerMatthias Andree <matthias.andree@gmx.de>
Sun, 3 Feb 2013 14:54:58 +0000 (15:54 +0100)
Older systems that provide the older RFC-2553 implementation of
getaddrinfo, rather than the current RFC-3493, and systems that do not
provide this getaddrinfo() interface at all and thus use the replacement
functions from libesmtp/getaddrinfo.?, might return EAI_NODATA when a
host is registered in DNS as MX or similar, but without A or AAAA
records.  Handle this situation when checking for multidrop aliases and
treat EAI_NODATA the same as EAI_NONAME, i. e. name cannot be resolved.

The proper fix, however, is to upgrade the operating system.

NEWS
checkalias.c

diff --git a/NEWS b/NEWS
index d78cdcfd1a026ce2f68e651396ff58b3d2f2e96e..22af11f72385fb3baa8955296db3453bbe3bc526 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -56,6 +56,20 @@ removed from a 6.4.0 or newer release.)
 
 --------------------------------------------------------------------------------
 
+fetchmail-6.3.25 (not yet released):
+
+# WORKAROUNDS
+* Older systems that provide the older RFC-2553 implementation of getaddrinfo,
+  rather than the current RFC-3493, and systems that do not provide this
+  getaddrinfo() interface at all and thus use the replacement functions from
+  libesmtp/getaddrinfo.?, might return EAI_NODATA when a host is registered in
+  DNS as MX or similar, but without A or AAAA records.  Handle this situation
+  when checking for multidrop aliases and treat EAI_NODATA the same as
+  EAI_NONAME, i. e. name cannot be resolved.
+
+  The proper fix, however, is to upgrade the operating system.
+
+
 fetchmail-6.3.24 (released 2012-12-23, 26108 LoC):
 
 # NOTE THAT THE RELEASE OF FUTURE FETCHMAIL 6.3.X VERSIONS IS UNCLEAR.
index 2e50ea09222d3cd61b469b953839e41a6665c027..1e1d16339fe033fc082154c494d78f15b830e512 100644 (file)
@@ -194,6 +194,15 @@ int is_host_alias(const char *name, struct query *ctl, struct addrinfo **res)
        switch (e)
        {
            case EAI_NONAME:    /* specified host is unknown */
+#ifdef EAI_NODATA
+           /* EAI_NODATA was in the older RFC-2553, but that got
+            * obsoleted by RFC-3493 - there, EAI_NODATA is no longer
+            * valid, and modern operating systems no longer issue this
+            * error code. libesmtp/getaddrinfo.?, however, still does.
+            * (This was reported to Brian Stafford 2013-02-03.)
+            */
+           case EAI_NODATA:    /* specified host is unknown */
+#endif
                break;
 
            default: