summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2021-08-26net/interfaces: fix default route lookup on Windowsbradfitz/win_default_routeBrad Fitzpatrick1-10/+64
It wasn't using the right metric. Apparently you're supposed to sum the route metric and interface metric. Whoops. While here, optimize a few little things too, not that this code should be too hot. Fixes #2707 (at least; probably dups but I'm failing to find) Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-26cmd/tailscaled: add debug flag to print interfaces just onceBrad Fitzpatrick1-3/+13
It previously only had a polling monitor mode. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-25net/portmapper: fix "running a test" condition.David Anderson1-1/+13
Fixes #2686. Signed-off-by: David Anderson <danderson@tailscale.com>
2021-08-25wgengine/netstack: fix crash in userspace netstack TCP forwardingBrad Fitzpatrick1-9/+36
Fixes #2658 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-25tailcfg,ipn/ipnlocal: support DNSConfig.Routes with empty values [mapver 23]Brad Fitzpatrick2-3/+22
Fixes #2706 Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-24fix: typo spelling grammarslowy0712-14/+14
Signed-off-by: slowy07 <slowy.arfy@gmail.com>
2021-08-23VERSION.txt: new unstable v1.15.0Denton Gentry1-1/+1
Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-08-23wgengine/magicsock: restore a bit of logging on node becoming activeBrad Fitzpatrick1-6/+41
Fixes #2695 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-23tsweb: add vars for unix process start time and versionBrad Fitzpatrick1-0/+3
To be scraped in the Go expvar JSON format, as a string is involved. For a future tool to record when processes restarted exactly, and at what version. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-23version: bump dateBrad Fitzpatrick1-1/+1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-22hostinfo: set DeviceModel from Linux devicetree modelBrad Fitzpatrick1-0/+7
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-22hostinfo: fix earlier git fail, add files lost in moveBrad Fitzpatrick3-0/+161
This was meant to be part of 47045265b9b340418fbfe08e50297dc875e54ce9 which instead deleted them :( Updates tailscale/corp#1959
2021-08-22api.md: add acl validation docsAaditya Chaudhary1-0/+45
Signed-off-by: Aaditya Chaudhary <32117362+AadityaChaudhary@users.noreply.github.com>
2021-08-21net/dns: resolveConfExists reading the wrong errorDavid Crawshaw1-1/+2
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2021-08-21ipn/ipnlocal: update requested tags in host infoMatt Drollette1-3/+2
Fixes #2641 Signed-off-by: Matt Drollette <matt@drollette.com>
2021-08-21derp: fix meshing accounting edge case bugBrad Fitzpatrick2-1/+2
If a peer is connected to multiple nodes in a region (so multiForwarder is in use) and then a node restarts and re-sends all its additions, this bug about whether an element is in the multiForwarder could cause a one-time flip in the which peer node we forward to. Note a huge deal, but not written as intended. Thanks to @lewgun for the bug report in #2141. Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-21words: add more tails and scalesAlessandro Mingione2-0/+10
Signed-off-by: Alessandro Mingione <alessandro@tailscale.com>
2021-08-20Revert "wgengine: actively log FlushDNS."Denton Gentry1-1/+0
This log is quite verbose, it was only to be left in for one unstable build to help debug a user issue. This reverts commit 1dd25520326f0adc1d37c12710c9f33c830a7ef5. Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-08-20hostinfo: add SetDeviceModel setter, move remaining code from controlclientBrad Fitzpatrick9-207/+69
Updates tailscale/corp#1959 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-19cmd/testcontrol: add test control serverJosh Bleecher Snyder2-0/+126
This is useful for manual performance testing of networks with many nodes. I imagine it'll grow more knobs over time. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-19wgengine: actively log FlushDNS.Denton Gentry1-0/+1
Intended to help in resolving customer issue with DNS caching. We currently exec `ipconfig /flushdns` from two places: - SetDNS(), which logs before invoking - here in router_windows, which doesn't We'd like to see a positive indication in logs that flushdns is being run. As this log is expected to be spammy, it is proposed to leave this in just long enough to do an unstable 1.13.x build and then revert it. They won't run an unsigned image that I build. Signed-off-by: Denton Gentry <dgentry@tailscale.com>
2021-08-19net/dns: avoid Linux PolicyKit GUI dialog during testsBrad Fitzpatrick1-2/+11
Fixes #2672 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-19cmd/tailscale: fix sporadic 'context canceled' error on 'up'Brad Fitzpatrick1-0/+12
Fixes #2333 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-19client/tailscale,ipn/localapi: warn on tailscale/tailscaled version skewBrad Fitzpatrick2-0/+7
Fixes #1905 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-19version: bump dateBrad Fitzpatrick1-1/+1
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18portlist: fix build tag to build only on macOS, not macOS+iOS.David Anderson1-2/+2
2021-08-18wgengine: predict min.Peers length across callsJosh Bleecher Snyder1-1/+3
The number of peers we have will be pretty stable across time. Allocate roughly the right slice size. This reduces memory usage when there are many peers. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-18wgengine/userspace: reduce allocations in getStatusJosh Bleecher Snyder1-9/+20
Two optimizations. Use values instead of pointers. We were using pointers to make track the "peer in progress" easier. It's not too hard to do it manually, though. Make two passes through the data, so that we can size our return value accurately from the beginning. This is cheap enough compared to the allocation, which grows linearly in the number of peers, that it is worth doing. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-18Makefile: add a linux/arm checkBrad Fitzpatrick1-1/+4
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18net/tstun: fix build on armMaisem Ali1-3/+3
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-08-18tstest/integration/testcontrol: sort peers in map responseJosh Bleecher Snyder1-0/+3
This is part of the control protocol. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-18net/portmapper: fix t.Log-after-test-done race in testsBrad Fitzpatrick1-2/+9
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18tailscaled: try migrating old state on synology devicesMaisem Ali1-0/+31
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-08-18wgengine/router: pass in AmbientCaps when calling `ip rule`Maisem Ali2-3/+25
Signed-off-by: Maisem Ali <maisem@tailscale.com>
2021-08-18ipn/localapi: refresh ACME certs in background two weeks in advanceBrad Fitzpatrick2-26/+70
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18control/controlclient: tweak a couple error messagesBrad Fitzpatrick1-2/+2
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18client/tailscale: make GetCertificate guess cert if SNI lacks dotsBrad Fitzpatrick2-1/+29
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-18tailcfg: add IP and Types field to PingRequestSimeng He4-1/+126
Signed-off-by: Simeng He <simeng@tailscale.com>
2021-08-18cmd/tailscale/cli: only write cert file if it changedBrad Fitzpatrick2-6/+28
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-17ipn/localapi: move cert fetching code to localapi, cache, add cert subcommandBrad Fitzpatrick9-254/+521
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-08-17control/controlclient: do not periodically print full netmapJosh Bleecher Snyder2-7/+12
The netmaps can get really large. Printing, processing, and uploading them is expensive. Only print the header on an ongoing basis. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17ipn/ipnlocal: log number of packet filters rather than entire filterJosh Bleecher Snyder1-1/+1
The number of packet filters can grow very large, so this log entry can be very large. We can get the packet filter server-side, so reduce verbosity here to just the number of filters present. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17logtail: add a re-usable buffer for uploadsJosh Bleecher Snyder1-3/+5
This avoids a per-upload alloc (which in practice often means per-log-line), up to 4k. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17logtail: always send a json arrayJosh Bleecher Snyder2-39/+23
The code goes to some effort to send a single JSON object when there's only a single line and a JSON array when there are multiple lines. It makes the code more complex and more expensive; when we add a second line, we have to use a second buffer to duplicate the first one after adding a leading square brackets. The savings come to two bytes. Instead, always send an array. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17logtail/filch: preallocate a scanner bufferJosh Bleecher Snyder2-0/+19
Scanning log lines is a frequent source of allocations. Pre-allocate a re-usable buffer. This still doesn't help when there are giant log lines. Those will still be problematic from an iOS memory perspective. For more on that, see https://github.com/tailscale/corp/issues/2423. (For those who cannot follow that link, it is a discussion of particular problematic types of log lines for particular categories of customers. The "categories of customers" part is the reason that it is a private issue.) There is also a latent bug here. If we ever encounter a log line longer than bufio.MaxScanTokenSize, then bufio.Scan will return an error, and we'll truncate the file and discard the rest of the log. That's not good, but bufio.MaxScanTokenSize is really big, so it probably doesn't matter much in practice now. Unfortunately, it does prevent us from easily capping the potential memory usage here, on pain of losing log entries. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17net/tstun: use unix.Ifreq type for Linux TAP interface configurationMatt Layher4-23/+28
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2021-08-17all: simplify build tags involving iOSJosh Bleecher Snyder6-13/+12
Prior to Go 1.16, iOS used GOOS=darwin, so we had to distinguish macOS from iOS during GOARCH. We now require Go 1.16 in our go.mod, so we can simplify. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17all: simplify ts_macext build tagsJosh Bleecher Snyder2-4/+6
Now that we have the easier-to-parse go:build build tags, it is straightforward to simplify them. Yay. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-17syncs: bump known good version to include Go 1.17Josh Bleecher Snyder4-6/+6
Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
2021-08-16cmd/tailscale/cli: fix cert fetch WaitOrder retry loop, misc cleanupsBrad Fitzpatrick1-9/+28
Updates #1235 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>