diff options
author | Andreas Beckmann <anbe@debian.org> | 2014-02-15 18:57:29 +0100 |
---|---|---|
committer | Andreas Beckmann <anbe@debian.org> | 2014-02-15 18:57:29 +0100 |
commit | e062dbd4f41383d57c5437307079baa327b13c11 (patch) | |
tree | 690084303096ad444e7612fac27b5824ee364df7 /debian | |
parent | c3cad2f86916ab2242878351857e2cacfaebacde (diff) | |
download | sendmail-e062dbd4f41383d57c5437307079baa327b13c11.tar.gz |
fix A-only MX CNAME interface binding issues when using IPv6
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | debian/patches/8.14/8.14.4/conf.c-ipv6.patch | 91 | ||||
-rw-r--r-- | debian/patches/8.14/8.14.4/series | 1 |
3 files changed, 94 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 7765377..07d09fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,8 @@ sendmail (8.14.4-4.2) UNRELEASED; urgency=low * Really fix FTBFS on HURD, thanks to Samuel Thibault. (Closes: #608525) * Update logcheck patterns to match high precision timestamps, thanks to Ralf Döblitz (Closes: #638952) + * conf.c-ipv6.patch: Fix A-only MX CNAME interface binding issues when using + IPv6, thanks to David F. Skoll. (Closes: #737164) (LP: #1223633) * debian/*/Makefile.am: Recover from Makefile.in. * debian/rules: refresh-debian-configure: Refresh all Makefile.in, too. * debian/build/: Update automake helper scripts to automake 1.14. diff --git a/debian/patches/8.14/8.14.4/conf.c-ipv6.patch b/debian/patches/8.14/8.14.4/conf.c-ipv6.patch new file mode 100644 index 0000000..94d55e3 --- /dev/null +++ b/debian/patches/8.14/8.14.4/conf.c-ipv6.patch @@ -0,0 +1,91 @@ +Description: correctly limit lookups to the same address family +Author: Claus Assmann + +--- sendmail-8.14.4~/sendmail/conf.c.8144 Tue Sep 10 09:46:16 2013 ++++ sendmail-8.14.4/sendmail/conf.c Tue Sep 10 09:46:53 2013 +@@ -4231,7 +4231,18 @@ + h = gethostbyname(name); + if (!resv6) + _res.options &= ~RES_USE_INET6; +- *err = h_errno; ++ ++ /* the function is supposed to return only the requested family */ ++ if (h != NULL && h->h_addrtype != family) ++ { ++# if NETINET6 ++ freehostent(h); ++# endif /* NETINET6 */ ++ h = NULL; ++ *err = NO_DATA; ++ } ++ else ++ *err = h_errno; + return h; + } + +@@ -4355,6 +4366,17 @@ + } + } + #endif /* (SOLARIS > 10000 && SOLARIS < 20400) || (defined(SOLARIS) && SOLARIS < 204) || (defined(sony_news) && defined(__svr4)) */ ++ ++ /* the function is supposed to return only the requested family */ ++ if (h != NULL && h->h_addrtype != family) ++ { ++# if NETINET6 ++ freehostent(h); ++# endif /* NETINET6 */ ++ h = NULL; ++ SM_SET_H_ERRNO(NO_DATA); ++ } ++ + if (tTd(61, 10)) + { + if (h == NULL) +@@ -4364,13 +4386,12 @@ + sm_dprintf("%s\n", h->h_name); + if (tTd(61, 11)) + { ++ struct in_addr ia; ++ size_t i; + #if NETINET6 + struct in6_addr ia6; + char buf6[INET6_ADDRSTRLEN]; +-#else /* NETINET6 */ +- struct in_addr ia; + #endif /* NETINET6 */ +- size_t i; + + if (h->h_aliases != NULL) + for (i = 0; h->h_aliases[i] != NULL; +@@ -4381,16 +4402,23 @@ + { + char *addr; + ++ addr = NULL; + #if NETINET6 +- memmove(&ia6, h->h_addr_list[i], +- IN6ADDRSZ); +- addr = anynet_ntop(&ia6, +- buf6, sizeof(buf6)); +-#else /* NETINET6 */ +- memmove(&ia, h->h_addr_list[i], +- INADDRSZ); +- addr = (char *) inet_ntoa(ia); ++ if (h->h_addrtype == AF_INET6) ++ { ++ memmove(&ia6, h->h_addr_list[i], ++ IN6ADDRSZ); ++ addr = anynet_ntop(&ia6, ++ buf6, sizeof(buf6)); ++ } ++ else + #endif /* NETINET6 */ ++ /* "else" in #if code above */ ++ { ++ memmove(&ia, h->h_addr_list[i], ++ INADDRSZ); ++ addr = (char *) inet_ntoa(ia); ++ } + if (addr != NULL) + sm_dprintf("\taddr: %s\n", addr); + } diff --git a/debian/patches/8.14/8.14.4/series b/debian/patches/8.14/8.14.4/series index 83864d7..d4e169b 100644 --- a/debian/patches/8.14/8.14.4/series +++ b/debian/patches/8.14/8.14.4/series @@ -14,3 +14,4 @@ fix_linkage raise-max-daemons.patch hurd.patch manpage-section.patch +conf.c-ipv6.patch |