Skip to content

linux: enable IPV6_MULTIPLE_TABLES for tailscaled IPv6 routing#315

Merged
castrojo merged 1 commit intoprojectbluefin:mainfrom
hanthor:fix/ipv6-multiple-tables
Apr 23, 2026
Merged

linux: enable IPV6_MULTIPLE_TABLES for tailscaled IPv6 routing#315
castrojo merged 1 commit intoprojectbluefin:mainfrom
hanthor:fix/ipv6-multiple-tables

Conversation

@hanthor
Copy link
Copy Markdown
Member

@hanthor hanthor commented Apr 22, 2026

Problem

Without CONFIG_IPV6_MULTIPLE_TABLES, ip -6 rule fails entirely:

$ ip -6 rule
RTNETLINK answers: Address family not supported by protocol

This causes tailscaled to log:

router: disabling tunneled IPv6 due to system IPv6 config:
  kernel doesn't support IPv6 policy routing

Without the ability to install IPv6 routing rules, tailscaled falls back to fe80:: link-local IPv6 paths for LAN peers. These paths are sticky and don't recover after sleep/wake — disco pings continue working (different code path) while all WireGuard data times out silently.

The Fedora kernel has had IPV6_MULTIPLE_TABLES=y for years. This is a straightforward gap in the Dakota kernel config.

Fix

Add IPV6_MULTIPLE_TABLES and IPV6_SUBTREES to fdsdk-config.sh. One new patch file, no other changes.

Testing

Verified on a Dakota alpha install: before the fix ip -6 rule errors, tailscaled uses link-local paths that break after sleep. After loading the module, tailscaled installs its fwmark rules and uses stable paths.

Related to #174

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a patch to enable IPv6 policy routing (IPV6_MULTIPLE_TABLES and IPV6_SUBTREES) in the Linux kernel configuration to support tools like tailscaled. However, the patch file is currently not referenced in any BuildStream element, so it will not be applied during the build. Additionally, the patch contains a malformed hunk header that will cause it to fail when applied with standard tools.

@@ -0,0 +1,40 @@
From 0000000000000000000000000000000000000001 Mon Sep 17 00:00:00 2001
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

This patch file is being added to the repository, but it does not appear to be referenced in any BuildStream element (e.g., the kernel element or the freedesktop-sdk element). In BuildStream, patches must be explicitly listed in the sources section of an element to be applied during the build process. Without updating the corresponding .bst file to include this patch, the kernel configuration will remain unchanged and the reported issue will not be resolved.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch_queue source kind in elements/freedesktop-sdk.bst (line 8–9) automatically applies all patches in patches/freedesktop-sdk/ in alphabetical order — no manual listing needed. This is a BuildStream feature; see the existing patches 0001–0008 which are all picked up the same way.

index 1b9465fd9..c23f8b2a1 100644
--- a/files/linux/fdsdk-config.sh
+++ b/files/linux/fdsdk-config.sh
@@ -2811,3 +2811,10 @@
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The hunk header in this patch is malformed. The post-image line count is specified as 10, but the hunk actually contains 11 lines (3 context lines and 8 added lines, including the empty line and the closing fi). This discrepancy will cause the patch to fail to apply using standard tools like git apply or patch.

@@ -2811,3 +2811,11 @@

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed — hunk header corrected to +2811,11 (3 context + 8 added lines). Force-pushed.

castrojo
castrojo previously approved these changes Apr 22, 2026
@castrojo
Copy link
Copy Markdown
Contributor

Rest lgtm other than fixing the syntax. Have we told GNOME about this one?

@hanthor
Copy link
Copy Markdown
Member Author

hanthor commented Apr 23, 2026

Not yet — worth filing an MR upstream against freedesktop-sdk to enable IPV6_MULTIPLE_TABLES by default. Most distros (Fedora, Debian, Arch) have had it for years. I'll open an issue/MR there after this lands.

@castrojo castrojo merged commit 99d1982 into projectbluefin:main Apr 23, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants