I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 2ec0894c authored by zzz's avatar zzz
Browse files

SSU2: Relay WIP part 13

Reject SSU1/SSU2 relay request mismatch as Bob
parent d85d5012
No related branches found
No related tags found
No related merge requests found
......@@ -726,6 +726,11 @@ class IntroductionManager {
_context.statManager().addRateData("udp.receiveRelayRequestBadTag", 1);
return;
}
if (charlie.getVersion() != 1) {
if (_log.shouldWarn())
_log.warn("Receive SSU1 relay request from " + alice + " for SSU2 " + charlie);
return;
}
if (_log.shouldDebug())
_log.debug("Receive relay request from " + alice
+ " for tag " + tag
......@@ -798,7 +803,10 @@ class IntroductionManager {
_log.warn("Relay tag not found " + tag + " from " + alice);
rcode = SSU2Util.RELAY_REJECT_BOB_NO_TAG;
} else if (charlie.getVersion() != 2) {
return;
if (_log.shouldWarn())
_log.warn("Receive SSU2 relay request from " + alice + " for SSU1 " + charlie);
// add a code for this?
rcode = SSU2Util.RELAY_REJECT_BOB_NO_TAG;
} else {
aliceRI = _context.netDb().lookupRouterInfoLocally(alice.getRemotePeer());
if (aliceRI != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment