rulesSource needs to be required in network or pgsql has issues

This commit is contained in:
Adam Ierymenko 2019-08-08 17:56:27 -05:00
parent 730305ecc7
commit 6a9a577c59
No known key found for this signature in database
GPG Key ID: 1657198823E52A61

View File

@ -52,6 +52,7 @@ void DB::initNetwork(nlohmann::json &network)
if (!network.count("mtu")) network["mtu"] = ZT_DEFAULT_MTU;
if (!network.count("remoteTraceTarget")) network["remoteTraceTarget"] = nlohmann::json();
if (!network.count("removeTraceLevel")) network["remoteTraceLevel"] = 0;
if (!network.count("rulesSource")) network["rulesSource"] = "";
if (!network.count("rules")) {
// If unspecified, rules are set to allow anything and behave like a flat L2 segment
network["rules"] = {{