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{