summaryrefslogtreecommitdiffhomepage
AgeCommit message (Collapse)AuthorFilesLines
2023-10-11types/ipproto: import and test string parsing for ipprotoJames Tucker5-2/+245
IPProto has been being converted to and from string formats in multiple locations with variations in behavior. TextMarshaller and JSONMarshaller implementations are now added, along with defined accepted and preferred formats to centralize the logic into a single cross compatible implementation. Updates tailscale/corp#15043 Fixes tailscale/corp#15141 Signed-off-by: James Tucker <james@tailscale.com>
2023-10-11ipn/ipnlocal: fix log spam from now expected pathsMaisem Ali1-12/+22
These log paths were actually unexpected until the refactor in fe95d81b43df14c7b4dcf68c764816a430206d24. This moves the logs to the callsites where they are actually unexpected. Fixes #9670 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-11net/packet: split off checksum munging into different pkgMaisem Ali11-405/+451
The current structure meant that we were embedding netstack in the tailscale CLI and in the GUIs. This removes that by isolating the checksum munging to a different pkg which is only called from `net/tstun`. Fixes #9756 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-11wgengine/filter: use slices.Contains in another placeBrad Fitzpatrick1-11/+3
We keep finding these. Updates #cleanup Change-Id: Iabc049b0f8da07341011356f0ecd5315c33ff548 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-11words: Na na na na na na na na na na na na na na na na (#9753)James 'zofrex' Sanderson1-0/+1
So gnarly! Updates tailscale/corp#14698 Signed-off-by: James Sanderson <jsanderson@tailscale.com>
2023-10-11util/nocasemaps: import nocasemaps from corpJames Tucker2-0/+243
This is a dependency of other code being imported later. Updates tailscale/corp#15043 Signed-off-by: James Tucker <james@tailscale.com>
2023-10-11cmd/containerboot: use linuxfw.NetfilterRunnerMaisem Ali5-65/+352
This migrates containerboot to reuse the NetfilterRunner used by tailscaled instead of manipulating iptables rule itself. This has the added advantage of now working with nftables and we can potentially drop the `iptables` command from the container image in the future. Updates #9310 Co-authored-by: Irbe Krumina <irbe@tailscale.com> Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-11client/web: remove unused context param from NewServerSonia Appasamy3-6/+3
Updates tailscale/corp#14335 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-10-11util/linuxfw: move fake runner into pkgMaisem Ali2-141/+131
This allows using the fake runner in different packages that need to manage filter rules. Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-11tsnet: support registering fallback TCP flow handlersTom DNetto2-4/+87
For the app connector use-case, it doesnt make sense to use listeners, because then you would need to register thousands of listeners (for each proto/service/port combo) to handle ranges. Instead, we plumb through the TCPHandlerForFlow abstraction, to avoid using the listeners abstraction that would end up being a bit messy. Signed-off-by: Tom DNetto <tom@tailscale.com> Updates: https://github.com/tailscale/corp/issues/15038
2023-10-11clientupdate/distsign: add new prod root signing key to keychainDavid Anderson1-1/+1
Updates tailscale/corp#15179 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-10-11net/dns: properly detect newer debian resolvconfGalen Guyer1-1/+6
Tailscale attempts to determine if resolvconf or openresolv is in use by running `resolvconf --version`, under the assumption this command will error when run with Debian's resolvconf. This assumption is no longer true and leads to the wrong commands being run on newer versions of Debian with resolvconf >= 1.90. We can now check if the returned version string starts with "Debian resolvconf" if the command is successful. Fixes #9218 Signed-off-by: Galen Guyer <galen@galenguyer.com>
2023-10-11util/cmpver: only consider ascii numerals (#9741)Paul Scott2-12/+31
Fixes #9740 Signed-off-by: Paul Scott <paul@tailscale.com>
2023-10-10types/ipproto: drop IPProto from IPProtoVersionMaisem Ali3-21/+21
Based on https://github.com/golang/go/wiki/CodeReviewComments#package-names. Updates #cleanup Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-10util/linuxfw: move detection logicMaisem Ali9-219/+248
Just a refactor to consolidate the firewall detection logic in a single package so that it can be reused in a later commit by containerboot. Updates #9310 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-10tool/gocross: handle VERSION file not foundMaisem Ali1-1/+4
Fixes #9734 Signed-off-by: Maisem Ali <maisem@tailscale.com>
2023-10-10util/linuxfw: add missing input rule to the tailscale tunJames Tucker4-1/+89
Add an explicit accept rule for input to the tun interface, as a mirror to the explicit rule to accept output from the tun interface. The rule matches any packet in to our tun interface and accepts it, and the rule is positioned and prioritized such that it should be evaluated prior to conventional ufw/iptables/nft rules. Updates #391 Fixes #7332 Updates #9084 Signed-off-by: James Tucker <james@tailscale.com>
2023-10-10clientupdate: abort if current version is newer than latest (#9733)Andrew Lytvynov4-4/+9
This is only relevant for unstable releases and local builds. When local version is newer than upstream, abort release. Also, re-add missing newlines in output that were missed in https://github.com/tailscale/tailscale/pull/9694. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-10tailcfg: add type for web client auth responseWill Norris1-0/+16
This will be returned from the upcoming control endpoints for doing web client session authentication. Updates tailscale/corp#14335 Signed-off-by: Will Norris <will@tailscale.com>
2023-10-10go.mod.sri: update SRI hash for go.mod changesFlakes Updater3-3/+3
Signed-off-by: Flakes Updater <noreply+flakes-updater@tailscale.com>
2023-10-10licenses: update tailscale{,d} licensesLicense Updater1-4/+5
Signed-off-by: License Updater <noreply+license-updater@tailscale.com>
2023-10-10go.toolchain.rev: bump for CVE-2023-39325Brad Fitzpatrick1-1/+1
Updates tailscale/corp#15165 Change-Id: Ib001cfb44eb3e6d735dfece9bd3ae9eea13048c9 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-10go.mod: bump x/net to 0.17 for CVE-2023-39325Brad Fitzpatrick3-13/+13
https://go.googlesource.com/net/+/b225e7ca6dde1ef5a5ae5ce922861bda011cfabd Updates tailscale/corp#15165 Change-Id: Ia8b5e16b1acfe1b2400d321034b41370396f70e2 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-10ipn/localapi: make whois take IP or IP:port as documented, fix capmap ↵Brad Fitzpatrick2-7/+92
netstack lookup The whois handler was documented as taking IP (e.g. 100.101.102.103) or IP:port (e.g. usermode 127.0.0.1:1234) but that got broken at some point and we started requiring a port always. Fix that. Also, found in the process of adding tests: fix the CapMap lookup in userspace mode (it was always returning the caps of 127.0.0.1 in userspace mode). Fix and test that too. Updates #9714 Change-Id: Ie9a59744286522fa91c4b70ebe89a1e94dbded26 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-10ipn/ipnlocal: use syspolicy to determine collection of posture dataKristoffer Dalby3-4/+17
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09posture: add get serial support for macOSKristoffer Dalby3-3/+114
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09posture: add get serial support for Windows/LinuxKristoffer Dalby8-3/+217
This commit adds support for getting serial numbers from SMBIOS on Windows/Linux (and BSD) using go-smbios. Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09wgengine/magicsock: add probed MTU metricsVal2-11/+43
Record the number of MTU probes sent, the total bytes sent, the number of times we got a successful return from an MTU probe of a particular size, and the max MTU recorded. Updates #311 Signed-off-by: Val <valerie@tailscale.com>
2023-10-09disco,net/tstun,wgengine/magicsock: probe peer MTUVal7-40/+91
Automatically probe the path MTU to a peer when peer MTU is enabled, but do not use the MTU information for anything yet. Updates #311 Signed-off-by: Val <valerie@tailscale.com>
2023-10-09tailcfg,ipn: add c2n endpoint for posture identityKristoffer Dalby2-0/+44
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09posture: add get serial stub for all platformsKristoffer Dalby2-0/+12
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09cmd/tailscale: add --posture-checking flag to setKristoffer Dalby2-0/+6
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-09ipn: add PostureChecks to PrefsKristoffer Dalby4-1/+21
Updates #5902 Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2023-10-08sniproxy allows configuration of hostnameSimon Leonhardt1-0/+2
Signed-off-by: Simon Leonhardt <simon@controlzee.com>
2023-10-06cmd/tailscale, magicsock: add debug command to flip DERP homesBrad Fitzpatrick4-0/+40
For testing netmap patchification server-side. Updates #1909 Change-Id: Ib1d784bd97b8d4a31e48374b4567404aae5280cc Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-06docs/sysv: add a sysv style init scriptJames Tucker1-0/+63
The script depends on a sufficiently recent start-stop-daemon as to provide the `-m` and `--remove-pidfile` flags. Updates #9502 Signed-off-by: James Tucker <james@tailscale.com>
2023-10-06tstest: make ResourceCheck panic on parallel testsBrad Fitzpatrick2-1/+13
To find potential flakes earlier. Updates #deflake-effort Change-Id: I52add6111d660821c3a23d4b1dd032821344bc48 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-06syncs: add Map.LoadOrInit for lazily initialized valuesJames Tucker2-1/+25
I was reviewing some code that was performing this by hand, and wanted to suggest using syncs.Map, however as the code in question was allocating a non-trivial structure this would be necessary to meet the target. Updates #cleanup Signed-off-by: James Tucker <james@tailscale.com>
2023-10-06taildrop: document and cleanup the package (#9699)Joe Tsai6-138/+157
Changes made: * Unexport declarations specific to internal taildrop functionality. * Document all exported functionality. * Move TestRedactErr to the taildrop package. * Rename and invert Handler.DirectFileDoFinalRename as AvoidFinalRename. Updates tailscale/corp#14772 Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2023-10-06clientupdate,cmd/tailscale/cli: use cli.Stdout/Stderr (#9694)Andrew Lytvynov2-22/+34
In case cli.Stdout/Stderr get overriden, all CLI output should use them instead of os.Stdout/Stderr. Update the `update` command to follow this pattern. Updates #cleanup Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-06api.md: remove clientConnectivity.derp fieldBrad Fitzpatrick1-4/+0
We don't actually send this. It's always been empty. Updates tailscale/corp#13400 Change-Id: I99b3d7a355fca17d2159bf81ede5be4ddd4b9dc9 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-06{ipn/ipnlocal, taildrop}: move put logic to taildrop (#9680)Rhea Ghosh7-283/+312
Cleaning up taildrop logic for sending files. Updates tailscale/corp#14772 Signed-off-by: Rhea Ghosh <rhea@tailscale.com> Co-authored-by: Joe Tsai <joetsai@digital-static.net>
2023-10-05tool/gocross: don't absorb --tags flags passed to subcommandDavid Anderson2-5/+56
Fixes tailscale/corp#15117 Signed-off-by: David Anderson <danderson@tailscale.com>
2023-10-05go.toolchain.rev: bump go to 1.21.2 (#9677)Andrew Lytvynov1-1/+1
Updates https://github.com/tailscale/go/pull/75 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-05ipn/ipnlocal: cleanup incomingFile (#9678)Joe Tsai1-16/+18
This is being moved to taildrop, so clean it up to stop depending on so much unreleated functionality by removing a dependency on peerAPIHandler. Updates tailscale/corp#14772 Signed-off-by: Joe Tsai <joetsai@digital-static.net> Co-authored-by: Rhea Ghosh <rhea@tailscale.com>
2023-10-05cmd/tailscale/cli: add update notification to "up" (#9644)Andrew Lytvynov2-1/+11
Add available update message in "tailscale up" output. Also update the message in "tailscale status" to match and mention auto-update. Updates https://github.com/tailscale/tailscale/issues/755 Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
2023-10-05taildrop: initial commit of taildrop functionality refactoring (#9676)Rhea Ghosh6-428/+497
Over time all taildrop functionality will be contained in the taildrop package. This will include end to end unit tests. This is simply the first smallest piece to move over. There is no functionality change in this commit. Updates tailscale/corp#14772 Signed-off-by: Rhea Ghosh <rhea@tailscale.com> Co-authored-by: Joseph Tsai <joetsai@tailscale.com>
2023-10-05client/web: restrict full management client behind browser sessionsSonia Appasamy3-5/+354
Adds `getTailscaleBrowserSession` to pull the user's session out of api requests, and `serveTailscaleAuth` to provide the "/api/auth" endpoint for browser to request auth status and new sessions. Updates tailscale/corp#14335 Signed-off-by: Sonia Appasamy <sonia@tailscale.com>
2023-10-05net/dns/resolver, ipnlocal: fix ExitDNS on Android and iOSBrad Fitzpatrick2-5/+14
Advertise it on Android (it looks like it already works once advertised). And both advertise & likely fix it on iOS. Yet untested. Updates #9672 Change-Id: If3b7e97f011dea61e7e75aff23dcc178b6cf9123 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-10-05hostinfo, ipnlocal: flesh out Wake-on-LAN support, send MACs, add c2n senderBrad Fitzpatrick8-9/+183
This optionally uploads MAC address(es) to control, then adds a c2n handler so control can ask a node to send a WoL packet. Updates #306 RELNOTE=now supports waking up peer nodes on your LAN via Wake-on-LAN packets Change-Id: Ibea1275fcd2048dc61d7059039abfbaf1ad4f465 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>