ike: Only track actually sent retransmits as outbound packets

Retransmission jobs for old requests for which we already received a
response previously left the impression that messages were sent more
recently than was actually the case.

task_manager_t always defined INVALID_STATE as possible return value if
no retransmit was sent, this just was never actually returned.

I guess we could further differentiate between actual invalid states
(e.g. if we already received the response) and when we don't send a
retransmit for other reasons e.g. because the IKE_SA became stale.
This commit is contained in:
Tobias Brunner
2020-06-02 14:07:06 +02:00
parent f3695d089b
commit 2edc73d84e
4 changed files with 88 additions and 81 deletions
+5 -4
View File
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2019 Tobias Brunner
* Copyright (C) 2006-2020 Tobias Brunner
* Copyright (C) 2006 Daniel Roethlisberger
* Copyright (C) 2005-2009 Martin Willi
* Copyright (C) 2005 Jan Hutter
@@ -872,10 +872,11 @@ struct ike_sa_t {
*
* @param message_id ID of the request to retransmit
* @return
* - SUCCESS
* - NOT_FOUND if request doesn't have to be retransmitted
* - SUCCESS if retransmit was sent
* - INVALID_STATE if no retransmit required
* - DESTROY_ME if this IKE_SA MUST be deleted
*/
status_t (*retransmit) (ike_sa_t *this, uint32_t message_id);
status_t (*retransmit)(ike_sa_t *this, uint32_t message_id);
/**
* Sends a DPD request to the peer.