diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-13 16:55:18 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-05-13 16:55:18 -0700 |
| commit | bdce679d84657feeac45c1703c2d828586bb649b (patch) | |
| tree | df38f851ee199a5e6e314b681962f34fa095a657 /node/Network.hpp | |
| parent | 241f3083341113f31538c4242939170dcc240961 (diff) | |
| download | infinitytier-bdce679d84657feeac45c1703c2d828586bb649b.tar.gz infinitytier-bdce679d84657feeac45c1703c2d828586bb649b.zip | |
Should fix deadlock issue in GitHub issue #166
Diffstat (limited to 'node/Network.hpp')
| -rw-r--r-- | node/Network.hpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/node/Network.hpp b/node/Network.hpp index 79ae3a90..f99ea525 100644 --- a/node/Network.hpp +++ b/node/Network.hpp @@ -55,6 +55,7 @@ namespace ZeroTier { class RuntimeEnvironment; +class _AnnounceMulticastGroupsToPeersWithActiveDirectPaths; /** * A virtual LAN @@ -62,6 +63,7 @@ class RuntimeEnvironment; class Network : NonCopyable { friend class SharedPtr<Network>; + friend class _AnnounceMulticastGroupsToPeersWithActiveDirectPaths; public: /** @@ -197,7 +199,11 @@ public: * @param peer Peer address to check * @return True if peer is allowed to communicate on this network */ - bool isAllowed(const Address &peer) const; + inline bool isAllowed(const Address &peer) const + { + Mutex::Lock _l(_lock); + return _isAllowed(peer); + } /** * Perform cleanup and possibly save state @@ -348,6 +354,7 @@ public: private: ZT1_VirtualNetworkStatus _status() const; void _externalConfig(ZT1_VirtualNetworkConfig *ec) const; // assumes _lock is locked + bool _isAllowed(const Address &peer) const; void _announceMulticastGroups(); const RuntimeEnvironment *RR; |
