Build fix

This commit is contained in:
Adam Ierymenko 2019-09-25 12:43:14 -07:00
parent 8a9669f130
commit 105023bd87
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3
3 changed files with 5 additions and 4 deletions

View File

@ -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))

View File

@ -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);
}
}

View File

@ -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()