mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] musl resolver handling of "search ." in /etc/resolv.conf
@ 2022-08-31 17:33 Dalton Hubble
  2022-08-31 23:59 ` Rich Felker
  0 siblings, 1 reply; 8+ messages in thread
From: Dalton Hubble @ 2022-08-31 17:33 UTC (permalink / raw)
  To: musl

[-- 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 --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-09-19 17:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-31 17:33 [musl] musl resolver handling of "search ." in /etc/resolv.conf Dalton Hubble
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

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).