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>
2022-02-03 09:31:25 -08:00
..
dns net/dns/resolvd: properly handle not having "search" entries 2022-01-31 15:11:28 -08:00
dnscache envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
dnsfallback net/netns: thread logf into control functions 2021-11-18 15:09:51 -08:00
flowtrack all: use testingutil.MinAllocsPerRun 2021-10-28 12:48:37 -07:00
interfaces net/interfaces: bound Linux /proc/net/route parsing 2022-02-03 09:31:25 -08:00
netcheck envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
neterror net/{neterror,dns/resolver}: move PacketWasTruncated to neterror from DNS code 2022-01-03 14:03:30 -08:00
netknob all: disable TCP keep-alives on iOS/Android 2021-09-28 12:03:18 -07:00
netns net/netns: remove a useless probe of the "ip" command 2022-01-11 17:47:06 -08:00
netstat all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
nettest net/nettest: deflake TestPipeTimeout 2021-11-30 12:21:59 -08:00
packet wgengine/netstack: clear TCP ECN bits before giving to gvisor 2022-01-19 20:09:24 -08:00
portmapper netcheck,portmapper,magicsock: ignore some UDP write errors on Linux 2021-12-31 08:27:21 -08:00
proxymux net/proxymux: add a listener mux that can run SOCKS and HTTP on a single socket. 2021-11-29 16:49:48 -08:00
socks5 net/tsdial: start of new package to unify all outbound dialing complexity 2021-11-30 17:21:49 -08:00
speedtest all: fix spelling mistakes 2021-10-12 21:23:14 -07:00
stun all: gofmt with Go 1.17 2021-08-05 15:54:00 -07:00
tlsdial envknob: add new package for all the strconv.ParseBool(os.Getenv(..)) 2022-01-24 11:51:23 -08:00
tsaddr ipnlocal, net/{dns,tsaddr,tstun}, wgengine: support MagicDNS on IPv6 2022-01-04 14:37:22 -08:00
tsdial net/dnscache, net/tsdial: add DNS caching to tsdial UserDial 2021-12-09 11:34:21 -08:00
tshttpproxy net/tshttpproxy: use correct size for Windows BOOL argument 2021-11-22 12:24:24 -08:00
tstun go.mod: bump netstack, switch to upstream netstack 2022-01-26 11:30:03 -08:00