summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-07-28 07:25:08 +0000
committerFilip Tehlar <ftehlar@cisco.com>2020-07-28 07:25:08 +0000
commit4d1423c5ace249f6609a41fadec9e4b9c4b323de (patch)
treedbce72eb529ccf10711b36e242f8768378396d80
parent6977ed6cffbc43d39ef58da4fcbe1f719b4022ee (diff)
ikev2: fix session re-initiate after SA expires
Type: fix Change-Id: Ie3d24b3df02d08fbb74d97f4e5ab0d79c35b0c0d Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r--src/plugins/ikev2/ikev2.c3
-rw-r--r--src/plugins/ikev2/ikev2_priv.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/ikev2/ikev2.c b/src/plugins/ikev2/ikev2.c
index d8c94ffba28..a9e78a3dfc3 100644
--- a/src/plugins/ikev2/ikev2.c
+++ b/src/plugins/ikev2/ikev2.c
@@ -537,6 +537,7 @@ ikev2_calc_keys (ikev2_sa_t * sa)
pos += tr_prf->key_len;
vec_free (keymat);
+ sa->keys_generated = 1;
}
static void
@@ -4313,7 +4314,7 @@ ikev2_mngr_process_responder_sas (ikev2_sa_t * sa)
ikev2_main_t *km = &ikev2_main;
vlib_main_t *vm = km->vlib_main;
- if (!sa->sk_ai || !sa->sk_ar)
+ if (!sa->keys_generated)
return 0;
if (sa->liveness_retries >= km->liveness_max_retries)
diff --git a/src/plugins/ikev2/ikev2_priv.h b/src/plugins/ikev2/ikev2_priv.h
index 7e40ed34a5e..f8b0458db9c 100644
--- a/src/plugins/ikev2/ikev2_priv.h
+++ b/src/plugins/ikev2/ikev2_priv.h
@@ -441,6 +441,7 @@ typedef struct
/* is NAT traversal mode */
u8 natt;
+ u8 keys_generated;
} ikev2_sa_t;