mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-21 18:06:39 +00:00
Build fix
This commit is contained in:
parent
8a9669f130
commit
105023bd87
@ -531,6 +531,7 @@ func (n *Node) AddStaticRoot(id *Identity, addrs []InetAddress) {
|
||||
}
|
||||
}
|
||||
if len(saddrs) > 0 {
|
||||
n.log.Printf("adding or updating static root %s at address(es) %s", id.String(), straddrs)
|
||||
ids := C.CString(id.String())
|
||||
C.ZT_Node_setStaticRoot(unsafe.Pointer(n.zn), ids, &saddrs[0], C.uint(len(saddrs)))
|
||||
C.free(unsafe.Pointer(ids))
|
||||
|
@ -29,8 +29,6 @@
|
||||
#include "RingBuffer.hpp"
|
||||
#include "Packet.hpp"
|
||||
|
||||
#include "../osdep/Phy.hpp"
|
||||
|
||||
/**
|
||||
* Maximum return value of preferenceRank()
|
||||
*/
|
||||
@ -46,7 +44,6 @@ class RuntimeEnvironment;
|
||||
class Path
|
||||
{
|
||||
friend class SharedPtr<Path>;
|
||||
Phy<Path *> *_phy;
|
||||
|
||||
public:
|
||||
/**
|
||||
@ -144,7 +141,8 @@ public:
|
||||
memset(_ifname, 0, 16);
|
||||
memset(_addrString, 0, sizeof(_addrString));
|
||||
if (_localSocket != -1) {
|
||||
_phy->getIfName((PhySocket *) ((uintptr_t) _localSocket), _ifname, 16);
|
||||
// TODO: add localInterface alongside localSocket
|
||||
//_phy->getIfName((PhySocket *) ((uintptr_t) _localSocket), _ifname, 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,14 @@ public:
|
||||
const char *const dnp = (dn.length() > 0) ? dn.c_str() : (const char *)0;
|
||||
std::lock_guard<std::mutex> l(_managedRoutes_l);
|
||||
_managedRoutes[std::pair<InetAddress,unsigned int>(target,metric)] = std::shared_ptr<ManagedRoute>(new ManagedRoute(target,via,dnp));
|
||||
return 0;
|
||||
}
|
||||
|
||||
ZT_ALWAYS_INLINE int removeRoute(const InetAddress &target,const InetAddress &via,const unsigned int metric)
|
||||
{
|
||||
std::lock_guard<std::mutex> l(_managedRoutes_l);
|
||||
_managedRoutes.erase(std::pair<InetAddress,unsigned int>(target,metric));
|
||||
return 0;
|
||||
}
|
||||
|
||||
ZT_ALWAYS_INLINE int syncRoutes()
|
||||
|
Loading…
x
Reference in New Issue
Block a user