diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-21 08:13:48 -0400 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2013-08-21 08:13:48 -0400 |
| commit | 2536352e5d166719acc87535ed17a805e7bd3c26 (patch) | |
| tree | eb676d506f419c410e0dda711273f5dcfcc6bb79 /node/Network.cpp | |
| parent | dbb509a30234059fb6de10cfcd9ba1aade6a0138 (diff) | |
| download | infinitytier-2536352e5d166719acc87535ed17a805e7bd3c26.tar.gz infinitytier-2536352e5d166719acc87535ed17a805e7bd3c26.zip | |
Make that an arbitrary tag to identify persistent taps...
Diffstat (limited to 'node/Network.cpp')
| -rw-r--r-- | node/Network.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/node/Network.cpp b/node/Network.cpp index d974c5d2..496e58fe 100644 --- a/node/Network.cpp +++ b/node/Network.cpp @@ -139,6 +139,9 @@ Network::~Network() SharedPtr<Network> Network::newInstance(const RuntimeEnvironment *renv,uint64_t id) throw(std::runtime_error) { + char tag[32]; + sprintf(tag,"%.16llx",(unsigned long long)id); + // We construct Network via a static method to ensure that it is immediately // wrapped in a SharedPtr<>. Otherwise if there is traffic on the Ethernet // tap device, a SharedPtr<> wrap can occur in the Ethernet frame handler @@ -150,7 +153,7 @@ SharedPtr<Network> Network::newInstance(const RuntimeEnvironment *renv,uint64_t nw->_rlLimit.bytesPerSecond = ZT_MULTICAST_DEFAULT_BYTES_PER_SECOND; nw->_rlLimit.maxBalance = ZT_MULTICAST_DEFAULT_RATE_MAX_BALANCE; nw->_rlLimit.minBalance = ZT_MULTICAST_DEFAULT_RATE_MIN_BALANCE; - nw->_tap = new EthernetTap(renv,renv->identity.address().toMAC(),ZT_IF_MTU,(const char *)0,&_CBhandleTapData,nw.ptr()); + nw->_tap = new EthernetTap(renv,tag,renv->identity.address().toMAC(),ZT_IF_MTU,&_CBhandleTapData,nw.ptr()); nw->_id = id; nw->_lastConfigUpdate = 0; nw->_destroyOnDelete = false; |
