Add external EAPOL transmission option for testing purposes
The new ext_eapol_frame_io parameter can be used to configure hostapd and wpa_supplicant to use control interface for receiving and transmitting EAPOL frames. This makes it easier to implement automated test cases for protocol testing. This functionality is included only in CONFIG_TESTING_OPTIONS=y builds. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
61fc90483f
commit
9d4ff04af3
8 changed files with 160 additions and 1 deletions
|
@ -66,6 +66,20 @@ static void ieee802_1x_send(struct hostapd_data *hapd, struct sta_info *sta,
|
|||
|
||||
if (wpa_auth_pairwise_set(sta->wpa_sm))
|
||||
encrypt = 1;
|
||||
#ifdef CONFIG_TESTING_OPTIONS
|
||||
if (hapd->ext_eapol_frame_io) {
|
||||
size_t hex_len = 2 * len + 1;
|
||||
char *hex = os_malloc(hex_len);
|
||||
|
||||
if (hex) {
|
||||
wpa_snprintf_hex(hex, hex_len, buf, len);
|
||||
wpa_msg(hapd->msg_ctx, MSG_INFO,
|
||||
"EAPOL-TX " MACSTR " %s",
|
||||
MAC2STR(sta->addr), hex);
|
||||
os_free(hex);
|
||||
}
|
||||
} else
|
||||
#endif /* CONFIG_TESTING_OPTIONS */
|
||||
if (sta->flags & WLAN_STA_PREAUTH) {
|
||||
rsn_preauth_send(hapd, sta, buf, len);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue