can we disable AAAA queries in the resolver ?
Gregory Neil Shapiro
gshapiro at freebsd.org
Sat Aug 2 09:31:34 PDT 2003
> i know, but what is happening is that all these applications
> (including sendmail and our ssh, for what matters)
> are broken in that they look for an AAAA record just for making
> a connection.
Can you try this patch for sendmail?
--- domain.c.orig Sat Aug 2 09:27:09 2003
+++ domain.c Sat Aug 2 09:29:47 2003
@@ -851,12 +851,6 @@
** false -- otherwise.
*/
-# if NETINET6
-# define SM_T_INITIAL T_AAAA
-# else /* NETINET6 */
-# define SM_T_INITIAL T_A
-# endif /* NETINET6 */
-
bool
dns_getcanonname(host, hbsize, trymx, statp, pttl)
char *host;
@@ -880,6 +874,7 @@
bool amatch;
bool gotmx = false;
int qtype;
+ int initial;
int loopcnt;
char *xp;
char nbuf[SM_MAX(MAXPACKET, MAXDNAME*2+2)];
@@ -971,11 +966,16 @@
*/
mxmatch = NULL;
- qtype = SM_T_INITIAL;
+ initial = T_A;
+# if NETINET6
+ if (InetMode == AF_INET6)
+ initial = T_AAAA;
+# endif /* NETINET6 */
+ qtype = initial;
for (dp = searchlist; *dp != NULL; )
{
- if (qtype == SM_T_INITIAL)
+ if (qtype == initial)
gotmx = false;
if (tTd(8, 5))
sm_dprintf("dns_getcanonname: trying %s.%s (%s)\n",
@@ -1057,7 +1057,7 @@
/* definite no -- try the next domain */
dp++;
- qtype = SM_T_INITIAL;
+ qtype = initial;
continue;
}
else if (tTd(8, 7))
@@ -1234,7 +1234,7 @@
qtype = T_MX;
else
{
- qtype = SM_T_INITIAL;
+ qtype = initial;
dp++;
}
}
More information about the freebsd-hackers
mailing list