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
Brad Fitzpatrick 2a67beaacf net/interfaces: bound Linux /proc/net/route parsing
tailscaled was using 100% CPU on a machine with ~1M lines, 100MB+
of /proc/net/route data.

Two problems: in likelyHomeRouterIPLinux, we didn't stop reading the
file once we found the default route (which is on the first non-header
line when present). Which meant it was finding the answer and then
parsing 100MB over 1M lines unnecessarily. Second was that if the
default route isn't present, it'd read to the end of the file looking
for it. If it's not in the first 1,000 lines, it ain't coming, or at
least isn't worth having. (it's only used for discovering a potential
UPnP/PMP/PCP server, which is very unlikely to be present in the
environment of a machine with a ton of routes)

Change-Id: I2c4a291ab7f26aedc13885d79237b8f05c2fd8e4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
3 years ago
..
dns net/dns/resolvd: properly handle not having "search" entries 3 years ago
dnscache envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 3 years ago
dnsfallback net/netns: thread logf into control functions 3 years ago
flowtrack all: use testingutil.MinAllocsPerRun 3 years ago
interfaces net/interfaces: bound Linux /proc/net/route parsing 3 years ago
netcheck envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 3 years ago
neterror net/{neterror,dns/resolver}: move PacketWasTruncated to neterror from DNS code 3 years ago
netknob all: disable TCP keep-alives on iOS/Android 3 years ago
netns net/netns: remove a useless probe of the "ip" command 3 years ago
netstat all: gofmt with Go 1.17 3 years ago
nettest net/nettest: deflake TestPipeTimeout 3 years ago
packet wgengine/netstack: clear TCP ECN bits before giving to gvisor 3 years ago
portmapper netcheck,portmapper,magicsock: ignore some UDP write errors on Linux 3 years ago
proxymux net/proxymux: add a listener mux that can run SOCKS and HTTP on a single socket. 3 years ago
socks5 net/tsdial: start of new package to unify all outbound dialing complexity 3 years ago
speedtest all: fix spelling mistakes 3 years ago
stun all: gofmt with Go 1.17 3 years ago
tlsdial envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 3 years ago
tsaddr ipnlocal, net/{dns,tsaddr,tstun}, wgengine: support MagicDNS on IPv6 3 years ago
tsdial net/dnscache, net/tsdial: add DNS caching to tsdial UserDial 3 years ago
tshttpproxy net/tshttpproxy: use correct size for Windows BOOL argument 3 years ago
tstun go.mod: bump netstack, switch to upstream netstack 3 years ago