summaryrefslogtreecommitdiff
path: root/cesar/cp/beacon/src/beacon.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/cp/beacon/src/beacon.c')
-rw-r--r--cesar/cp/beacon/src/beacon.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/cesar/cp/beacon/src/beacon.c b/cesar/cp/beacon/src/beacon.c
index 086253b8e1..1ecf0b015d 100644
--- a/cesar/cp/beacon/src/beacon.c
+++ b/cesar/cp/beacon/src/beacon.c
@@ -576,8 +576,17 @@ cp_beacon_process_bmi_eks (cp_t *ctx, const bsu_beacon_t *beacon)
|| (ctx->mac_config->nek_mgr.next_nek->eks
!= beacon->bmis.eks.new_eks))
{
- /* We don't have the new NEK. We need to ask for it. */
- cp_fsm_post_new_event (ctx, bare, nek_request);
+ /* We don't have the new NEK. We need to ask for it.
+ * But we don't want to ask many times. After all, this already
+ * is a fall-back mechanism in case we missed the CM_SET_KEY_REQ
+ * MME sent by the CCo before the start of a NEK change. It
+ * doesn't seem useful to insist that much. So, only ask once.
+ *
+ * If ctx->beacon.eks.kccd != 0, it means we are already aware
+ * of the countdown. So we already asked for the new missing
+ * NEK. */
+ if (ctx->beacon.eks.kccd == 0)
+ cp_fsm_post_new_event (ctx, bare, nek_request);
}
}