diff --git a/SSU.cpp b/SSU.cpp index aed6b218..ea4d4de1 100644 --- a/SSU.cpp +++ b/SSU.cpp @@ -69,6 +69,11 @@ namespace ssu // relay response ProcessRelayResponse (buf,len); break; + case eSessionRelayResponseReceived: + // HolePunch received + LogPrint ("SSU HolePuch of ", len, " bytes received"); + Established (); + break; case eSessionRelayRequestReceived: // HolePunch m_State = eSessionStateUnknown; @@ -386,6 +391,7 @@ namespace ssu payload += 2; LogPrint ("Our external address is ", ourIP.to_string (), ":", ourPort); i2p::context.UpdateAddress (ourIP.to_string ().c_str ()); + m_State= eSessionRelayResponseReceived; } else LogPrint ("Unexpected payload type ", (int)(header->flag >> 4)); diff --git a/SSU.h b/SSU.h index ff08f1f1..0976fc80 100644 --- a/SSU.h +++ b/SSU.h @@ -57,6 +57,7 @@ namespace ssu eSessionStateConfirmedReceived, eSessionRelayRequestSent, eSessionRelayRequestReceived, + eSessionRelayResponseReceived, eSessionStateEstablished };