]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Calculate MTK before sending it to MAC in case Open is dropped
authorPeter Oh <poh@qca.qualcomm.com>
Fri, 29 Apr 2016 21:27:58 +0000 (14:27 -0700)
committerJouni Malinen <j@w1.fi>
Fri, 13 May 2016 17:54:51 +0000 (20:54 +0300)
IEEE Std 802.11-2012 13.5.6.3 State transitions require an action
sending SETKEYS primitive to MAC when OPN_ACPT event occurs in CNF_RCVD
state in case of AMPE is used, but since MTK calculation is missed in
this condition, all zero valued key are passed to MAC and cause unicast
packet decryption error. This could happen if the first transmission of
plink Open frame is dropped and Confirm frame is processed first
followed by retransmitted Open frame.

Fix this by calculating the MTK also in this sequence of unexpected
messages.

Signed-off-by: Peter Oh <poh@qca.qualcomm.com>
wpa_supplicant/mesh_mpm.c

index 6292e6277d3ba7d0e5e2f5453fc203cb0606bab9..a0b71748a3d5fc7ca2187f6b658f67a61dcec655 100644 (file)
@@ -934,6 +934,8 @@ static void mesh_mpm_fsm(struct wpa_supplicant *wpa_s, struct sta_info *sta,
                                                   PLINK_CLOSE, reason);
                        break;
                case OPN_ACPT:
+                       if (conf->security & MESH_CONF_SEC_AMPE)
+                               mesh_rsn_derive_mtk(wpa_s, sta);
                        mesh_mpm_plink_estab(wpa_s, sta);
                        mesh_mpm_send_plink_action(wpa_s, sta,
                                                   PLINK_CONFIRM, 0);