<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tailscale/wgengine/netstack/netstack_test.go, branch main</title>
<subtitle>The easiest, most secure way to use WireGuard and 2FA</subtitle>
<id>http://git.waynecole.info/tailscale/atom?h=main</id>
<link rel='self' href='http://git.waynecole.info/tailscale/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/'/>
<updated>2026-04-24T19:42:16Z</updated>
<entry>
<title>wgengine/netstack: absorb all quad-100 traffic locally, never leak to peers</title>
<updated>2026-04-24T19:42:16Z</updated>
<author>
<name>James Tucker</name>
<email>james@tailscale.com</email>
</author>
<published>2026-04-24T02:18:44Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=1b40911611b37947bdc905dec30b2914af540920'/>
<id>urn:sha1:1b40911611b37947bdc905dec30b2914af540920</id>
<content type='text'>
Previously, handleLocalPackets intercepted traffic to the Tailscale
service IP (100.100.100.100 / fd7a:115c:a1e0::53) only for an allow-list
of ports: TCP 53/80/8080 and UDP 53. Any other port returned
filter.Accept, letting the packet fall through to the ACL filter and
wireguard-go, which would attempt a peer lookup. No peer owns the
quad-100 AllowedIP, so after ~5s pendopen.go would log:

    open-conn-track: timeout opening ...; no associated peer node

This is the common "conntrack error no peer found for 100.100.100.100:853"
log spam seen in the wild (e.g. from systemd-resolved or another
resolver speculatively trying DoT on quad-100). It also leaks quad-100
packets onto the tailnet.

Remove the port allow-list so handleLocalPackets absorbs every quad-100
packet into netstack regardless of IP protocol or port. Traffic never
reaches the conntrack / peer-routing layers.

With the allow-list gone, acceptTCP needs a corresponding guard: on a
quad-100 TCP port we don't serve, execution used to fall through to the
isTailscaleIP case (quad-100 is in the tailscale IP range), which
rewrote the dial target to 127.0.0.1:&lt;port&gt; and forwardTCP'd the
connection to whatever happened to be listening on the host's loopback
at that port. Add a hittingServiceIP case that RSTs cleanly instead,
placed before the isTailscaleIP fallthrough.

TestQuad100UnservedTCPPortDoesNotForward is a new integration test that
injects a TCP SYN to 100.100.100.100:853 via handleLocalPackets, stubs
forwardDialFunc, and asserts the dialer is not invoked; it catches
regressions of the acceptTCP recursion/loopback-redirection case.

Fixes #15796
Fixes #19421
Updates #3261
Updates #11305

Signed-off-by: James Tucker &lt;james@tailscale.com&gt;
</content>
</entry>
<entry>
<title>all: fix six tests that failed with -count=2</title>
<updated>2026-04-14T01:52:57Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@tailscale.com</email>
</author>
<published>2026-04-14T01:27:26Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=9fbe4b3ed28cd68be6d25b6824bd638ab14b292e'/>
<id>urn:sha1:9fbe4b3ed28cd68be6d25b6824bd638ab14b292e</id>
<content type='text'>
Avery found a bunch of tests that fail with -count=2.

Updates tailscale/corp#40176 (tracks making our CI detect them)

Change-Id: Ie3e4398070dd92e4fe0146badddf1254749cca20
Signed-off-by: Brad Fitzpatrick &lt;bradfitz@tailscale.com&gt;
Co-authored-by: Avery Pennarun &lt;apenwarr@tailscale.com&gt;
</content>
</entry>
<entry>
<title>wgengine/netstack: fix data race on in-flight connection test globals</title>
<updated>2026-04-13T22:24:35Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@tailscale.com</email>
</author>
<published>2026-04-13T20:31:35Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=50b8cfbde2fc548a6c5b33b3c7021997ca14a0d9'/>
<id>urn:sha1:50b8cfbde2fc548a6c5b33b3c7021997ca14a0d9</id>
<content type='text'>
The maxInFlightConnectionAttemptsForTest and
maxInFlightConnectionAttemptsPerClientForTest globals were plain ints
read by background gVisor TCP handler goroutines (via
wrapTCPProtocolHandler) and written by tstest.Replace cleanup in
TestTCPForwardLimits_PerClient. When a gVisor goroutine outlived the
test cleanup window, the race detector caught the unsynchronized
access.

The race-prone code was introduced in c5abbcd4b4d8 (2024-02-26,
"wgengine/netstack: add a per-client limit for in-flight TCP
forwards") which added both the plain int globals and the
TestTCPForwardLimits_PerClient test that writes them via
tstest.Replace. It is not obvious why this has only recently started
being detected as a data race; likely some combination of gVisor
version bumps, Go toolchain scheduler changes, and additional
TCP-injecting subtests (e.g. 03461ea7f, 2026-01-30) increased
goroutine churn enough to hit the window.

Change both globals to atomic.Int32 and replace tstest.Replace (which
does non-atomic *target = old on cleanup) with explicit Store/Cleanup
pairs.

Fixes #19118

Change-Id: Id26ba6fbfb2e4ade319976db80af8e16c7c8778e
Signed-off-by: Brad Fitzpatrick &lt;bradfitz@tailscale.com&gt;
</content>
</entry>
<entry>
<title>wgengine/netstack: allow UDP listeners to receive traffic on Service VIP addresses (#18972)</title>
<updated>2026-04-08T09:53:50Z</updated>
<author>
<name>Tom Meadows</name>
<email>tom@tmlabs.co.uk</email>
</author>
<published>2026-04-08T09:53:50Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=5341b26328b1cd938cbaf2804a9b9c2cbf996af8'/>
<id>urn:sha1:5341b26328b1cd938cbaf2804a9b9c2cbf996af8</id>
<content type='text'>
Fixes UDP listeners on VIP Service addresses not receiving inbound traffic.

- Modified shouldProcessInbound to check for registered UDP transport endpoints when processing packets to service VIPs
- Uses FindTransportEndpoint to determine if a UDP listener exists for the destination VIP/port
- Supports both IPv4 and IPv6

The aim was to mirror the existing TCP logic, providing feature parity for UDP-based services on VIP Services.

Fixes #18971

Signed-off-by: chaosinthecrd &lt;tom@tmlabs.co.uk&gt;</content>
</entry>
<entry>
<title>wgengine/netstack: deliver self-addressed packets via loopback</title>
<updated>2026-02-27T22:30:41Z</updated>
<author>
<name>James Tucker</name>
<email>james@tailscale.com</email>
</author>
<published>2026-02-27T21:49:05Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=0fb207c3d045b888523914dce0b6c9e9a1abdd69'/>
<id>urn:sha1:0fb207c3d045b888523914dce0b6c9e9a1abdd69</id>
<content type='text'>
When a tsnet.Server dials its own Tailscale IP, TCP SYN packets are
silently dropped. In inject(), outbound packets with dst=self fail the
shouldSendToHost check and fall through to WireGuard, which has no peer
for the node's own address.

Fix this by detecting self-addressed packets in inject() using isLocalIP
and delivering them back into gVisor's network stack as inbound packets
via a new DeliverLoopback method on linkEndpoint. The outbound packet
must be re-serialized into a new PacketBuffer because outbound packets
have their headers parsed into separate views, but DeliverNetworkPacket
expects raw unparsed data.

Updates #18829

Signed-off-by: James Tucker &lt;james@tailscale.com&gt;
</content>
</entry>
<entry>
<title>wgengine/netstack: add local tailscale service IPs to route and terminate locally (#18461)</title>
<updated>2026-01-30T21:46:03Z</updated>
<author>
<name>KevinLiang10</name>
<email>37811973+KevinLiang10@users.noreply.github.com</email>
</author>
<published>2026-01-30T21:46:03Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=03461ea7fb9c2c318a355498811481ad9c74b119'/>
<id>urn:sha1:03461ea7fb9c2c318a355498811481ad9c74b119</id>
<content type='text'>
* wgengine/netstack: add local tailscale service IPs to route and terminate locally

This commit adds the tailscales service IPs served locally to OS routes, and
make interception to packets so that the traffic terminates locally without
making affects to the HA traffics.

Fixes tailscale/corp#34048

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* fix test

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* add ready field to avoid accessing lb before netstack starts

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* wgengine/netstack: store values from lb to avoid acquiring a lock

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* add active services to netstack on starts with stored prefs.

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* fix comments

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

* update comments

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;

---------

Signed-off-by: KevinLiang10 &lt;37811973+KevinLiang10@users.noreply.github.com&gt;</content>
</entry>
<entry>
<title>all: remove AUTHORS file and references to it</title>
<updated>2026-01-23T23:49:45Z</updated>
<author>
<name>Will Norris</name>
<email>will@tailscale.com</email>
</author>
<published>2026-01-23T21:21:57Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=3ec5be3f510f74738179c1023468343a62a7e00f'/>
<id>urn:sha1:3ec5be3f510f74738179c1023468343a62a7e00f</id>
<content type='text'>
This file was never truly necessary and has never actually been used in
the history of Tailscale's open source releases.

A Brief History of AUTHORS files
---

The AUTHORS file was a pattern developed at Google, originally for
Chromium, then adopted by Go and a bunch of other projects. The problem
was that Chromium originally had a copyright line only recognizing
Google as the copyright holder. Because Google (and most open source
projects) do not require copyright assignemnt for contributions, each
contributor maintains their copyright. Some large corporate contributors
then tried to add their own name to the copyright line in the LICENSE
file or in file headers. This quickly becomes unwieldy, and puts a
tremendous burden on anyone building on top of Chromium, since the
license requires that they keep all copyright lines intact.

The compromise was to create an AUTHORS file that would list all of the
copyright holders. The LICENSE file and source file headers would then
include that list by reference, listing the copyright holder as "The
Chromium Authors".

This also become cumbersome to simply keep the file up to date with a
high rate of new contributors. Plus it's not always obvious who the
copyright holder is. Sometimes it is the individual making the
contribution, but many times it may be their employer. There is no way
for the proejct maintainer to know.

Eventually, Google changed their policy to no longer recommend trying to
keep the AUTHORS file up to date proactively, and instead to only add to
it when requested: https://opensource.google/docs/releasing/authors.
They are also clear that:

&gt; Adding contributors to the AUTHORS file is entirely within the
&gt; project's discretion and has no implications for copyright ownership.

It was primarily added to appease a small number of large contributors
that insisted that they be recognized as copyright holders (which was
entirely their right to do). But it's not truly necessary, and not even
the most accurate way of identifying contributors and/or copyright
holders.

In practice, we've never added anyone to our AUTHORS file. It only lists
Tailscale, so it's not really serving any purpose. It also causes
confusion because Tailscalars put the "Tailscale Inc &amp; AUTHORS" header
in other open source repos which don't actually have an AUTHORS file, so
it's ambiguous what that means.

Instead, we just acknowledge that the contributors to Tailscale (whoever
they are) are copyright holders for their individual contributions. We
also have the benefit of using the DCO (developercertificate.org) which
provides some additional certification of their right to make the
contribution.

The source file changes were purely mechanical with:

    git ls-files | xargs sed -i -e 's/\(Tailscale Inc &amp;\) AUTHORS/\1 contributors/g'

Updates #cleanup

Change-Id: Ia101a4a3005adb9118051b3416f5a64a4a45987d
Signed-off-by: Will Norris &lt;will@tailscale.com&gt;
</content>
</entry>
<entry>
<title>health,ipn/ipnlocal: introduce eventbus in heath.Tracker (#17085)</title>
<updated>2025-09-16T15:25:29Z</updated>
<author>
<name>Claus Lensbøl</name>
<email>claus@tailscale.com</email>
</author>
<published>2025-09-16T15:25:29Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=2015ce40814dd175f7d441c83d7517a2128b37e4'/>
<id>urn:sha1:2015ce40814dd175f7d441c83d7517a2128b37e4</id>
<content type='text'>
The Tracker was using direct callbacks to ipnlocal. This PR moves those
to be triggered via the eventbus.

Additionally, the eventbus is now closed on exit from tailscaled
explicitly, and health is now a SubSystem in tsd.

Updates #15160

Signed-off-by: Claus Lensbøl &lt;claus@tailscale.com&gt;</content>
</entry>
<entry>
<title>net/netmon: publish events to event bus</title>
<updated>2025-04-16T17:10:45Z</updated>
<author>
<name>David Anderson</name>
<email>dave@tailscale.com</email>
</author>
<published>2025-03-19T17:47:25Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=5399fa159af99380a70347864a4d4acb13efef6b'/>
<id>urn:sha1:5399fa159af99380a70347864a4d4acb13efef6b</id>
<content type='text'>
Updates #15160

Signed-off-by: David Anderson &lt;dave@tailscale.com&gt;
</content>
</entry>
<entry>
<title>all: update the tsd.System constructor name (#15372)</title>
<updated>2025-04-16T17:10:45Z</updated>
<author>
<name>M. J. Fromberger</name>
<email>fromberger@tailscale.com</email>
</author>
<published>2025-03-20T22:18:29Z</published>
<link rel='alternate' type='text/html' href='http://git.waynecole.info/tailscale/commit/?id=deb0b255ff1431ffbd0a4b61bb319f7852ab0e24'/>
<id>urn:sha1:deb0b255ff1431ffbd0a4b61bb319f7852ab0e24</id>
<content type='text'>
Replace NewSystemWithEventBus with plain NewSystem, and update all usage.
See https://github.com/tailscale/tailscale/pull/15355#discussion_r2003910766

Updates #15160

Change-Id: I64d337f09576b41d9ad78eba301a74b9a9d6ebf4
Signed-off-by: M. J. Fromberger &lt;fromberger@tailscale.com&gt;
</content>
</entry>
</feed>
