Improve the 'network_id' configuration option:

The 'network_id' option allows an administrator to specify to which
network they intend a server to connect. Servers can leverage this
information to optimize routing and prune automatically discovered
cross-network connections.

This commit will, if merged:

- add support for the devnet keyword, which corresponds to network ID #2;
- report the network ID, if one is configured, in server_info
This commit is contained in:
Nik Bougalis
2019-12-22 22:10:50 -08:00
parent a96dc2ecea
commit 607328e1a0
5 changed files with 27 additions and 3 deletions

View File

@@ -2167,6 +2167,9 @@ Json::Value NetworkOPsImp::getServerInfo (bool human, bool admin, bool counters)
if (human)
info [jss::hostid] = getHostId (admin);
if (auto const netid = app_.overlay().networkID())
info [jss::network_id] = static_cast<Json::UInt>(*netid);
info [jss::build_version] = BuildInfo::getVersionString ();
info [jss::server_state] = strOperatingMode (admin);