tailscale/net
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>
2024-09-18 18:43:03 -07:00
..
art all: fix new lint warnings from bumping staticcheck 2024-08-22 12:31:08 -07:00
captivedetection net/captivedetection: mark TestAllEndpointsAreUpAndReturnExpectedResponse flaky (#13021) 2024-08-03 22:08:55 +00:00
connstats all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
dns net/dns/resolver: fix dns-sd NXDOMAIN responses from quad-100 2024-09-18 18:43:03 -07:00
dnscache net/dnscache: use parent context to perform lookup 2024-06-12 11:21:02 -07:00
dnsfallback {control,net}: close idle connections of custom transports 2024-08-05 17:28:15 +01:00
flowtrack net/flowtrack: fix, test String method 2024-06-18 21:44:44 -07:00
ipset go.mod: bump bart 2024-07-08 19:10:44 -07:00
ktimeout net/ktimeout: add a package to set TCP user timeout 2024-02-20 10:49:58 -08:00
memnet net/memnet: export the network name (#9111) 2023-08-28 11:43:51 -07:00
netaddr all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netcheck net/netcheck,wgengine/magicsock: plumb OnlyTCP443 controlknob through netcheck (#13491) 2024-09-17 12:24:42 -07:00
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2023-04-04 16:32:16 -07:00
netkernelconf ipn/{ipnlocal,localapi},net/netkernelconf,client/tailscale,cmd/containerboot: optionally enable UDP GRO forwarding for containers (#12410) 2024-06-10 19:19:03 +01:00
netknob all: update copyright and license headers 2023-01-27 15:36:29 -08:00
netmon all: fix new lint warnings from bumping staticcheck 2024-08-22 12:31:08 -07:00
netns net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 2024-07-31 12:34:16 -06:00
netstat all: add test for package comments, fix, add comments as needed 2024-07-10 09:57:00 -07:00
netutil all: add test for package comments, fix, add comments as needed 2024-07-10 09:57:00 -07:00
packet wgengine/magicsock: actually use AF_PACKET socket for raw disco 2024-09-03 12:50:09 -04:00
ping net/ping: fix ICMP echo code field to 0 2023-09-15 17:08:39 -07:00
portmapper all: use math/rand/v2 more 2024-06-05 15:24:04 -07:00
proxymux all: cleanup unused code, part 1 (#10661) 2023-12-20 14:50:30 -08:00
routetable net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
socks5 net/socks5: support UDP 2024-08-05 09:25:24 -07:00
sockstats net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
speedtest all: update copyright and license headers 2023-01-27 15:36:29 -08:00
stun ci: enable checklocks workflow for specific packages 2024-06-26 13:55:07 -04:00
stunserver all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tcpinfo all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tlsdial cmd/tta, vnet: add host firewall, env var support, more tests 2024-08-12 15:32:12 -07:00
tsaddr net/ipset, wgengine/filter/filtertype: add split-out packages 2024-06-16 15:25:23 -07:00
tsdial {control,net}: close idle connections of custom transports 2024-08-05 17:28:15 +01:00
tshttpproxy all: use Go 1.22 range-over-int 2024-04-16 15:32:38 -07:00
tstun net/tstun: probe TCP GRO (#13376) 2024-09-05 09:59:31 -07:00
wsconn go.{mod,sum}: migrate from nhooyr.io/websocket to github.com/coder/websocket 2024-08-14 21:23:49 -07:00