From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 2 09:31:33 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C442F37B401; Sat, 2 Aug 2003 09:31:33 -0700 (PDT) Received: from horsey.gshapiro.net (horsey.gshapiro.net [64.105.95.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D3DF43FB1; Sat, 2 Aug 2003 09:31:33 -0700 (PDT) (envelope-from gshapiro@gshapiro.net) Received: from horsey.gshapiro.net (localhost [127.0.0.1]) h72GVTpa051955 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 2 Aug 2003 09:31:29 -0700 (PDT) Received: (from gshapiro@localhost)h72GVTTX051954; Sat, 2 Aug 2003 09:31:29 -0700 (PDT) Date: Sat, 2 Aug 2003 09:31:29 -0700 From: Gregory Neil Shapiro To: Luigi Rizzo Message-ID: <20030802163128.GX81388@horsey.gshapiro.net> References: <20030801235200.A53695@xorpc.icir.org> <20030802085918.GA14729@walton.maths.tcd.ie> <20030802030852.A9531@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030802030852.A9531@xorpc.icir.org> User-Agent: Mutt/1.5.4i cc: hackers@freebsd.org cc: ume@freebsd.org Subject: Re: can we disable AAAA queries in the resolver ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Aug 2003 16:31:34 -0000 > 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++; } }