|
@@ -30,7 +30,7 @@ func InitializeCommsNetwork() error {
|
|
|
|
|
|
setCommsID()
|
|
setCommsID()
|
|
|
|
|
|
- _, err := logic.GetNetwork(COMMS_NETID)
|
|
|
|
|
|
+ commsNetwork, err := logic.GetNetwork(COMMS_NETID)
|
|
if err != nil {
|
|
if err != nil {
|
|
var network models.Network
|
|
var network models.Network
|
|
network.NetID = COMMS_NETID
|
|
network.NetID = COMMS_NETID
|
|
@@ -41,6 +41,11 @@ func InitializeCommsNetwork() error {
|
|
logger.Log(1, "comms net does not exist, creating with ID,", network.NetID, "and CIDR,", network.AddressRange)
|
|
logger.Log(1, "comms net does not exist, creating with ID,", network.NetID, "and CIDR,", network.AddressRange)
|
|
_, err = logic.CreateNetwork(network)
|
|
_, err = logic.CreateNetwork(network)
|
|
return err
|
|
return err
|
|
|
|
+ } else 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)
|
|
time.Sleep(time.Second << 1)
|
|
SyncServerNetwork(COMMS_NETID)
|
|
SyncServerNetwork(COMMS_NETID)
|