From 5786044f530cc37198b38a719843cac730519b8c Mon Sep 17 00:00:00 2001 From: Othmar Gsenger Date: Tue, 11 Dec 2007 16:02:39 +0000 Subject: replay protection works again --- anytun.cpp | 4 ++-- syncSocket.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/anytun.cpp b/anytun.cpp index e1d065a..3ba5de9 100644 --- a/anytun.cpp +++ b/anytun.cpp @@ -281,8 +281,8 @@ void* receiver(void* p) } //Replay Protection - //if (!checkPacketSeqNr(pack,conn)) - // continue; + if (!checkPacketSeqNr(pack,conn)) + continue; if (!decryptPacket(pack, c, conn)) continue; diff --git a/syncSocket.cpp b/syncSocket.cpp index 677deb5..2edd7ca 100644 --- a/syncSocket.cpp +++ b/syncSocket.cpp @@ -37,17 +37,17 @@ void SyncSocket::OnReconnect() void SyncSocket::OnAccept() { - Send( Utility::GetLocalHostname() + "\n"); - Send( Utility::GetLocalAddress() + "\n"); - Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n"); - Send("\n"); +// Send( Utility::GetLocalHostname() + "\n"); +// Send( Utility::GetLocalAddress() + "\n"); +// Send("Number of sockets in list : " + Utility::l2string(Handler().GetCount()) + "\n"); +// Send("\n"); if( ! cl_.empty()) { std::ostringstream sout; boost::archive::text_oarchive oa(sout); const ConnectionParam conn = cl_.getConnection(); oa << conn; - Send(sout.str()+"\n"); + Send(sout.str()); } } -- cgit v1.2.3