update introducer's iTag is session to introducer was replaced to new one

This commit is contained in:
orignal 2024-09-27 13:32:20 -04:00
parent c3a1631319
commit 64e4b3871a
6 changed files with 48 additions and 13 deletions

View file

@ -1554,5 +1554,23 @@ namespace data
}
return false;
}
bool LocalRouterInfo::UpdateSSU2Introducer (const IdentHash& h, bool v4, uint32_t iTag, uint32_t iExp)
{
auto addresses = GetAddresses ();
if (!addresses) return false;
auto addr = (*addresses)[v4 ? eSSU2V4Idx : eSSU2V6Idx];
if (addr)
{
for (auto& it: addr->ssu->introducers)
if (h == it.iH)
{
it.iTag = iTag;
it.iExp = iExp;
return true;
}
}
return false;
}
}
}