[Bug Report] IPv6 SLAAC never works — accept_ra is written to the 'all' level instead of the interface

Note: I used AI assistant to help analyze the logs and draft this report.
Every command below was run on my own device and the output is copied verbatim.
Verified on hardware by me. 
Wish the issue can be solved by official. 

TL;DR

S99tailscale, S99netbird and S99zerotier enable IP forwarding on the KVM, then try to keep SLAAC working by setting net.ipv6.conf.all.accept_ra = 2. On Linux that value is overridden by the per-interface setting, which stays at 1 — and the kernel ignores accept_ra entirely when forwarding = 1. Result: no Router Advertisement is ever processed, so the device never gets a global IPv6 address.

Firmware 1.10.1-release2
Device RM10
Upstream GLKVM behind a second router (double NAT); upstream advertises a public /64 via RA

One-line fix (interface level instead of all):

echo 'net.ipv6.conf.eth0.accept_ra = 2' >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf

Symptoms

  • All other LAN hosts receive a global IPv6 address via SLAAC. The GLKVM does not — eth0 only has fe80::/64.
  • tailscale netcheck reports IPv6: no, but OS has support.
  • Tailscale therefore stays on DERP relay. Over cellular, the direct (P2P) path occasionally comes up and then drops back to relay, because IPv4 NAT traversal is the only option and the mapping expires (carrier CGNAT, MappingVariesByDestIP: true).
  • No error is logged anywhere — the failure is completely silent.

Root cause

/etc/init.d/S99tailscale (non-rm2 branch), plus identical blocks in S99netbird and S99zerotier:

if [ ! -n "$(grep '^net\.ipv6\.conf\.all\.forwarding' /etc/sysctl.conf)" ]; then
    echo 'net.ipv6.conf.all.forwarding = 1' >> /etc/sysctl.conf
fi
# Allow accepting RA even when forwarding is enabled (to get IPv6 address via SLAAC)
if [ ! -n "$(grep '^net\.ipv6\.conf\.all\.accept_ra' /etc/sysctl.conf)" ]; then
    echo 'net.ipv6.conf.all.accept_ra = 2' >> /etc/sysctl.conf
fi
sysctl -p /etc/sysctl.conf

The comment shows the intent is right, but the value is written at the wrong level. The resulting kernel state:

net.ipv6.conf.all.accept_ra     = 2     <- written by the script
net.ipv6.conf.eth0.accept_ra    = 1     <- actually enforced; RA is ignored
net.ipv6.conf.default.accept_ra = 1
net.ipv6.conf.eth0.forwarding   = 1

Per Linux documentation, a per-interface sysctl takes precedence over the corresponding all entry, and when forwarding = 1 on an interface, accept_ra = 1 means "do not accept RAs" — accept_ra = 2 is the only value that works while forwarding.

Why it looks intermittent

At boot, S40network brings eth0 up before S99tailscale runs, so forwarding is still 0 for a short window. During that window the kernel sends a Router Solicitation and successfully obtains an address:

inet6 <GLOBAL_PREFIX>:xxxx/64 scope global dynamic mngtmpaddr proto kernel_ra
      valid_lft 86218sec  preferred_lft 14218sec

But once forwarding becomes 1, no further RA is processed. The address cannot be renewed and silently expires after ~24 h. If you happen to look during that window, IPv6 "works"; later it is gone.

This is aggravated if the upstream router does not send periodic unsolicited RAs and only replies to a Router Solicitation — then the boot window is the only chance.

Steps to reproduce

  1. Connect the KVM to a LAN that supplies a global IPv6 prefix via RA.
  2. Boot normally, do not modify any sysctl.
  3. Check:
ip -6 addr show dev eth0        # only fe80:: present
sysctl net.ipv6.conf.all.accept_ra net.ipv6.conf.eth0.accept_ra net.ipv6.conf.eth0.forwarding
tailscale netcheck 2>&1 | grep IPv6
  1. Confirm an RA is actually on the wire (capture on the upstream, or rdisc6 eth0 from another host).

Workaround

echo 'net.ipv6.conf.eth0.accept_ra = 2' >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf

After a reboot (or after the next Router Solicitation), ip -6 addr shows a global address and tailscale netcheck reports:

IPv6: yes, [<GLOBAL_PREFIX>:xxxx]:52689

The added line is not removed by the init scripts, because they only check for ^net\.ipv6\.conf\.all\.accept_ra. It persists across reboots and normal firmware upgrades (it lives in the overlay on /userdata), and is cleared by a factory reset.

Note: editing the value does not make the kernel send a Router Solicitation on the spot, so on the current boot you may need to wait for the default route lifetime to expire (the kernel then re-solicits) or simply reboot.

Suggested fix

In the three init scripts, set the value on the interface level as well:

echo 'net.ipv6.conf.eth0.accept_ra = 2' >> /etc/sysctl.conf

or, to cover whatever the WAN interface turns out to be:

sysctl -w net.ipv6.conf.default.accept_ra=2
sysctl -w net.ipv6.conf.all.accept_ra=2
for i in /sys/class/net/*/; do
    n=$(basename "$i")
    [ "$n" = lo ] || sysctl -w "net.ipv6.conf.${n}.accept_ra=2"
done

Two related points worth reviewing at the same time:

  1. Forwarding is enabled unconditionally. On this device tailscale debug prefs shows AdvertiseRoutes: null and RouteAll: false, so forwarding is not actually needed for Tailscale here. Enabling it only when an exit node or subnet routes are configured would avoid the problem entirely.
  2. The WebUI has no IPv6 network settings at all — the Ethernet page only exposes mode / ip_address / netmask / gateway / dns_server1 / dns_server2, and there is no way to disable or configure IPv6 from the UI (see also #66321). A toggle for "IPv6: off / SLAAC / static" would have made this much easier to diagnose.

Thanks for providing the detailed report and the workaround. We'll forward this to our R&D team for review.

Hi, please try updating to v1.11.0 beta 3 and check if the issue has been resolved.

OK, I will test it soon.
Thank you.