fix allowedIPs construction where networks are provided

This commit is contained in:
Callan Bryant 2020-11-02 17:56:12 +00:00
parent aa785b9ab6
commit f1e1a6838f
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

View File

@ -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{