mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 11:57:39 +03:00
Fix PrefixFromNet
This commit is contained in:
parent
967afcf6c1
commit
ba68e017a9
1 changed files with 1 additions and 1 deletions
|
@ -161,7 +161,7 @@ func PrefixFromNet(netAddr net.Addr) netip.Prefix {
|
|||
switch addr := netAddr.(type) {
|
||||
case *net.IPNet:
|
||||
bits, _ := addr.Mask.Size()
|
||||
return netip.PrefixFrom(AddrFromIP(addr.IP), bits)
|
||||
return netip.PrefixFrom(AddrFromIP(addr.IP).Unmap(), bits)
|
||||
default:
|
||||
return netip.Prefix{}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue