Skip to content

Commit 2377e62

Browse files
committed
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
1 parent a23b66f commit 2377e62

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

redirect_nftables_rules.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ func (r *autoRedirect) nftablesCreateLocalAddressSets(
103103
update = true
104104
}
105105
}
106-
localAddresses6 = common.Filter(localAddresses6, func(it netip.Prefix) bool {
107-
address := it.Addr()
108-
return address.IsLoopback() || address.IsGlobalUnicast() && !address.IsPrivate()
109-
})
110106
if len(lastAddresses) == 0 || update {
111107
_, err := nftablesCreateIPSet(nft, table, 6, "inet6_local_address_set", nftables.TableFamilyIPv6, nil, localAddresses6, false, update)
112108
if err != nil {

0 commit comments

Comments
 (0)