summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2014-08-28 20:34:27 (GMT)
committerOthmar Gsenger <otti@anytun.org>2014-08-28 20:34:27 (GMT)
commit2bb177f23ff44430c24faf8bc17e82c4bf0fe9f3 (patch)
tree82566d1ccaa9ecb93517a2ed82ceb344d5cdb364
parent32bd6f8f365d47ad1c54931a1c58f7830927016a (diff)
new threading working, but only one crypto thread per direction possible yet
-rw-r--r--src/anytun.cpp2
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);