aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrey Kartashev <andrey.kartashev@afconsult.com>2018-11-02 18:02:19 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-26 14:42:25 (GMT)
commitc20cc5833eb615a2f840f8da3512cd586ed7e441 (patch)
tree94be47cbafeae1d9145e05446dcb1be48357040a /src
parentc1576d44a839b4e75c8797b1b44b9463d2dfa189 (diff)
downloadhostap-c20cc5833eb615a2f840f8da3512cd586ed7e441.zip
hostap-c20cc5833eb615a2f840f8da3512cd586ed7e441.tar.gz
hostap-c20cc5833eb615a2f840f8da3512cd586ed7e441.tar.bz2
mka: Speed up processing of duplicated SCI
Decrease timeout for a peer with duplicated SCI to speed up process in case it is a valid peer after MI change. Signed-off-by: Andrey Kartashev <andrey.kartashev@afconsult.com>
Diffstat (limited to 'src')
-rw-r--r--src/pae/ieee802_1x_kay.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
index 92f2bd3..8862a0a 100644
--- a/src/pae/ieee802_1x_kay.c
+++ b/src/pae/ieee802_1x_kay.c
@@ -840,8 +840,15 @@ ieee802_1x_mka_decode_basic_body(struct ieee802_1x_kay *kay, const u8 *mka_msg,
peer = ieee802_1x_kay_get_peer_sci(participant,
&body->actor_sci);
if (peer) {
+ time_t new_expire;
+
wpa_printf(MSG_WARNING,
"KaY: duplicated SCI detected - maybe active attacker or peer selected new MI - ignore MKPDU");
+ /* Reduce timeout to speed up this process but left the
+ * chance for old one to prove aliveness. */
+ new_expire = time(NULL) + MKA_HELLO_TIME * 1.5 / 1000;
+ if (peer->expire > new_expire)
+ peer->expire = new_expire;
return NULL;
}