mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-31 00:23:58 +00:00
Remove dns config on shutdown
Also add calls to MacDNSHelper to the kext tap
This commit is contained in:
parent
b9a1719cb1
commit
85a5b0b948
@ -202,6 +202,8 @@ MacEthernetTap::MacEthernetTap(
|
||||
|
||||
MacEthernetTap::~MacEthernetTap()
|
||||
{
|
||||
MacDNSHelper::removeDNS(_nwid);
|
||||
|
||||
Mutex::Lock _gl(globalTapCreateLock);
|
||||
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||
Thread::join(_thread);
|
||||
|
@ -43,6 +43,8 @@
|
||||
#include <netinet/in_var.h>
|
||||
#include <netinet/icmp6.h>
|
||||
|
||||
#include "MacDNSHelper.hpp"
|
||||
|
||||
// OSX compile fix... in6_var defines this in a struct which namespaces it for C++ ... why?!?
|
||||
struct prf_ra {
|
||||
u_char onlink : 1;
|
||||
@ -441,6 +443,8 @@ MacKextEthernetTap::MacKextEthernetTap(
|
||||
|
||||
MacKextEthernetTap::~MacKextEthernetTap()
|
||||
{
|
||||
MacDNSHelper::removeDNS(_nwid);
|
||||
|
||||
::write(_shutdownSignalPipe[1],"\0",1); // causes thread to exit
|
||||
Thread::join(_thread);
|
||||
|
||||
@ -689,7 +693,7 @@ void MacKextEthernetTap::threadMain()
|
||||
|
||||
void MacKextEthernetTap::setDns(const char *domain, const std::vector<InetAddress> &servers)
|
||||
{
|
||||
|
||||
MacDNSHelper::setDNS(_nwid, domain, servers);
|
||||
}
|
||||
|
||||
} // namespace ZeroTier
|
||||
|
Loading…
x
Reference in New Issue
Block a user