From 8672ca9cf8b7f065c8e9faa134e5af0683e9f416 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 24 Oct 2014 17:29:09 -0700 Subject: Prep for real tests like alltoall. --- testnet/TestEthernetTapFactory.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testnet/TestEthernetTapFactory.cpp') diff --git a/testnet/TestEthernetTapFactory.cpp b/testnet/TestEthernetTapFactory.cpp index 836f586e..1e72bc4e 100644 --- a/testnet/TestEthernetTapFactory.cpp +++ b/testnet/TestEthernetTapFactory.cpp @@ -57,6 +57,10 @@ EthernetTap *TestEthernetTapFactory::open( Mutex::Lock _l(_tapsByMac_m); _tapsByMac[mac] = tap; } + { + Mutex::Lock _l(_tapsByNwid_m); + _tapsByNwid[nwid] = tap; + } return tap.ptr(); } @@ -73,6 +77,10 @@ void TestEthernetTapFactory::close(EthernetTap *tap,bool destroyPersistentDevice Mutex::Lock _l(_tapsByMac_m); _tapsByMac.erase(tapp->mac()); } + { + Mutex::Lock _l(_tapsByNwid_m); + _tapsByNwid.erase(tapp->nwid()); + } } } // namespace ZeroTier -- cgit v1.2.3