make sure iptracker is configured on start

pull/20/head
Ryan Tharp 6 years ago committed by Jeff Becker
parent 1efb68e9cd
commit 6738fcaa6a
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -110,7 +110,7 @@ namespace llarp
llarp::Addr tunIp(source_addr);
// related to dns_iptracker_setup_dotLokiLookup(&this->dll, tunIp);
dns_iptracker_setup(tunIp); // claim GW IP to make sure it's not inuse
dns_iptracker_setup(this->dll.ip_tracker, tunIp); // claim GW IP to make sure it's not inuse
return true;
}
return Endpoint::SetOption(k, v);
@ -150,6 +150,7 @@ namespace llarp
llarp::Addr tunIp(tunif.ifaddr);
dns_iptracker_setup_dotLokiLookup(
&this->dll, tunIp); // just set ups dll to use global iptracker
dns_iptracker_setup(this->dll.ip_tracker, tunIp); // claim GW IP to make sure it's not inuse
// set up networking in currrent thread if we are not isolated
if(!SetupNetworking())
@ -158,7 +159,11 @@ namespace llarp
else
{
llarp::LogInfo("Setting up per netns DNS IP tracker");
llarp::Addr tunIp(tunif.ifaddr);
this->dll.ip_tracker = new dns_iptracker;
dns_iptracker_setup_dotLokiLookup(
&this->dll, tunIp); // just set ups dll to use global iptracker
dns_iptracker_setup(this->dll.ip_tracker, tunIp); // claim GW IP to make sure it's not inuse
}
// wait for result for network setup
llarp::LogInfo("waiting for tun interface...");

Loading…
Cancel
Save