You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net/dns
James Tucker af5a845a87 net/dns/resolver: fix dns-sd NXDOMAIN responses from quad-100
mdnsResponder at least as of macOS Sequoia does not find NXDOMAIN
responses to these dns-sd PTR queries acceptable unless they include the
question section in the response. This was found debugging #13511, once
we turned on additional diagnostic reporting from mdnsResponder we
witnessed:

```
Received unacceptable 12-byte response from 100.100.100.100 over UDP via utun6/27 -- id: 0x7F41 (32577), flags: 0x8183 (R/Query, RD, RA, NXDomain), counts: 0/0/0/0,
```

If the response includes a question section, the resposnes are
acceptable, e.g.:

```
Received acceptable 59-byte response from 8.8.8.8 over UDP via en0/17 -- id: 0x2E55 (11861), flags: 0x8183 (R/Query, RD, RA, NXDomain), counts: 1/0/0/0,
```

This may be contributing to an issue under diagnosis in #13511 wherein
some combination of conditions results in mdnsResponder no longer
answering DNS queries correctly to applications on the system for
extended periods of time (multiple minutes), while dig against quad-100
provides correct responses for those same domains. If additional debug
logging is enabled in mdnsResponder we see it reporting:

```
Penalizing server 100.100.100.100 for 60 seconds
```

It is also possible that the reason that macOS & iOS never "stopped
spamming" these queries is that they have never been replied to with
acceptable responses. It is not clear if this special case handling of
dns-sd PTR queries was ever beneficial, and given this evidence may have
always been harmful. If we subsequently observe that the queries settle
down now that they have acceptable responses, we should remove these
special cases - making upstream queries very occasionally isn't a lot of
battery, so we should be better off having to maintain less special
cases and avoid bugs of this class.

Updates #2442
Updates #3025
Updates #3363
Updates #3594
Updates #13511

Signed-off-by: James Tucker <james@tailscale.com>
1 month ago
..
publicdns net/dns/publicdns: remove additional information in DOH URL passed to IPv6 address generation for controlD. 4 months ago
recursive
resolvconffile
resolver net/dns/resolver: fix dns-sd NXDOMAIN responses from quad-100 1 month ago
config.go all: add test for package comments, fix, add comments as needed 4 months ago
debian_resolvconf.go
direct.go
direct_linux.go net/dns: updated gonotify dependency to v2 that supports closable context 2 months ago
direct_notlinux.go
direct_test.go
direct_unix_test.go
flush_default.go
flush_windows.go
ini.go
ini_test.go
manager.go cli: implement `tailscale dns status` (#13353) 2 months ago
manager_darwin.go net/dns: support GetBaseConfig on Darwin OSS tailscaled (#13351) 2 months ago
manager_default.go
manager_freebsd.go
manager_linux.go
manager_linux_test.go
manager_openbsd.go
manager_tcp_test.go net/dns, health: raise health warning for failing forwarded DNS queries (#12888) 3 months ago
manager_test.go
manager_windows.go net/dns: disable DNS registration for Tailscale interface on Windows 2 months ago
manager_windows_test.go
nm.go
noop.go
nrpt_windows.go
openresolv.go
osconfig.go net/dns: fix IsZero and Equal methods on OSConfig 2 months ago
osconfig_test.go net/dns: fix IsZero and Equal methods on OSConfig 2 months ago
resolvconf-workaround.sh
resolvconf.go
resolvconfpath_default.go
resolvconfpath_gokrazy.go
resolvd.go
resolved.go
utf.go
utf_test.go
wsl_windows.go