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

This commit is contained in:
Adam Ierymenko 2025-08-25 11:22:21 -07:00
parent 0d3ed4769e
commit bed6557a6d
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3

View file

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