mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 21:37:17 +01:00
logging and ip checks
This commit is contained in:
parent
2a5af37075
commit
2679c58892
|
@ -552,7 +552,7 @@ namespace client
|
||||||
RemotePort(theirPort)
|
RemotePort(theirPort)
|
||||||
{
|
{
|
||||||
Receive();
|
Receive();
|
||||||
LogPrint(eLogDebug, "UDPSession: bound to", IPSocket.local_endpoint());
|
LogPrint(eLogDebug, "UDPSession: bound to ", IPSocket.local_endpoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -563,10 +563,12 @@ namespace client
|
||||||
void UDPSession::HandleReceived(const boost::system::error_code & ecode, std::size_t len)
|
void UDPSession::HandleReceived(const boost::system::error_code & ecode, std::size_t len)
|
||||||
{
|
{
|
||||||
if(!ecode) {
|
if(!ecode) {
|
||||||
|
LogPrint(eLogDebug, "UDPSession: forward ", len, "B from ", FromEndpoint);
|
||||||
i2p::datagram::DatagramDestination * dgram = Destination->GetDatagramDestination();
|
i2p::datagram::DatagramDestination * dgram = Destination->GetDatagramDestination();
|
||||||
if(dgram) {
|
if(dgram && FromEndpoint == ExpectedEndpoint) {
|
||||||
LastActivity = i2p::util::GetMillisecondsSinceEpoch();
|
LastActivity = i2p::util::GetMillisecondsSinceEpoch();
|
||||||
dgram->SendDatagramTo(m_Buffer, len, Identity, LocalPort, RemotePort);
|
dgram->SendDatagramTo(m_Buffer, len, Identity, LocalPort, RemotePort);
|
||||||
|
LogPrint(eLogDebug, "UDPSession: forward to ", Identity.ToBase32());
|
||||||
}
|
}
|
||||||
Receive();
|
Receive();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue