mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-17 06:38:25 +00:00
Tear down routes before devices when leaving a network or shutting down.
This commit is contained in:
@ -539,6 +539,15 @@ public:
|
|||||||
memset(&config, 0, sizeof(ZT_VirtualNetworkConfig));
|
memset(&config, 0, sizeof(ZT_VirtualNetworkConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
~NetworkState()
|
||||||
|
{
|
||||||
|
this->managedRoutes.clear();
|
||||||
|
#ifdef __APPLE__
|
||||||
|
Thread::sleep(10);
|
||||||
|
this->tap.reset();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
std::shared_ptr<EthernetTap> tap;
|
std::shared_ptr<EthernetTap> tap;
|
||||||
ZT_VirtualNetworkConfig config; // memcpy() of raw config from core
|
ZT_VirtualNetworkConfig config; // memcpy() of raw config from core
|
||||||
std::vector<InetAddress> managedIps;
|
std::vector<InetAddress> managedIps;
|
||||||
|
Reference in New Issue
Block a user