mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-19 18:15:50 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user