From 765e0e5c6b8b0398d86611093bc9ee18f482eb89 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 18 Mar 2022 13:33:33 -0400 Subject: [PATCH] correct 'i' size for SSU2 --- libi2pd/RouterInfo.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libi2pd/RouterInfo.cpp b/libi2pd/RouterInfo.cpp index 473c110e..e8d31925 100644 --- a/libi2pd/RouterInfo.cpp +++ b/libi2pd/RouterInfo.cpp @@ -279,9 +279,13 @@ namespace data } else if (!strcmp (key, "i")) // ntcp2 iv or ssu2 intro { - Base64ToByteStream (value, strlen (value), address->i, 16); if (address->IsNTCP2 ()) + { + Base64ToByteStream (value, strlen (value), address->i, 16); address->published = true; // presence of "i" means "published" NTCP2 + } + else + Base64ToByteStream (value, strlen (value), address->i, 32); } else if (key[0] == 'i') { @@ -1239,7 +1243,7 @@ namespace data WriteString (address.i.ToBase64 (len), properties); properties << ';'; } - if (isPublished || address.ssu) + if (isPublished || (address.ssu && !address.IsSSU2 ())) { WriteString ("port", properties); properties << '=';