From 0253e2d3f648653361d5028cd1782ac309608ea3 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 21 Jun 2022 09:51:49 -0400 Subject: [PATCH] different nonce location for PeerTest msg 2 and 4 --- libi2pd/SSU2Session.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/SSU2Session.cpp b/libi2pd/SSU2Session.cpp index 97e2d95f..84d27b36 100644 --- a/libi2pd/SSU2Session.cpp +++ b/libi2pd/SSU2Session.cpp @@ -1413,7 +1413,7 @@ namespace transport void SSU2Session::HandlePeerTest (const uint8_t * buf, size_t len) { - uint32_t nonce = bufbe32toh (buf + 36); + uint32_t nonce = bufbe32toh ((buf[0] == 2 || buf[0] == 4) ? buf + 36 : buf + 4); // hash is presented for msg 2 and 4 only switch (buf[0]) // msg { case 1: // Bob from Alice