Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions feeds/qca-wifi-6/hostapd/files/hostapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,8 @@ hostapd_set_bss_options() {
set_default rrm_beacon_report 0
fi

[ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N"
[ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N"
append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N"
append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N"

json_get_vars ftm_responder stationary_ap lci civic
set_default ftm_responder 0
Expand Down
17 changes: 17 additions & 0 deletions feeds/qca-wifi-6/hostapd/patches/zzz-acl-radius-cui.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
--- a/src/ap/ieee802_11_auth.c
+++ b/src/ap/ieee802_11_auth.c
@@ -149,6 +149,14 @@
if (add_common_radius_attr(hapd, hapd->conf->radius_auth_req_attr,
NULL, msg) < 0)
goto fail;
+
+ if (hapd->conf->radius_request_cui &&
+ !radius_msg_add_attr(msg,
+ RADIUS_ATTR_CHARGEABLE_USER_IDENTITY,
+ (const u8 *) "\0", 1)) {
+ wpa_printf(MSG_DEBUG, "Could not add CUI");
+ goto fail;
+ }

os_snprintf(buf, sizeof(buf), RADIUS_802_1X_ADDR_FORMAT,
MAC2STR(addr));
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
From bc7ad0243307f12fbcb29200e7798b5290175a5f Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkat@nearhop.com>
Date: Fri, 6 Feb 2026 01:24:36 +0530
Subject: [PATCH] WiFi-6 / hostapd/ubus: Clear bss_mgmt_enable params when they
are disabled.

bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
once enabled through the ubus, are not disabled.
Disable them when they are not set.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
---
src/ap/ubus.c | 87 ++++++++++++++++++++---
1 file changed, 79 insertions(+), 8 deletions(-)

diff --git a/src/ap/ubus.c b/src/ap/ubus.c
index 2f7fdc0..cd8ffc5 100644
--- a/src/ap/ubus.c
+++ b/src/ap/ubus.c
@@ -1016,6 +1016,70 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
}
}

+static bool
+__hostapd_bss_mgmt_disable_f(struct hostapd_data *hapd, int flag)
+{
+ struct hostapd_bss_config *bss = hapd->conf;
+ uint32_t flags;
+
+ switch (flag) {
+ case BSS_MGMT_EN_NEIGHBOR:
+ if (bss->radio_measurements[0] &
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
+ bss->radio_measurements[0] &=
+ ~WLAN_RRM_CAPS_NEIGHBOR_REPORT;
+ return true;
+ }
+ return false;
+ case BSS_MGMT_EN_BEACON:
+ flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
+
+ if (bss->radio_measurements[0] & flags == flags) {
+ bss->radio_measurements[0] &= ~(u8) flags;
+ return true;
+ }
+ return false;
+#ifdef CONFIG_WNM_AP
+ case BSS_MGMT_EN_BSS_TRANSITION:
+ if (bss->bss_transition) {
+ bss->bss_transition = 0;
+ return true;
+ }
+
+ bss->bss_transition = 0;
+ return false;
+#endif
+ }
+}
+
+static int
+__hostapd_bss_mgmt_get_f(struct hostapd_data *hapd)
+{
+ struct hostapd_bss_config *bss = hapd->conf;
+ uint32_t beacon_flags;
+ int flags = 0;
+
+
+ if (bss->radio_measurements[0] &
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
+ flags |= (1 << BSS_MGMT_EN_NEIGHBOR);
+ }
+ beacon_flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
+
+ if (bss->radio_measurements[0] & beacon_flags == beacon_flags) {
+ flags |= (1 << BSS_MGMT_EN_BEACON);
+ }
+#ifdef CONFIG_WNM_AP
+ if (bss->bss_transition) {
+ flags |= (1 << BSS_MGMT_EN_BSS_TRANSITION);
+ }
+#endif
+ return flags;
+}
static void
__hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
{
@@ -1023,10 +1087,11 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
int i;

for (i = 0; i < __BSS_MGMT_EN_MAX; i++) {
- if (!(flags & (1 << i)))
- continue;
-
- update |= __hostapd_bss_mgmt_enable_f(hapd, i);
+ if (!(flags & (1 << i))) {
+ update |= __hostapd_bss_mgmt_disable_f(hapd, i);
+ } else {
+ update |= __hostapd_bss_mgmt_enable_f(hapd, i);
+ }
}

if (update)
@@ -1057,11 +1122,16 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,

blobmsg_parse(bss_mgmt_enable_policy, __BSS_MGMT_EN_MAX, tb, blob_data(msg), blob_len(msg));

+ flags = __hostapd_bss_mgmt_get_f(hapd);
for (i = 0; i < ARRAY_SIZE(tb); i++) {
- if (!tb[i] || !blobmsg_get_bool(tb[i]))
+ if (!tb[i]) {
continue;
-
- flags |= (1 << i);
+ }
+ if (blobmsg_get_bool(tb[i])) {
+ flags |= (1 << i);
+ } else {
+ flags &= ~(1 << i);
+ }
}

__hostapd_bss_mgmt_enable(hapd, flags);
@@ -1071,7 +1141,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
static void
hostapd_rrm_nr_enable(struct hostapd_data *hapd)
{
- __hostapd_bss_mgmt_enable(hapd, 1 << BSS_MGMT_EN_NEIGHBOR);
+ int flags = __hostapd_bss_mgmt_get_f(hapd);
+ __hostapd_bss_mgmt_enable(hapd, flags | (1 << BSS_MGMT_EN_NEIGHBOR));
}

static int
--
2.34.1

4 changes: 2 additions & 2 deletions feeds/qca-wifi-7/hostapd/files/hostapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -964,8 +964,8 @@ hostapd_set_bss_options() {
set_default rrm_beacon_report 0
fi

[ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N"
[ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N"
append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N"
append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N"
[ "$rnr" -eq "1" ] && append bss_conf "rnr=1" "$N"

json_get_vars ftm_responder stationary_ap lci civic
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
From 7d2f21d50e06755968953093a5d5badc811cbbc1 Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkat@nearhop.com>
Date: Thu, 5 Feb 2026 22:13:56 +0530
Subject: [PATCH] hostapd/ubus: Clear bss_mgmt_enable params when they are
disabled.

bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
once enabled through the ubus, are not disabled.
Disable them when they are not set.

Signed-off-by: Venkat Chimata <venkat@nearhop.com>
---
src/ap/ubus.c | 88 +++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 79 insertions(+), 9 deletions(-)

diff --git a/src/ap/ubus.c b/src/ap/ubus.c
index 4eb5a11..30e8a21 100644
--- a/src/ap/ubus.c
+++ b/src/ap/ubus.c
@@ -947,7 +947,6 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
if (bss->radio_measurements[0] &
WLAN_RRM_CAPS_NEIGHBOR_REPORT)
return false;
-
bss->radio_measurements[0] |=
WLAN_RRM_CAPS_NEIGHBOR_REPORT;
hostapd_neighbor_set_own_report(hapd);
@@ -973,6 +972,70 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
}
}

+static bool
+__hostapd_bss_mgmt_disable_f(struct hostapd_data *hapd, int flag)
+{
+ struct hostapd_bss_config *bss = hapd->conf;
+ uint32_t flags;
+
+ switch (flag) {
+ case BSS_MGMT_EN_NEIGHBOR:
+ if (bss->radio_measurements[0] &
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
+ bss->radio_measurements[0] &=
+ ~WLAN_RRM_CAPS_NEIGHBOR_REPORT;
+ return true;
+ }
+ return false;
+ case BSS_MGMT_EN_BEACON:
+ flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
+
+ if (bss->radio_measurements[0] & flags == flags) {
+ bss->radio_measurements[0] &= ~(u8) flags;
+ return true;
+ }
+ return false;
+#ifdef CONFIG_WNM_AP
+ case BSS_MGMT_EN_BSS_TRANSITION:
+ if (bss->bss_transition) {
+ bss->bss_transition = 0;
+ return true;
+ }
+
+ bss->bss_transition = 0;
+ return false;
+#endif
+ }
+}
+
+static int
+__hostapd_bss_mgmt_get_f(struct hostapd_data *hapd)
+{
+ struct hostapd_bss_config *bss = hapd->conf;
+ uint32_t beacon_flags;
+ int flags = 0;
+
+
+ if (bss->radio_measurements[0] &
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
+ flags |= (1 << BSS_MGMT_EN_NEIGHBOR);
+ }
+ beacon_flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
+
+ if (bss->radio_measurements[0] & beacon_flags == beacon_flags) {
+ flags |= (1 << BSS_MGMT_EN_BEACON);
+ }
+#ifdef CONFIG_WNM_AP
+ if (bss->bss_transition) {
+ flags |= (1 << BSS_MGMT_EN_BSS_TRANSITION);
+ }
+#endif
+ return flags;
+}
static void
__hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
{
@@ -980,10 +1043,11 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
int i;

for (i = 0; i < __BSS_MGMT_EN_MAX; i++) {
- if (!(flags & (1 << i)))
- continue;
-
- update |= __hostapd_bss_mgmt_enable_f(hapd, i);
+ if (!(flags & (1 << i))) {
+ update |= __hostapd_bss_mgmt_disable_f(hapd, i);
+ } else {
+ update |= __hostapd_bss_mgmt_enable_f(hapd, i);
+ }
}

if (update)
@@ -1014,11 +1078,16 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,

blobmsg_parse(bss_mgmt_enable_policy, __BSS_MGMT_EN_MAX, tb, blob_data(msg), blob_len(msg));

+ flags = __hostapd_bss_mgmt_get_f(hapd);
for (i = 0; i < ARRAY_SIZE(tb); i++) {
- if (!tb[i] || !blobmsg_get_bool(tb[i]))
+ if (!tb[i]) {
continue;
-
- flags |= (1 << i);
+ }
+ if (blobmsg_get_bool(tb[i])) {
+ flags |= (1 << i);
+ } else {
+ flags &= ~(1 << i);
+ }
}

__hostapd_bss_mgmt_enable(hapd, flags);
@@ -1028,7 +1097,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
static void
hostapd_rrm_nr_enable(struct hostapd_data *hapd)
{
- __hostapd_bss_mgmt_enable(hapd, 1 << BSS_MGMT_EN_NEIGHBOR);
+ int flags = __hostapd_bss_mgmt_get_f(hapd);
+ __hostapd_bss_mgmt_enable(hapd, flags | (1 << BSS_MGMT_EN_NEIGHBOR));
}

static int
--
2.34.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
From 975ef85e3fc478dc96b19d9862a1ade383fe48f8 Mon Sep 17 00:00:00 2001
From: Arif Alam <arif.alam@netexperience.com>
Date: Thu, 12 Mar 2026 09:53:21 -0400
Subject: [PATCH] openssl: x509: truncate CN in presence of other attr

Backport of upstream commit 5124ffe9d431ca866ef90cb6f5167a837fdc4840.
https://github.com/warmcat/libwebsockets/issues/2542

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
---
lib/tls/openssl/openssl-x509.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lib/tls/openssl/openssl-x509.c b/lib/tls/openssl/openssl-x509.c
index 185a84a8..df324aa0 100644
--- a/lib/tls/openssl/openssl-x509.c
+++ b/lib/tls/openssl/openssl-x509.c
@@ -77,7 +77,8 @@ lws_tls_openssl_cert_info(X509 *x509, enum lws_tls_cert_info type,
{
X509_NAME *xn;
#if !defined(LWS_PLAT_OPTEE)
- char *p;
+ char *p, *p1;
+ size_t rl;
#endif

if (!x509)
@@ -112,8 +113,16 @@ lws_tls_openssl_cert_info(X509 *x509, enum lws_tls_cert_info type,
return -1;
X509_NAME_oneline(xn, buf->ns.name, (int)len - 2);
p = strstr(buf->ns.name, "/CN=");
- if (p)
- memmove(buf->ns.name, p + 4, strlen(p + 4) + 1);
+ if (p) {
+ p += 4;
+ p1 = strchr(p, '/');
+ if (p1)
+ rl = (size_t)(p1 - p);
+ else
+ rl = strlen(p);
+ memmove(buf->ns.name, p, rl);
+ buf->ns.name[rl] = '\0';
+ }
buf->ns.len = (int)strlen(buf->ns.name);
return 0;
#endif
--
2.53.0

Loading
Loading