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
This commit is contained in:
parent
a23b66f721
commit
2377e62d4a
1 changed files with 0 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue