mirror of
				https://github.com/Telecominfraproject/wlan-ap.git
				synced 2025-10-31 02:17:58 +00:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			14493
			...
			uci_defaul
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | b72e58b33d | 
| @@ -1,61 +0,0 @@ | ||||
| --- 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); | ||||
| @@ -200,7 +200,7 @@ | ||||
| 			phy-mode = "sgmii"; | ||||
| 			full-duplex; | ||||
| 			pause; | ||||
| 			airoha,surge = <0>; | ||||
| 			airoha,surge = <1>; | ||||
| 			airoha,polarity = <2>; | ||||
| 		}; | ||||
|  | ||||
|   | ||||
| @@ -15,14 +15,9 @@ 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; | ||||
| @@ -33,7 +28,7 @@ let timeouts = { | ||||
| 	'orphan': 2 * 60 * 60, | ||||
| 	interval: 10000, | ||||
| 	expiry_interval: 60 * 60 * 1000, | ||||
| 	expiry_threshold: 1 * 365 * 24 * 60 * 60, | ||||
| 	expiry_threshold: 3 * 24 * 60 * 60, | ||||
| }; | ||||
|  | ||||
| ulog_open(ULOG_SYSLOG | ULOG_STDIO, LOG_DAEMON, "cloud_discover"); | ||||
| @@ -42,22 +37,6 @@ 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, /Telecom Infra Project Issuing CA/)) { | ||||
| 		ulog(LOG_INFO, 'Certificate type is "Demo" \n'); | ||||
| 		cds_server = 'discovery-qa.open-lan.org'; | ||||
| 		timeouts.expiry_threshold = 3 * 24 * 60 * 60; | ||||
| 	} else { | ||||
| 		ulog(LOG_INFO, 'Certificate type is "TIP"\n'); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| function readjsonfile(path) { | ||||
| 	let file = fs.readfile(path); | ||||
| 	if (file) | ||||
| @@ -99,14 +78,6 @@ 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 ??= {}; | ||||
| @@ -120,10 +91,9 @@ 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; | ||||
| } | ||||
|  | ||||
| @@ -160,7 +130,6 @@ function set_state(set) { | ||||
| 		if (prev == VALIDATING) { | ||||
| 			ulog(LOG_INFO, 'Setting cloud controller to validated\n'); | ||||
| 			gateway_write({ valid: true }); | ||||
| 			discovery_state_write(); | ||||
| 		} | ||||
| 		break; | ||||
|  | ||||
| @@ -195,7 +164,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://${cds_server}/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://openlan.keys.tip.build/v1/devices/${serial} --output /tmp/ucentral.redirector`); | ||||
| 	if (!fs.stat(path)) | ||||
| 		return; | ||||
| 	let redir = readjsonfile(path); | ||||
| @@ -258,18 +227,15 @@ 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; | ||||
|  | ||||
| @@ -289,36 +255,6 @@ 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) { | ||||
| @@ -393,16 +329,28 @@ let ubus_methods = { | ||||
| 		}, | ||||
| 		args: {}, | ||||
| 	}, | ||||
| 	reenroll: { | ||||
| 		call: function(req) { | ||||
| 			trigger_reenroll(); | ||||
| 			return 0; | ||||
| 		}, | ||||
| 		args: {}, | ||||
| 	}, | ||||
| }; | ||||
|  | ||||
| detect_certificate_type(); | ||||
| 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'); | ||||
| } | ||||
|  | ||||
| if (gateway_available()) { | ||||
| 	let status = ubus.call('ucentral', 'status'); | ||||
|   | ||||
| @@ -8,22 +8,9 @@ import * as libuci from 'uci'; | ||||
|  | ||||
| let store_operational_pem = false; | ||||
| let store_operational_ca = false; | ||||
| let est_server = 'est.certificates.open-lan.org'; | ||||
| let est_server = 'qaest.certificates.open-lan.org:8001'; | ||||
| 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, /Telecom Infra Project Issuing CA/)) { | ||||
| 		ulog(LOG_INFO, 'Certificate type is "Demo" \n'); | ||||
| 		est_server = 'qaest.certificates.open-lan.org:8001'; | ||||
| 	} else { | ||||
| 		ulog(LOG_INFO, 'Certificate type is "TIP"\n'); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| if (getenv('EST_SERVER')) | ||||
| 	est_server = getenv('EST_SERVER'); | ||||
|  | ||||
| @@ -92,8 +79,6 @@ 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'); | ||||
| @@ -141,9 +126,6 @@ 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'); | ||||
|   | ||||
| @@ -5,7 +5,7 @@ import * as fs from 'fs'; | ||||
|  | ||||
| let cmd = ARGV[0]; | ||||
| let ifname = getenv("interface"); | ||||
| let opt138 = getenv("opt138"); | ||||
| let opt224 = getenv("opt138"); | ||||
| let opt224 = getenv("opt224"); | ||||
|  | ||||
| if (cmd != 'bound' && cmd != 'renew') | ||||
|   | ||||
| @@ -4,6 +4,3 @@ MIIFajCCA1KgAwIBAgICDnowDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUT3BlbkxBTiBEZW1vIFJv | ||||
| -----BEGIN CERTIFICATE----- | ||||
| MIIFIDCCAwigAwIBAgICDnkwDQYJKoZIhvcNAQELBQAwHzEdMBsGA1UEAwwUT3BlbkxBTiBEZW1vIFJvb3QgQ0EwHhcNMjUwMjIxMTUwMDAwWhcNMjYwMjIxMTUwMDAwWjAfMR0wGwYDVQQDDBRPcGVuTEFOIERlbW8gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMjExylKdJWoJu9mOHPJ6yZFXKe1lE467G65acpS2FKIWnPVFjNCmATMpkMOIFzEFwyFdbQjzOidtiL+73zlE52lOJpXCfOcxDFqDYDJJ8//J1/gQWsBaKpSvgLiHU/0awkQg+yJYZpj8YZa4NkFe+zTjQScSfOsqPPb3rZ7DOQ2BKAhjVShKmVbtNil0iO0zm8vE8DNkktTNMREp2pzb8MbCAgfOkwlrby6T+rV3TvmjThGdFUb5lWDFxWtlF8W0SUII9qj7p5TdGpryeLsO0nZTBtS4HxZNdvmKOHfgcRHmSZIJ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vA/aHME8KF+6y6m4pC7FkUjVaRlzWu/wIDAQABo2MwYTAfBgNVHSMEGDAWgBSUaFuoOPk4QLByZP47kj4p1IbCJjAdBgNVHQ4EFgQUlGhbqDj5OECwcmT+O5I+KdSGwiYwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggIBAB+/RUC2X6eVoPsFNMkaXO5Iib/ub0JoWhODQm8j2Mr5dpGXESSpXjfDcqDOLuJbWWoflXBLdr8BsVCBqOA9YgCX0H8Br7dUWmCScixxLW0he592/424EvdwifxcKHZLjv9CKV5Txhqnm2djc5RY/nTH5MYVrIh/If2TNO5ydDP6+vgy9GQ4en04VK7rz+PW17O8l7k9/lOmYptZmHgSDAPj/cT3PlG+McqaI5rMSHeEHlzH+PvgWjtSeEhF4FwFBXroDl4/yb4l2JB8bqAZ3vsOXSkigFcZh5MXPe+zuSSW+G8iLr4xoi0CFsP2DaHEyxgqP4B1FtE9nFPo6cvWbwqTVT7QSzqfH+jPJuQvpFXeRF5UFegNZTFT5/uFFPamihakFslEYxeJey1y+OJdLcP6ef87ruSt8amsq56OAETYpnW4JFowlEh0C+QwLGHGGY6WrOgHY/90hJmPgXBdBVg/IoOhzbvk5A+LqZDvxV2/rLNfClw8Kr3g5e8obcB6dWgMCy2z+us0H79ucnmhzQKsjpxM9T1ncHovAQfiD3jVqfHULY53avh0wIAjosoTGbe8dyx80quHe+16qWan7C9idXeAYYJXbZt5hs6hLw4I8M1LsjTg6vwsqiaHZpsmDyyQLdFjNJldG7aosfS9F+BIpuwijF+1dashL0CPsbIJ | ||||
| -----END CERTIFICATE----- | ||||
|   | ||||
| @@ -4,9 +4,10 @@ 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-08-11 | ||||
| PKG_SOURCE_VERSION:=549e84e5fea7230c5471d6a3dbddcc7d3152f665 | ||||
| PKG_SOURCE_DATE:=2025-07-27 | ||||
| PKG_SOURCE_VERSION:=c536f6957bd96e57301f9d540b75460119d2a69a | ||||
|  | ||||
| PKG_LICENSE:=BSD-3-Clause | ||||
| PKG_MAINTAINER:=John Crispin <john@phrozen.org> | ||||
|   | ||||
| @@ -20,7 +20,6 @@ let config; | ||||
| let offline_timer; | ||||
| let current_state; | ||||
| let online = false; | ||||
| let leds_off = false; | ||||
|  | ||||
| function self_healing() { | ||||
| 	let heal_wifi = false; | ||||
| @@ -149,13 +148,6 @@ 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'); | ||||
|  | ||||
| @@ -199,7 +191,7 @@ function led_find(alias) { | ||||
| function factory_reset_timeout() { | ||||
| 	let led = led_find('led-running'); | ||||
| 	if (led) | ||||
| 		led_write(led, 'trigger', leds-off ? 'none' : 'default-on'); | ||||
| 		led_write(led, 'trigger', 'default-on'); | ||||
| } | ||||
|  | ||||
| let blink_timer; | ||||
| @@ -218,7 +210,7 @@ let state_handler = { | ||||
| 	offline: function() { | ||||
| 		online = false; | ||||
| 		let led = led_find('led-running'); | ||||
| 		if (!leds_off && led) | ||||
| 		if (led) | ||||
| 			led_write(led, 'trigger', 'heartbeat'); | ||||
| 		if (config.ui.offline_trigger) { | ||||
| 			if (offline_timer) | ||||
| @@ -231,7 +223,7 @@ let state_handler = { | ||||
| 	online: function() { | ||||
| 		online = true; | ||||
| 		let led = led_find('led-running'); | ||||
| 		if (!leds_off && led) | ||||
| 		if (led) | ||||
| 			led_write(led, 'trigger', 'default-on'); | ||||
| 		online_handler(); | ||||
| 		return 0; | ||||
|   | ||||
| @@ -1,26 +0,0 @@ | ||||
| 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 | ||||
|  | ||||
		Reference in New Issue
	
	Block a user