Skip to content

Commit 7e542f6

Browse files
committed
hostapd: fix build error with SAE disabled
Fixes: b2a2c28 ("hostapd: add support for authenticating with multiple PSKs via ubus helper") Signed-off-by: Felix Fietkau <[email protected]>
1 parent eeb59f8 commit 7e542f6

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

package/network/services/hostapd/patches/601-ucode_support.patch

+8-4
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ as adding/removing interfaces.
725725
for (pw = hapd->conf->sae_passwords; pw; pw = pw->next) {
726726
if (!is_broadcast_ether_addr(pw->peer_addr) &&
727727
(!sta ||
728-
@@ -582,12 +587,28 @@ const char * sae_get_password(struct hos
728+
@@ -582,12 +587,30 @@ const char * sae_get_password(struct hos
729729
pt = hapd->conf->ssid.pt;
730730
}
731731

@@ -741,6 +741,7 @@ as adding/removing interfaces.
741741
+ if (!sta->use_sta_psk)
742742
+ break;
743743
+
744+
+#ifdef CONFIG_SAE
744745
+ if (sta->sae_pt) {
745746
+ pt = sta->sae_pt;
746747
break;
@@ -753,10 +754,11 @@ as adding/removing interfaces.
753754
+ NULL);
754755
+ sta->sae_pt = pt;
755756
+ break;
757+
+#endif
756758
}
757759
}
758760

759-
@@ -3229,6 +3250,12 @@ static void handle_auth(struct hostapd_d
761+
@@ -3229,6 +3252,12 @@ static void handle_auth(struct hostapd_d
760762
goto fail;
761763
}
762764

@@ -771,17 +773,19 @@ as adding/removing interfaces.
771773

772774
--- a/src/ap/sta_info.c
773775
+++ b/src/ap/sta_info.c
774-
@@ -474,6 +474,9 @@ void ap_free_sta(struct hostapd_data *ha
776+
@@ -474,6 +474,11 @@ void ap_free_sta(struct hostapd_data *ha
775777
forced_memzero(sta->last_tk, WPA_TK_MAX_LEN);
776778
#endif /* CONFIG_TESTING_OPTIONS */
777779

780+
+#ifdef CONFIG_SAE
778781
+ if (sta->sae_pt)
779782
+ sae_deinit_pt(sta->sae_pt);
783+
+#endif
780784
+
781785
os_free(sta);
782786
}
783787

784-
@@ -1507,6 +1510,8 @@ void ap_sta_set_authorized_event(struct
788+
@@ -1507,6 +1512,8 @@ void ap_sta_set_authorized_event(struct
785789
#endif /* CONFIG_P2P */
786790
const u8 *ip_ptr = NULL;
787791

package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
372372

373373
#ifdef CONFIG_FILS
374374
static struct wpabuf *
375-
@@ -3615,8 +3618,8 @@ static u16 check_multi_ap(struct hostapd
375+
@@ -3617,8 +3620,8 @@ static u16 check_multi_ap(struct hostapd
376376
}
377377

378378

@@ -383,7 +383,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
383383
{
384384
/* Supported rates not used in IEEE 802.11ad/DMG */
385385
if (hapd->iface->current_mode &&
386-
@@ -4003,7 +4006,7 @@ static int __check_assoc_ies(struct host
386+
@@ -4005,7 +4008,7 @@ static int __check_assoc_ies(struct host
387387
elems->ext_capab_len);
388388
if (resp != WLAN_STATUS_SUCCESS)
389389
return resp;
@@ -392,7 +392,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
392392
if (resp != WLAN_STATUS_SUCCESS)
393393
return resp;
394394

395-
@@ -6058,6 +6061,11 @@ static void handle_beacon(struct hostapd
395+
@@ -6060,6 +6063,11 @@ static void handle_beacon(struct hostapd
396396
0);
397397

398398
ap_list_process_beacon(hapd->iface, mgmt, &elems, fi);

package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/src/ap/sta_info.c
22
+++ b/src/ap/sta_info.c
3-
@@ -1836,3 +1836,22 @@ void ap_sta_free_sta_profile(struct mld_
3+
@@ -1914,3 +1914,22 @@ void ap_sta_free_sta_profile(struct mld_
44
}
55
}
66
#endif /* CONFIG_IEEE80211BE */
@@ -25,7 +25,7 @@
2525
+
2626
--- a/src/ap/sta_info.h
2727
+++ b/src/ap/sta_info.h
28-
@@ -417,23 +417,8 @@ int ap_sta_re_add(struct hostapd_data *h
28+
@@ -408,23 +408,8 @@ int ap_sta_re_add(struct hostapd_data *h
2929

3030
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);
3131

0 commit comments

Comments
 (0)