Skip to content

GL-BE6500: tailscaled exits when routing TCP to the LAN subnet (kernel hands tailscale0 TSO packets with csum_start = 0) #24

Open

Description

@ahoshaiyan

Summary

On a GL-BE6500 acting as a Tailscale subnet router, tailscaled shuts itself down (exit code 0) as soon as forwarded TCP traffic from the LAN goes back out through tailscale0. ICMP and UDP are unaffected. Under procd this turns into a crash loop, procd gives up, and the router drops off the tailnet until Tailscale is restarted by hand.

The root cause appears to be in the kernel's forwarding path. TCP GSO/TSO packets are delivered to the TUN device with a virtio_net_hdr whose csum_start is 0. Tailscale's userspace WireGuard (wireguard-go) rejects the packet, treats the TUN read error as fatal, closes the device, and the daemon exits.

Disabling TSO on tailscale0 (ethtool -K tailscale0 tso off) fully works around it.

Environment

Device GL-BE6500
Firmware 4.9.0
Kernel Linux GL-BE6500 5.4.213 #0 SMP PREEMPT Tue Aug 11 11:04:32 2026 aarch64 GNU/Linux
Architecture aarch64
Tailscale (bundled) 1.92.5-1 (OpenWrt), go1.25.7
Tailscale (also tested) Official static build tailscale_1.92.5_arm64 from pkgs.tailscale.com: same failure
Network Acceleration enabled
Tailscale role Subnet router advertising the LAN (10.38.0.0/16, br-lan), configured via the GL UI

Steps to reproduce

  1. Enable Tailscale in the GL UI with LAN subnet routing, and approve the route in the Tailscale admin console.
  2. From a remote tailnet device, ping a LAN host such as 10.38.0.94. This works.
  3. From the same remote device, open a TCP connection to a LAN host, e.g. http://10.38.0.94/ (port 80).
  4. tailscaled on the router exits immediately, and the router shows as offline in the tailnet.

Expected behaviour

TCP traffic between tailnet clients and LAN hosts is routed normally, and tailscaled keeps running.

Actual behaviour

tailscaled exits with status 0 within a second of the first forwarded TCP reply. Under procd it keeps getting restarted and exits again on the next TCP packet, until procd stops respawning it:

daemon.err tailscaled[12256]: TPM: error opening: stat /dev/tpmrm0: no such file or directory
daemon.info avahi-daemon[16209]: Withdrawing address record for 100.x.x.x on tailscale0.
... (repeated 6 times, each instance living 2-6 seconds) ...
daemon.info procd: Instance tailscale::instance1 s in a crash loop 6 crashes, 7 seconds since last crash

Logs (official Tailscale build, run in the foreground with --verbose=1)

The bundled OpenWrt build prints nothing besides the TPM line, even with --verbose=2, and tailscale debug daemon-logs connects but times out. Its logging appears to be compiled out. The official static build logs normally, so the excerpt below comes from it, running against the same state file and on the same kernel. The log is trimmed and identifiers are redacted.

wgengine: idle peer [peer] now active, reconfiguring WireGuard
wgengine: Reconfig: configuring userspace WireGuard config (with 2/13 peers)
wg: Failed to read packet from TUN device: tcp header len is invalid: 0
Receive func ReceiveIPv4 exiting with error: *net.OpError, read udp 0.0.0.0:41641: raw-read udp4 0.0.0.0:41641: use of closed network connection
Receive func ReceiveIPv6 exiting with error: *net.OpError, read udp [::]:41641: raw-read udp6 [::]:41641: use of closed network connection
Closing the engine because the WireGuard device has been closed...
magicsock: 0 active derp conns
wgengine has been closed; shutting down
control: client.Shutdown ...
control: Client.Shutdown done.
flushing log.
logger closing down

Analysis

  • Not killed externally. strace -f on tailscaled shows no SIGTERM/SIGKILL/SIGINT, only Go-internal SIGURG and SIGCHLD from its own helper commands. The main thread calls exit_group(0). No commands are executed in the ~70 s between startup and the exit.
  • Not storage or memory. /overlay is 2% used, ~450 MB of RAM is available, and dmesg has no OOM kills.
  • Not the Tailscale build. The official upstream static binary fails the same way on the same router.
  • The packet header from the kernel is malformed. Tailscale enables TUN offloads (IFF_VNET_HDR + TSO). For a TCP GSO packet, wireguard-go reads the TCP data-offset nibble at in[csum_start + 12] and rejects anything outside 20–60 bytes. The error reports 0. With csum_start = 0, byte 12 of an IPv4 header is the first octet of the source address, here 10 (0x0a) from 10.38.0.94, and 0x0a >> 4 == 0, which yields tcp header len is invalid: 0. So the kernel delivered a TCP GSO packet to the TUN device with csum_start unset (i.e. the skb was apparently not CHECKSUM_PARTIAL).
  • Only forwarded TCP is affected, which fits GSO/GRO handling on the forwarding path. Our guess is that the vendor packet acceleration / hardware GRO path builds GSO skbs without the checksum metadata a normal GRO'd skb would have. We have not verified this.

Tailscale treating a single bad TUN read as fatal makes the impact worse, but the malformed virtio_net_hdr comes from the kernel.

Workaround (confirmed working)

Disable TSO on tailscale0. The kernel then segments in software before the packet reaches the TUN device:

opkg update && opkg install ethtool
ethtool -K tailscale0 tso off

tailscale0 is recreated on every Tailscale restart, and the bundled 19-tailscale-iface hotplug restarts Tailscale on every interface ifup, so the setting has to be reapplied each time. We use a hotplug script:

# /etc/hotplug.d/net/20-tailscale-offload
[ "$INTERFACE" = "tailscale0" ] && [ "$ACTION" = "add" ] || exit 0
( sleep 3; ethtool -K tailscale0 tso off ) &

With this in place, TCP to LAN hosts through the subnet router works and tailscaled stays up.

Suggested fix

  • Investigate why TCP GSO skbs on the forwarding path reach the TUN device without CHECKSUM_PARTIAL / a valid csum_start on this platform (likely in the acceleration/GRO path).
  • Until that's fixed, consider shipping the mitigation in the GL Tailscale integration, e.g. disabling TSO on tailscale0 in /etc/hotplug.d/net/19-tailscale-net after the device is created.

Additional notes (separate, lower priority)

  • Logging: the bundled tailscaled produces no log output (only the TPM line), and tailscale debug daemon-logs times out. That made this very hard to diagnose. Keeping Tailscale's local logs, at least on stderr so procd forwards them to logread, would help.
  • /etc/hotplug.d/iface/19-tailscale-iface:
    • It runs gl_tailscale restart on every interface ifup (e.g. each WAN reconnect), which restarts Tailscale more often than seems necessary.
    • Its elif [ "$enabled" = "0" ] branch runs /etc/init.d/tailscale stop on any iface hotplug event when Tailscale is disabled, regardless of $ACTION.

Activity

  1. SLoeuillet commented on Nov 10, 2026

    @SLoeuillet

    Same failure on a Google Cloud subnet router: there, NIC hardware GRO (gVNIC, Linux 7.0 stable) leaves csum_start = 0 on forwarded GSO packets. Proposed fix in wireguard-go: tailscale/wireguard-go#129. When csum_start is missing, it takes the offsets from the packet's IP header, and it drops a GSO packet it still can't split instead of closing the device. Tracking issue: tailscale/tailscale#22298. If the BE6500's Ethernet driver does hardware GRO, ethtool -K <lan-if> rx-gro-hw off may work around it here too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions