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 <jouni@codeaurora.org>
This commit is contained in:
Jouni Malinen 2019-06-03 17:28:50 +03:00
parent b09670abfb
commit 59fcb3f0b1

View file

@ -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