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
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>
2 months ago
..
art all: fix new lint warnings from bumping staticcheck 3 months ago
captivedetection net/captivedetection: mark TestAllEndpointsAreUpAndReturnExpectedResponse flaky (#13021) 3 months ago
connstats all: use Go 1.22 range-over-int 7 months ago
dns net/dns/resolver: fix dns-sd NXDOMAIN responses from quad-100 2 months ago
dnscache net/dnscache: use parent context to perform lookup 5 months ago
dnsfallback {control,net}: close idle connections of custom transports 3 months ago
flowtrack net/flowtrack: fix, test String method 5 months ago
ipset go.mod: bump bart 4 months ago
ktimeout net/ktimeout: add a package to set TCP user timeout 9 months ago
memnet net/memnet: export the network name (#9111) 1 year ago
netaddr
netcheck net/netcheck,wgengine/magicsock: plumb OnlyTCP443 controlknob through netcheck (#13491) 2 months ago
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2 years ago
netkernelconf ipn/{ipnlocal,localapi},net/netkernelconf,client/tailscale,cmd/containerboot: optionally enable UDP GRO forwarding for containers (#12410) 5 months ago
netknob
netmon all: fix new lint warnings from bumping staticcheck 3 months ago
netns net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 4 months ago
netstat all: add test for package comments, fix, add comments as needed 4 months ago
netutil all: add test for package comments, fix, add comments as needed 4 months ago
packet wgengine/magicsock: actually use AF_PACKET socket for raw disco 2 months ago
ping net/ping: fix ICMP echo code field to 0 1 year ago
portmapper all: use math/rand/v2 more 5 months ago
proxymux all: cleanup unused code, part 1 (#10661) 11 months ago
routetable net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 7 months ago
socks5 net/socks5: support UDP 3 months ago
sockstats net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 7 months ago
speedtest
stun ci: enable checklocks workflow for specific packages 5 months ago
stunserver all: use Go 1.22 range-over-int 7 months ago
tcpinfo all: use Go 1.22 range-over-int 7 months ago
tlsdial cmd/tta, vnet: add host firewall, env var support, more tests 3 months ago
tsaddr net/ipset, wgengine/filter/filtertype: add split-out packages 5 months ago
tsdial {control,net}: close idle connections of custom transports 3 months ago
tshttpproxy all: use Go 1.22 range-over-int 7 months ago
tstun net/tstun: probe TCP GRO (#13376) 2 months ago
wsconn go.{mod,sum}: migrate from nhooyr.io/websocket to github.com/coder/websocket 3 months ago