Index: Datagrams.cpp =================================================================== --- Datagrams.cpp (revision 5371) +++ Datagrams.cpp (working copy) @@ -1365,6 +1365,18 @@ return FALSE; } + if ( ! (pHits->m_pAddress.S_un.S_un_b.s_b1 == pHost->sin_addr.S_un.S_un_b.s_b1 && + pHits->m_pAddress.S_un.S_un_b.s_b2 == pHost->sin_addr.S_un.S_un_b.s_b2 && + pHits->m_pAddress.S_un.S_un_b.s_b3 == pHost->sin_addr.S_un.S_un_b.s_b3 && + pHits->m_pAddress.S_un.S_un_b.s_b4 == pHost->sin_addr.S_un.S_un_b.s_b4 ) ) + { + pPacket->Debug( _T("UDP Sender IP does not match packet NA") ); + theApp.Message( MSG_ERROR, IDS_PROTOCOL_BAD_HIT, + (LPCTSTR)CString( inet_ntoa( pHost->sin_addr ) ) ); + Statistics.Current.Gnutella2.Dropped++; + return FALSE; + } + if ( Security.IsDenied( &pHits->m_pAddress ) || nHops > (int)Settings.Gnutella1.MaximumTTL ) { pHits->Delete();