瀏覽代碼

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

Adam Ierymenko 2 周之前
父節點
當前提交
bed6557a6d
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      node/Switch.cpp

+ 1 - 4
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;
 					}