From a743e0531a514303d42ad8bdecb924c5aa1642a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Wed, 29 May 2024 15:30:41 +0800 Subject: [PATCH] Fix PrefixFromNet --- common/metadata/addr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/metadata/addr.go b/common/metadata/addr.go index 6da2d22..6fcfb60 100644 --- a/common/metadata/addr.go +++ b/common/metadata/addr.go @@ -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{} }