make publishing introsets optional using reachable=false to disable

pull/1093/head
Jeff Becker 4 years ago
parent 8cad7fecbd
commit 70eb353c42
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -111,6 +111,14 @@ namespace llarp
bool
TunEndpoint::SetOption(const std::string &k, const std::string &v)
{
if(k == "reachable")
{
if(IsFalseValue(v))
{
m_PublishIntroSet = false;
LogInfo(Name(), " setting to be not reachable by default");
}
}
if(k == "isolate-network" && IsTrueValue(v.c_str()))
{
#if defined(__linux__)

@ -544,6 +544,8 @@ namespace llarp
bool
Endpoint::ShouldPublishDescriptors(llarp_time_t now) const
{
if(not m_PublishIntroSet)
return false;
// make sure we have all paths that are established
// in our introset
size_t numNotInIntroset = 0;

@ -438,6 +438,7 @@ namespace llarp
hooks::Backend_ptr m_OnUp;
hooks::Backend_ptr m_OnDown;
hooks::Backend_ptr m_OnReady;
bool m_PublishIntroSet = true;
private:
void

Loading…
Cancel
Save