From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 8294 invoked from network); 24 Aug 2020 21:52:08 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Aug 2020 21:52:08 -0000 Received: (qmail 24285 invoked by uid 550); 24 Aug 2020 21:52:05 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 24261 invoked from network); 24 Aug 2020 21:52:04 -0000 From: Daniel Neri Content-Type: multipart/alternative; boundary="Apple-Mail=_2E5DB0A4-D2BA-46B4-B32C-0A9C5A63DE8B" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Date: Mon, 24 Aug 2020 23:51:52 +0200 References: <5232EC15-7E60-4D1F-BF3B-C31BFF998C06@rb67.eu> <20200824161646.GH3265@brightrain.aerifal.cx> <20200824164326.GI3265@brightrain.aerifal.cx> <87mu2jycum.fsf@mid.deneb.enyo.de> <20200824213215.GL3265@brightrain.aerifal.cx> To: musl@lists.openwall.com In-Reply-To: <20200824213215.GL3265@brightrain.aerifal.cx> Message-Id: <0422ED16-0AA3-402E-8103-940EC2545A3B@rb67.eu> X-Mailer: Apple Mail (2.3445.104.15) Subject: Re: [musl] Incompatible behaviour of res_query(3) w.r.t. NXDOMAIN --Apple-Mail=_2E5DB0A4-D2BA-46B4-B32C-0A9C5A63DE8B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On 24 Aug 2020, at 23:32, Rich Felker wrote: >=20 > Does such a distinction exist? I thought res_query was just equivalent > to res_mkquery+res_send and that calling res_send directly would get > you the same errors. I thought so too, but I=E2=80=99ve been reading the musl implementation. = ;-) After looking more at the other implementations, I think Florian is = correct though: it=E2=80=99s more like res_mkquery+res_send+setting = h_errno and the return value based on the RCODE of the response. Regards, Daniel --Apple-Mail=_2E5DB0A4-D2BA-46B4-B32C-0A9C5A63DE8B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 On = 24 Aug 2020, at 23:32, Rich Felker <dalias@libc.org> wrote:

Does such a distinction exist? I thought res_query was just = equivalent
to res_mkquery+res_send and that calling res_send directly = would get
you the same errors.

I thought so too, but I=E2=80=99ve been = reading the musl implementation. ;-)

After looking more at the other = implementations, I think Florian is correct though: it=E2=80=99s more = like res_mkquery+res_send+setting h_errno and the return value based on = the RCODE of the response.

Regards,
Daniel

= --Apple-Mail=_2E5DB0A4-D2BA-46B4-B32C-0A9C5A63DE8B--