mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 07:34:31 +08:00
added comms net default acl check
This commit is contained in:
parent
5ba79afeba
commit
d738a35eaf
1 changed files with 7 additions and 1 deletions
|
@ -30,7 +30,7 @@ func InitializeCommsNetwork() error {
|
|||
|
||||
setCommsID()
|
||||
|
||||
_, err := logic.GetNetwork(COMMS_NETID)
|
||||
commsNetwork, err := logic.GetNetwork(COMMS_NETID)
|
||||
if err != nil {
|
||||
var network models.Network
|
||||
network.NetID = COMMS_NETID
|
||||
|
@ -42,6 +42,12 @@ func InitializeCommsNetwork() error {
|
|||
_, err = logic.CreateNetwork(network)
|
||||
return err
|
||||
}
|
||||
if commsNetwork.DefaultACL == "" {
|
||||
commsNetwork.DefaultACL = "yes"
|
||||
if err = logic.SaveNetwork(&commsNetwork); err != nil {
|
||||
logger.Log(1, "comms net default acl is set incorrectly, please manually adjust to \"yes\",", COMMS_NETID)
|
||||
}
|
||||
}
|
||||
time.Sleep(time.Second << 1)
|
||||
SyncServerNetwork(COMMS_NETID)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue