aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrey Kartashev <andrey.kartashev@afconsult.com>2018-11-02 18:02:17 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-26 14:42:25 (GMT)
commitc9c93e7a2414c78a0db4008e3c80c2173eb84942 (patch)
tree76a1df0ec996c6bc316665a5dd1ee5662b85a3d2 /src
parent54c6a69952e31b13cf6c75989ca472fb9e692a08 (diff)
downloadhostap-c9c93e7a2414c78a0db4008e3c80c2173eb84942.zip
hostap-c9c93e7a2414c78a0db4008e3c80c2173eb84942.tar.gz
hostap-c9c93e7a2414c78a0db4008e3c80c2173eb84942.tar.bz2
mka: Remember LowestPN for each key server
According IEEE Std 802.1X-2010, 9.8 each participant shall record the values of NextPN for last SAK accepted from each Key Server to use it in case of a switch from one Key Server to another and back. Add LPN recording and set saved value as the initial PN for the created channel. 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, 6 insertions, 1 deletions
diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
index dc9a47f..0e7f0f3 100644
--- a/src/pae/ieee802_1x_kay.c
+++ b/src/pae/ieee802_1x_kay.c
@@ -1435,6 +1435,8 @@ ieee802_1x_mka_decode_sak_use_body(
}
}
+ if (sa_key)
+ sa_key->next_pn = lpn;
found = FALSE;
dl_list_for_each(rxsc, &participant->rxsc_list, struct receive_sc,
list) {
@@ -1568,6 +1570,7 @@ static void ieee802_1x_kay_init_data_key(struct data_key *pkey)
pkey->receives = TRUE;
os_get_time(&pkey->created_time);
+ pkey->next_pn = 1;
pkey->user = 1;
}
@@ -2784,7 +2787,9 @@ int ieee802_1x_kay_create_sas(struct ieee802_1x_kay *kay,
ieee802_1x_delete_transmit_sa(kay, txsa);
txsa = ieee802_1x_kay_init_transmit_sa(principal->txsc, latest_sak->an,
- 1, latest_sak);
+ latest_sak->next_pn ?
+ latest_sak->next_pn : 1,
+ latest_sak);
if (!txsa)
return -1;