fix allowedIPs construction where networks are provided
This commit is contained in:
parent
aa785b9ab6
commit
f1e1a6838f
@ -254,8 +254,8 @@ func (conf DsnetConfig) GetWgPeerConfigs() []wgtypes.PeerConfig {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, net := range peer.Networks {
|
for _, net := range peer.Networks {
|
||||||
allowedIPs[i+1] = net.IPNet
|
allowedIPs = append(allowedIPs, net.IPNet)
|
||||||
}
|
}
|
||||||
|
|
||||||
wgPeers = append(wgPeers, wgtypes.PeerConfig{
|
wgPeers = append(wgPeers, wgtypes.PeerConfig{
|
||||||
|
Loading…
Reference in New Issue
Block a user