|
|
92bdd1 |
From 008e224dbb518f44aac46b0c8e55448bd907e43d Mon Sep 17 00:00:00 2001
|
|
|
92bdd1 |
Message-Id: <008e224dbb518f44aac46b0c8e55448bd907e43d.1488376601.git.dcaratti@redhat.com>
|
|
|
92bdd1 |
From: Sabrina Dubroca <sd@queasysnail.net>
|
|
|
92bdd1 |
Date: Wed, 2 Nov 2016 16:38:36 +0100
|
|
|
92bdd1 |
Subject: [PATCH] mka: Disable peer detection timeout for PSK mode
|
|
|
92bdd1 |
|
|
|
92bdd1 |
The first peer may take a long time to come up. In PSK mode we are
|
|
|
92bdd1 |
basically in a p2p system, and we cannot know when a peer will join the
|
|
|
92bdd1 |
key exchange. Wait indefinitely, and let the administrator decide if
|
|
|
92bdd1 |
they want to abort.
|
|
|
92bdd1 |
|
|
|
92bdd1 |
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
|
|
|
92bdd1 |
---
|
|
|
92bdd1 |
src/pae/ieee802_1x_kay.c | 12 ++++++++++--
|
|
|
92bdd1 |
1 file changed, 10 insertions(+), 2 deletions(-)
|
|
|
92bdd1 |
|
|
|
92bdd1 |
diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
|
|
|
92bdd1 |
index 2841b10..19b2c2f 100644
|
|
|
92bdd1 |
--- a/src/pae/ieee802_1x_kay.c
|
|
|
92bdd1 |
+++ b/src/pae/ieee802_1x_kay.c
|
|
|
92bdd1 |
@@ -3339,8 +3339,16 @@ ieee802_1x_kay_create_mka(struct ieee802_1x_kay *kay, struct mka_key_name *ckn,
|
|
|
92bdd1 |
usecs = os_random() % (MKA_HELLO_TIME * 1000);
|
|
|
92bdd1 |
eloop_register_timeout(0, usecs, ieee802_1x_participant_timer,
|
|
|
92bdd1 |
participant, NULL);
|
|
|
92bdd1 |
- participant->mka_life = MKA_LIFE_TIME / 1000 + time(NULL) +
|
|
|
92bdd1 |
- usecs / 1000000;
|
|
|
92bdd1 |
+
|
|
|
92bdd1 |
+ /* Disable MKA lifetime for PSK mode.
|
|
|
92bdd1 |
+ * The peer(s) can take a long time to come up, because we
|
|
|
92bdd1 |
+ * create a "standby" MKA, and we need it to remain live until
|
|
|
92bdd1 |
+ * some peer appears.
|
|
|
92bdd1 |
+ */
|
|
|
92bdd1 |
+ if (mode != PSK) {
|
|
|
92bdd1 |
+ participant->mka_life = MKA_LIFE_TIME / 1000 + time(NULL) +
|
|
|
92bdd1 |
+ usecs / 1000000;
|
|
|
92bdd1 |
+ }
|
|
|
92bdd1 |
|
|
|
92bdd1 |
return participant;
|
|
|
92bdd1 |
|
|
|
92bdd1 |
--
|
|
|
92bdd1 |
2.7.4
|
|
|
92bdd1 |
|