| Age | Commit message (Collapse) | Author | Files | Lines |
|
Required a minor test update too, which now needs a private key to get far
enough to test the thing being tested.
|
|
No need to allocate or compare all the fields we don't care about.
|
|
It launches goroutines and interferes with panic-based debugging,
obscuring stacks.
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
wireguard-go uses 3 goroutines per peer (with reasonably large stacks
& buffers).
Rather than tell wireguard-go about all our peers, only tell it about
peers we're actively communicating with. That means we need hooks into
magicsock's packet receiving path and tstun's packet sending path to
lazily create a wireguard peer on demand from the network map.
This frees up lots of memory for iOS (where we have almost nothing
left for larger domains with many users).
We should ideally do this in wireguard-go itself one day, but that'd
be a pretty big change.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
address
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
sync.Pools should almost always be packate globals, even though in this
case we only have exactly 1 TUN device anyway, so it matters less.
Still, it's unusual to see a Pool that's not a package global, so move it.
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
We originally picked those numbers somewhat at random, but with the idea
that 8 is a traditionally lucky number in Chinese culture. Unfortunately,
"88" is also neo-nazi shorthand language.
Use 52 instead, because those are the digits above the letters
"TS" (tailscale) on a qwerty keyboard, so we're unlikely to collide with
other users. 5, 2 and 52 are also pleasantly culturally meaningless.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
|
|
Don't log heartbeat pings & pongs. Track the reason for pings and then
only log the ping/pong traffic if it was for initial path discovery.
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Nameserver IP 10.11.12.13 would otherwise get written to resolv.conf as 13.12.11.10, as was happening on my client.
Signed-off-by: Eduardo Kienetz <eduardo@kienetz.com>
|
|
So we don't accidentally pass a NAT traversal test by having DERP pick up our slack
when we really just wanted DERP as an OOB messaging channel.
|
|
|
|
https://github.com/tailscale/tailscale/commit/891898525c12630b0f896cb9142ff5274e07afc2 had a continue that meant the didCopy synchronization never ran.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Before this patch, the 250ms sleep would not be interrupted by context cancellation,
which would result in the goroutine sometimes lingering in tests (100ms grace period).
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Very rarely, cancellation occurs between a successful send on derpRecvCh
and a call to copyBuf on the receiving side.
Without this patch, this situation results in <-copyBuf blocking indefinitely.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Peers advertising a discovery key know how to speak the discovery
protocol and do their own heartbeats to get through NATs and keep NATs
open. No need for the pinger except for with legacy peers.
|
|
* update to new HandshakeDone signature
* use new Device.IpcGetOperationFiltered call to avoid sending allowed_ips
See https://github.com/tailscale/wireguard-go/commit/dd6c1c8fe14c1af4fc8ef599ff99c302e289b553
|
|
The new interface lets implementors more precisely distinguish
local traffic from forwarded traffic, and applies different
forwarding logic within Machines for each type. This allows
Machines to be packet forwarders, which didn't quite work
with the implementation of Inject.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
This log line looks buggy, even though lacking a filter is expected during bringup.
We already know if we forget to SetFilter: it breaks the magicsock test,
so no useful information is lost.
Resolves #559.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Wendi <wendi.yu@yahoo.ca>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
The test demonstrates that magicsock can traverse two stateful
firewalls facing each other, that each require localhost to
initiate connections.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Also adds ephemeral port support to natlab.
Work in progress.
Pairing with @danderson.
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
And add some defensive early returns on c.closed.
|
|
|
|
This change adds to tsdns the ability to delegate lookups to upstream nameservers.
This is crucial for setting Magic DNS as the system resolver.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Never return "nil, nil" anymore. The caller expected a usable
interface now. I missed some of these earlier.
Also, handle address deletion now.
Updates #532
|
|
Fixes #532
|
|
We had a test for it, but no 32-bit builder apparently. :(
Fixes #529
|
|
Fixes tailscale/corp#412 ("flood of link change events at start-up")
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
And update existing callers with (near) duplicated cases.
|
|
Don't do anything with UPnP, NAT-PMP, PCP yet, but see how common they
are in the wild.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
Generate the disco key ourselves and give out the public half instead.
Fixes #525
|
|
Endpoints need to be Stringers apparently.
Fixes tailscale/corp#422
|
|
There's a lot of confusion around what tailscale status shows, so make it better:
show region names, last write time, and put stars around DERP too if active.
Now stars are always present if activity, and always somewhere.
|
|
Updates #483
|