mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-12-01 14:18:36 +00:00
Fix link-local destinations rejected as TUN loopback
This commit is contained in:
@@ -125,7 +125,12 @@ func (h *Outbound) fetchMyAddresses() {
|
||||
continue
|
||||
}
|
||||
found = true
|
||||
myAddresses = append(myAddresses, myInterface.Addresses...)
|
||||
for _, prefix := range myInterface.Addresses {
|
||||
if prefix.Addr().Is6() && prefix.Addr().IsLinkLocalUnicast() {
|
||||
prefix = netip.PrefixFrom(prefix.Addr(), prefix.Addr().BitLen())
|
||||
}
|
||||
myAddresses = append(myAddresses, prefix)
|
||||
}
|
||||
}
|
||||
if !found {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user