Added ZTS_EVENT_NETWORK_DOWN to tap destructor
This commit is contained in:
@@ -36,8 +36,6 @@
|
|||||||
#include "OSUtils.hpp"
|
#include "OSUtils.hpp"
|
||||||
|
|
||||||
#include "Service.hpp"
|
#include "Service.hpp"
|
||||||
extern void _push_callback_event(uint64_t nwid, int eventCode);
|
|
||||||
|
|
||||||
#include "Mutex.hpp"
|
#include "Mutex.hpp"
|
||||||
#include "lwipDriver.hpp"
|
#include "lwipDriver.hpp"
|
||||||
#include "libzt.h"
|
#include "libzt.h"
|
||||||
@@ -49,8 +47,8 @@ extern void _push_callback_event(uint64_t nwid, int eventCode);
|
|||||||
namespace ZeroTier {
|
namespace ZeroTier {
|
||||||
|
|
||||||
class VirtualTap;
|
class VirtualTap;
|
||||||
|
|
||||||
extern OneService *service;
|
extern OneService *service;
|
||||||
|
extern void postEvent(uint64_t id, int eventCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A virtual tap device. The ZeroTier core service creates one of these for each
|
* A virtual tap device. The ZeroTier core service creates one of these for each
|
||||||
@@ -88,6 +86,7 @@ VirtualTap::VirtualTap(
|
|||||||
|
|
||||||
VirtualTap::~VirtualTap()
|
VirtualTap::~VirtualTap()
|
||||||
{
|
{
|
||||||
|
postEvent(_nwid, ZTS_EVENT_NETWORK_DOWN);
|
||||||
_run = false;
|
_run = false;
|
||||||
::write(_shutdownSignalPipe[1],"\0",1);
|
::write(_shutdownSignalPipe[1],"\0",1);
|
||||||
_phy.whack();
|
_phy.whack();
|
||||||
|
|||||||
Reference in New Issue
Block a user