From f1e1a6838fd5c07958a897b4c1f3eb7e60f5b283 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Mon, 2 Nov 2020 17:56:12 +0000 Subject: [PATCH] fix allowedIPs construction where networks are provided --- configtypes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configtypes.go b/configtypes.go index b05218f..2e88658 100644 --- a/configtypes.go +++ b/configtypes.go @@ -254,8 +254,8 @@ func (conf DsnetConfig) GetWgPeerConfigs() []wgtypes.PeerConfig { ) } - for i, net := range peer.Networks { - allowedIPs[i+1] = net.IPNet + for _, net := range peer.Networks { + allowedIPs = append(allowedIPs, net.IPNet) } wgPeers = append(wgPeers, wgtypes.PeerConfig{