From 59fcb3f0b171b363bad72dbeaa6dbe117c87b8e4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 3 Jun 2019 17:28:50 +0300 Subject: [PATCH] RADIUS server: Add EAP-Key-Name into Access-Accept If the EAP Session-ID is available, add it into Access-Accept (EAP-Key-Name attribute). This is needed for MACsec. Signed-off-by: Jouni Malinen --- src/radius/radius_server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/radius/radius_server.c b/src/radius/radius_server.c index d352f26ee..e0c0d8230 100644 --- a/src/radius/radius_server.c +++ b/src/radius/radius_server.c @@ -1136,6 +1136,13 @@ radius_server_encapsulate_eap(struct radius_server_data *data, len)) { RADIUS_DEBUG("Failed to add MPPE key attributes"); } + + if (sess->eap_if->eapSessionId && + !radius_msg_add_attr(msg, RADIUS_ATTR_EAP_KEY_NAME, + sess->eap_if->eapSessionId, + sess->eap_if->eapSessionIdLen)) { + RADIUS_DEBUG("Failed to add EAP-Key-Name attribute"); + } } #ifdef CONFIG_HS20