mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 19:34:27 +08:00
peers nil check
This commit is contained in:
parent
2de7beb31e
commit
90ca33db6e
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ func SetPeers(iface string, node *models.Node, peers []wgtypes.PeerConfig) error
|
|||
err = SetMacPeerRoutes(iface)
|
||||
return err
|
||||
} else if ncutils.IsLinux() {
|
||||
if len(peers) > 0 {
|
||||
if peers != nil && len(peers) > 0 {
|
||||
local.SetPeerRoutes(iface, oldPeerAllowedIps, peers)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue