[PATCH 2/7] AP: Add testing option to reject IEEE 802.1X Authentication frame groups
Andrei Otcheretianski
andrei.otcheretianski at intel.com
Tue Nov 24 06:30:23 PST 2026
From: Ilan Peer <ilan.peer at intel.com>
Add the ieee8021x_auth_reject_groups testing option that rejects the
listed groups with status FINITE_CYCLIC_GROUP_NOT_SUPPORTED even though
they are enabled and listed in the Supported Groups element.
Signed-off-by: Ilan Peer <ilan.peer at intel.com>
---
hostapd/config_file.c | 10 ++++++++++
src/ap/ap_config.c | 3 +++
src/ap/ap_config.h | 3 +++
src/ap/ieee802_11.c | 10 ++++++++++
4 files changed, 26 insertions(+)
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 1a9057b9d0..9debac3788 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3040,6 +3040,16 @@ static int hostapd_config_fill(struct hostapd_config *conf,
line, pos);
return 1;
}
+#ifdef CONFIG_TESTING_OPTIONS
+ } else if (os_strcmp(buf, "ieee8021x_auth_reject_groups") == 0) {
+ if (hostapd_parse_intlist(&bss->ieee8021x_auth_reject_groups,
+ pos)) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid ieee8021x_auth_reject_groups value '%s'",
+ line, pos);
+ return 1;
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_IEEE8021X_AUTH */
} else if (os_strcmp(buf, "wpa_group_rekey") == 0) {
bss->wpa_group_rekey = atoi(pos);
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index 86cfc281a7..5920b4fc7d 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -1022,6 +1022,9 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
#ifdef CONFIG_IEEE8021X_AUTH
os_free(conf->ieee8021x_auth_groups);
+#ifdef CONFIG_TESTING_OPTIONS
+ os_free(conf->ieee8021x_auth_reject_groups);
+#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_IEEE8021X_AUTH */
#ifdef CONFIG_PASN
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index c3cb04b3bd..251f3a5b5a 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1037,6 +1037,9 @@ struct hostapd_bss_config {
#endif /* CONFIG_ENC_ASSOC */
#ifdef CONFIG_IEEE8021X_AUTH
int *ieee8021x_auth_groups;
+#ifdef CONFIG_TESTING_OPTIONS
+ int *ieee8021x_auth_reject_groups;
+#endif /* CONFIG_TESTING_OPTIONS */
#endif /* CONFIG_IEEE8021X_AUTH */
#ifdef CONFIG_ROBUST_AV
bool enable_dscp_policy_capa;
diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 62e68ce685..c1e8323ff4 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -3476,6 +3476,16 @@ u16 wpa_auth_validate_802_1x_frame(struct hostapd_data *hapd,
group);
return WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED;
}
+#ifdef CONFIG_TESTING_OPTIONS
+ if (int_array_includes(hapd->conf->ieee8021x_auth_reject_groups,
+ group)) {
+ wpa_printf(MSG_INFO,
+ "Reject supported group %u (testing)",
+ group);
+
+ return WLAN_STATUS_FINITE_CYCLIC_GROUP_NOT_SUPPORTED;
+ }
+#endif /* CONFIG_TESTING_OPTIONS */
sta->eap_auth_data.group = group;
pubkey = elems->owe_dh + 2;
pubkey_len = elems->owe_dh_len - 2;
--
2.56.1
More information about the Hostap
mailing list