select proper SSU address for incoming sessions

This commit is contained in:
orignal 2014-10-29 21:16:27 -04:00
parent 67001e1696
commit 54ec71d30d
3 changed files with 11 additions and 4 deletions

View file

@ -327,7 +327,8 @@ namespace transport
void SSUSession::SendSessionCreated (const uint8_t * x)
{
auto introKey = GetIntroKey ();
auto address = i2p::context.GetRouterInfo ().GetSSUAddress ();
auto address = IsV6 () ? i2p::context.GetRouterInfo ().GetSSUV6Address () :
i2p::context.GetRouterInfo ().GetSSUAddress (true); //v4 only
if (!introKey || !address)
{
LogPrint (eLogError, "SSU is not supported");