mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-04-29 15:29:42 +00:00
TRACE output improvements and compile fix.
This commit is contained in:
parent
10df5dcf70
commit
cc2a1444ae
@ -112,7 +112,7 @@ bool PacketDecoder::tryDecode(const RuntimeEnvironment *_r)
|
|||||||
// This might be something from a new or old version of the protocol.
|
// This might be something from a new or old version of the protocol.
|
||||||
// Technically it passed MAC so the packet is still valid, but we
|
// Technically it passed MAC so the packet is still valid, but we
|
||||||
// ignore it.
|
// ignore it.
|
||||||
TRACE("ignored unrecognized verb %.2x from %s(%s)",(unsigned int)v,source().toString().c_str(),_remoteAddress.toString().c_str());
|
TRACE("ignored unrecognized verb %.2x from %s(%s)",(unsigned int)verb(),source().toString().c_str(),_remoteAddress.toString().c_str());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -277,7 +277,7 @@ bool PacketDecoder::_doOK(const RuntimeEnvironment *_r,const SharedPtr<Peer> &pe
|
|||||||
Packet::Verb inReVerb = (Packet::Verb)(*this)[ZT_PROTO_VERB_OK_IDX_IN_RE_VERB];
|
Packet::Verb inReVerb = (Packet::Verb)(*this)[ZT_PROTO_VERB_OK_IDX_IN_RE_VERB];
|
||||||
uint64_t inRePacketId = at<uint64_t>(ZT_PROTO_VERB_OK_IDX_IN_RE_PACKET_ID);
|
uint64_t inRePacketId = at<uint64_t>(ZT_PROTO_VERB_OK_IDX_IN_RE_PACKET_ID);
|
||||||
|
|
||||||
//TRACE("%s(%s): OK(%s)",source().toString().c_str(),_remoteAddress.toString().c_str(),Packet::verbString(inReVerb));
|
TRACE("%s(%s): OK(%s)",source().toString().c_str(),_remoteAddress.toString().c_str(),Packet::verbString(inReVerb));
|
||||||
|
|
||||||
switch(inReVerb) {
|
switch(inReVerb) {
|
||||||
case Packet::VERB_HELLO: {
|
case Packet::VERB_HELLO: {
|
||||||
|
@ -97,8 +97,10 @@ void Peer::onReceive(
|
|||||||
// Only learn paths on replies to packets we have sent, otherwise
|
// Only learn paths on replies to packets we have sent, otherwise
|
||||||
// this introduces both an asymmetry problem in NAT-t and a potential
|
// this introduces both an asymmetry problem in NAT-t and a potential
|
||||||
// reply DOS attack.
|
// reply DOS attack.
|
||||||
if (!wp->fixed)
|
if (!wp->fixed) {
|
||||||
wp->addr = remoteAddr;
|
wp->addr = remoteAddr;
|
||||||
|
TRACE("peer %s learned endpoint %s from %s(%s)",address().toString().c_str(),remoteAddr.toString().c_str(),Packet::verbString(verb),Packet::verbString(inReVerb));
|
||||||
|
}
|
||||||
|
|
||||||
_requestHistory[p].timestamp = 0;
|
_requestHistory[p].timestamp = 0;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user