mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-02-22 10:20:52 +00:00
Take TRACE back out of Mac makefile, fix a few decode little things.
This commit is contained in:
parent
490e86dde3
commit
525ab3faa9
@ -20,7 +20,7 @@ ifeq ($(ZT_AUTO_UPDATE),1)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
# Uncomment to dump trace and log info to stdout (useful for debug/test)
|
# Uncomment to dump trace and log info to stdout (useful for debug/test)
|
||||||
DEFS+=-DZT_TRACE -DZT_LOG_STDOUT
|
#DEFS+=-DZT_TRACE -DZT_LOG_STDOUT
|
||||||
|
|
||||||
# Uncomment for a release optimized universal binary build
|
# Uncomment for a release optimized universal binary build
|
||||||
CFLAGS=-arch i386 -arch x86_64 -Wall -O4 -fstack-protector -pthread -mmacosx-version-min=10.6 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
CFLAGS=-arch i386 -arch x86_64 -Wall -O4 -fstack-protector -pthread -mmacosx-version-min=10.6 -DNDEBUG -Wno-unused-private-field $(INCLUDES) $(DEFS)
|
||||||
|
@ -67,7 +67,7 @@ Switch::~Switch()
|
|||||||
void Switch::onRemotePacket(Demarc::Port localPort,const InetAddress &fromAddr,const Buffer<4096> &data)
|
void Switch::onRemotePacket(Demarc::Port localPort,const InetAddress &fromAddr,const Buffer<4096> &data)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (data.size() >= ZT_PROTO_MIN_FRAGMENT_LENGTH) {
|
if (data.size() > ZT_PROTO_MIN_FRAGMENT_LENGTH) {
|
||||||
if (data[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)
|
if (data[ZT_PACKET_FRAGMENT_IDX_FRAGMENT_INDICATOR] == ZT_PACKET_FRAGMENT_INDICATOR)
|
||||||
_handleRemotePacketFragment(localPort,fromAddr,data);
|
_handleRemotePacketFragment(localPort,fromAddr,data);
|
||||||
else if (data.size() >= ZT_PROTO_MIN_PACKET_LENGTH)
|
else if (data.size() >= ZT_PROTO_MIN_PACKET_LENGTH)
|
||||||
|
@ -259,8 +259,7 @@ public:
|
|||||||
|
|
||||||
inline void operator()(Topology &t,const SharedPtr<Peer> &p)
|
inline void operator()(Topology &t,const SharedPtr<Peer> &p)
|
||||||
{
|
{
|
||||||
if (_supernodeAddresses.count(p->address()))
|
if (!_supernodeAddresses.count(p->address())) {
|
||||||
return; // skip supernodes
|
|
||||||
p->forgetDirectPaths(false); // false means don't forget 'fixed' paths e.g. supernodes
|
p->forgetDirectPaths(false); // false means don't forget 'fixed' paths e.g. supernodes
|
||||||
if (((_now - p->lastFrame()) < ZT_PEER_LINK_ACTIVITY_TIMEOUT)&&(_supernode)) {
|
if (((_now - p->lastFrame()) < ZT_PEER_LINK_ACTIVITY_TIMEOUT)&&(_supernode)) {
|
||||||
TRACE("sending reset NOP to %s",p->address().toString().c_str());
|
TRACE("sending reset NOP to %s",p->address().toString().c_str());
|
||||||
@ -269,6 +268,7 @@ public:
|
|||||||
_supernode->send(_r,outp.data(),outp.size(),_now);
|
_supernode->send(_r,outp.data(),outp.size(),_now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint64_t _now;
|
uint64_t _now;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user