diff options
author | Grant Limberg <grant.limberg@zerotier.com> | 2019-06-17 15:32:21 -0700 |
---|---|---|
committer | Grant Limberg <grant.limberg@zerotier.com> | 2019-06-17 15:32:21 -0700 |
commit | 4e2439bd127c399bc31a44611c5226ed51681728 (patch) | |
tree | f21abf81b912447b101d9ba1e09e2166a6db7323 | |
parent | 97975402120d565dd211f9d470e7b192641712c5 (diff) | |
download | infinitytier-4e2439bd127c399bc31a44611c5226ed51681728.tar.gz infinitytier-4e2439bd127c399bc31a44611c5226ed51681728.zip |
Don't call _phy->getIfName if localSocket is -1
-rw-r--r-- | node/Path.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/node/Path.hpp b/node/Path.hpp index 5b966f6b..f0198bde 100644 --- a/node/Path.hpp +++ b/node/Path.hpp @@ -158,7 +158,9 @@ public: { memset(_ifname, 0, 16); memset(_addrString, 0, sizeof(_addrString)); - _phy->getIfName((PhySocket *)((uintptr_t)_localSocket), _ifname, 16); + if (_localSocket != -1) { + _phy->getIfName((PhySocket *) ((uintptr_t) _localSocket), _ifname, 16); + } } /** |