mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-02 10:12:06 +08:00
Merge pull request #791 from gravitl/bugfix_v0.10.1_setpeers
testing additional check on publickey
This commit is contained in:
commit
0aa9dd0992
1 changed files with 4 additions and 0 deletions
|
|
@ -94,6 +94,10 @@ func SetPeers(iface, currentNodeAddr string, keepalive int32, peers []wgtypes.Pe
|
|||
if peer.AllowedIPs[0].String() == currentPeer.AllowedIPs[0].String() {
|
||||
shouldDelete = false
|
||||
}
|
||||
// re-check this if logic is not working, added in case of allowedips not working
|
||||
if peer.PublicKey.String() == currentPeer.PublicKey.String() {
|
||||
shouldDelete = false
|
||||
}
|
||||
}
|
||||
if shouldDelete {
|
||||
output, err := ncutils.RunCmd("wg set "+iface+" peer "+currentPeer.PublicKey.String()+" remove", true)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue