Browse Source

Re-enable relaying checks, also not bug related but put back after we decided to punt removing moons.

pull/4/head
Adam Ierymenko 7 months ago
parent
commit
bed6557a6d
No known key found for this signature in database
GPG Key ID: C8877CF2D7A5D7F3
  1. 5
      node/Switch.cpp

5
node/Switch.cpp

@ -79,12 +79,9 @@ void Switch::onRemotePacket(void* tPtr, const int64_t localSocket, const InetAdd
if (destination != RR->identity.address()) {
// RELAY: fragment is for a different node, so maybe send it there if we should relay.
/*
if ((! RR->topology->amUpstream()) && (! path->trustEstablished(now))) {
return;
}
*/
if (fragment.hops() < ZT_RELAY_MAX_HOPS) {
fragment.incrementHops();
@ -166,7 +163,7 @@ void Switch::onRemotePacket(void* tPtr, const int64_t localSocket, const InetAdd
if (destination != RR->identity.address()) {
// RELAY: packet head is for a different node, so maybe send it there if we should relay.
if (/* (! RR->topology->amUpstream()) && (! path->trustEstablished(now)) && */ (source != RR->identity.address())) {
if ((! RR->topology->amUpstream()) && (! path->trustEstablished(now)) && (source != RR->identity.address())) {
return;
}

Loading…
Cancel
Save