mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-10 00:30:37 +08:00
fix UpdateWgPeers to enable multiple peer sections
This commit is contained in:
parent
cef9fb8bf1
commit
e8683469a5
1 changed files with 1 additions and 0 deletions
|
|
@ -361,6 +361,7 @@ func UpdateWgPeers(wgInterface string, peers []wgtypes.PeerConfig) error {
|
|||
//delete the peers sections as they are going to be replaced
|
||||
wireguard.DeleteSection(section_peers)
|
||||
for i, peer := range peers {
|
||||
ncutils.Log("adding peer section for peer #: " + string(i) + peer.PublicKey.String())
|
||||
wireguard.SectionWithIndex(section_peers, i).Key("PublicKey").SetValue(peer.PublicKey.String())
|
||||
//if peer.PresharedKey.String() != "" {
|
||||
//wireguard.SectionWithIndex(section_peers, i).Key("PreSharedKey").SetValue(peer.PresharedKey.String())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue