aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd/patches/017-mesh-fix-mesh_oom-test.patch
blob: cc566c7de212b3b98b97541eda5aa63767a7a5ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 928da9a270deaf4409aee4d87a33a6f61b56c136 Mon Sep 17 00:00:00 2001
From: Markus Theil <markus.theil@tu-ilmenau.de>
Date: Tue, 30 Jun 2020 14:19:05 +0200
Subject: [PATCH 17/19] mesh: fix mesh_oom test

Only change freq params, if ifmsh->freq is set initially, which only
happens if hostapd_get_hw_features in setup_interface2 succeeds.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 wpa_supplicant/mesh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/wpa_supplicant/mesh.c
+++ b/wpa_supplicant/mesh.c
@@ -218,7 +218,7 @@ static int wpas_mesh_complete(struct wpa
 	 * inspect if channel's been changed since initialized.
 	 * i.e. DFS radar detection
 	 */
-	if (ifmsh->freq != params->freq.freq) {
+	if (ifmsh->freq > 0 && ifmsh->freq != params->freq.freq) {
 		wpa_s->assoc_freq = ifmsh->freq;
 		ssid->frequency = ifmsh->freq;
 		struct he_capabilities *he_capab = NULL;