Compare commits

...

23 Commits

Author SHA1 Message Date
Arif Alam
60a714f15d ath11k: improve peer deletion timeout error handling and fix memory leak
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-09-04 01:13:04 -04:00
Arif Alam
c27b015a63 est_client: fix certificate issuer matching
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-29 22:52:28 -04:00
Arif Alam
02c2e6945b est_client: cloud_discovery: fixup demo environment
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-08-28 21:39:54 -04:00
Sebastian Huang
e7cd5038ac mediatek-sdk: Disable surge protection mode for AN8801SB PHY driver
Signed-off-by: Sebastian Huang <sebastian_huang@accton.com>
2025-08-20 08:16:30 +02:00
Paul White
34e4a01e25 ucentral-state: Respect LED config before enabling
Ensure that LEDs are configured to be ON before attempting to change their state.

Previously, if the LED was configured to be OFF, it would still enter a double-blink
state when the cloud connection was lost, and then switch to solid ON upon
reconnection—ignoring the configured OFF state.

This update changes that behavior:
    - If LEDs are configured OFF, they will remain OFF even during cloud
      disconnection (no double-blink).
    - After temporary state changes (e.g., during factory reset), the LED will
      return to its configured state (either OFF or ON).

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-20 08:16:08 +02:00
Tanya Singh
60e9fb2645 cloud_discover: typo fix in DHCP script option 138
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-19 07:33:01 +02:00
John Crispin
b995833a03 cloud_discovery: fix typo
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 16:58:33 +02:00
John Crispin
9866d4a86e cloud_discovery: update CDS QA endpoint
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 16:14:42 +02:00
John Crispin
143d4e3b58 cloud_discovery: make the reenrollment process more robust
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 11:44:04 +02:00
John Crispin
0735fd8c9a elfutils: fix build with GCC11
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-14 10:31:04 +02:00
Tanya Singh
c7f9061eee cloud_discovery: Fix typo in cloud_discovery script
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-14 07:57:59 +02:00
Paul White
f4a58c0989 qca-ssdk: Move MIB loop cnt variable to handle
The MIB loop cnt variable was defined as a static variable in the function that
implements the loop, however this function can be called for more than one switch
on some platforms.   This results in a race condition that leads to memory
corruption and kernel crashes.

The fix moves the loop cnt variable to the passed in switch handle, this way
there is one per switch chip.   Thix fix was identified by looking at newer
versions of the qca-ssdk software package from QCA.

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-13 14:39:38 +02:00
John Crispin
cd78a832e3 cloud_discovery: use production CDS for migration path
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-13 14:35:42 +02:00
Paul White
7b6fc736f6 base-files: boot: add sync after uci-defaults
A scenario was seen where UCI config was not flushed to disk before
an AP power-cycle after uci-defaults was completed.  Since these
scripts are deleted after being ran once, there is no way to recover
without a factory reset.

Adding this sync operation proved to help avoid this situation from
happening

Signed-off-by: Paul White <paul@shasta.cloud>
2025-08-12 19:19:10 +02:00
John Crispin
f997f8dff0 tip-defaults: add operational OpenLan root CA
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-12 19:11:54 +02:00
John Crispin
c4b3eeed81 est_client: switch to production environment
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-11 06:36:22 +02:00
John Crispin
b2ba9d7c1b ucentral-client: update to latest HEAD
549e84e ucentral-client: Add discovery metadata to connect payload

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-11 06:13:02 +02:00
Marek Kwaczynski
b982f3f4c2 cloud_discovery: Track and persist discovery method
Adds support for recording the method used to discover the cloud
controller (e.g. DHCP, FLASH, OpenLAN).
The selected method  records the current date and time along
with the discovery method into "/etc/ucentral/discovery.state.json".
The date is stored in epoch format.

Fixed: WIFI-14966

Signed-off-by: Marek Kwaczynski <marek@shasta.cloud>
2025-08-11 05:41:36 +02:00
John Crispin
68dfd58303 wireless-regdb: disable channel 14 in JP
Fixes: WIFI-14962
Signed-off-by: John Crispin <john@phrozen.org>
2025-08-07 14:51:33 +02:00
John Crispin
6ba26cba2b est_client: add a function to validate that the CN is correct
cloud_discovery will not start if the CN does not match the devices serial.
an error will be written to syslog

---
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: The certificate used has a CN that does not match the serial of the device
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
Wed Aug  6 14:23:23 2025 user.notice root: ERROR
---

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-06 16:23:57 +02:00
John Crispin
b5b276bfcc est_client: check if a cert is present inside the fwtool helper
This was causing devices without a birt cert being present from doing a
sysupgrade.

Signed-off-by: John Crispin <john@phrozen.org>
2025-08-06 11:03:59 +02:00
Tanya Singh
de7dc7e01a ipq50xx: Fix bootbank switching when firmware upgrade is triggered for Edgecore EAP104 and OAP101 series
Fixes: WIFI-14957
Signed-off-by: Tanya Singh <tanya_singh@accton.com>
2025-08-06 10:54:55 +02:00
jackcybertan
a967d67af3 qca-wifi-7: Added ramoops support for SonicFi IPQ5332 devices
Fixes: WIFI-14869
Signed-off-by: jackcybertan <jack.tsai@cybertan.com.tw>
2025-08-06 10:53:52 +02:00
19 changed files with 438 additions and 46 deletions

View File

@@ -107,29 +107,42 @@ platform_do_upgrade() {
board=$(board_name)
case $board in
glinet,b3000|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
edgecore,eap104)
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
else
CI_UBIPART="rootfs1"
CI_FWSETENV="active 1"
fi
fi
nand_upgrade_tar "$1"
;;
glinet,b3000)
CI_UBIPART="rootfs1"
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"
nand_upgrade_tar "$1"
;;
hfcl,ion4x_w|\
hfcl,ion4x_w|\
hfcl,ion4xi_w)
wp_part=$(fw_printenv primary | cut -d = -f2)
echo "Current Primary is $wp_part"
if [[ $wp_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="primary 0"
else
CI_UBIPART="rootfs_1"
CI_FWSETENV="primary 1"
fi
nand_upgrade_tar "$1"
;;
wp_part=$(fw_printenv primary | cut -d = -f2)
echo "Current Primary is $wp_part"
if [[ $wp_part == 1 ]]; then
CI_UBIPART="rootfs"
CI_FWSETENV="primary 0"
else
CI_UBIPART="rootfs_1"
CI_FWSETENV="primary 1"
fi
nand_upgrade_tar "$1"
;;
cig,wf186w|\
cig,wf186h|\
emplus,wap385c|\

View File

@@ -0,0 +1,10 @@
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -902,6 +902,7 @@ int ath11k_peer_create(struct ath11k *ar
if (vdev_id == param->vdev_id)
return -EINVAL;
+ ath11k_dp_peer_cleanup(ar, vdev_id, param->peer_addr);
ath11k_peer_delete(ar, vdev_id, param->peer_addr);
}

View File

@@ -0,0 +1,54 @@
From f211976a35c898f39d5a2602dd2a076a7b7cebd2 Mon Sep 17 00:00:00 2001
From: Arif Alam <arif.alam@netexperience.com>
Date: Tue, 2 Sep 2025 20:07:06 -0400
Subject: [PATCH] ath11k: improve peer deletion timeout and error handling
Signed-off-by: Arif Alam <arif.alam@netexperience.com>
---
drivers/net/wireless/ath/ath11k/peer.c | 9 ++++++---
drivers/net/wireless/ath/ath11k/peer.h | 2 ++
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
index 1907067..d5dbf40 100644
--- a/drivers/net/wireless/ath/ath11k/peer.c
+++ b/drivers/net/wireless/ath/ath11k/peer.c
@@ -771,7 +771,7 @@ int ath11k_wait_for_peer_delete_done(struct ath11k *ar, u32 vdev_id,
}
time_left = wait_for_completion_timeout(&ar->peer_delete_done,
- 3 * HZ);
+ msecs_to_jiffies(ATH11K_PEER_DELETE_MSG_TIMEOUT_MS));
if (time_left == 0) {
ath11k_warn(ar->ab, "Timeout in receiving peer delete response\n");
return -ETIMEDOUT;
@@ -857,8 +857,11 @@ int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr)
}
ret = ath11k_wait_for_peer_delete_done(ar, vdev_id, addr);
- if (ret)
- return ret;
+ if (ret) {
+ ath11k_warn(ar->ab,
+ "failed wait for peer %pM delete done id %d ret %d\n",
+ addr, vdev_id, ret);
+ }
ATH11K_MEMORY_STATS_DEC(ar->ab, per_peer_object,
sizeof(struct ath11k_peer));
diff --git a/drivers/net/wireless/ath/ath11k/peer.h b/drivers/net/wireless/ath/ath11k/peer.h
index c1a6464..ca20627 100644
--- a/drivers/net/wireless/ath/ath11k/peer.h
+++ b/drivers/net/wireless/ath/ath11k/peer.h
@@ -6,6 +6,8 @@
#ifndef ATH11K_PEER_H
#define ATH11K_PEER_H
+#define ATH11K_PEER_DELETE_MSG_TIMEOUT_MS 100
+
struct ppdu_user_delayba {
u8 reserved0;
u16 sw_peer_id;
--
2.50.1

View File

@@ -0,0 +1,61 @@
--- a/include/init/ssdk_plat.h
+++ b/include/init/ssdk_plat.h
@@ -330,6 +330,7 @@ struct qca_phy_priv {
struct mii_bus *miibus;
/*qca808x_end*/
u64 *mib_counters;
+ a_uint32_t mib_loop_cnt;
/* dump buf */
a_uint8_t buf[2048];
a_uint32_t link_polling_required;
--- a/src/ref/ref_mib.c
+++ b/src/ref/ref_mib.c
@@ -479,39 +479,37 @@ qca_ar8327_sw_get_port_mib(struct switch
#endif
int
-_qca_ar8327_sw_capture_port_tx_counter(struct qca_phy_priv *priv, int port)
+_qca_ar8327_sw_capture_port_tx_counter(a_uint32_t dev_id, int port)
{
fal_mib_info_t mib_Info;
memset(&mib_Info, 0, sizeof(fal_mib_info_t));
- fal_get_tx_mib_info(priv->device_id, port, &mib_Info);
+ fal_get_tx_mib_info(dev_id, port, &mib_Info);
return 0;
}
int
-_qca_ar8327_sw_capture_port_rx_counter(struct qca_phy_priv *priv, int port)
+_qca_ar8327_sw_capture_port_rx_counter(a_uint32_t dev_id, int port)
{
fal_mib_info_t mib_Info;
memset(&mib_Info, 0, sizeof(fal_mib_info_t));
- fal_get_rx_mib_info(priv->device_id, port, &mib_Info);
+ fal_get_rx_mib_info(dev_id, port, &mib_Info);
return 0;
}
void
qca_ar8327_sw_mib_task(struct qca_phy_priv *priv)
{
- static int loop = 0;
-
mutex_lock(&priv->reg_mutex);
- if ((loop % 2) == 0)
- _qca_ar8327_sw_capture_port_rx_counter(priv, loop/2);
+ if ((priv->mib_loop_cnt % 2) == 0)
+ _qca_ar8327_sw_capture_port_rx_counter(priv->device_id, priv->mib_loop_cnt/2);
else
- _qca_ar8327_sw_capture_port_tx_counter(priv, loop/2);
+ _qca_ar8327_sw_capture_port_tx_counter(priv->device_id, priv->mib_loop_cnt/2);
- if(++loop == (2 * (priv->ports))) {
- loop = 0;
+ if(++priv->mib_loop_cnt == (2 * (priv->ports))) {
+ priv->mib_loop_cnt = 0;
}
mutex_unlock(&priv->reg_mutex);

View File

@@ -200,7 +200,7 @@
phy-mode = "sgmii";
full-duplex;
pause;
airoha,surge = <1>;
airoha,surge = <0>;
airoha,polarity = <2>;
};

View File

@@ -31,6 +31,20 @@
stdout-path = "serial0";
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
ramoops@49c00000 {
compatible = "ramoops";
reg = <0x0 0x49c00000 0x0 0x100000>;
record-size = <0x20000>;
console-size = <0x20000>;
pmsg-size = <0x20000>;
};
};
soc@0 {
mdio:mdio@90000 {
pinctrl-0 = <&mdio1_pins>;

View File

@@ -190,6 +190,14 @@
/delete-node/ wcnss@4a900000;
/delete-node/ q6_caldb_region@4ce00000;
ramoops@49c00000 {
compatible = "ramoops";
reg = <0x0 0x49c00000 0x0 0x100000>;
record-size = <0x20000>;
console-size = <0x20000>;
pmsg-size = <0x20000>;
};
q6_mem_regions: q6_mem_regions@4A900000 {
no-map;
reg = <0x0 0x4A900000 0x0 0x5100000>;

View File

@@ -190,6 +190,14 @@
/delete-node/ wcnss@4a900000;
/delete-node/ q6_caldb_region@4ce00000;
ramoops@49c00000 {
compatible = "ramoops";
reg = <0x0 0x49c00000 0x0 0x100000>;
record-size = <0x20000>;
console-size = <0x20000>;
pmsg-size = <0x20000>;
};
q6_mem_regions: q6_mem_regions@4A900000 {
no-map;
reg = <0x0 0x4A900000 0x0 0x5100000>;

View File

@@ -190,6 +190,14 @@
/delete-node/ wcnss@4a900000;
/delete-node/ q6_caldb_region@4ce00000;
ramoops@49c00000 {
compatible = "ramoops";
reg = <0x0 0x49c00000 0x0 0x100000>;
record-size = <0x20000>;
console-size = <0x20000>;
pmsg-size = <0x20000>;
};
q6_mem_regions: q6_mem_regions@4A900000 {
no-map;
reg = <0x0 0x4A900000 0x0 0x5100000>;

View File

@@ -22,6 +22,19 @@ start_service() {
[ "$valid" == "true" ] ||
/usr/share/ucentral/ucentral.uc /etc/ucentral/ucentral.cfg.0000000001 > /dev/null
est_client check
[ $? -eq 1 ] && {
logger ERROR
logger ERROR
logger ERROR
logger The certificate used has a CN that does not match the serial of the device
echo The certificate used has a CN that does not match the serial of the device
logger ERROR
logger ERROR
logger ERROR
return
}
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn

View File

@@ -15,9 +15,14 @@ const ONLINE = 2;
const OFFLINE = 3;
const ORPHAN = 4;
const DISCOVER_DHCP = "DHCP";
const DISCOVER_FLASH = "FLASH";
const DISCOVER_LOOKUP = "OpenLAN";
let ubus = libubus.connect();
let uci = libuci.cursor();
let state = DISCOVER;
let discovery_method = "";
let validate_time;
let offline_time;
let orphan_time;
@@ -28,7 +33,7 @@ let timeouts = {
'orphan': 2 * 60 * 60,
interval: 10000,
expiry_interval: 60 * 60 * 1000,
expiry_threshold: 3 * 24 * 60 * 60,
expiry_threshold: 1 * 365 * 24 * 60 * 60,
};
ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "cloud_discover");
@@ -37,6 +42,24 @@ ulog(LOG_INFO, 'Start\n');
uloop.init();
let cds_server = 'discovery.open-lan.org';
function detect_certificate_type() {
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
let issuer = pipe.read("all");
pipe.close();
if (match(issuer, /OpenLAN Demo Birth CA/)) {
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
cds_server = 'discovery-qa.open-lan.org';
timeouts.expiry_threshold = 3 * 24 * 60 * 60;
} else if (match(issuer, /OpenLAN Birth Issuing CA/)) {
ulog(LOG_INFO, 'Certificate type is "Production"\n');
} else {
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
}
}
function readjsonfile(path) {
let file = fs.readfile(path);
if (file)
@@ -78,6 +101,14 @@ function gateway_load() {
return readjsonfile('/etc/ucentral/gateway.json');
}
function discovery_state_write() {
let discovery_state = {
"type": discovery_method,
"updated": time()
};
fs.writefile('/etc/ucentral/discovery.state.json', discovery_state);
}
function gateway_write(data) {
let gateway = gateway_load();
gateway ??= {};
@@ -91,9 +122,10 @@ function gateway_write(data) {
if (new[key] != gateway[key])
changed = true;
}
if (changed)
if (changed) {
fs.writefile('/etc/ucentral/gateway.json', new);
system('sync');
}
return changed;
}
@@ -130,6 +162,7 @@ function set_state(set) {
if (prev == VALIDATING) {
ulog(LOG_INFO, 'Setting cloud controller to validated\n');
gateway_write({ valid: true });
discovery_state_write();
}
break;
@@ -164,7 +197,7 @@ function redirector_lookup() {
let serial = uci.get('system', '@system[-1]', 'mac');
fs.unlink(path);
system(`curl -k --cert /etc/ucentral/operational.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/operational.ca https://openlan.keys.tip.build/v1/devices/${serial} --output /tmp/ucentral.redirector`);
system(`curl -k --cert /etc/ucentral/operational.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/operational.ca https://${cds_server}/v1/devices/${serial} --output /tmp/ucentral.redirector`);
if (!fs.stat(path))
return;
let redir = readjsonfile(path);
@@ -227,15 +260,18 @@ function interval_handler() {
if (!time_is_valid())
return;
discovery_method = DISCOVER_DHCP;
if (discover_dhcp())
return;
if (system('/usr/bin/est_client enroll'))
return;
discovery_method = DISCOVER_FLASH;
if (!discover_flash())
return;
discovery_method = DISCOVER_LOOKUP;
redirector_lookup();
break;
@@ -255,6 +291,36 @@ function interval_handler() {
}
}
function trigger_reenroll() {
ulog(LOG_INFO, 'triggering reenroll\n');
if (system('/usr/bin/est_client reenroll')) {
ulog(LOG_INFO, 'reenroll failed\n');
return;
}
ulog(LOG_INFO, 'reenroll succeeded\n');
ulog(LOG_INFO, 'stopping client\n');
system('/etc/init.d/ucentral stop');
set_state(DISCOVER);
}
function expiry_handler() {
let stat = fs.stat('/etc/ucentral/operational.ca');
if (!stat)
return;
let ret = system(`openssl x509 -checkend ${timeouts.expiry_threshold} -noout -in /certificates/operational.pem`);
if (!ret) {
ulog(LOG_INFO, 'checked certificate expiry - all ok\n');
return;
}
ulog(LOG_INFO, 'certificate will expire soon\n');
trigger_reenroll();
}
let ubus_methods = {
discover: {
call: function(req) {
@@ -329,28 +395,16 @@ let ubus_methods = {
},
args: {},
},
reenroll: {
call: function(req) {
trigger_reenroll();
return 0;
},
args: {},
},
};
function expiry_handler() {
let stat = fs.stat('/etc/ucentral/operational.ca');
if (!stat)
return;
let ret = system(`openssl x509 -checkend ${timeouts.expiry_threshold} -noout -in /certificates/operational.pem`);
if (!ret) {
ulog(LOG_INFO, 'checked certificate expiry - all ok\n');
return;
}
ulog(LOG_INFO, 'certificate will expire soon\n');
if (system('/usr/bin/est_client reenroll')) {
ulog(LOG_INFO, 'reenroll failed\n');
return;
}
ulog(LOG_INFO, 'reenroll succeeded\n');
ulog(LOG_INFO, '(re)starting client\n');
system('/etc/init.d/ucentral restart');
}
detect_certificate_type();
if (gateway_available()) {
let status = ubus.call('ucentral', 'status');

View File

@@ -4,12 +4,28 @@
import { ulog_open, ulog, ULOG_SYSLOG, ULOG_STDIO, LOG_DAEMON, LOG_INFO } from 'log';
import * as fs from 'fs';
import * as libuci from 'uci';
let store_operational_pem = false;
let store_operational_ca = false;
let est_server = 'qaest.certificates.open-lan.org:8001';
let est_server = 'est.certificates.open-lan.org';
let cert_prefix = 'operational';
function set_est_server() {
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
let issuer = pipe.read("all");
pipe.close();
if (match(issuer, /OpenLAN Demo Birth CA/)) {
ulog(LOG_INFO, 'Certificate type is "Demo" \n');
est_server = 'qaest.certificates.open-lan.org:8001';
} else if (match(issuer, /OpenLAN Birth Issuing CA/)) {
ulog(LOG_INFO, 'Certificate type is "Production"\n');
} else {
ulog(LOG_INFO, 'Certificate type is "TIP"\n');
}
}
if (getenv('EST_SERVER'))
est_server = getenv('EST_SERVER');
@@ -78,6 +94,8 @@ function call_est_server(path, cert, target) {
if (generate_csr(cert))
return 1;
set_est_server();
let ret = system('curl -m 10 -X POST https://' + est_server + '/.well-known/est/' + path + ' -d @/tmp/csr.nohdr.p10 -H "Content-Type: application/pkcs10" --cert ' + cert + ' --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/operational.nohdr.p7');
if (ret) {
ulog(LOG_INFO, 'Failed to request operational certificate\n');
@@ -125,6 +143,9 @@ function load_operational_ca() {
ulog(LOG_INFO, 'Operational CA is present\n');
return 0;
}
set_est_server();
let ret = system('curl -m 10 -X GET https://' + est_server + '/.well-known/est/cacerts --cert /etc/ucentral/' + cert_prefix + '.pem --key /etc/ucentral/key.pem --cacert /etc/ucentral/insta.pem -o /tmp/' + cert_prefix + '.ca.nohdr.p7');
if (!ret)
ret = p7_too_pem('/tmp/' + cert_prefix + '.ca.nohdr.p7', '/etc/ucentral/' + cert_prefix + '.ca');
@@ -139,11 +160,14 @@ function load_operational_ca() {
}
function fwtool() {
if (!fs.stat('/etc/ucentral/cert.pem'))
return 0;
let pipe = fs.popen(`openssl x509 -in /etc/ucentral/cert.pem -noout -issuer`);
let issuer = pipe.read("all");
pipe.close();
if (!(match(issuer, /OpenLAN/) && match(issuer, /Birth CA/)))
if (!(match(issuer, /OpenLAN/) && match(issuer, /Birth/)))
return 0;
ulog(LOG_INFO, 'The issuer is insta\n');
@@ -163,6 +187,20 @@ function fwtool() {
return 0;
}
function check_cert() {
if (!fs.stat('/etc/ucentral/cert.pem'))
return 0;
let pipe = fs.popen("openssl x509 -in /etc/ucentral/cert.pem -noout -subject -nameopt multiline | grep commonName | awk '{ print $3 }'");
let cn = pipe.read("all");
pipe.close();
if (!cn)
return 0;
cn = lc(trim(cn));
let uci = libuci.cursor();
let serial = uci.get('ucentral', 'config', 'serial');
return cn != serial;
}
switch(ARGV[0]) {
case 'enroll':
let ret = simpleenroll();
@@ -184,4 +222,7 @@ case 'reenroll':
case 'fwtool':
exit(fwtool());
case 'check':
exit(check_cert());
}

View File

@@ -5,7 +5,7 @@ import * as fs from 'fs';
let cmd = ARGV[0];
let ifname = getenv("interface");
let opt224 = getenv("opt138");
let opt138 = getenv("opt138");
let opt224 = getenv("opt224");
if (cmd != 'bound' && cmd != 'renew')

View File

@@ -4,3 +4,6 @@ MIIFajCCA1KgAwIBAgICDnowDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUT3BlbkxBTiBEZW1vIFJv
-----BEGIN CERTIFICATE-----
MIIFIDCCAwigAwIBAgICDnkwDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUT3BlbkxBTiBEZW1vIFJvb3QgQ0EwHhcNMjUwMjIxMTUwMDAwWhcNMjYwMjIxMTUwMDAwWjAfMR0wGwYDVQQDDBRPcGVuTEFOIERlbW8gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMjExylKdJWoJu9mOHPJ6yZFXKe1lE467G65acpS2FKIWnPVFjNCmATMpkMOIFzEFwyFdb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F+1dashL0CPsbIJ
-----END CERTIFICATE-----

View File

@@ -4,10 +4,9 @@ PKG_NAME:=ucentral-client
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-client.git
PKG_MIRROR_HASH:=34c912efa9c0dcdbc6122296e236993484b24b3bc4de51608356304afc8df1c3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2025-07-27
PKG_SOURCE_VERSION:=c536f6957bd96e57301f9d540b75460119d2a69a
PKG_SOURCE_DATE:=2025-08-11
PKG_SOURCE_VERSION:=549e84e5fea7230c5471d6a3dbddcc7d3152f665
PKG_LICENSE:=BSD-3-Clause
PKG_MAINTAINER:=John Crispin <john@phrozen.org>

View File

@@ -20,6 +20,7 @@ let config;
let offline_timer;
let current_state;
let online = false;
let leds_off = false;
function self_healing() {
let heal_wifi = false;
@@ -148,6 +149,13 @@ function online_handler() {
function config_load() {
ulog(LOG_INFO, 'loading config\n');
uci.load('system');
let led_off_cfg = uci.get("system", "@system[0]", "leds_off");
if (led_off_cfg == 1) {
leds_off = true;
}
uci.load('state');
config = uci.get_all('state');
@@ -191,7 +199,7 @@ function led_find(alias) {
function factory_reset_timeout() {
let led = led_find('led-running');
if (led)
led_write(led, 'trigger', 'default-on');
led_write(led, 'trigger', leds-off ? 'none' : 'default-on');
}
let blink_timer;
@@ -210,7 +218,7 @@ let state_handler = {
offline: function() {
online = false;
let led = led_find('led-running');
if (led)
if (!leds_off && led)
led_write(led, 'trigger', 'heartbeat');
if (config.ui.offline_trigger) {
if (offline_timer)
@@ -223,7 +231,7 @@ let state_handler = {
online: function() {
online = true;
let led = led_find('led-running');
if (led)
if (!leds_off && led)
led_write(led, 'trigger', 'default-on');
online_handler();
return 0;

View File

@@ -0,0 +1,33 @@
From 309a419087da906a2f3b0f39763f021e9729dd85 Mon Sep 17 00:00:00 2001
From: Paul White <paul@shasta.cloud>
Date: Mon, 4 Aug 2025 04:14:23 +0000
Subject: [PATCH] base-files: boot: add sync after uci-defaults
A scenario was seen where UCI config was not flushed to disk before
an AP power-cycle after uci-defaults was completed. Since these
scripts are deleted after being ran once, there is no way to recover
without a factory reset.
Adding this sync operation proved to help avoid this situation from
happening
Signed-off-by: Paul White <paul@shasta.cloud>
---
package/base-files/files/etc/init.d/boot | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/base-files/files/etc/init.d/boot b/package/base-files/files/etc/init.d/boot
index 15756669a9..c8a803e32c 100755
--- a/package/base-files/files/etc/init.d/boot
+++ b/package/base-files/files/etc/init.d/boot
@@ -15,6 +15,7 @@ uci_apply_defaults() {
( . "./$(basename $file)" ) && rm -f "$file"
done
uci commit
+ sync
}
boot() {
--
2.43.0

View File

@@ -0,0 +1,26 @@
From b82a8514a3f52b91ec84f703ef92740dda19d5d9 Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 14 Aug 2025 10:29:29 +0200
Subject: [PATCH] elfutils: fix build with GCC11
Signed-off-by: John Crispin <john@phrozen.org>
---
package/libs/elfutils/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index f7364c36be..76112c89ff 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -87,7 +87,7 @@ TARGET_CFLAGS += \
-Wno-unused-result \
-Wno-format-nonliteral
-ifneq ($(CONFIG_GCC_USE_VERSION_11),y)
+ifneq ($(CONFIG_GCC_VERSION_11),y)
TARGET_CFLAGS += \
-Wno-error=use-after-free
endif
--
2.34.1

View File

@@ -0,0 +1,39 @@
From d0a0f0304f292a40f2fcdd20b320089627b0f05f Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Thu, 7 Aug 2025 14:50:51 +0200
Subject: [PATCH] wireless-regdb: fix channel 14 in JP
Signed-off-by: John Crispin <john@phrozen.org>
---
.../patches/200-jp-no-channel-14.patch | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
diff --git a/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch b/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
new file mode 100644
index 0000000000..ea1411cfdd
--- /dev/null
+++ b/package/firmware/wireless-regdb/patches/200-jp-no-channel-14.patch
@@ -0,0 +1,19 @@
+--- a/db.txt
++++ b/db.txt
+@@ -16,8 +16,6 @@ country 00:
+ (2402 - 2472 @ 40), (20)
+ # Channel 12 - 13.
+ (2457 - 2482 @ 20), (20), NO-IR, AUTO-BW
+- # Channel 14. Only JP enables this and for 802.11b only
+- (2474 - 2494 @ 20), (20), NO-IR, NO-OFDM
+ # Channel 36 - 48
+ (5170 - 5250 @ 80), (20), AUTO-BW
+ # Channel 52 - 64
+@@ -945,7 +943,6 @@ country JO: DFS-JP
+ # https://www.soumu.go.jp/main_content/000833682.pdf
+ country JP: DFS-JP
+ (2402 - 2482 @ 40), (20)
+- (2474 - 2494 @ 20), (20), NO-OFDM
+ (4910 - 4990 @ 40), (23)
+ (5170 - 5250 @ 80), (20), AUTO-BW
+ (5250 - 5330 @ 80), (20), DFS, AUTO-BW
--
2.34.1