refresh offline-signed transient on destination re-create

A repeated SESSION CREATE (SAM/I2CP) presenting a fresh offline-signature
transient of the same master resolves to the same identity hash, so
CreateNewLocalDestination returns the existing destination and the new
transient is dropped: the destination keeps signing LeaseSets with the old
transient and goes offline at its expiry.

Adopt the newer transient in place (swap keys and republish the LeaseSet,
without touching tunnels or streams) when its expiry is later, so an offline
transient can be rotated before it expires without rebuilding the destination.
This commit is contained in:
acetone committed 2026-06-19 21:43:24 +03:00
1 parent ec5131d342
commit acc0f94e49
3 files changed
+23 -1

No files matched your search

+4
View File
@@ -410,6 +410,8 @@ namespace client
if (it != m_Destinations.end ())
{
LogPrint (eLogWarning, "Clients: Local destination ", m_AddressBook.ToAddress(keys.GetPublic ()->GetIdentHash ()), " exists");
if (keys.IsOfflineSignature ())
it->second->UpdateOfflineSignature (keys);
it->second->Start (); // make sure to start
return it->second;
}
@@ -425,6 +427,8 @@ namespace client
if (it != m_Destinations.end ())
{
LogPrint (eLogWarning, "Clients: Local destination ", m_AddressBook.ToAddress(keys.GetPublic ()->GetIdentHash ()), " exists");
if (keys.IsOfflineSignature ())
it->second->UpdateOfflineSignature (keys);
it->second->Start (); // make sure to start
return it->second;
}