iv_gen: Provide external sequence number (IKE, ESP)

This prevents duplicate sequential IVs in case of a HA failover.
This commit is contained in:
Tobias Brunner
2013-10-11 15:55:40 +02:00
parent d74c254dfd
commit e8229ad558
7 changed files with 18 additions and 23 deletions
+1 -1
View File
@@ -1622,7 +1622,7 @@ METHOD(message_t, generate, status_t,
htoun32(lenpos, chunk.len + encryption->get_length(encryption));
}
this->payloads->insert_last(this->payloads, encryption);
if (encryption->encrypt(encryption, chunk) != SUCCESS)
if (encryption->encrypt(encryption, this->message_id, chunk) != SUCCESS)
{
generator->destroy(generator);
return INVALID_STATE;