From 2377e62d4a4ecce2b84281d16d7de612c498cd1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 17 Jan 2026 20:42:31 +0800 Subject: [PATCH] Fix IPv6 ULA addresses excluded from local address set The filter condition `IsGlobalUnicast() && !IsPrivate()` incorrectly excluded ULA addresses (fc00::/7) from inet6_local_address_set, causing DNS hijack to fail for IPv6 ULA addresses. Fixes: sagernet/sing-box#3698 --- redirect_nftables_rules.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/redirect_nftables_rules.go b/redirect_nftables_rules.go index ea03d40..08f6baa 100644 --- a/redirect_nftables_rules.go +++ b/redirect_nftables_rules.go @@ -103,10 +103,6 @@ func (r *autoRedirect) nftablesCreateLocalAddressSets( update = true } } - localAddresses6 = common.Filter(localAddresses6, func(it netip.Prefix) bool { - address := it.Addr() - return address.IsLoopback() || address.IsGlobalUnicast() && !address.IsPrivate() - }) if len(lastAddresses) == 0 || update { _, err := nftablesCreateIPSet(nft, table, 6, "inet6_local_address_set", nftables.TableFamilyIPv6, nil, localAddresses6, false, update) if err != nil {