mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-19 03:24:24 +08:00
don't set endpoint if server
This commit is contained in:
parent
b16a6ab6a4
commit
8901160237
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ func SetPeers(iface string, node *models.Node, peers []wgtypes.PeerConfig) error
|
|||
if keepAliveString == "0" {
|
||||
keepAliveString = "15"
|
||||
}
|
||||
if node.IsHub == "yes" || peer.Endpoint == nil {
|
||||
if node.IsHub == "yes" || node.IsServer == "yes" || peer.Endpoint == nil {
|
||||
_, err = ncutils.RunCmd("wg set "+iface+" peer "+peer.PublicKey.String()+
|
||||
" persistent-keepalive "+keepAliveString+
|
||||
" allowed-ips "+allowedips, true)
|
||||
|
|
Loading…
Add table
Reference in a new issue