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=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 29318 invoked from network); 7 Jul 2022 18:17:05 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 7 Jul 2022 18:17:05 -0000 Received: (qmail 28370 invoked by uid 550); 7 Jul 2022 18:17:01 -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 28338 invoked from network); 7 Jul 2022 18:17:00 -0000 Date: Thu, 07 Jul 2022 18:16:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1657217807; x=1657477007; bh=GBebDaO6INTOv9xaYeMCtw1i1p5QFGwhr/iJIUeRC9s=; h=Date:To:From:Reply-To:Subject:Message-ID:Feedback-ID:From:To:Cc: Date:Subject:Reply-To:Feedback-ID:Message-ID; b=qRf5xI7t7FFH1eCTPG8PeioOlCJkuoWU0IUlNhusioVpkwFzb67/V43+zsi4ioAlh PITGklpa6QT94ZhAcC27yW7HRubH04sXlkJzPybRrKpgbE8wkRELL9VxHx763Igon2 FHIrAEWwIJOya3DaJ/DVcXKboVRRsylvRb/fm3o4ejX2wllm7fwHX21JU+8e21El7m 96Bv25/YnaZNdCpmZbzLrdpWz++TH5Sz+zuLiQEjsKy05tCf9N9wI6P6oo/TruFrlD nAgTQneHbWcirZZrDAyVPUhj+s5LtfANU4PY7A1CoCzRcjzBleNgvl4jFtwMriwidC +3uYwyaxfkoaw== To: "musl@lists.openwall.com" From: Felix Tailor Message-ID: Feedback-ID: 51466989:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: [musl] resolv.conf misconfiguration, Round-Robin bug in musl or something else? Hello, I have encountered an issue when trying to resolve hosts that have multiple= IPv4 addresses: I get the same IPv4 address for the host. I use ping or wg= et from busybox, which is linked against musl. The issue occurs when there are IPv4 and IPv6 nameservers in resolv.conf. I= f I leave only one nameserver (IPv4 or IPv6), I get different IPv4 values (= Round-Robin) as expected. To reproduce this issue: 1. Install Docker and enable IPv6: https://docs.docker.com/config/daemon/ip= v6/ 2. Execute: docker run --rm -it alpine:3.16.0 sh apk add --no-cache dnsmasq cat </etc/resolv.conf nameserver 127.0.0.1 nameserver ::1 EOF cat </etc/dnsmasq.conf addn-hosts=3D/etc/addn-hosts local=3D/lan/ EOF cat </etc/addn-hosts 127.1.1.1 local.lan 127.2.2.2 local.lan EOF dnsmasq -C /etc/dnsmasq.conf -d & i=3D0; while [ $i -lt 3 ]; do ping -qc1 local.lan; i=3D$((i+1)); done PING local.lan (127.1.1.1) 56(84) bytes of data. --- local.lan ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev =3D 0.006/0.006/0.006/0.000 ms PING local.lan (127.1.1.1) 56(84) bytes of data. --- local.lan ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev =3D 0.004/0.004/0.004/0.000 ms PING local.lan (127.1.1.1) 56(84) bytes of data. --- local.lan ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev =3D 0.004/0.004/0.004/0.000 ms Ping always returns the same IPv4 address, but with nslookup different IPv4= addresses are returned, so Round-Robin seems to work: root@eb8d4fb49d34:/# nslookup local.lan Server:=09=09127.0.0.1 Address:=09127.0.0.1#53 Name:=09local.lan Address: 127.1.1.1 Name:=09local.lan Address: 127.2.2.2 root@eb8d4fb49d34:/# nslookup local.lan Server:=09=09127.0.0.1 Address:=09127.0.0.1#53 Name:=09local.lan Address: 127.2.2.2 Name:=09local.lan Address: 127.1.1.1 root@eb8d4fb49d34:/# nslookup local.lan Server:=09=09127.0.0.1 Address:=09127.0.0.1#53 Name:=09local.lan Address: 127.1.1.1 Name:=09local.lan Address: 127.2.2.2 Questions: 1. Why is Round-Robin not working with musl for hosts with multiple IPv4 ad= dresses when using multiple different IP protocol nameservers in resolv.con= f? 2. Is it reasonable to have multiple different IP protocol nameservers for = localhost in resolv.conf? 3. Is replacing the contents of resolv.conf in this example with 'nameserve= r localhost' a viable solution? Regards, Felix