From 6dd2c6aaf9c34ea99beb24133a4dc265eeedd1d0 Mon Sep 17 00:00:00 2001 From: orignal Date: Wed, 27 Aug 2025 21:15:13 -0400 Subject: [PATCH] don't include remote ident hash to SYN packet if no signature --- libi2pd/Streaming.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 7e8747ad..122a26d2 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -955,10 +955,18 @@ namespace stream if (m_Status == eStreamStatusNew && !m_SendStreamID && m_RemoteIdentity) { // first SYN packet - packet[size] = 8; - size++; // NACK count - memcpy (packet + size, m_RemoteIdentity->GetIdentHash (), 32); - size += 32; + if (m_DontSign) + { + // remote ident is useless without signature, don't include it + packet[size] = 0; size++; // NACK count + } + else + { + packet[size] = 8; + size++; // NACK count + memcpy (packet + size, m_RemoteIdentity->GetIdentHash (), 32); + size += 32; + } } else {