mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-08-14 10:37:33 -07:00
Build fix, use -Os on Linux too.
This commit is contained in:
parent
951d911531
commit
9a3c34b5b3
3 changed files with 40 additions and 56 deletions
|
@ -57,6 +57,7 @@
|
|||
#include <algorithm>
|
||||
#include <utility>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
#include "../node/NonCopyable.hpp"
|
||||
#include "../node/InetAddress.hpp"
|
||||
|
@ -471,6 +472,20 @@ Binder_send_packet:
|
|||
return aa;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param addr Address to check
|
||||
* @return True if this is a bound local interface address
|
||||
*/
|
||||
inline bool isBoundLocalInterfaceAddress(const InetAddress &addr) const
|
||||
{
|
||||
Mutex::Lock _l(_lock);
|
||||
for(std::vector<_Binding>::const_iterator b(_bindings.begin());b!=_bindings.end();++b) {
|
||||
if (b->address == addr)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<_Binding> _bindings;
|
||||
Mutex _lock;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue