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
Jonathan Nobels 6006bc92b5
net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873)
fixes tailscale/corp#31299

Fixes two issues:
getInterfaceIndex would occasionally race with netmon's state, returning
the cached default interface index after it had be changed by NWNetworkMonitor.
This had the potential to cause connections to bind to the prior default.  The fix
here is to preferentially use the interface index provided by NWNetworkMonitor
preferentially.

When no interfaces are available, macOS will set the tunnel as the default
interface when an exit node is enabled, potentially causing getInterfaceIndex
to return utun's index.  We now guard against this when taking the
defaultIdx path.

Signed-off-by: Jonathan Nobels <jonathan@tailscale.com>
4 months ago
..
art all: fix new lint warnings from bumping staticcheck 1 year ago
bakedroots tstest/tlstest: simplify, don't even bake in any keys 6 months ago
batching net/batching: fix compile-time assert (#16864) 4 months ago
captivedetection tailcfg: add DERPRegion.NoMeasureNoHome, deprecate+document Avoid [cap 115] 10 months ago
connectproxy net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
connstats {net/connstats,wgengine/magicsock}: fix packet counting in connstats 1 year ago
dns ipn/ipnlocal, net/dns: use slices.Equal to simplify code (#16641) 5 months ago
dnscache net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
dnsfallback net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
flowtrack net/flowtrack: fix, test String method 2 years ago
ipset all: use iterators over slice views more 1 year ago
ktimeout various: disable MPTCP when setting TCP_USER_TIMEOUT sockopt (#15063) 10 months ago
memnet net/{netx,memnet},all: add netx.DialFunc, move memnet Network impl 9 months ago
netaddr all: update copyright and license headers 3 years ago
netcheck net/netcheck: preserve live home DERP through packet loss 7 months ago
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 3 years ago
netkernelconf all: remove non-applicable "linux" deps on Android 8 months ago
netknob all: update copyright and license headers 3 years ago
netmon net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
netns net/{netns, netmon}: use LastKnownDefaultInterface if set and check for utun (#16873) 4 months ago
netstat all: add test for package comments, fix, add comments as needed 1 year ago
netutil net/netmon: publish events to event bus 8 months ago
netx net/{netx,memnet},all: add netx.DialFunc, move memnet Network impl 9 months ago
packet net/{batching,packet},wgengine/magicsock: export batchingConn (#16848) 4 months ago
ping net/ping: fix ICMP echo code field to 0 2 years ago
portmapper ipn,net,tsnet,wgengine: make an eventbus mandatory where it is used (#16594) 5 months ago
proxymux all: cleanup unused code, part 1 (#10661) 2 years ago
routetable net/routetable: don't try to fetch the route table on android 9 months ago
socks5 net/socks5: optimize UDP relay 1 year ago
sockstats net/sockstats: prevent crash in setNetMon (#13985) 1 year ago
speedtest all: update copyright and license headers 3 years ago
stun ci: enable checklocks workflow for specific packages 2 years ago
stunserver all: use Go 1.22 range-over-int 2 years ago
tcpinfo all: use Go 1.22 range-over-int 2 years ago
tlsdial net/tlsdial: fix TLS cert validation of HTTPS proxies 6 months ago
tsaddr net/tsaddr: include test input in test failure output 1 year ago
tsdial net/*: remove Windows exceptions for when Resolver.PreferGo didn't work 6 months ago
tshttpproxy net/tshttpproxy: use errors.New for error creation (#16860) 4 months ago
tstun all: detect JetKVM and specialize a handful of things for it 6 months ago
udprelay net/{batching,packet},wgengine/magicsock: export batchingConn (#16848) 4 months ago
wsconn go.{mod,sum}: migrate from nhooyr.io/websocket to github.com/coder/websocket 1 year ago