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=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3217 invoked from network); 8 Oct 2022 00:05:31 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 8 Oct 2022 00:05:31 -0000 Received: (qmail 14307 invoked by uid 550); 8 Oct 2022 00:05:28 -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 14270 invoked from network); 8 Oct 2022 00:05:28 -0000 Date: Fri, 7 Oct 2022 20:05:16 -0400 From: Rich Felker To: Jo-Philipp Wich Cc: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , openwrt-devel@lists.openwrt.org, musl@lists.openwall.com Message-ID: <20221008000516.GD29905@brightrain.aerifal.cx> References: <0175978a-476c-e5f3-1da0-12bb78de7f54@kleine-koenig.org> <20221007232540.GC29905@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] nslookup failures with coarse CLOCK_MONOTONIC On Sat, Oct 08, 2022 at 01:53:29AM +0200, Jo-Philipp Wich wrote: > Hi, > > > [...] > > Which implementation of nslookup is this? Busybox? It would probably > > be useful to hear thoughts on it from their side. > assuming the OP is using standard OpenWrt nslookup, it is the "big" busybox > nslookup implementation, which is using the res_*() api and name lookup logic > borrowed from musl libc instead of the original "small" version fiddling with > the `_res` state directly (and being broken on musl libc due to that). > > The proper course of action here is likely adapting the solution in > 6c858d6fd4df8b5498ef2cae66c8f3c3eff1587b and porting it to the busybox "big" > nslookup code itself. > > I agree that musl libc itself cannot do much more to ensure uniqueness of the > IDs generated by res_mkquery() and that it should be solved in the application > code itself in this case. While it won't be as fast (not parallel unless you do threads) it might be worth just using res_send in the Busybox "big" nslookup. At present neither busybox nor musl supports TCP fallback for large records, but the next release of musl will, and the fact that it's using its own query look with UDP derived from the musl code means it won't get that benefit. Alternatively, busybox could copy our parallel TCP fallback code if they like. :-) Rich