From: Dalton Hubble <dghubble@gmail.com>
To: musl@lists.openwall.com
Subject: [musl] musl resolver handling of "search ." in /etc/resolv.conf
Date: Wed, 31 Aug 2022 10:33:05 -0700 [thread overview]
Message-ID: <CAC1FGz1iHNTrNsehFMc-BkkbOwC2tDV5xhhetKHzC7CdqOTnHg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
Hey folks,
I wanted to flag a possible issue with musl handling of DNS "search ." in
/etc/resolv.conf.The easiest way I have to repro and consume musl is
starting an alpine or busybox musl container image.
podman run -it docker.io/alpine:3.16.2 /bin/ash
Edit /etc/resolv.conf to the following (not the "." at the end of search):
```
search default.svc.cluster.local .
nameserver 8.8.8.8
options ndots:5
```
```
wget www.google.com
wget: bad address 'www.google.com'
```
Remove the "." from search and wget will work fine again.
https://github.com/coreos/fedora-coreos-tracker/issues/1287 has some great
details showing DNS packet capture and a malformed packet.
Broader context is that systemd and recently Kubernetes start adding
"search ." to resolv.conf in certain scenarios, which seems to break
musl-based resolvers.
- https://github.com/systemd/systemd/pull/17201
- https://github.com/kubernetes/kubernetes/pull/109441
- https://github.com/kubernetes/kubernetes/issues/112135
--
Dalton Hubble
dghubble@gmail.com
[-- Attachment #2: Type: text/html, Size: 2092 bytes --]
next reply other threads:[~2022-08-31 17:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-31 17:33 Dalton Hubble [this message]
2022-08-31 23:59 ` Rich Felker
2022-09-01 1:32 ` Jeffrey Walton
2022-09-01 12:45 ` Rich Felker
2022-09-01 16:03 ` Luca BRUNO
2022-09-01 18:01 ` Rich Felker
2022-09-02 8:09 ` Luca BRUNO
2022-09-19 17:18 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAC1FGz1iHNTrNsehFMc-BkkbOwC2tDV5xhhetKHzC7CdqOTnHg@mail.gmail.com \
--to=dghubble@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).