summaryrefslogtreecommitdiff
path: root/encryptedPacket.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-01-31 11:59:15 +0000
committerOthmar Gsenger <otti@anytun.org>2008-01-31 11:59:15 +0000
commite7d0e0673edad1449eb2665d2a29266979e2f74e (patch)
tree0395b122e28087111a6fb7dc46f5d4541b3fdbd0 /encryptedPacket.cpp
parentpacket and cypher fixes (diff)
finallly working, payload type needs further checks
Diffstat (limited to 'encryptedPacket.cpp')
-rw-r--r--encryptedPacket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/encryptedPacket.cpp b/encryptedPacket.cpp
index 9c091b5..a8e7a36 100644
--- a/encryptedPacket.cpp
+++ b/encryptedPacket.cpp
@@ -93,6 +93,10 @@ void EncryptedPacket::setLength(u_int32_t length)
throw std::out_of_range("can't set length greater then size ofsize of allocated memory");
length_ = length;
+ if( auth_tag_)
+ payload_length_ = length_ - sizeof(struct HeaderStruct)+AUTHTAG_SIZE;
+ else
+ payload_length_ = length_ - sizeof(struct HeaderStruct);
}
void EncryptedPacket::setSeqNr(seq_nr_t seq_nr)