From a34b27ba14355dde8b0b9046791f92b3a499cb37 Mon Sep 17 00:00:00 2001 From: Leo Antunes Date: Thu, 30 Jun 2022 21:59:06 +0200 Subject: [PATCH] fix: netip.Addr to net.IPNet conversion --- wg/wireguard.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wg/wireguard.go b/wg/wireguard.go index 625bd0f..6e40570 100644 --- a/wg/wireguard.go +++ b/wg/wireguard.go @@ -149,7 +149,7 @@ func (s *State) SetUpInterface(nodes []common.Node) error { func addrToIPNet(addr netip.Addr) *net.IPNet { return &net.IPNet{ IP: addr.AsSlice(), - Mask: net.CIDRMask(addr.BitLen(), 0), + Mask: net.CIDRMask(addr.BitLen(), addr.BitLen()), } }