diff options
Diffstat (limited to 'src/anytun.cpp')
-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); |