blob: f90b6a9f15305f069973b901717a779aea42d18b [file] [log] [blame]
developerac8397b2021-11-25 15:14:03 +08001diff --git a/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch b/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch
2new file mode 100644
3index 0000000..c14aef9
4--- /dev/null
5+++ b/package/network/services/hostapd/patches/902-print-sae-groups-by-hostapd-ctrl.patch
6@@ -0,0 +1,28 @@
7+--- a/hostapd/ctrl_iface.c
8++++ b/hostapd/ctrl_iface.c
9+@@ -1301,6 +1301,25 @@ static int hostapd_ctrl_iface_get_config
10+ pos += ret;
11+ }
12+
13++ if (hapd->conf->wpa && wpa_key_mgmt_sae(hapd->conf->wpa_key_mgmt)) {
14++ int *groups = hapd->conf->sae_groups;
15++ int default_groups[] = { 19, 0 };
16++ int i;
17++
18++ if (!groups)
19++ groups = default_groups;
20++
21++ for (i = 0; groups[i] > 0; i++) {
22++ ret = os_snprintf(pos, end - pos, "%s%d%s",
23++ i == 0 ? "sae_groups=" : "",
24++ groups[i],
25++ groups[i + 1] > 0 ? " " : "\n");
26++ if (os_snprintf_error(end - pos, ret))
27++ return pos - buf;
28++ pos += ret;
29++ }
30++ }
31++
32+ if (hapd->conf->wpa) {
33+ ret = os_snprintf(pos, end - pos, "group_cipher=%s\n",
34+ wpa_cipher_txt(hapd->conf->wpa_group));