Commit Graph
5964 Commits
Author SHA1 Message Date
Val 0a6ddae0de tmp: introduce wire/user/safe mtu 2023-08-07 23:05:24 +02:00
Val 7d18398d7f tmp: more callmemaybe debugging 2023-08-07 21:04:10 +02:00
Val 01ed896b4d tmp: add both kinds of mtu to printout of probe 2023-08-04 11:02:07 +02:00
Val c3fac3f6a5 tmp: cut down on probe mtus for debugging 2023-08-03 18:03:26 +02:00
Val bebb0dc684 Debugging printfs for PTB and MTU
Signed-off-by: Val <[email protected]>
2023-08-02 15:34:19 +02:00
salman aec143eb97 WIP wgengine: inject ICMP PTB for oversize packets
Now with IPv4/6 header math.
2023-08-02 15:34:00 +02:00
Val 1f7de20fe1 wgengine/magicsock: probe likely mtus when connecting to peers
Updates #311

Signed-off-by: Val <[email protected]>
2023-08-02 13:49:35 +02:00
Val 4bfeb8b483 wgengine/magicsock: add metric to record highest MTU
Record the highest MTU we probe on any link at any time.

Updates #311

Signed-off-by: Val <[email protected]>
2023-08-01 21:29:55 +02:00
Val c989d08ac7 wgengine/magicsock: record best mtu to an endpoint
Record any mtu information we get from CLI ping, but do not use it
yet.

Updates #311

Signed-off-by: Val <[email protected]>
2023-08-01 21:29:47 +02:00
Val b43c20872e tmp: reminder to update max udp header when we start using bigger mtus 2023-07-31 20:58:36 +02:00
Val 9438ed7438 For merge: don't pad the pong reply
Signed-off-by: Val <[email protected]>
2023-07-29 21:58:45 +02:00
Val f113eec45b For merge: add payload size to ping log message 2023-07-29 21:17:21 +02:00
salmanandVal 7e9ed47026 wgengine,ipn,cmd/tailscale: add size option to ping
This adds the capability to pad disco ping message payloads to reach a
specified size. It also plumbs it through to the tailscale ping -size
flag.

Disco pings used for actual endpoint discovery do not use this yet.

Updates #311.

Co-authored-by: Val <[email protected]>
Signed-off-by: salman <[email protected]>
2023-07-29 21:17:21 +02:00
Valandsalman c661d61e24 magicsock: set the don't fragment sockopt
This sets the Don't Fragment flag, for now behind the TS_DEBUG_PMTUD
envknob.

Updates #311.

Co-authored-by: salman <[email protected]>
Signed-off-by: Val <[email protected]>
2023-07-29 21:17:21 +02:00
Claire Wang 90a7d3066c derp: use tstime (#8634)
Updates #8587

Signed-off-by: Claire Wang <[email protected]>
2023-07-27 15:56:33 -04:00
Claire Wang 2315bf246a ipn: use tstime (#8597)
Updates #8587
Signed-off-by: Claire Wang <[email protected]>
2023-07-27 15:41:31 -04:00
Andrew Lytvynov c1ecae13ab ipn/{ipnlocal,localapi}: actually renew certs before expiry (#8731)
While our `shouldStartDomainRenewal` check is correct, `getCertPEM`
would always bail if the existing cert is not expired. Add the same
`shouldStartDomainRenewal` check to `getCertPEM` to make it proceed with
renewal when existing certs are still valid but should be renewed.

The extra check is expensive (ARI request towards LetsEncrypt), so cache
the last check result for 1hr to not degrade `tailscale serve`
performance.

Also, asynchronous renewal is great for `tailscale serve` but confusing
for `tailscale cert`. Add an explicit flag to `GetCertPEM` to force a
synchronous renewal for `tailscale cert`.

Fixes #8725

Signed-off-by: Andrew Lytvynov <[email protected]>
2023-07-27 12:29:40 -07:00
tinku-tailscale aa37be70cf api.md: update device authorize API docs to allow for deauth (#8728)
Signed-off-by: tinku-tailscale <[email protected]>
2023-07-27 15:30:14 +01:00
Charlotte Brandhorst-Satzkorn 35bdbeda9f cli: introduce exit-node subcommand to list and filter exit nodes
This change introduces a new subcommand, `exit-node`, along with a
subsubcommand of `list` and a `--filter` flag.

Exit nodes without location data will continue to be displayed when
`status` is used. Exit nodes with location data will only be displayed
behind `exit-node list`, and in status if they are the active exit node.

The `filter` flag can be used to filter exit nodes with location data by
country.

Exit nodes with Location.Priority data will have only the highest
priority option for each country and city listed. For countries with
multiple cities, a <Country> <Any> option will be displayed, indicating
the highest priority node within that country.

Updates tailscale/corp#13025

Signed-off-by: Charlotte Brandhorst-Satzkorn <[email protected]>
2023-07-26 16:41:52 -07:00
David Anderson 9d89e85db7 wgengine/magicsock: document mysterious-looking assignment
Updates #cleanup

Signed-off-by: David Anderson <[email protected]>
2023-07-26 14:57:01 -07:00
David Anderson 84777354a0 wgengine/magicsock: factor out more separable parts
Updates #8720

Signed-off-by: David Anderson <[email protected]>
2023-07-26 14:39:43 -07:00
David Anderson 9a76deb4b0 disco: move disco pcap helper to disco package
Updates tailscale/corp#13464

Signed-off-by: David Anderson <[email protected]>
2023-07-26 13:39:57 -07:00
David Anderson cde37f5307 wgengine/magicsock: factor out peerMap into separate file
Updates tailscale/corp#13464

Signed-off-by: David Anderson <[email protected]>
2023-07-26 13:39:57 -07:00
David Anderson f7016d8c00 wgengine/magicsock: factor out endpoint into its own file
Updates tailscale/corp#13464

Signed-off-by: David Anderson <[email protected]>
2023-07-26 12:05:32 -07:00
David Anderson c2831f6614 wgengine/magicsock: delete unused stuff
Updates tailscale/corp#13464

Signed-off-by: David Anderson <[email protected]>
2023-07-26 11:44:41 -07:00
Andrew Lytvynov 9edb848505 cmd/tailscale/cli: implement update on FreeBSD (#8710)
Implement `tailscale update` on FreeBSD. This is much simpler than other
platforms because `pkg rquery` lets us get the version in their repos
without any extra parsing.

Updates #6995

Signed-off-by: Andrew Lytvynov <[email protected]>
2023-07-25 17:38:25 -07:00
Maisem Ali 1ecc16da5f tailcfg,ipn/ipnlocal,wgengine: add values to PeerCapabilities
Define PeerCapabilty and PeerCapMap as the new way of sending down
inter-peer capability information.

Previously, this was unstructured and you could only send down strings
which got too limiting for certain usecases. Instead add the ability
to send down raw JSON messages that are opaque to Tailscale but provide
the applications to define them however they wish.

Also update accessors to use the new values.

Updates #4217

Signed-off-by: Maisem Ali <[email protected]>
2023-07-25 14:32:51 -07:00
Andrew Lytvynov 306deea03a cmd/tailscale/cli,version/distro: update support for Alpine (#8701)
Similar to Arch support, use the latest version info from the official
`apk` repo and don't offer explicit track or version switching.
Add detection for Alpine Linux in version/distro along the way.

Updates #6995

Signed-off-by: Andrew Lytvynov <[email protected]>
2023-07-24 16:53:15 -07:00
David Anderson 6afffece8a net/art: use more intelligible, go-ish state tracking in table.Get
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 4f14ed2ad6 net/art: use encoding/binary for address bit twiddling
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson f1cd67488d net/art: move slice closer to its use
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 44ad7b3746 net/art: factor out picking the right strideTable for addr family
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 125b982ba5 net/art: make Table.Get alloc-free
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson b76d8a88ae net/art: document return value of strideTable.delete
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson b242e2c2cb net/art: reword confusing function docstring
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 8478358d77 net/art: use "index", not "idx" in function names
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson de5c6ed4be net/art: document valid values of strideTable.prefix
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 736a44264f net/art: fix comment typo
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 1e6f0bb608 net/art: fix slowPrefixTable bugs found by fuzzing
One is a straight "I forgot how to Go" bug, the others are semantic
mismatches with the main implementation around masking the prefixes
passed to insert/delete.

Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson aaca911904 net/art: add another consistency test for insert/delete
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson b145a22f55 net/art: add more exhaustive table testing
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 9cc3f7a3d6 net/art: fix format of debug output
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson ac657caaf1 net/art: add debug hooks to strideTable
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson fcf4d044fa net/art: implement path compression optimization
Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 486195edf0 net/art: make each strideTable track the IP prefix it represents
This is a prerequisite for path compression, so that insert/delete
can determine when compression occurred.

Updates #7781

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
David Anderson 45b5d0983c net/art: fix running tests outside of CI
Updates #7866

Signed-off-by: David Anderson <[email protected]>
2023-07-24 13:33:48 -07:00
License Updater 4c05d43008 licenses: update tailscale{,d} licenses
Signed-off-by: License Updater <[email protected]>
2023-07-24 10:42:00 -07:00
Andrew Lytvynov 894b237a70 cmd/tailscale/cli: implement update for dnf/yum-based distros (#8678)
This is the Fedora family of distros, including CentOS, RHEL and others.
Tested in `fedora:latest` and `centos:7` containers.

Updates #6995

Signed-off-by: Andrew Lytvynov <[email protected]>
2023-07-24 10:20:17 -07:00
Brad Fitzpatrick f1cc8ab3f9 tailcfg: add UserProfile.Groups
Updates tailscale/corp#13375

Signed-off-by: Brad Fitzpatrick <[email protected]>
2023-07-23 15:23:59 -07:00
Michael Stapelberg 2a6c237d4c net/dns: overwrite /tmp/resolv.conf on gokrazy
Appliances built using https://gokrazy.org/ have a read-only root file system,
including /etc/resolv.conf, which is a symlink to /tmp/resolv.conf.

The system’s dhcp client overwrites /tmp/resolv.conf instead,
so we need to use this path in Tailscale, too.

related to https://github.com/gokrazy/gokrazy/issues/209

fixes https://github.com/tailscale/tailscale/issues/8689

Signed-off-by: Michael Stapelberg <[email protected]>
2023-07-23 09:53:32 -07:00