diff options
author | Christian Pointner <equinox@anytun.org> | 2008-03-03 18:37:34 +0000 |
---|---|---|
committer | Christian Pointner <equinox@anytun.org> | 2008-03-03 18:37:34 +0000 |
commit | 5680eef9744eb898ebf00df12747ef068650e8f2 (patch) | |
tree | 99d13aba44b2fc8c71b3c5d59527fde38bd1bbce | |
parent | fixed param short code collision (diff) |
bugfix @ authentication
-rw-r--r-- | anytun.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -123,7 +123,9 @@ void* sender(void* p) while(1) { plain_packet.setLength(MAX_PACKET_LENGTH); + encrypted_packet.withAuthTag(false); encrypted_packet.setLength(MAX_PACKET_LENGTH); + // read packet from device u_int32_t len = param->dev.read(plain_packet.getPayload(), plain_packet.getPayloadLength()); plain_packet.setPayloadLength(len); @@ -227,6 +229,7 @@ void* receiver(void* p) u_int16_t remote_port; plain_packet.setLength(MAX_PACKET_LENGTH); + encrypted_packet.withAuthTag(false); encrypted_packet.setLength(MAX_PACKET_LENGTH); // read packet from socket @@ -248,6 +251,7 @@ void* receiver(void* p) // check whether auth tag is ok or not if(a->getMaxLength()) { + encrypted_packet.withAuthTag(true); conn.kd_.generate(LABEL_SATP_MSG_AUTH, encrypted_packet.getSeqNr(), session_auth_key); a->setKey(session_auth_key); if(!a->checkTag(encrypted_packet)) { |