mirror of
https://github.com/gravitl/netmaker.git
synced 2026-04-23 00:17:10 +08:00
added comms net default acl check
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user