| Age | Commit message (Collapse) | Author | Files | Lines |
|
NetworkMap.Equal
|
|
It stood out a lot in hello.ipn.dev's profiles for generating a lot of
garbage (and thus GC CPU).
|
|
|
|
|
|
This code is currently racy due to an incorrect assumption
that goal is never modified in-place, so does not require extra locking.
This change makes the assumption correct.
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
|
|
More remain.
Fixes tailscale/corp#432
|
|
Updates #483
|
|
Introduced in a975e86bb8a42f0be9faf16067ee55a6da55d767.
Only affected TS_DEBUG_* env users.
|
|
It's useful to copy/paste directly from there, without using tailscale up.
If it's truncated for some specific reason, it doesn't say why.
|
|
This adds a new magicsock endpoint type only used when both sides
support discovery (that is, are advertising a discovery
key). Otherwise the old code is used.
So far the new code only communicates over DERP as proof that the new
code paths are wired up. None of the actually discovery messaging is
implemented yet.
Support for discovery (generating and advertising a key) are still
behind an environment variable for now.
Updates #483
|
|
It was temporary and 3 months has elapsed without problems.
|
|
As part of disabling background STUN packets when idle, we want an
emergency override switch to turn it back on, in case it interacts
poorly in the wild. We'll send that via control, but we'll want to
plumb it down to magicsock via NetworkMap.
Updates tailscale/corp#320
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
allocations
And start of tests.
|
|
|
|
Not actually used yet.
Updates #483
|
|
|
|
|
|
Signed-Off-By: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
It's too big to log.
|
|
This lets control & logs also use SOCKS dials.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
This reverts commit afb9c6a6abc9fa5a26200cc36d1ffc947b8b9e89.
Doesn't work. See:
https://github.com/tailscale/tailscale/issues/409#issuecomment-635241550
Looks pretty dire:
https://medium.com/capital-one-tech/how-to-get-an-android-device-nickname-d5eab12f4ced
Updates #409
|
|
Updates #409
|
|
It can't run without corp stuff anyway, and makes it harder to
refactor the control server.
|
|
It can only be built with corp deps anyway, and having it split
from the control code makes our lives harder.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
Instead of hard-coding the DERP map (except for cmd/tailscale netcheck
for now), get it from the control server at runtime.
And make the DERP map support multiple nodes per region with clients
picking the first one that's available. (The server will balance the
order presented to clients for load balancing)
This deletes the stunner package, merging it into the netcheck package
instead, to minimize all the config hooks that would've been
required.
Also fix some test flakes & races.
Fixes #387 (Don't hard-code the DERP map)
Updates #388 (Add DERP region support)
Fixes #399 (wgengine: flaky tests)
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
|
|
I can now run these tests with -count=1000 without running out of RAM.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
This contains atomic ints that trigger a race check error if we access
them non-atomically.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
We were mis-counting the number of Synchronized messages that we should
have been generating.
|
|
By default, nothing differentiates errors or fatals from regular logs, so they just
blend into the rest of the logs.
As a bonus, if you run a test using t.Run(), the log messages printed
via the sub-t.Run() are printed at a different time from log messages
printed via the parent t.Run(), making debugging almost impossible.
This doesn't actually fix the test flake I'm looking for, but at least
I can find it in the logs now.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
If a test calls log.Printf, 'go test' horrifyingly rearranges the
output to no longer be in chronological order, which makes debugging
virtually impossible. Let's stop that from happening by making
log.Printf panic if called from any module, no matter how deep, during
tests.
This required us to change the default error handler in at least one
http.Server, as well as plumbing a bunch of logf functions around,
especially in magicsock and wgengine, but also in logtail and backoff.
To add insult to injury, 'go test' also rearranges the output when a
parent test has multiple sub-tests (all the sub-test's t.Logf is always
printed after all the parent tests t.Logf), so we need to screw around
with a special Logf that can point at the "current" t (current_t.Logf)
in some places. Probably our entire way of using subtests is wrong,
since 'go test' would probably like to run them all in parallel if you
called t.Parallel(), but it definitely can't because the're all
manipulating the shared state created by the parent test. They should
probably all be separate toplevel tests instead, with common
setup/teardown logic. But that's a job for another time.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
This matches the new API requirements.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
Signed-off-by: Dmytro Shynkevych <dmytro@tailscale.com>
|
|
This helps validate the server's behaviour when these are present.
|
|
Shotizam before and output queries:
sqlite> select sum(size) from bin where func like 'type..%';
129067
=>
120216
|
|
|
|
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
This depends on improved support from the control server, to send the
new subnet width (Bits) fields. If these are missing, we fall back to
assuming their value is /32.
Conversely, if the server sends Bits fields to an older client, it will
interpret them as /32 addresses. Since the only rules we allow are
"accept" rules, this will be narrower or equal to the intended rule, so
older clients will simply reject hosts on the wider subnet (fail
closed).
With this change, the internal filter.Matches format has diverged
from the wire format used by controlclient, so move the wire format
into tailcfg and convert it to filter.Matches in controlclient.
Signed-off-by: Avery Pennarun <apenwarr@tailscale.com>
|
|
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
|
|
This strictly sequences things such that c1 is fully registered in
the control server before c2 creates its poll. Failure to do this
can cause an inversion where c2's poll finishes establishing
before c1's poll starts, which results in c2 getting disconnected
rather than c1, and the test times out waiting for c1 to get kicked.
Fixes #98.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
The test is straightforward, but it's a little perplexing if you're
not overly familiar with controlclient.
Signed-off-by: David Anderson <danderson@tailscale.com>
|
|
|
|
This reverts commit 6fcbd4c4d476bd461c9bd2e52df6e3b7964a6452.
Decided to put it in tailscale/go's crypto/x509 instead.
|
|
|