diff options
author | Othmar Gsenger <otti@anytun.org> | 2014-08-28 20:34:27 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2014-08-28 20:34:27 +0000 |
commit | 2bb177f23ff44430c24faf8bc17e82c4bf0fe9f3 (patch) | |
tree | 82566d1ccaa9ecb93517a2ed82ceb344d5cdb364 | |
parent | new threading model complete, but not working (diff) |
new threading working, but only one crypto thread per direction possible yet
-rw-r--r-- | src/anytun.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/anytun.cpp b/src/anytun.cpp index 6fec2d7..8cb9c43 100644 --- a/src/anytun.cpp +++ b/src/anytun.cpp @@ -158,6 +158,7 @@ void threadReadTunDeviceAndWriteToPlainInQueue(TunDevice* dev, Channel<PlainPack // cLog.msg(Log::PRIO_DEBUG) << "threadReadTunDeviceAndWriteToPlainInQueue loop"; PlainPacket * plain_packet = NULL; plain_memory_pool->pop(&plain_packet); + plain_packet->setLength(MAX_PACKET_LENGTH); // cLog.msg(Log::PRIO_DEBUG) << "threadReadTunDeviceAndWriteToPlainInQueue after pop"; // read packet from device @@ -310,6 +311,7 @@ void threadReadSocketAndWriteToEncryptedInQueue( PacketSource*src, Channel<Encry for(;;) { EncryptedPacket * encrypted_packet = NULL; encrypted_memory_pool->pop(&encrypted_packet); + encrypted_packet->setLength(MAX_PACKET_LENGTH); PacketSourceEndpoint remote_end; encrypted_packet->withAuthTag(false); |