Compare commits

..

154 Commits

Author SHA1 Message Date
Jakob Olsson
8a256deda2 map-agent: 6.3.6.8 2025-07-28 09:48:50 +02:00
Vivek Kumar Dutta
a51d5e6616 wifidmd: Fix legacy nodes for extenders 2025-07-25 17:51:06 +05:30
Vivek Kumar Dutta
971392a796 xmppc: Fix ConnReqXMPPConnection value 2025-07-25 17:48:44 +05:30
Vivek Kumar Dutta
291cd43b10 bbfdm: Fix internal dm references 2025-07-25 17:44:11 +05:30
Vivek Kumar Dutta
9ab8dbdb3b dslmngr: 1.2.10 2025-07-04 15:15:57 +05:30
Vivek Kumar Dutta
f3cb8ad566 sulu: 5.0.4 2025-07-04 14:43:12 +05:30
Vivek Kumar Dutta
95e9630c4b libdsl: 7.3.0 2025-07-04 12:20:08 +05:30
Vivek Kumar Dutta
2c6a9e76c8 wifidmd: 1.1.33 2025-07-04 12:09:39 +05:30
Suvendhu Hansa
653b74aacf icwmp: avoid unexpected DHCP release at runtime 2025-07-03 11:25:50 +05:30
Reidar Cederqvist
c6437fbf53 Update Sulu to version 5.0.3 2025-07-02 18:02:48 +00:00
Markus Gothe
3a4ad69af9 libdsl: initial Airoha integration. 2025-07-02 16:02:27 +02:00
Suvendhu Hansa
0379e816c5 tr143: init/clean modules from DownloadDiagnostics test 2025-07-02 14:43:40 +05:30
Amin Ben Romdhane
b8f99bbe64 ethmngr: 3.0.8 2025-07-01 17:50:59 +02:00
Jakob Olsson
42df10c708 map-agent: 6.3.6.7 2025-07-01 14:28:09 +02:00
Amin Ben Romdhane
7369ee4c20 wifidmd: 1.1.32 2025-07-01 12:48:47 +02:00
Amin Ben Romdhane
dc3aa2ec9d hostmngr: 1.3.1 2025-07-01 12:47:39 +02:00
Amin Ben Romdhane
312d28bec4 bbfdm: refresh DHCP entries when a new extender/repeater is connected 2025-07-01 12:33:12 +02:00
Anjan Chanda
45a754f567 ieee1905: 8.7.32 2025-07-01 09:44:59 +02:00
Amin Ben Romdhane
491f2ca07d netmngr: 1.1.8 2025-06-30 18:21:33 +02:00
Amin Ben Romdhane
2d5f9229f2 bbfdm: 1.16.6 2025-06-30 17:16:29 +02:00
Anjan Chanda
16536b9bc3 ieee1905: 8.7.31 2025-06-30 15:42:27 +02:00
Jakob Olsson
f552b68f10 map-agent: 6.3.6.6 2025-06-30 13:59:22 +02:00
Jakob Olsson
7c444911f7 map-agent: 6.3.6.5 2025-06-30 11:31:43 +02:00
Vivek Kumar Dutta
7a12fb28b1 wifidmd: reset WiFi with WiFi.Reset() cmd 2025-06-30 12:49:43 +05:30
Vivek Kumar Dutta
a430d76517 tr143: an7581 fastpath improvements 2025-06-29 10:46:16 +05:30
Janusz Dziedzic
b48c7e14dc map-agent: use correct networkid for dynamic backhaul 2025-06-27 14:27:36 +00:00
Gustaf Franzen
269d72c30a nng: 1.11
NNG - nanomsg-next-gen
2025-06-27 12:03:58 +00:00
Anjan Chanda
f19082aa1e ieee1905: 8.7.27 2025-06-27 13:45:19 +02:00
Janusz Dziedzic
43f0296ea2 libwifi: 7.13.4 2025-06-27 11:02:38 +00:00
Amin Ben Romdhane
6418f9fa8f bbfdm: 1.16.5 2025-06-26 17:01:41 +02:00
arbala
58ecaf9c15 map-agent: 6.3.6.4 2025-06-26 13:20:37 +02:00
Markus Gothe
0f8887f676 dslmngr: Add initial Airoha support. 2025-06-26 13:04:41 +02:00
Vivek Kumar Dutta
a1193cc6b8 wifidmd: 1.1.30 2025-06-26 14:44:02 +05:30
Vivek Kumar Dutta
392a41b38a ieee1905: tr181 vendor extn for localonly mode 2025-06-26 14:40:55 +05:30
Mohd Husaam Mehdi
c3128d3a14 self-diagnostics: collect contents of firewall log file 2025-06-26 13:25:22 +05:30
Anjan Chanda
4d88e123a9 ieee1905: 8.7.25 2025-06-26 09:27:43 +02:00
Vivek Kumar Dutta
fb050cae2e wifidmd: Set network_type with SetSSID 2025-06-25 18:03:30 +05:30
Jakob Olsson
90af4f350b map-agent: 6.3.6.3 2025-06-25 11:58:42 +02:00
Amin Ben Romdhane
605f0faacc parental-control: Use the correct instance name in reload service 2025-06-25 10:04:32 +02:00
arbala
065772401b ieee1905: 8.7.11 2025-06-25 09:47:06 +02:00
Vivek Kumar Dutta
886000a830 dnsmngr: Fix probable crash 2025-06-25 09:47:20 +05:30
Reidar Cederqvist
0b5a84e33a sulu: bump sulu-core to latest devel 2025-06-25 00:26:30 +02:00
Vivek Kumar Dutta
a2763cd075 bbfdm: Update reference db before set 2025-06-24 18:59:40 +05:30
Erik Karlsson
4a8b27ed95 map-agent: 6.3.6.2 2025-06-24 14:50:48 +02:00
Erik Karlsson
6eef7e4b21 ieee1905: do not use hw.board.basemac 2025-06-24 14:50:34 +02:00
Vivek Kumar Dutta
a0bde81de4 obuspa: Fix parameters in TransferCompelete event 2025-06-24 18:15:22 +05:30
Vivek Kumar Dutta
5e04f9312b sysmngr: Fix TransferComplete parameters 2025-06-24 18:13:42 +05:30
Vivek Kumar Dutta
a1e7f80ae0 logmngr: 1.0.17 2025-06-24 18:13:35 +05:30
Xiaofeng Meng
ed5169b94c sshmngr: Fix session detection for OpenSSH backend
The `sshmngr` service failed to list active sessions with the `sshd`
(OpenSSH) backend because the session detection logic could not handle
the process structure of modern OpenSSH, which uses an intermediate
process for new connections.

This commit resolves the issue by:
- Improving process lookup to check for grandparent PIDs, correctly
  identifying the session process.
- Querying the correct intermediate process for network connection details.
  parse netstat output.

The new logic is encapsulated in a `get_network_info` function within the
`openssh` backend script to maintain compatibility with the `dropbear`
backend, which uses a simpler implementation of the same function.
2025-06-24 18:04:44 +05:30
Jakob Olsson
c64701e6b2 map-agent: 6.3.6.1 2025-06-24 13:36:14 +02:00
Anjan Chanda
db6672c9ee wifimngr: 17.7.5 2025-06-24 10:28:45 +02:00
Vivek Kumar Dutta
05c4d0d3d1 obuspa: Fix log level for some recurring logs 2025-06-24 12:59:33 +05:30
Reidar Cederqvist
6535fe465c sulu: bump sulu-theme-genexis version to fix dark-mode logo 2025-06-23 10:52:55 +02:00
Markus Gothe
2703db3f2e mcastmngr: Add L2 snooping UCI generation.
If the WAN device is a bridge then generate
a default configuration using snooping instead
of proxying.
2025-06-23 09:29:47 +02:00
Suvendhu Hansa
bb603cb492 obuspa: mqtt fallback IP family in dual-stack mode 2025-06-21 19:17:25 +05:30
Reidar Cederqvist
f8d7788d6f sulu: update sulu to version 5.0 based on React 2025-06-20 20:53:42 +02:00
Vivek Kumar Dutta
97df4367eb bbfdm: 1.16.3 2025-06-20 18:44:02 +05:30
Vivek Kumar Dutta
21fbf0253c sysmngr: 1.0.27 2025-06-20 18:10:19 +05:30
Vivek Kumar Dutta
ced2b4187f netmode: 1.1.5 2025-06-20 12:43:21 +05:30
Suvendhu Hansa
bfdd27f72a obuspa: Option to configure DualStack preference 2025-06-20 09:08:20 +05:30
George Yang
6f1953e4a4 dectmngr-3.7.10 and libvoice-airoha-1.1.7
- Play dial tone for DECT handset
2025-06-19 15:00:38 +00:00
Roman Azarenko
fd816f8ee1 iopsys-analytics: read ubus event data from pipe 2025-06-19 16:51:27 +02:00
Jakob Olsson
cbdc083db5 ieee1905: 8.7.9 2025-06-19 15:20:38 +02:00
Jakob Olsson
eb1897a730 hostmngr: 1.3.0 2025-06-19 14:34:03 +02:00
Roman Azarenko
546450566e iopsys-analytics: get hostname from UCI, whitespace/typo cleanup 2025-06-18 22:16:31 +02:00
Vivek Kumar Dutta
5fb51c6fd9 wifidmd: Added EncryptionMode parameter 2025-06-18 20:52:26 +05:30
Sukru Senli
5d84d0ae29 wifi-services, map-plugins: add PKG_LICENSE_FILES 2025-06-18 17:07:33 +02:00
Anjan Chanda
340709b527 map-plugins: 0.0.4 2025-06-18 16:38:07 +02:00
George Yang
38bef28d00 dectmngr-3.7.9 and libvoice-airoha-1.1.6
- dectmngr: DTMF tone always be played in any DTMF mode
  whenever key is pressed.

- libvoice-airoha: Removed adamStrmSendDtmfr() calls.
  It is not actually needed for rfc4733 mode to generate
  RTP event for received DTMF tones.
2025-06-18 15:55:41 +02:00
Janusz Dziedzic
ba53aeda7d libwifi: 7.13.3 2025-06-18 13:48:13 +00:00
Mohd Husaam Mehdi
bd63c5a090 parental-control: fix path used to check if urlfiltering is enabled 2025-06-18 18:19:27 +05:30
George Yang
89c1fbb38a libvoice-airoha-1.1.5 2025-06-18 10:31:08 +02:00
Vivek Kumar Dutta
d6ff1d851b parental-control: 1.2.1 2025-06-18 11:02:16 +05:30
Vivek Kumar Dutta
107b1576e8 ipt-trigger: 1.0.3 2025-06-18 11:00:27 +05:30
Vivek Kumar Dutta
47694dc23e hostmngr: 1.2.21 2025-06-18 11:00:27 +05:30
Vivek Kumar Dutta
002836769c bridgemngr: 1.0.17 2025-06-18 11:00:23 +05:30
Amin Ben Romdhane
cafb9f09ba wifidmd: 1.1.27 2025-06-17 16:26:14 +02:00
Sukru Senli
a440adbef9 jsonval: 1.0.0
A small CLI tool to validate JSON files against a schema using json-schema-validator and nlohmann/json
2025-06-17 15:38:32 +02:00
Sukru Senli
2ba04321b3 json-schema-validator: 2.3.0 2025-06-17 17:13:00 +05:30
Sukru Senli
9126f2ef7d nlohmann-json: 3.11.2 2025-06-17 17:13:00 +05:30
Amin Ben Romdhane
ed01ddf670 bbfdm: 1.16.2 2025-06-16 16:05:39 +02:00
Janusz Dziedzic
7e360f7b30 map-agent: 6.3.6.0 2025-06-16 13:54:31 +00:00
Vivek Kumar Dutta
e15dcd3b25 wifidmd: Fetch radio status from wifi.radio ubus object 2025-06-16 09:55:27 +05:30
Suvendhu Hansa
9ee00a3c82 map-controller: added wpa,wpa2,wpa-mixed in uci validation 2025-06-13 20:26:17 +05:30
Janusz Dziedzic
ba94d88f0d libwifi: 7.13.2 2025-06-13 14:32:36 +00:00
George Yang
041e51edf3 libvoice-airoha: 1.1.4 and dectmngr: 3.7.8 2025-06-13 12:15:53 +02:00
Amin Ben Romdhane
6ca5af0790 bbfdm: 1.16.1 2025-06-13 11:11:55 +02:00
Anjan Chanda
6d32d6e8b3 map-plugins: 0.0.3 2025-06-13 11:05:32 +02:00
Anjan Chanda
2b4f9029f8 map-controller: 6.4.0.11 2025-06-13 11:04:27 +02:00
Vivek Kumar Dutta
8c3bf8763e obuspa: option to configure poll period 2025-06-13 10:40:40 +05:30
Mohd Husaam Mehdi
1c6243113c mcastmngr: update firewall script to get zone name dynamically 2025-06-12 19:50:36 +05:30
Mohd Husaam Mehdi
eedf8d2761 firewallmngr: update firewall script to get zone name dynamically 2025-06-12 19:43:14 +05:30
Amin Ben Romdhane
bf8b4de5da wifidmd: add a script to handle wifi configs relaod 2025-06-12 15:14:07 +05:30
Vivek Kumar Dutta
fd208e0e5f bbfdm: external reload handlers for wifi 2025-06-12 15:14:07 +05:30
Husaam Mehdi
5b090176a1 logmngr: Fix shadow variable names in lib 2025-06-12 14:34:46 +05:30
Jakob Olsson
93b1952f50 decollector: 6.2.1.7 2025-06-12 09:26:36 +02:00
Jakob Olsson
ddcfeeb339 map-controller: 6.4.0.6 2025-06-11 16:26:13 +02:00
Anjan Chanda
8cea3573f7 map-plugins: 0.0.2 2025-06-11 15:39:15 +02:00
Anjan Chanda
8ac0f69992 map-controller: 6.4.0.5 2025-06-11 15:38:10 +02:00
Janusz Dziedzic
65dea29e5f mapcontroller: 6.4.0.3 2025-06-11 12:28:27 +00:00
Janusz Dziedzic
2cecb4f75a libwifi: 7.13.1 2025-06-11 10:11:16 +00:00
Suvendhu Hansa
a47d302ec7 icwmp,twamp,userinterface: Fix duplicate zone names 2025-06-11 14:34:41 +05:30
Roman Azarenko
a9b3a392dd iopsys-analytics: fix typo in Makefile conditional
syslong-ng -> syslog-ng
2025-06-11 10:04:05 +02:00
Amin Ben Romdhane
397611aff5 wifidmd: 1.1.24 2025-06-10 17:39:43 +02:00
arbala
21c9fafc4d map-agent: 6.3.5.9 2025-06-10 17:21:49 +02:00
Anjan Chanda
41efd7d712 map-plugins: 0.0.1 2025-06-10 17:05:46 +02:00
Anjan Chanda
f1e37ac0d8 map-controller: 6.4.0.2 2025-06-10 17:04:22 +02:00
Vivek Kumar Dutta
ab6d3935d1 swmodd: 2.5.27 2025-06-10 11:02:12 +05:30
Roman Azarenko
db529f651e iopsys-analytics: add support for fluentbit 2025-06-09 16:47:18 +02:00
Mohd Husaam Mehdi
975bf57de0 analytics: add support for fluent-bit backend 2025-06-09 13:21:21 +00:00
Vivek Kumar Dutta
6fb3a1b91d wifidmd: Vendor extn to modify ssid in SetSSID 2025-06-09 17:02:59 +05:30
Suvendhu Hansa
57ae4eb344 icwmp,twamp: Fix zone name in firewall rules 2025-06-09 16:53:48 +05:30
Anjan Chanda
dc79aa56f9 map-controller: 6.4.0.1 2025-06-09 10:24:31 +02:00
Vivek Kumar Dutta
8334b65ad4 icwmp: Fix fault string initialization 2025-06-06 17:18:53 +05:30
Strhuan Blomquist
e9caa2e7cd cleanup of colleccd 2025-06-05 13:58:47 +00:00
Janusz Dziedzic
49a31dbd49 libwifi: 7.13.0 2025-06-05 08:10:38 +00:00
Vivek Kumar Dutta
31f223f7a0 icwmp: 9.9.8 2025-06-04 18:03:28 +05:30
Vivek Kumar Dutta
8e33d24256 sysmngr: 1.0.26 2025-06-04 17:59:04 +05:30
Mohd Husaam Mehdi
e6df8f9ad0 logmngr: add support for conf_dir in generated logrotate config 2025-06-04 15:02:45 +05:30
Reidar Cederqvist
2c3e9ce606 sulu: fix led brightness access 2025-06-04 10:58:45 +02:00
arbala
616e15b9c4 decollector: 6.2.1.6 2025-06-03 15:37:23 +02:00
Husaam Mehdi
93d2d09dcc parental-control: Option to enable/disable urlfilter 2025-06-03 15:56:45 +05:30
Janusz Dziedzic
ece7e8f22c wifimngr: 17.7.4 2025-06-03 08:17:45 +02:00
Vivek Kumar Dutta
879b473d20 bbfdm: Added netmode in critical service list 2025-06-02 19:07:40 +05:30
Vivek Kumar Dutta
ac9da0ec6f wifidmd: Cleanup updated for Radius parameters 2025-06-02 19:05:56 +05:30
Suvendhu Hansa
7c5046d9d8 bbfdm: added mapcontroller in critical service 2025-05-30 20:37:11 +05:30
Vivek Kumar Dutta
69ccc34b2c sysmngr: align with fwbank 2025-05-30 19:35:24 +05:30
Vivek Kumar Dutta
87a6852c1a sysmngr: fwbank: return failure result if input validation fails 2025-05-30 13:26:17 +05:30
Vivek Kumar Dutta
b0d1ada967 ddnsmngr: 1.0.12 2025-05-30 09:30:05 +05:30
Husaam Mehdi
09cccc39cc fluent-bit: Align syslog output with syslog-ng
- added support to prepend message length in syslog output
2025-05-30 09:27:19 +05:30
Jakob Olsson
7227cbd8da map-agent: 6.3.5.8 2025-05-28 13:00:50 +02:00
Vivek Kumar Dutta
c57b0322b0 netmode: 1.1.4 2025-05-28 12:36:43 +05:30
Sukru Senli
db626422dc netmode: Added mode specific scripts 2025-05-28 12:17:31 +05:30
Anjan Chanda
26ffa55453 wifimngr: 17.7.3 2025-05-27 20:23:43 +02:00
arbala
adc2b26a78 map-controller: 6.3.0.19 2025-05-27 17:34:01 +02:00
Amin Ben Romdhane
51e3ad0404 bbfdm: 1.15.30 2025-05-27 16:41:19 +02:00
Amin Ben Romdhane
d9448a0de4 icwmp: 9.9.7 2025-05-27 16:40:27 +02:00
Amin Ben Romdhane
84eff7c8e0 wifidmd: 1.1.21 2025-05-27 16:37:16 +02:00
Amin Ben Romdhane
53d940586e bridgemngr: 1.0.16 2025-05-27 16:33:00 +02:00
Amin Ben Romdhane
712435786a netmngr: 1.1.7 2025-05-27 16:31:58 +02:00
Jakob Olsson
e57bbc0306 map-agent: 6.3.5.7 2025-05-27 13:04:38 +02:00
Vivek Kumar Dutta
cc4aa5a415 wifidmd: Added InitiateWPSPBC() in DataElements 2025-05-27 09:12:37 +05:30
Amin Ben Romdhane
7e502d79c8 bridgemngr: 1.0.15 2025-05-26 17:18:03 +02:00
Amin Ben Romdhane
cbbc3b3725 wifi-services: Add Rating Data Model Extension 2025-05-26 13:13:15 +00:00
Mohd Husaam Mehdi
dcfe80ad8e fluent-bit: enable tail plugin to help read files 2025-05-26 18:42:27 +05:30
Mohd Husaam Mehdi
c8bbe8725a logmngr: enable hot reload for fluent-bit 2025-05-26 17:47:18 +05:30
Anjan Chanda
71828eb20b decollector: 6.2.1.5 2025-05-26 14:14:55 +02:00
Anjan Chanda
90fd7f326d decollector: 6.2.1.4 2025-05-26 12:01:47 +02:00
Anjan Chanda
1263451924 wifimngr: 17.7.2 2025-05-26 11:48:18 +02:00
Anjan Chanda
c74662e1dd wifi-services: 0.0.5 2025-05-26 11:47:09 +02:00
Janusz Dziedzic
34482e3c86 map-agent: 6.3.5.6 2025-05-26 07:45:43 +00:00
Filip Matusiak
96be0f9fab map-agent: 6.3.5.5
log: introduce feature level logging
2025-05-26 08:54:23 +02:00
Mohd Husaam Mehdi
971d1ca37e logmngr: add support for including config files in fluent-bit
* config files can be placed at /etc/fluent-bit/conf.d/ and
  they will be included
2025-05-26 11:46:38 +05:30
Vivek Kumar Dutta
99821b5010 obuspa: uci option to configure mqtt RequestResponseInfo 2025-05-25 21:45:02 +05:30
122 changed files with 2659 additions and 1236 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.15.29
PKG_VERSION:=1.16.6.1
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=08cf6a9725b34c0421f2ee8f762aa1878b8cca1f
PKG_SOURCE_VERSION:=fd9b465de588f05d5449d0ce66ef1bb1da9c74b9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,13 +8,16 @@
"ieee1905",
"mapcontroller",
"mosquitto",
"nginx"
"nginx",
"netmode"
],
"cwmp": [
"firewall",
"network",
"dhcp",
"mapcontroller",
"wireless",
"time"
"time",
"netmode"
]
}

View File

@@ -15,9 +15,13 @@
]
},
"dhcp_refresh": {
"if_operator": "OR",
"if" : [
{
"event": "host"
},
{
"event": "wifi.dataelements.Associated"
}
],
"then" : [

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.14
PKG_VERSION:=1.0.17
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
PKG_SOURCE_VERSION:=99bc3a3a0a2571917eda7085c21952f779fdb471
PKG_SOURCE_VERSION:=36e6e8319a95dad3bccfe9f2d8a298b39c6ce86b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ddnsmngr
PKG_VERSION:=1.0.11
PKG_VERSION:=1.0.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
PKG_SOURCE_VERSION:=9f2f4dabc71c4f405b1c5df576d20d793d299e94
PKG_SOURCE_VERSION:=44af9a7b3fec3929f8554af9633a5b8068189b48
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.2.1.3
PKG_VERSION:=6.2.1.7
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=40b6d6183a282bb8f48b3cf554691f54b5928ecf
PKG_SOURCE_VERSION:=ca92325ece080389ffb405c95048b64071eda653
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.7.7
PKG_VERSION:=3.7.10
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=289a91b3e7f221f16c976efd147bd4b203420b41
PKG_SOURCE_VERSION:=1f851980a6ba616df54f79930225f8bcd563b711
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.17
PKG_VERSION:=1.0.18
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=2ceb76e98cf23a8d52ab3f464d38d62385311a87
PKG_SOURCE_VERSION:=80fa147e6f1f0d9c1a62a62a693ff3adaef45363
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.9
PKG_VERSION:=1.2.10
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE_VERSION:=5340cb31f759301f5aca3fd848fc3a63b0b4663f
PKG_SOURCE_VERSION:=8fb4093b4d26b3cb06603e110d424005e33cf5d6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip
@@ -30,6 +30,8 @@ include ../bbfdm/bbfdm.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
else ifneq ($(CONFIG_TARGET_airoha),)
TARGET_PLATFORM=AIROHA
else
$(info Unexpected CONFIG_TARGET)
endif
@@ -41,7 +43,7 @@ define Package/dslmngr
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +TARGET_airoha:br2684ctl
endef
define Package/dslmngr/description
@@ -75,7 +77,10 @@ define Package/dslmngr/install
$(CP) ./files/common/* $(1)/
ifeq ($(CONFIG_TARGET_brcmbca),y)
$(CP) ./files/broadcom/* $(1)/
else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)

View File

@@ -0,0 +1,26 @@
#!/bin/sh /etc/rc.common
START=99
STOP=99
USE_PROCD=1
start_service() {
readonly need_xdsl="$(jsonfilter -i /etc/board.json -e @.dsl)"
[ -f /etc/board.json ] || return 0
if [ "$need_xdsl" != "" ]; then
procd_open_instance xdsl_wan
procd_set_param command /sbin/xdsl_wan
procd_set_param respawn
procd_close_instance
fi
}
boot() {
: # boot-up is handled from 'hsm' application
}
service_triggers()
{
procd_add_reload_trigger "dsl"
}

View File

@@ -0,0 +1,28 @@
#!/bin/sh
. /lib/functions.sh
xtm_remove_devices() {
:
}
xtm_create_devices() {
:
}
xdsl_configure() {
# Support bridged WAN interface
ebtables --concurrent -t broute -D BROUTING -p 0xbeed -j DROP 2> /dev/null
ebtables --concurrent -t broute -I BROUTING -p 0xbeed -j DROP
}
xdsl_stop() {
return 0
}
xdsl_init() {
readonly need_xdsl="$(jsonfilter -i /etc/board.json -e @.dsl)"
[ "$need_xdsl" = "" ] && exit 0
echo "Starting DSL"
}

View File

@@ -0,0 +1,240 @@
#!/bin/sh
source "/lib/functions.sh"
source "/lib/functions/network.sh"
source "/lib/functions/system.sh"
PREVLINK=""
PREVWANMODE=""
WANMODE=""
CONFIGURED=0
CINDEX=0
WANPORT="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
delete_atm_device() {
/userfs/bin/blapi_cmd xdsl atm_delete_interface $CINDEX
CINDEX=$((CINDEX+1))
}
delete_atm_devices() {
CINDEX=0
config_load dsl
config_foreach delete_atm_device atm-device
}
configure_atm_device() {
local vpi vci encapsulation qos_class pcr mbs scr
local encap qos ethmac
config_get vpi $1 vpi "8"
config_get vci $1 vci "35"
config_get encapsulation $1 encapsulation "llc"
config_get qos_class $1 qos_class "ubr"
config_get pcr $1 pcr "0"
config_get mbs $1 mbs "0"
config_get scr $1 scr "0"
case $encapsulation in # llc, vcmux
vcmux)
encap="1483 Bridged IP VC-Mux"
;;
*)
encap="1483 Bridged IP LLC"
;;
esac
ethmac="$(echo -n "$(macaddr_add 02:AA:BB:01:23:40 $((CINDEX+2)))" | sed 's#:##g')"
/userfs/bin/blapi_cmd xdsl create_device $CINDEX ATM "" "$ethmac"
/userfs/bin/blapi_cmd xdsl atm_create_interface $CINDEX ATM "$qos_class" "$encap" "$vpi" "$vci" "$pcr" "$scr" "$mbs" 0
CINDEX=$((CINDEX+1))
}
create_atm_devices() {
delete_atm_devices
CINDEX=0
config_foreach configure_atm_device atm-device
}
configure_line() {
local mode profile bitswap sra us0 sesdrop sos ginp mod prof
local adsl1_flag=0 issue2_flag=0 Glite_flag=0 adsl2_flag=0 adsl2p_flag=0 vdsl2_flag=0
local pro_8a_flag=0 pro_8b_flag=0 pro_8c_flag=0 pro_8d_flag=0 pro_12a_flag=0 pro_12b_flag=0 pro_17a_flag=0 pro_30a_flag=0 pro_35b_flag=0
config_get mode $1 mode "vdsl2"
config_get profile $1 profile "35b"
config_get bitswap $1 bitswap "1"
config_get sra $1 sra "1"
config_get us0 $1 us0 "1"
config_get sos $1 sos "0"
config_get sos $1 roc "0"
config_get sos $1 ginp "0"
for mod in $mode; do
[ "$mod" = "gdmt" ] && adsl1_flag=1
[ "$mod" = "glite" ] && Glite_flag=1
[ "$mod" = "t1413" ] && issue2_flag=1
[ "$mod" = "adsl2" ] && adsl2_flag=1
[ "$mod" = "adsl2p" ] && adsl2p_flag=1
[ "$mod" = "vdsl2" ] && vdsl2_flag=1
done
for prof in $profile; do
[ "$prof" = "8a" ] && pro_8a_flag=1
[ "$prof" = "8b" ] && pro_8b_flag=1
[ "$prof" = "8c" ] && pro_8c_flag=1
[ "$prof" = "8d" ] && pro_8d_flag=1
[ "$prof" = "12a" ] && pro_12a_flag=1
[ "$prof" = "12b" ] && pro_12b_flag=1
[ "$prof" = "17a" ] && pro_17a_flag=1
[ "$prof" = "30a" ] && pro_30a_flag=1
[ "$prof" = "35b" ] && pro_35b_flag=1
done
/userfs/bin/blapi_cmd xdsl set_adsl_profile "$pro_8a_flag" "$pro_8b_flag" "$pro_8c_flag" "$pro_8d_flag" "$pro_12a_flag" "$pro_12b_flag" "$pro_17a_flag" "$pro_30a_flag" "$pro_35b_flag"
/userfs/bin/blapi_cmd xdsl set_adsl_mode "$adsl1_flag" "$issue2_flag" "$Glite_flag" "$adsl2_flag" "$adsl2p_flag" "$vdsl2_flag"
/userfs/bin/blapi_cmd xdsl set_adsl_ginp "$((!ginp))"
/userfs/bin/blapi_cmd xdsl set_adsl_sos_roc "$((!sos))" "$((!roc))"
/userfs/bin/blapi_cmd xdsl set_adsl_us0 "$((!us0))"
/userfs/bin/blapi_cmd xdsl set_adsl_sra "$((!sra))"
/userfs/bin/blapi_cmd xdsl set_adsl_bitswap "$((!bitswap))"
CONFIGURED=1
}
configure_lines() {
config_load dsl
config_foreach configure_line dsl-line
}
call_wan_hotplug() {
# initializations
local updown="$1"
local ethwan="$2"
# ethernet hotlugs expect LINK and PORT environment variables set
env -i LINK="$updown" PORT="$ethwan" /sbin/hotplug-call ethernet
}
if [ "$WANPORT" = "ae_wan" -a -f /proc/device-tree/ae_wan/wan-dsl ]; then
/etc/init.d/br2684ctl stop
else
/etc/init.d/br2684ctl start
fi
# Wait for nas0 interface to come up.
while [ "$(devstatus "$WANPORT" | jsonfilter -e @.up)" != "true" ]; do
sleep 1
done
while [ true ]; do
LINK="$(awk '/ADSL link status:/{print $4}' /proc/tc3162/adsl_stats)"
[ \( "$LINK" = "down" -o "$LINK" = "up" \) ] && break
sleep 1
done
sleep 2
/userfs/bin/blapi_cmd xdsl set_adsl_sysvid "26 00 47 4E 58 53 00 00" # GNXS vendor id
/userfs/bin/blapi_cmd xdsl set_adsl_version "$(ubus call fwbank dump | jsonfilter -e "@.bank[@.active=true].swver" | cut -f1 -d'_' | cut -f1 -d'-' | hexdump -e '11/1 "%02x " "\n"' | head -n1)"
/userfs/bin/blapi_cmd xdsl set_power_up_down 1
/userfs/bin/blapi_cmd xdsl set_power_up_down 0
sleep 1
while [ true ]; do
LINK="$(awk '/ADSL link status:/{print $4}' /proc/tc3162/adsl_stats)"
if [ "$LINK" != "$PREVLINK" -a \( "$LINK" = "down" -o "$LINK" = "up" \) ]; then
if [ "$LINK" = "down" ]; then
[ "$CONFIGURED" -eq 0 ] && configure_lines # Needs to be done once the slave SoC is in down state and we've not been able to auto-sync.
if [ -n "$WANMODE" ]; then
if [ "$WANMODE" = "PTM" ]; then
/userfs/bin/blapi_cmd xdsl ptm_do_reset_sequence 0 1
else
delete_atm_devices
fi
fi
call_wan_hotplug "down" "$WANPORT"
else
CONFIGURED=1
WANMODE="$(awk '/TPSTC type:/{print $4}' /proc/tc3162/adsl_stats)"
if [ "$WANMODE" != "$PREVWANMODE" ]; then
OLDWANPORT="$WANPORT"
network_defer_device "$OLDWANPORT"
if [ -f /proc/device-tree/ae_wan/wan-dsl ]; then
WANPORT="ae_wan"
else
WANPORT="nas10"
fi
if [ "$WANMODE" = "PTM" ]; then
/etc/init.d/br2684ctl stop
delete_atm_devices
/userfs/bin/blapi_cmd system set_wan_mode 1
/userfs/bin/blapi_cmd xdsl reload_ko 2
/userfs/bin/blapi_cmd xdsl ptm_do_reset_sequence 1 2
# Set extended TPID for PTM packet flow
sys memwl 1FB50000 81001839
# VLAN TPID - VLAN
sys memwl 1FB50F18 8100
ifconfig ${WANPORT} mtu 1500
else
/userfs/bin/blapi_cmd system set_wan_mode 0
/userfs/bin/blapi_cmd xdsl reload_ko 1
/etc/init.d/br2684ctl start
# Set extended TPID for ATM packet flow
sys memwl 1FB50000 884C1839
# VLAN TPID - MPOA
sys memwl 1FB50F18 884C
ifconfig ${WANPORT} mtu 1982
ifconfig ${WANPORT} down up
OLDWANPORT="$WANPORT"
ATMINDEX="$(cat /sys/class/atm/TSARM*/atmindex | tail -n1 2> /dev/null)"
WANPORT="nas$((ATMINDEX))"
fi
if [ "$OLDWANPORT" != "$WANPORT" ]; then
call_wan_hotplug "down" "$OLDWANPORT"
FILES="$(grep "$OLDWANPORT" /etc/config/* | cut -f1 -d: | uniq | cut -f4 -d/ | xargs)"
for FILE in $FILES; do
sed -i -e "s#${OLDWANPORT}#${WANPORT}#g" "/etc/config/${FILE}"
"/etc/init.d/${FILE}" restart
done
else
/etc/init.d/network restart
fi
ifconfig ${OLDWANPORT} down up
fi
if [ "$WANMODE" = "PTM" ]; then
: # ToDo
else
create_atm_devices
fi
call_wan_hotplug "up" "$WANPORT"
PREVWANMODE="$WANMODE"
fi
# Toggle link state
network_defer_device "$WANPORT"
network_ready_device "$WANPORT"
# We are only interested in the transtion from init -> up/down and up/down -> down/up and vice versa.
# Since we poll the status via in-band signaling packets might get lost and the /procfs file is empty.
# This state we don't want to handle as it will toggle the link and do a re-setup which is totally unnecessary and unwanted.
PREVLINK="$LINK"
fi
sleep 5
done

View File

@@ -25,6 +25,7 @@ config dsl-line line
list profile 12b
list profile 17a
list profile 30a
list profile 35b
option bitswap 1
option sra 1
option us0 1 # VDSL2 only

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=3.0.7
PKG_VERSION:=3.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=171cf63d972c6fa81b97281531e457a0967c16c7
PKG_SOURCE_VERSION:=c73e5b15718ca40b2740bbe6151dfbb2bcca16df
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -2,6 +2,8 @@
. /lib/functions.sh
ZONE_NAME_FILE="/tmp/service_fw_zone"
log() {
echo "${@}"|logger -t firewall.service -p info
}
@@ -17,6 +19,37 @@ exec_cmd() {
return 0
}
collect_zone_name() {
local name network
config_get name "${1}" name ""
if [ -z "${name}" ]; then
return
fi
config_get network "${1}" network ""
for i in ${network}; do
var="${i}_zone"
echo "${var}=${name}" >> "${ZONE_NAME_FILE}"
done
}
load_zone_names() {
rm -f "${ZONE_NAME_FILE}"
config_foreach collect_zone_name zone
}
get_firewall_zone() {
if [ ! -f "${ZONE_NAME_FILE}" ]; then
echo ""
return
fi
var="${1}_zone="
name="$(cat ${ZONE_NAME_FILE} | grep ${var} | head -n 1 | cut -d'=' -f 2)"
echo "${name}"
}
add_iptable_rule() {
chain_name=$1
protocol=$2
@@ -135,9 +168,14 @@ add_service() {
fi
action=$(echo "${target}" | tr a-z A-Z)
chain_name="zone_${interface}_input"
res=0
zone_name="$(get_firewall_zone ${interface})"
if [ -z "${zone_name}" ]; then
log "Rule can not be added without zone name for interface ${interface}"
return
fi
chain_name="zone_${zone_name}_input"
res=0
count=$(echo "${proto}" | sed -n "/-1/p" | wc -l)
if [ "${count}" -eq 0 ]; then
@@ -160,4 +198,9 @@ add_service() {
}
config_load firewall
load_zone_names
config_foreach add_service "service"
rm -f "${ZONE_NAME_FILE}"

View File

@@ -1,5 +0,0 @@
config FLUENT_BIT_SYSLOG_PREPEND_LENGTH
bool "Enable syslog length prefix (RFC5424)"
default y
help
If enabled, prepends the byte-length of the syslog message to the message output.

View File

@@ -33,10 +33,6 @@ define Package/fluent-bit/description
Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./fluent-bit/* $(PKG_BUILD_DIR)/
@@ -61,12 +57,6 @@ CMAKE_OPTIONS+= \
-DFLB_WASM=No \
-DFLB_LUAJIT=No
ifeq ($(CONFIG_FLUENT_BIT_SYSLOG_PREPEND_LENGTH),y)
CMAKE_OPTIONS += -DFLUENT_BIT_SYSLOG_PREPEND_LENGTH=Yes
else
CMAKE_OPTIONS += -DFLUENT_BIT_SYSLOG_PREPEND_LENGTH=No
endif
# In plugins
CMAKE_OPTIONS += \
-DFLB_IN_SYSLOG=Yes \
@@ -75,6 +65,7 @@ CMAKE_OPTIONS += \
-DFLB_IN_DISK=Yes \
-DFLB_IN_EXEC=Yes \
-DFLB_IN_HEAD=Yes \
-DFLB_IN_TAIL=Yes \
-DFLB_IN_FORWARD=No \
-DFLB_IN_KMSG=No \
-DFLB_IN_PROC=No \
@@ -83,7 +74,6 @@ CMAKE_OPTIONS += \
-DFLB_IN_MQTT=No \
-DFLB_IN_STDIN=No \
-DFLB_IN_SYSTEMD=No \
-DFLB_IN_TAIL=No \
-DFLB_IN_TCP=No \
-DFLB_IN_THERMAL=No \
-DFLB_IN_UDP=No \

View File

@@ -0,0 +1,47 @@
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
index 4ecc7c4ac..cfe568245 100644
--- a/plugins/out_syslog/syslog.c
+++ b/plugins/out_syslog/syslog.c
@@ -776,12 +776,42 @@ static flb_sds_t syslog_format(struct flb_syslog *ctx, msgpack_object *o,
}
if (ctx->parsed_mode != FLB_SYSLOG_UDP) {
+ unsigned int msg_len = 0;
+
+ /* Create new SDS for length prefix */
+ flb_sds_t prefix = flb_sds_create_size(ctx->maxsize + 32);
+ if (!prefix) {
+ ret_sds = NULL;
+ goto clean;
+ }
+
+ /* Add newline also to make behaviour similar to syslog-ng */
tmp = flb_sds_cat(*s, "\n", 1);
if (!tmp) {
+ flb_sds_destroy(prefix);
ret_sds = NULL;
goto clean;
}
*s = tmp;
+
+ msg_len = flb_sds_len(*s);
+ tmp = flb_sds_printf(&prefix, "%u ", msg_len);
+ if (!tmp) {
+ flb_sds_destroy(prefix);
+ ret_sds = NULL;
+ goto clean;
+ }
+ prefix = tmp;
+
+ tmp = flb_sds_cat(prefix, *s, msg_len);
+ if (!tmp) {
+ flb_sds_destroy(prefix);
+ ret_sds = NULL;
+ goto clean;
+ }
+
+ flb_sds_destroy(*s);
+ *s = tmp;
}
}
else {

View File

@@ -1,71 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72b950e7b..58e76b349 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,6 +205,9 @@ option(FLB_CUSTOM_CALYPTIA "Enable Calyptia Support" Yes)
# Config formats
option(FLB_CONFIG_YAML "Enable YAML config format" Yes)
+# out syslog message format
+option(FLUENT_BIT_SYSLOG_PREPEND_LENGTH "Enable prepending of length to syslog message" Yes)
+
# List of plugins available and defaults for each option
include(cmake/plugins_options.cmake)
diff --git a/plugins/out_syslog/CMakeLists.txt b/plugins/out_syslog/CMakeLists.txt
index 556d8e1a4..a848020e9 100644
--- a/plugins/out_syslog/CMakeLists.txt
+++ b/plugins/out_syslog/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(FLUENT_BIT_SYSLOG_PREPEND_LENGTH)
+ add_definitions(-DFLUENT_BIT_SYSLOG_PREPEND_LENGTH)
+endif()
+
set(src
syslog.c
syslog_conf.c)
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
index 4ecc7c4ac..f85c38b51 100644
--- a/plugins/out_syslog/syslog.c
+++ b/plugins/out_syslog/syslog.c
@@ -156,7 +156,7 @@ static flb_sds_t syslog_rfc5424(flb_sds_t *s, struct flb_time *tms,
return NULL;
}
*s = tmp;
- return *s;
+ goto finalize;
}
prival = (msg->facility << 3) + msg->severity;
@@ -291,6 +291,31 @@ static flb_sds_t syslog_rfc5424(flb_sds_t *s, struct flb_time *tms,
*s = tmp;
}
+finalize:
+#ifdef FLUENT_BIT_SYSLOG_PREPEND_LENGTH
+ // Create new SDS with length prefix
+ // Allocate enough space for "%u "
+ flb_sds_t prefix = flb_sds_create_size(32);
+ if (!prefix) {
+ return NULL;
+ }
+
+ unsigned int msg_len = flb_sds_len(*s);
+ prefix = flb_sds_printf(&prefix, "%u ", msg_len);
+ if (!prefix) {
+ return NULL;
+ }
+
+ flb_sds_t new_s = flb_sds_cat(prefix, *s, msg_len);
+ if (!new_s) {
+ flb_sds_destroy(prefix);
+ return NULL;
+ }
+
+ flb_sds_destroy(*s);
+ *s = new_s;
+#endif
+
return *s;
}

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.2.20
PKG_VERSION:=1.3.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3948618fa8fa23a0ddc51632b0036dbd08e27696
PKG_SOURCE_VERSION:=3663ca4d001508509774115d6797b932f9ed4f69
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.9.6
PKG_VERSION:=9.9.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=5dba542b280495730176da468bc45ed5dcc8c94e
PKG_SOURCE_VERSION:=070e812e1bfb81a35a95a9c16cc20e8ffa6e30e4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -88,6 +88,7 @@ define Package/icwmp/install
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/85-migrate-gw-info $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/999-cwmp-conn-config $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp

View File

@@ -1,14 +1,44 @@
#!/bin/sh
. /lib/functions.sh
ZONE_NAME_FILE="/tmp/cwmp_fw_zone"
#created by the icwmp package
log() {
echo "${@}"|logger -t firewall.cwmp -p info
}
collect_zone_name() {
local name network
config_get name "${1}" name ""
if [ -z "${name}" ]; then
return
fi
config_get network "${1}" network ""
for i in ${network}; do
var="${i}_zone"
echo "${var}=${name}" >> "${ZONE_NAME_FILE}"
done
}
load_zone_names() {
rm -f "${ZONE_NAME_FILE}"
config_load firewall
config_foreach collect_zone_name zone
}
get_firewall_zone() {
zone="$(uci show firewall|grep network|grep -w "${1}"|cut -d. -f 2)"
zone="${zone:-wan}" # defaults to wan zone
echo "$zone"
if [ ! -f "${ZONE_NAME_FILE}" ]; then
echo ""
return
fi
var="${1}_zone="
name="$(cat ${ZONE_NAME_FILE} | grep ${var} | head -n 1 | cut -d'=' -f 2)"
echo "${name}"
}
cleanup_upstream_rules() {
@@ -169,4 +199,6 @@ configure_connection_req_rules() {
fi
}
load_zone_names
configure_connection_req_rules "$@"
rm -f "${ZONE_NAME_FILE}"

View File

@@ -16,79 +16,6 @@ log() {
echo "${@}"|logger -t cwmp.init -p info
}
regenerate_ssl_link() {
local cert_dir
cert_dir="${1%/}"
if [ -f "${cert_dir}" ]; then
return 0
fi
# do not generate the c_rehash if its system default cert path
# ca-certificate package already generates c_rehash on compilation
[ ! -d "${cert_dir}" ] || [ "${cert_dir}" = "/etc/ssl/certs" ] && return 0
generate_links() {
local file_type="$1"
local files="${cert_dir}"/*."${file_type}"
for cfile in ${files}; do
if [ -f "${cfile}" ]; then
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
if [ ! -f "${cert_dir}/${rehash}.0" ]; then
log "Generating c_rehash for ${cfile}=>${rehash}.0"
ln -s "${cfile}" "${cert_dir}/${rehash}.0"
fi
fi
done
}
generate_links "pem"
}
enable_dhcp_option43() {
local wan="${1}"
### Ask for DHCP Option 43 only if CWMP is enabled ###
local reqopts="$(uci -q get network."${wan}".reqopts)"
local proto="$(uci -q get network."${wan}".proto)"
local newreqopts=""
local option43_present=0
for ropt in $reqopts; do
case $ropt in
43) option43_present=1 ;;
*) ;;
esac
done
if [ ${option43_present} -eq 1 ]; then
return;
fi
newreqopts="$reqopts 43"
if [ "${proto}" = "dhcp" ]; then
uci -q set network."${wan}".reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
}
set_vendor_id() {
local wan="${1}"
local proto="$(uci -q get network."${wan}".proto)"
if [ "${proto}" = "dhcp" ]; then
vendorid="$(uci -q get network."${wan}".vendorid)"
if [ -z "${vendorid}" ]; then
uci -q set network."${wan}".vendorid="dslforum.org"
ubus call uci commit '{"config":"network"}'
elif [[ $vendorid != *"dslforum.org"* ]]; then
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
ubus call uci commit '{"config":"network"}'
fi
fi
}
wait_for_resolvfile() {
local time=$1
local tm=1
@@ -211,28 +138,6 @@ validate_defaults() {
}
boot() {
local dhcp_discovery wan_interface skip_dhcp_boot_options
config_load cwmp
config_get wan_interface cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get skip_dhcp_boot_options acs skip_dhcp_boot_options "0"
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
if [ "${skip_dhcp_boot_options}" -ne 1 ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
fi
fi
config_get ssl_capath acs ssl_capath
if [ -n "${ssl_capath}" ]; then
regenerate_ssl_link "${ssl_capath}"
fi
# Copy backup data so that if it restart latter on, it gets the info
copy_cwmp_etc_files_to_varstate
mkdir -p /var/run/icwmpd/

View File

@@ -0,0 +1,107 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "${@}"|logger -t cwmp.defaults -p info
}
set_vendor_id() {
local wan="${1}"
local proto="$(uci -q get network."${wan}".proto)"
if [ "${proto}" = "dhcp" ]; then
vendorid="$(uci -q get network."${wan}".vendorid)"
if [ -z "${vendorid}" ]; then
uci -q set network."${wan}".vendorid="dslforum.org"
elif [[ $vendorid != *"dslforum.org"* ]]; then
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
fi
fi
}
enable_dhcp_option43() {
local wan="${1}"
local reqopts="$(uci -q get network."${wan}".reqopts)"
local proto="$(uci -q get network."${wan}".proto)"
local newreqopts=""
local option43_present=0
for ropt in $reqopts; do
case $ropt in
43) option43_present=1 ;;
*) ;;
esac
done
if [ ${option43_present} -eq 1 ]; then
return;
fi
newreqopts="$reqopts 43"
if [ "${proto}" = "dhcp" ]; then
uci -q set network."${wan}".reqopts="$newreqopts"
fi
}
regenerate_ssl_link() {
local cert_dir
cert_dir="${1%/}"
if [ -f "${cert_dir}" ]; then
return 0
fi
# do not generate the c_rehash if its system default cert path
# ca-certificate package already generates c_rehash on compilation
[ ! -d "${cert_dir}" ] || [ "${cert_dir}" = "/etc/ssl/certs" ] && return 0
generate_links() {
local file_type="$1"
local files="${cert_dir}"/*."${file_type}"
for cfile in ${files}; do
if [ -f "${cfile}" ]; then
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
if [ ! -f "${cert_dir}/${rehash}.0" ]; then
log "Generating c_rehash for ${cfile}=>${rehash}.0"
ln -s "${cfile}" "${cert_dir}/${rehash}.0"
fi
fi
done
}
generate_links "pem"
}
configure_dhcp_discovery() {
local dhcp_discovery wan_interface skip_dhcp_boot_options
config_load cwmp
config_get wan_interface cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get skip_dhcp_boot_options acs skip_dhcp_boot_options "0"
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
if [ "${skip_dhcp_boot_options}" -ne 1 ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
fi
fi
}
configure_ssl_path() {
local ssl_capath
config_load cwmp
config_get ssl_capath acs ssl_capath
if [ -n "${ssl_capath}" ]; then
regenerate_ssl_link "${ssl_capath}"
fi
}
configure_dhcp_discovery
configure_ssl_path

View File

@@ -1,16 +1,17 @@
#
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
# Copyright (C) 2025 Genexis Sweden AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.7.8
PKG_VERSION:=8.7.32
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9c507bfb7f45fad81097262f05dc7cd11760e6b0
PKG_SOURCE_VERSION:=f1f653c0b7b53a243af889a4c8594aca42589045
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -105,6 +106,7 @@ TARGET_CFLAGS += -DHAS_UBUS
ifeq ($(CONFIG_IEEE1905_BUILD_TR181_PLUGIN),y)
TARGET_CFLAGS += -DBUILD_TR181_PLUGIN
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
endif
MAKE_FLAGS += \

View File

@@ -12,6 +12,7 @@ config al-iface
list ifname 'br-lan'
list ifname '/eth.*'
list ifname '/wl.*'
list ifname '/ra.*'
list ifname '/wds.*'
# ap sections are auto-generated/overwritten during onboarding

View File

@@ -1,10 +1,9 @@
#!/bin/sh
. /lib/functions/system.sh
BMAC=$(db -q get hw.board.basemac)
BMAC=$(get_mac_label)
BMAC=${BMAC//:/}
BMAC=${BMAC// /}
BMAC=$(printf "%12.12X" $((0x$BMAC)))
[ "$BMAC" == "" ] && exit 1

View File

@@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=PROPRIETARY
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=00189cea0a78b7a30dbfdd363b6d8e836437d1bc
PKG_SOURCE_VERSION:=25e32ac5a860aec6e53e3449565b71595073e014
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopsys-analytics.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -31,8 +31,8 @@ define Package/$(PKG_NAME)
+@PACKAGE_COLLECTD_ENCRYPTED_NETWORK \
# remote syslog
DEPENDS+= \
+@FLUENT_BIT_SYSLOG_PREPEND_LENGTH \
+@SYSLOGNG_LOGROTATE \
+@PACKAGE_syslog-ng:SYSLOGNG_LOGROTATE \
+PACKAGE_fluent-bit:logrotate \
endef
@@ -44,11 +44,12 @@ endef
Build/Compile=
define Package/$(PKG_NAME)/install
$(CP) -r ./files/common/* $(1)/
$(CP) -r $(PKG_BUILD_DIR)/files/common/* $(1)/
ifneq ($(CONFIG_PACKAGE_fluent-bit),)
$(CP) -r ./files/fluent-bit/* $(1)/
else
$(CP) -r ./files/syslog-ng/* $(1)/
$(CP) -r $(PKG_BUILD_DIR)/files/fluent-bit/* $(1)/
endif
ifneq ($(CONFIG_PACKAGE_syslog-ng),)
$(CP) -r $(PKG_BUILD_DIR)/files/syslog-ng/* $(1)/
endif
endef

View File

@@ -1,19 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDJTCCAg0CAQEwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCU0UxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDAeFw0yMjExMjIxMjM1MDNaFw0zMjExMTkxMjM1MDNaMGwxCzAJBgNVBAYTAlVT
MREwDwYDVQQIDAhJbnRlcm5ldDEMMAoGA1UEBwwDRFVUMQwwCgYDVQQKDAMuLi4x
DDAKBgNVBAsMAy4uLjEMMAoGA1UEAwwDLi4uMRIwEAYJKoZIhvcNAQkBFgMuLi4w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDleMMuJ8AO1DeRmOyE2k2D
DWUKB4yiRQhKxnRyRcF1s+mHcySS1NRlLwyZUuOFvBYHUhE3AfNMN5ywKazl4FwG
MNtx0iUfHmHc0MQ04KZk1ifkS5WPUMksEJDQyM06ZH3gcIhGDlSkprnMsp9q5HlG
umopBlihLTI+WM+8kliFbT7iOICDi9qRHPS+WTT/RClX12ISAejVFMFdpf8aQOGn
klu7mcGyOBij0axcfd2QlHybvkSSksvny19I1/Be7MdtO3fxJODuUy8sHd9HqaOJ
TbjcwWNWFJIR4+Gsz2DeqIPxpaqUjEZgJfUD5FSTOL3ZgtjMmzjYZj8IEf5BD7st
AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAK+WvRYkkM+11ljo1pKwyTtcyz9fiQ9Z
zGAed6UViEPhJNIchFEFukMMqNaWL3Pi0MkvkAiJvyJbGW0YiPm7r0sf2sOD4PPI
UqDskApA9P1aL1uF/CBvP7kViVVVcNDSHq+Hc+6Jrg+Ufycq2kE9KrU/zI2Z0kEd
70k+YNLWTZNjekXfrxlniw7ycmALJuYkw1GXSZ4pph+VXYPJ7c/sm4J3MKDXonTQ
tEI4wTTkfOHUBDppNX/b9gw0A4jL5nAga/6Q2PPNoaTrgLZS0o03GO3HES24iHlG
TBrIW9q2HRcDOfj5oNaoSasOyARFT0owJdcBFlzp7Pe1lMN+bRLz5h0=
-----END CERTIFICATE-----

View File

@@ -1,28 +0,0 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDleMMuJ8AO1DeR
mOyE2k2DDWUKB4yiRQhKxnRyRcF1s+mHcySS1NRlLwyZUuOFvBYHUhE3AfNMN5yw
Kazl4FwGMNtx0iUfHmHc0MQ04KZk1ifkS5WPUMksEJDQyM06ZH3gcIhGDlSkprnM
sp9q5HlGumopBlihLTI+WM+8kliFbT7iOICDi9qRHPS+WTT/RClX12ISAejVFMFd
pf8aQOGnklu7mcGyOBij0axcfd2QlHybvkSSksvny19I1/Be7MdtO3fxJODuUy8s
Hd9HqaOJTbjcwWNWFJIR4+Gsz2DeqIPxpaqUjEZgJfUD5FSTOL3ZgtjMmzjYZj8I
Ef5BD7stAgMBAAECggEATmdMiOCcBnUL53tQlLPh9/0DoMGjk23yv1m/P6wFxamL
CPSWcnS1fTzuGRTxGCiDfkzUBO9tqYT2zFnw8ToPNy5KTEF43YEL/t51q3t2Xs2t
I5uPpj/7/EpMsIlrVaAwQhcw+H68/OTaZs5BGcymgzv+ObYpYiiHGjZOBCgchrl+
/FyUyrS1M11VcamJ8H6GqNDEy5zvwOX3VjIwHvbONrN6zjNvMRIMzCQC59hEeBDG
j6AYMw2/UJ4sPLpmqObnPvYO4D6qsEuKxQDGFwaPGSulOs5+OHMqTcTLRtktR5qJ
Mjq5C2axy3TvxpbZ5Ou2jRB/zaXWNkK26UP5Iv2MAQKBgQD/4J5lcFBkrZArR5XL
FiAfN4yfBAPcveRP7Zgqb7nlLzzouqz7vyH8Hhnk+XbA9CiKVOMc2Fbe82/exuft
DvsoW5+Ds31SU52q5vWjtnPXeuK0kT6lm+qBbtmsFSAnfCRZUQcF8PhERLfzOEA6
Uln0xr2EFR3D/UaBjsN3aTKMzQKBgQDllOe+QAf4CZGgCyAF1DDakuZF+iAfsCNz
83dlb6N2ggJinOLs3ExfT0oJSUp4KPAIOQ+QgY01Itk0py2HEfYCgvXim7RrZ1P7
5Sx++fi48ar3aqgLqg0hur0Yd1kFPjVRWj2/jM6qvLC8nEehNQH1VOh847FcwTrY
UWWMKOnn4QKBgFnApE7Ykpp99u/3cCeIX0QT7BNrCR/Iy+jtYk6gWgh2BVts/3he
lsEkndifWHReMEo1dGSNzgruQPNXucqBUr/ZQ56iuvbBtbBYyxjdysxuok7ME7lr
c1prU5b04g53kRhzP49p8uufXxbFSGIsuLkPbTKDZal1keGn/hBIqh6RAoGAT9pS
HMdSvkA9yaf09HIQqAXOWGqef8cZHbyCO+LvvUmNINWmzHH3knMWslIut8qtan7G
XiHhhqjfWcQIPuHNaqQ4eCBmSbE/8e6NYoD5tQJB0Brl5mC4fpHgMcFZUkyH6Qr1
TUnhnFtTMdc9xuGUE8v7rWzZBQUkvZbaNj0I1qECgYAesALh2u0r/ayEYjWAcqu8
XXhQWRhg7fXm0cCODNeK5rhkaqxlw64hSY29tgEKPg/F66jXMDXcsvsBwnPoGN35
lD6CQlWKR3g2LtRCAHLICQ5aODNL9B321syoIHF1Cdlw78V3uMsQ7av/IWaIX4BL
EEWtDICxzN37PaGuYVSRSQ==
-----END PRIVATE KEY-----

View File

@@ -1,93 +0,0 @@
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
Interval 60
ReadThreads 2
WriteQueueLimitHigh 10000
WriteQueueLimitLow 8000
LoadPlugin "load"
LoadPlugin "network"
LoadPlugin "memory"
LoadPlugin "processes"
LoadPlugin "cpu"
LoadPlugin "exec"
<Plugin "network">
<Server "analytics.iopsys.eu" "25827">
SecurityLevel "encrypt"
Username "iopsys"
Password "kffJDv3CMVO9WHO4CIP8CGM3ZXN4EQv"
</Server>
</Plugin>
<Plugin "network">
<Server "analytics.iopsys.eu" "25825">
SecurityLevel "encrypt"
Username "iopsys"
Password "6rgVOHWq9BPCbZFlLVB854jD8WCv4EvK"
</Server>
</Plugin>
<Plugin "memory">
ValuesPercentage true
</Plugin>
<Plugin "processes">
CollectFileDescriptor true
CollectContextSwitch true
CollectMemoryMaps true
ProcessMatch "mapagent_instances" "mapagent"
ProcessMatch "wifimngr_instances" "wifimngr"
ProcessMatch "ieee1905d_instances" "ieee1905d"
ProcessMatch "topologyd_topologyd" "topologyd"
ProcessMatch "uspd_instances" "uspd"
ProcessMatch "mapcontroller_instances" "mapcontroller"
ProcessMatch "obuspa_instances" "(.*)obuspa"
ProcessMatch "hostapd_instances" "hostapd"
ProcessMatch "swmodd_instances" "swmodd"
ProcessMatch "ruleng_instances" "rulengd"
ProcessMatch "wpa_supplicant_instances" "wpa_supplicant"
ProcessMatch "dm_bulkdata" "bbfdmd -m bulkdata"
ProcessMatch "dm_ddnsmngr" "bbfdmd -m ddnsmngr"
ProcessMatch "dm_dnsmngr" "bbfdmd -m dnsmngr"
ProcessMatch "dm_ethmngr" "bbfdmd -m ethmngr"
ProcessMatch "dm_hostmngr" "bbfdmd -m hostmngr"
ProcessMatch "dm_icwmp" "bbfdmd -m icwmp"
ProcessMatch "dm_mcastmngr" "bbfdmd -m mcastmngr"
ProcessMatch "dm_periodicstat" "bbfdmd -m periodicstats"
ProcessMatch "dm_portmapping" "bbfdmd -m portmapping"
ProcessMatch "dm_qosmngr" "bbfdmd -m qosmngr"
ProcessMatch "dm_sshmngr" "bbfdmd -m sshmngr"
ProcessMatch "dm_swmodd" "bbfdmd -m swmodd"
ProcessMatch "dm_timemngr" "bbfdmd -m timemngr"
ProcessMatch "dm_tr104" "bbfdmd -m tr104"
ProcessMatch "dm_urlfilter" "bbfdmd -m urlfilter"
ProcessMatch "dm_userinterfac" "bbfdmd -m userinterface"
ProcessMatch "dm_usermngr" "bbfdmd -m usermngr"
ProcessMatch "bbfdmd" "bbfdmd"
ProcessMatch "decollector" "decollector"
ProcessMatch "collectd" "collectd"
ProcessMatch "uwsgi" "uwsgi"
ProcessMatch "syslog-ng" "syslog-ng"
ProcessMatch "mosquitto" "mosquitto"
ProcessMatch "nginx" "nginx"
ProcessMatch "hostmngr" "hostmngr"
ProcessMatch "asterisk" "asterisk"
ProcessMatch "voicemngr" "voicemngr"
</Plugin>
<Plugin "cpu">
ReportByState true
ReportByCpu true
ValuesPercentage true
</Plugin>
<Plugin "exec">
Exec "nobody" "/sbin/get-sn"
</Plugin>
<Plugin "load">
</Plugin>

View File

@@ -1,3 +0,0 @@
config core-watcher 'globals'
option api_key '1JH7ZKGDtJXKeLt4CfeJt4y'
option url 'https://analytics.iopsys.eu:1337/crash_upload_file'

View File

@@ -1,6 +0,0 @@
{
"forced_inform": [
"Device.DeviceInfo.ModelName"
]
}

View File

@@ -1,38 +0,0 @@
#!/bin/sh /etc/rc.common
export USE_PROCD=1
export START=95
export STOP=01
LOG="logger -t core-watcher[$$] -p"
start_service() {
[ -f /etc/config/core-watcher ] || {
$LOG error "UCI config not found"
return 1
}
firmware_version=$(db get device.deviceinfo.SoftwareVersion || echo "unknown")
product_class=$(db get device.deviceinfo.ProductClass | awk '{print tolower($0)}')
serial=$(db get device.deviceinfo.SerialNumber || echo "unknown")
config_load core-watcher
url=""
config_get url "globals" "url"
api_key=""
config_get api_key "globals" "api_key"
if [ -z "$url" ] || [ -z "$api_key" ]; then
$LOG error "URL or API Key not found in config"
return 2
fi
procd_open_instance
procd_set_param env API_KEY="$api_key" SERIAL="$serial" FIRMWARE_VERSION="$firmware_version" PRODUCT_CLASS="$product_class"
procd_set_param command /usr/bin/core-watcher -u "$url"
procd_set_param limits core="unlimited"
procd_close_instance
}

View File

@@ -1,26 +0,0 @@
#!/bin/sh /etc/rc.common
START=15
STOP=20
USE_PROCD=1
start_service() {
procd_open_instance
echo "Starting ubus monitor..."
procd_set_param respawn # Enable automatic restart on failure
procd_set_param stdout 1 # Redirect stdout to procd
procd_set_param stderr 1 # Redirect stderr to procd
procd_set_param command /bin/sh "/usr/sbin/ubus-monitor"
procd_close_instance
}
reload_service(){
echo "Explicitly restarting service, are you sure you need this?"
stop
start
}

View File

@@ -1,3 +0,0 @@
#!/bin/sh
uci set cwmp.cpe.forced_inform_json='/etc/icwmpd/force_inform.json'
uci commit cwmp

View File

@@ -1,5 +0,0 @@
set_core_unlimited() {
prlimit --core=unlimited: -p 1
}
boot_hook_add preinit_main set_core_unlimited

View File

@@ -1,11 +0,0 @@
#!/bin/sh
INTERVAL="${COLLECTD_INTERVAL:-60}"
while sleep "$INTERVAL"; do
SN=$(db get device.deviceinfo.SerialNumber)
HOSTNAME=$(uname -n)
FORMATTED_RESULT=$(echo "1337")
echo "PUTVAL \"$HOSTNAME/exec-$SN/gauge-INFO\" interval=$INTERVAL N:\"$FORMATTED_RESULT\""
done

View File

@@ -1,150 +0,0 @@
#!/bin/sh
# shellcheck shell=busybox
# This shell script watches for *.core files created in
# /tmp and uploads them
CORE_DIR="/tmp"
LOG="logger -t core-watcher[$$] -p"
POLL_INTERVAL="5"
upload_file() {
FILEPATH=$1
$LOG info "Uploading $UPLOAD_TYPE $FILEPATH"
curl -s --fail -X "POST" \
"$API_URL" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "api_key=$API_KEY" \
-F "dump_md5=$COREDUMP_MD5" \
-F "device_serial=$SERIAL" \
-F "upload_type=$UPLOAD_TYPE" \
-F "incoming_file=@$FILEPATH;type=text/plain"
status=$?
if [ "$status" != "0" ]; then
$LOG error "$UPLOAD_TYPE upload failed. curl returned status $status"
else
$LOG info "$UPLOAD_TYPE upload success"
if [ $UPLOAD_TYPE = "core" ]; then
$LOG info "Renaming core $ORIGINAL_CORE_FILEPATH"
mv "$ORIGINAL_CORE_FILEPATH" "$ORIGINAL_CORE_FILEPATH"_UPLOADED
fi
fi
}
usage() {
cat <<EOM
Usage:
$0 [OPTIONS]
Options:
-h help
-u <URL> API Gateway URL (required)
EOM
exit 1
}
main() {
if [ -z "$API_KEY" ]; then
$LOG error "API_KEY env variable not set"
exit 1
fi
if [ -z "$SERIAL" ]; then
$LOG error "SERIAL env variable not set"
exit 1
fi
if [ -z "$FIRMWARE_VERSION" ]; then
$LOG error "FIRMWARE_VERSION env variable not set"
exit 1
fi
while getopts "u:" opt; do
case $opt in
u)
API_URL=${OPTARG}
;;
*)
usage
;;
esac
done
if [ -z "$API_URL" ]; then
usage
fi
# Source system information from /etc/os-release
. /etc/os-release
# Convert OPENWRT_DEVICE_PRODUCT to uppercase and use it as the board name
BOARD_NAME=$(echo "$OPENWRT_DEVICE_PRODUCT" | tr 'a-z' 'A-Z')
BASE_MAC="$(db get device.deviceinfo.BaseMACAddress)"
while true; do
if ping -c1 -4 analytics.iopsys.eu; then
CORES=$(find "$CORE_DIR" -type f -name "*.core")
for core in $CORES; do
$LOG error "Core found: $core"
COREDUMP_MD5="$(md5sum "$core" | cut -f1 -d' ')"
UPLOAD_TYPE="file"
if [ -e /tmp/ctfw.meta ]; then
. /tmp/ctfw.meta
fi
echo "$CTFW_TEST_CASE" > /tmp/ctfw-test-case.txt
upload_file "/tmp/ctfw-test-case.txt"
echo "$CTFW_TAG" > /tmp/ctfw-job-tag.txt
upload_file "/tmp/ctfw-job-tag.txt"
echo "$CTFW_LOCK_USERNAME" > /tmp/ctfw-lock-username.txt
upload_file "/tmp/ctfw-lock-username.txt"
opkg list > /tmp/opkg-list.txt
upload_file "/tmp/opkg-list.txt"
free > /tmp/free-mem.txt
upload_file "/tmp/free-mem.txt"
cat /proc/slabinfo > /tmp/slabinfo.txt
upload_file "/tmp/slabinfo.txt"
echo "$BOARD_NAME" > /tmp/board-name.txt
upload_file "/tmp/board-name.txt"
echo "$BASE_MAC" > /tmp/base-mac.txt
upload_file "/tmp/base-mac.txt"
uname -n > /tmp/hostname.txt
upload_file "/tmp/hostname.txt"
echo "$FIRMWARE_VERSION" > /tmp/fw-version.txt
upload_file "/tmp/fw-version.txt"
cp "$(strings "$core" | grep ^/ | head -1 | cut -d' ' -f1)" /tmp/binary
upload_file /tmp/binary
UPLOAD_TYPE="core"
ORIGINAL_CORE_FILEPATH="$core"
cp "$core" /tmp/core
upload_file /tmp/core
rm /tmp/core
done
fi
sleep $POLL_INTERVAL
done
}
main "$@"

View File

@@ -1,231 +0,0 @@
#!/bin/sh
# shellcheck shell=dash
# Location of system report temporary directory
SRDIR="/tmp/system-report"
configure() {
local preconf_path
preconf_path="$(realpath "$0")"
if ! cmp -s /usr/sbin/system-report "${preconf_path}" >/dev/null; then
echo "iopsys-test system-report differs from included with firmware, symlinking"
ln -sf "${preconf_path}" /usr/sbin/system-report
fi
if ! cmp -s /rom/usr/sbin/system-report /usr/sbin/system-report >/dev/null && ! grep -Fq "/usr/sbin/system-report" /etc/sysupgrade.conf; then
echo "iopsys-test system-report differs from included with firmware, adding to sysupgrade.conf"
echo "/usr/sbin/system-report" >>/etc/sysupgrade.conf
fi
}
run() {
set -x
# Alias ubus to have a smaller 5-second timeout on all subsequent calls
ubus() { command ubus -t 5 "$@"; }
mkdir -p "$SRDIR"
SRCF="$SRDIR/config"
SRSY="$SRDIR/system"
SRNT="$SRDIR/network"
SRTR="$SRDIR/tr069"
SRMD="$SRDIR/mem_dump"
# Config
echo "Gathering configuration data"
{
cat /etc/banner
echo "Installed Packages"
opkg list-installed
echo "Database"
db show
echo "Configuration"
uci show
} > "$SRCF"
# System
echo "Gathering system information"
{
echo "System Info"
ubus call system info
echo "Board Info"
ubus call system board
echo "Running Processes"
top -b -n 1
echo "Kernel Parameters"
sysctl -A 2>/dev/null
echo "System Log"
timeout 5 logread -l 1000
echo "Driver Message"
timeout 5 dmesg
echo "PCI Devices"
lspci -k
echo "Installed Modules"
lsmod
echo "CPU Info"
cat /proc/cpuinfo
echo "Memory Info"
cat /proc/meminfo
echo "Slab Info"
cat /proc/slabinfo
echo "Firmware banks"
ubus call fwbank dump
} > "$SRSY"
# Network
echo "Gathering network state"
{
echo "Device Status"
ubus call network.device status
echo "Hosts Status"
ubus call hosts show
echo "Topology"
ubus call ieee1905.topology dump
echo "Network Status"
ubus call network.interface dump
if [ -d /sys/class/ieee80211 ]; then
echo "Wireless Status"
ubus call network.wireless status
echo "Wireless Radio Status"
ubus call wifi status
echo "Get radio scan"
for radio_if in $(ubus list 'wifi.radio.*'); do
ubus call "${radio_if}" scan
sleep 2
ubus call "${radio_if}" scanresults
done
echo "Get Assoc List"
interfaces=$(uci show wireless | grep "ifname=" | awk -F'[.,=]' '{print$2}')
for int in $interfaces; do
mode=$(uci get "wireless.${int}.mode")
if [ "$mode" = "ap" ] ; then
ap_int=$(uci get "wireless.${int}.ifname")
echo "Get assoc list"
ubus call "wifi.ap.${ap_int}" assoclist
echo "Get station info"
ubus call "wifi.ap.${ap_int}" stations
fi
done
fi
if [ "$(db get hw.board.hasVoice)" = 1 ]; then
echo "voice status"
ubus call voice.asterisk status
fi
echo "IPv4 Routes"
ip -d r
echo "IPv6 Routes"
ip -d -6 r
echo "Neighbor Table"
ip n
echo "ARP Table"
cat /proc/net/arp
echo "IGMP Snooping Table"
ubus call mcast stats
echo "Conntrack Table"
cat /proc/net/nf_conntrack
echo "Network Interface Status"
ip -d a
echo "IPv4 Firewall Status"
iptables -xvnL
echo "IPv6 Firewall Status"
ip6tables -xvnL
echo "Bridge Info"
brctl show
if [ -f /tmp/multiap.backhaul ]; then
echo "Multi-AP Backhaul status"
cat /tmp/multiap.backhaul
fi
echo "TCP/UDP listened ports"
netstat -tlnp
netstat -ulnp
echo "MAC layer firewall status"
ebtables -t broute -L
echo "MAC layer firewall status list"
ebtables -L
echo "IEEE1905 info"
ubus call ieee1905 info
if [ -f /usr/bin/iwinfo ]; then
echo "iwinfo interface details"
/usr/bin/iwinfo
fi
} > "$SRNT"
# TR-069
echo "Gathering TR-069 state"
{
echo "TR-069 status"
ubus call tr069 status
echo "get all TR-181 Parameters"
ubus call bbfdm get '{"path":"Device."}'
echo "TR-069 Option 43 URL"
uci -P /var/state -q get cwmp.acs.url
echo "TR-069 Logs"
[ -f /var/log/icwmp ] && cat /var/log/icwmp
} > "$SRTR"
# Firmware RAM dump (IOP-8118)
if [ -f /tmp/mem_dump ]; then
mv /tmp/mem_dump "$SRMD"
fi
REPORT_PATH="$(dirname "${SRDIR}")"
REPORT_DIRNAME="$(basename "${SRDIR}")"
FILENAME="${REPORT_PATH}/system-report-$(date +%Y-%m-%d).tar.gz"
tar -cz -C "${REPORT_PATH}" -f "${FILENAME}" "${REPORT_DIRNAME}"
echo "Report is located at ${FILENAME}"
#ubus send "system-report" "{ \"filename\" : \"$FILENAME\" }"
rm -r "$SRDIR"
}
case "${1:-}" in
configure) configure ;;
*) run ;;
esac

View File

@@ -1,7 +0,0 @@
#!/bin/ash
rm -f /tmp/ubus-calls-pipe
mkfifo /tmp/ubus-calls-pipe || echo "Pipe wasn't created" >&2
logger -t ubus-logging "Pipe created sucessfully"
/bin/ubus listen > /tmp/ubus-calls-pipe

View File

@@ -1,42 +0,0 @@
[INPUT]
name syslog
tag logs
path /dev/log
parser syslog-rfc3164-local
[INPUT]
Name head
Tag ubus_listen
file /tmp/ubus-calls-pipe
Interval_Sec 1
[OUTPUT]
name syslog
match logs
host analytics.iopsys.eu
port 6514
mode tcp
tls on
tls.verify off
tls.key_file /etc/analytics-cert/clientkey.pem
tls.crt_file /etc/analytics-cert/clientcert.pem
syslog_format rfc5424
syslog_appname_preset dummy
syslog_message_key message
syslog_hostname_key hostname
syslog_hostname_preset dummy
[OUTPUT]
name syslog
match ubus_listen
host analytics.iopsys.eu
port 6515
mode tcp
tls on
tls.verify off
tls.key_file /etc/analytics-cert/clientkey.pem
tls.crt_file /etc/analytics-cert/clientcert.pem
syslog_format rfc5424
syslog_appname_preset dummy
syslog_message_key head
syslog_hostname_preset dummy

View File

@@ -1,25 +0,0 @@
#!/bin/sh
# Check if fluent-bit is installed
if command -v fluent-bit >/dev/null 2>&1; then
conf_file="/etc/fluent-bit/conf.d/analytics.conf"
# Check if the configuration file exists
if [ -f "$conf_file" ]; then
# Get hostname and serial number
hostname="$(db -q get device.deviceinfo.ModelName)"
serialnum="$(db -q get device.deviceinfo.SerialNumber)"
# Replace syslog_hostname_preset line
sed -i "s/^.*syslog_hostname_preset.*/ syslog_hostname_preset ${hostname}/" "$conf_file"
# Replace syslog_appname_preset line
sed -i "s/^.*syslog_appname_preset.*/ syslog_appname_preset ${serialnum}/" "$conf_file"
fi
fi
# Clear logs periodically
grep -q 'logrotate' /etc/crontabs/root || echo '*/15 * * * * /usr/sbin/logrotate /etc/logrotate.conf' >> /etc/crontabs/root
# Exit successfully
exit 0

View File

@@ -1,9 +0,0 @@
/var/log/messages {
    missingok
    rotate 1
    size 1M
    postrotate
        /usr/sbin/syslog-ng-ctl reopen
    endscript
}

View File

@@ -1,46 +0,0 @@
source s_file {
file("/var/log/messages" program_override("`ENV_VAR_SYSLOG_NG_DUT_SERIAL_NUMBER`"));
};
source ubus_calls {
pipe("/tmp/ubus-calls-pipe"
flags(no-parse)
);
};
destination d_tls_syslog {
syslog(
"analytics.iopsys.eu"
transport("tls")
port(6514)
tls(
key-file("/etc/analytics-cert/clientkey.pem")
cert-file("/etc/analytics-cert/clientcert.pem")
peer-verify(no)
)
);
};
destination d_tls_ubus {
syslog(
"analytics.iopsys.eu"
transport("tls")
port(6515)
tls(
key-file("/etc/analytics-cert/clientkey.pem")
cert-file("/etc/analytics-cert/clientcert.pem")
peer-verify(no)
)
);
};
log {
source(s_file);
destination(d_tls_syslog);
};
log {
source(ubus_calls);
destination(d_tls_ubus);
};

View File

@@ -1,4 +0,0 @@
sed -i '/procd_open_instance.*/a \\tprocd_set_param env ENV_VAR_SYSLOG_NG_DUT_SERIAL_NUMBER="$(db get hw.board.serial_number)"' /etc/init.d/syslog-ng
# Clear logs periodically
grep -q 'logrotate' /etc/crontabs/root || echo '*/15 * * * * /usr/sbin/logrotate /etc/logrotate.conf' >> /etc/crontabs/root

View File

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ipt-trigger
PKG_VERSION:=1.0.2
PKG_VERSION:=1.0.3
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4f3d4427403e0a9be7653c1b92907ae8ae5f21ae
PKG_SOURCE_VERSION:=ac1beae4794f99533b28db7d0e6e80f4c268a3e8
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ipt-trigger.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -0,0 +1,55 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=json-schema-validator
PKG_VERSION:=2.3.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/pboettch/json-schema-validator.git
PKG_SOURCE_VERSION:=$(PKG_VERSION)
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
PKG_BUILD_DEPENDS:=nlohmann-json
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS += \
-DJSON_VALIDATOR_BUILD_TESTS=OFF \
-DJSON_VALIDATOR_BUILD_EXAMPLES=OFF \
-DJSON_VALIDATOR_INSTALL=ON \
-DJSON_VALIDATOR_SHARED_LIBS=OFF
define Package/json-schema-validator
SECTION:=libs
CATEGORY:=Libraries
TITLE:=JSON Schema Validator for nlohmann::json
URL:=https://github.com/pboettch/json-schema-validator
DEPENDS:=+libstdcpp +nlohmann-json
endef
define Package/json-schema-validator/description
A JSON Schema Validator for Modern C++ using nlohmann/json.
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/nlohmann
$(CP) $(PKG_BUILD_DIR)/src/nlohmann/json-schema.hpp $(1)/usr/include/nlohmann/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libnlohmann_json_schema_validator*.a $(1)/usr/lib/ 2>/dev/null || true
$(CP) $(PKG_BUILD_DIR)/libnlohmann_json_schema_validator*.so* $(1)/usr/lib/ 2>/dev/null || true
endef
define Package/json-schema-validator/install
true
endef
$(eval $(call BuildPackage,json-schema-validator))

44
jsonval/Makefile Normal file
View File

@@ -0,0 +1,44 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=jsonval
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/jsonval
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Command-line JSON Schema Validator
DEPENDS:=+nlohmann-json +json-schema-validator +libstdcpp
endef
define Package/jsonval/description
A small CLI tool to validate JSON files against a schema using json-schema-validator and nlohmann/json.
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
cp -r ./src/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
$(TARGET_CXX) \
$(TARGET_CXXFLAGS) -std=c++17 \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/nlohmann \
-L$(STAGING_DIR)/usr/lib \
$(PKG_BUILD_DIR)/main.cpp \
-o $(PKG_BUILD_DIR)/jsonval \
-lnlohmann_json_schema_validator
endef
define Package/jsonval/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/jsonval $(1)/usr/bin/
endef
$(eval $(call BuildPackage,jsonval))

64
jsonval/src/main.cpp Normal file
View File

@@ -0,0 +1,64 @@
#include <iostream>
#include <fstream>
#include <string>
#include <nlohmann/json.hpp>
#include <nlohmann/json-schema.hpp>
using nlohmann::json;
using nlohmann::json_schema::json_validator;
using namespace std;
void print_usage(const string& prog_name) {
cerr << "Usage: " << prog_name << " -s <schema.json> -j <data.json>" << endl;
}
int main(int argc, char* argv[]) {
string schema_path, data_path;
// Simple argument parsing
for (int i = 1; i < argc; ++i) {
string arg = argv[i];
if ((arg == "-s" || arg == "--schema") && i + 1 < argc) {
schema_path = argv[++i];
} else if ((arg == "-j" || arg == "--json") && i + 1 < argc) {
data_path = argv[++i];
} else {
print_usage(argv[0]);
return 1;
}
}
if (schema_path.empty() || data_path.empty()) {
print_usage(argv[0]);
return 1;
}
ifstream schema_file(schema_path);
ifstream data_file(data_path);
if (!schema_file.is_open() || !data_file.is_open()) {
cerr << "Error: Could not open one or both files." << endl;
return 2;
}
json schema, document;
try {
schema_file >> schema;
data_file >> document;
} catch (const json::parse_error& e) {
cerr << "Parse error: " << e.what() << endl;
return 3;
}
try {
json_validator validator;
validator.set_root_schema(schema);
validator.validate(document);
cout << "Valid" << endl;
} catch (const std::exception& e) {
cerr << "Validation failed: " << e.what() << endl;
return 4;
}
return 0;
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdsl
PKG_VERSION:=7.2.100
PKG_VERSION:=7.3.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=20875ec79fcc7c546c2f1253c867d6afbc8bff75
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/libdsl.git
PKG_SOURCE_VERSION:=2a7a49fac35c3d8078ffe051594c0425d355cacd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -37,6 +37,9 @@ else ifeq ($(CONFIG_TARGET_x86),y)
else ifeq ($(CONFIG_TARGET_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=AIROHA
TARGET_CFLAGS +=-DIOPSYS_AIROHA
endif
TARGET_CFLAGS += \
@@ -57,7 +60,7 @@ define Package/libdsl
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= xDSL library (libdsl)
DEPENDS+=TARGET_brcmbca:bcm963xx-bsp
DEPENDS+=TARGET_brcmbca:bcm963xx-bsp +TARGET_airoha:libeasy
endef
define Package/libdsl/description

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.1.3
PKG_VERSION:=1.1.7
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=f4ffa38b77e20f9e2a6b6ffd5b2bf83cddb6bffc
PKG_SOURCE_VERSION:=3a30086a68a3409f0396acb01380f91daabf7a2f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.12.10
PKG_VERSION:=7.13.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=2bd3a37cc5c14af93d0af1643610285d8d382fba
PKG_SOURCE_VERSION:=e5a8bc4985d91b0938bbdf2a46a99081408e5224
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=logmngr
PKG_VERSION:=1.0.15
PKG_VERSION:=1.0.17
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=1561b71a2225af737db9f091204247ab4e141abb
PKG_SOURCE_VERSION:=ad2636c642d56967e78c0c84bf82cb0e2b6311f2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,7 +5,7 @@
CONF_FILE=/etc/fluent-bit/fluent-bit.conf
TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf
CONF_DIR=/etc/fluent-bit/conf.d
FLUENT_BIT_CONF_DIR=/etc/fluent-bit/conf.d
append_conf() {
echo "$*" >> ${TMP_CONF_FILE}
@@ -15,12 +15,12 @@ create_config_file() {
mkdir -p /tmp/fluent-bit
rm -f ${TMP_CONF_FILE}
touch ${TMP_CONF_FILE}
# include all files placed in analytics directory
# include all files placed in FLUENT_BIT_CONF_DIR directory
# fluent-bit does not support using directory in include directive
# also, if no file is found then fluent-bit aborts
# so only add include if any file is present in the CONF_DIR
if [ -d "$CONF_DIR" ] && [ "$(ls -A "$CONF_DIR")" ]; then
echo "@INCLUDE ${CONF_DIR}/*" >> ${TMP_CONF_FILE}
# so only add include if any file is present in the FLUENT_BIT_CONF_DIR
if [ -d "$FLUENT_BIT_CONF_DIR" ] && [ "$(ls -A "$FLUENT_BIT_CONF_DIR")" ]; then
echo "@INCLUDE ${FLUENT_BIT_CONF_DIR}/*" >> ${TMP_CONF_FILE}
fi
echo "" >> ${TMP_CONF_FILE}
}
@@ -34,6 +34,7 @@ create_service_section() {
echo " log_level info" >> ${TMP_CONF_FILE}
echo " coro_stack_size 24576" >> ${TMP_CONF_FILE}
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
echo " hot_reload on" >> ${TMP_CONF_FILE}
echo "" >> ${TMP_CONF_FILE}
}

View File

@@ -4,11 +4,14 @@
LOGROTATE_FILE=/etc/logrotate.conf
LOGROTATE_TMP_FILE=/tmp/logrotate/logrotate.conf
CONF_DIR=/etc/logrotate.d
create_logrotate_file() {
mkdir -p /tmp/logrotate
rm -f ${LOGROTATE_TMP_FILE}
touch ${LOGROTATE_TMP_FILE}
echo -e "include ${CONF_DIR}" >> ${LOGROTATE_TMP_FILE}
echo -e "" >> ${LOGROTATE_TMP_FILE}
}
handle_logrotate() {

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.3.5.4
PKG_VERSION:=6.3.6.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=2ed08bae7f22d08dc868d03c28777a44fc637093
PKG_SOURCE_VERSION:=5790b643f8df05a8409527958b6927b5a3485f25
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -61,6 +61,14 @@ remove_from_bridge() {
[ -n "$ifname" ] && brctl delif ${al_bridge} ${ifname}
}
get_network_id() {
local ifname=$1
[ -n "$ifname" ] || return
network_id=$(wpa_cli -i $ifname list_n|tail -n 1 | awk '{print $1}')
echo ${network_id}
}
update_bstas() {
section="$1"
action="$2"
@@ -68,14 +76,15 @@ update_bstas() {
config_get ifname "$section" ifname
config_get_bool enabled "$section" enabled 0
network_id=$(get_network_id $ifname)
if [ "$action" = "down" ]; then
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
wpa_cli -i "$ifname" disable_network $network_id > /dev/null 2>&1
# wpa_cli -i "$ifname" save_config > /dev/null 2>&1
elif [ "$action" = "up" ]; then
[ "$enabled" -eq 0 ] && return
wpa_cli -i "$ifname" reconnect > /dev/null 2>&1
wpa_cli -i "$ifname" enable_network 0 > /dev/null 2>&1
wpa_cli -i "$ifname" enable_network $network_id > /dev/null 2>&1
# wpa_cli -i "$ifname" save_config > /dev/null 2>&1
fi
}

View File

@@ -203,7 +203,7 @@ start_service() {
procd_open_instance
create_dir
procd_set_param command "/usr/sbin/mapagent" "-d"
procd_set_param command "/usr/sbin/mapagent" "-d" "-o" "/tmp/mapagent.log" "-f"
procd_set_param respawn
# procd_set_param stdout 1
# procd_set_param stderr 1

View File

@@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.3.0.18
PKG_VERSION:=6.4.0.11
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=b76714a5254756a66f2a8663b70d07dbe7818aaa
PKG_SOURCE_VERSION:=db314c0fb388a3de47a9e6db5d944d7fabc832c6
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
LOCAL_DEV=0
@@ -74,12 +74,29 @@ ifeq ($(CONFIG_CONTROLLER_PROPAGATE_PROBE_REQ),y)
TARGET_CFLAGS += -DPROPAGATE_PROBE_REQ
endif
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/map-controller
$(INSTALL_DIR) $(1)/usr/include/map-controller/utils
$(CP) $(PKG_BUILD_DIR)/src/wifi_dataelements.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/cntlr_commands_impl.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/cntlr_commands.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/cntlr_apis.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/wifi_opclass.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/steer_module.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/timer.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/timer_impl.h $(1)/usr/include/map-controller
$(CP) $(PKG_BUILD_DIR)/src/utils/debug.h $(1)/usr/include/map-controller/utils
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/src/libcntlr-apis.so $(1)/usr/lib
endef
define Package/map-controller/install
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
$(CP) $(PKG_BUILD_DIR)/src/libcntlr-apis.so $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/src/plugins/steer/rcpi/rcpi.so $(1)/usr/lib/mapcontroller/rcpi.so
endef

View File

@@ -8,9 +8,7 @@ config controller 'controller'
option enable_ts '0'
option primary_vid '1'
option primary_pcp '0'
option allow_bgdfs '0'
option stale_sta_timeout '30d'
option channel_plan '0'
option de_collect_interval '60'
config sta_steering
@@ -26,6 +24,10 @@ config sta_steering
option plugins_policy 'any'
list plugins 'rcpi'
config channel_plan
option preclear_dfs '0'
option acs '0'
###################
# Default AP sections credentials will by updated
# by uci-defaults script 99-mapcntlr

View File

@@ -71,7 +71,7 @@ validate_ap_section() {
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes",
"none", "psk-mixed", "psk-mixed+aes",
"psk", "psk+aes")' \
"psk", "psk+aes", "wpa", "wpa2", "wpa-mixed")' \
'key:string' \
'vid:range(1,65535):1' \
'type:or("backhaul", "fronthaul", "combined")' \

11
map-plugins/Config.in Normal file
View File

@@ -0,0 +1,11 @@
if (PACKAGE_map-plugins)
menu "Options"
config STEER_RATE_PLUGIN
bool "STA steering based on estimated throughput of target-AP"
default PACKAGE_map-plugins-steer-rate
endmenu
endif

68
map-plugins/Makefile Normal file
View File

@@ -0,0 +1,68 @@
#
# Copyright (C) 2025 Genexis Sweden AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-plugins
PKG_VERSION:=0.0.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=74bf151851112ecee731d447af016c8dc668adcf
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-plugins.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY GENEXIS
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_mapcontroller
PKG_BUILD_DEPENDS := map-controller
include $(INCLUDE_DIR)/package.mk
include $(wildcard plugins/*.mk)
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall"
plugins := \
$(if $(CONFIG_PACKAGE_map-plugins-steer-rate),steer-rate)
ppkg:=$(patsubst plugins/%.mk,map-plugins-%,$(wildcard plugins/*.mk))
define Package/map-plugins/Default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Multi-AP value added services
endef
define Package/map-plugins/config
source "$(SOURCE)/Config.in"
endef
define Package/map-plugins
$(call Package/map-plugins/Default)
TITLE:=Multi-AP plugins modules
DEPENDS+=+libeasy +libwifiutils +map-controller
endef
define Package/map-plugins/description
Provides extra Multi-AP services viz. steering, channel-planning etc.
endef
define Package/map-plugins/install
:
endef
define Build/Compile
$(foreach p,$(ppkg),$(call Build/Compile/$(p),$(1)))
endef
$(eval $(call BuildPackage,map-plugins))
$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p))))

View File

@@ -0,0 +1,20 @@
define Package/map-plugins-steer-rate
$(call Package/map-plugins/Default)
TITLE:=STA steering based on estimated throughput of target-AP
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +map-controller \
+map-plugins
endef
define Package/map-plugins-steer-rate/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
$(CP) $(PKG_BUILD_DIR)/steer/rate/rate.so $(1)/usr/lib/mapcontroller/rate.so
endef
define Build/Compile/map-plugins-steer-rate
$(MAKE) -C $(PKG_BUILD_DIR)/steer/rate \
CC="$(TARGET_CC)" \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)"
endef

View File

@@ -65,12 +65,69 @@ generate_igmp_proxy_config(){
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
}
generate_mld_snooping_config(){
local u_itf="$1"
uci add mcast snooping
uci rename mcast.@snooping[-1]="mc_snooping_MLD"
uci set mcast.@snooping[-1].enable="1"
uci set mcast.@snooping[-1].proto="mld"
uci set mcast.@snooping[-1].version="2"
uci set mcast.@snooping[-1].robustness="2"
uci set mcast.@snooping[-1].query_interval="125"
uci set mcast.@snooping[-1].query_response_interval="100"
uci set mcast.@snooping[-1].last_member_query_interval="10"
uci set mcast.@snooping[-1].fast_leave="1"
uci set mcast.@snooping[-1].snooping_mode="2"
uci set mcast.@snooping[-1].interface="$u_itf"
}
generate_igmp_snooping_config(){
local u_itf="$1"
uci add mcast snooping
uci rename mcast.@snooping[-1]="igmp_snooping_1"
uci set mcast.@snooping[-1].enable="1"
uci set mcast.@snooping[-1].proto="igmp"
uci set mcast.@snooping[-1].version="2"
uci set mcast.@snooping[-1].robustness="2"
uci set mcast.@snooping[-1].query_interval="125"
uci set mcast.@snooping[-1].query_response_interval="100"
uci set mcast.@snooping[-1].last_member_query_interval="10"
uci set mcast.@snooping[-1].fast_leave="1"
uci set mcast.@snooping[-1].snooping_mode="2"
uci set mcast.@snooping[-1].interface="$u_itf"
uci add_list mcast.@snooping[-1].filter="239.0.0.0/8"
}
check_wan_bridge() {
local config="$1"
local wan_device="$2"
local name type
[ $((is_wan_bridge)) -ne 0 ] && return
config_get type "$config" type
config_get name "$config" name
[ "$type" = "bridge" -a "$wan_device" = "$name" ] && is_wan_bridge=1
}
generate_mcast_config(){
local up_itf="$(uci -q get network.wan.device)"
local is_wan_bridge=0
up_itf="$(uci -q get network.wan.device)"
config_load network
config_foreach check_wan_bridge device "$up_itf"
generate_igmp_proxy_config "$up_itf"
generate_mld_proxy_config "$up_itf"
if [ $((is_wan_bridge)) -eq 0 ]; then
generate_igmp_proxy_config "$up_itf"
generate_mld_proxy_config "$up_itf"
else
generate_igmp_snooping_config "$up_itf"
generate_mld_snooping_config "$up_itf"
fi
}
interfaces_ok(){

View File

@@ -1,2 +1,140 @@
# Forward multicast packets from wan to lan
iptables -w -t filter -A zone_wan_forward -p udp -d 224.0.0.0/240.0.0.0 -m comment --comment "!fw3: Allow-Multicast-UDP" -j zone_lan_dest_ACCEPT
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
ZONE_NAME_FILE="/tmp/mcast_fw_zone"
log() {
echo "${@}"|logger -t firewall.mcast -p info
}
collect_zone_name() {
local name network
config_get name "${1}" name ""
if [ -z "${name}" ]; then
return
fi
config_get network "${1}" network ""
for i in ${network}; do
var="${i}_zone"
echo "${var}=${name}" >> "${ZONE_NAME_FILE}"
done
}
load_zone_names() {
rm -f "${ZONE_NAME_FILE}"
config_load firewall
config_foreach collect_zone_name zone
}
get_firewall_zone() {
if [ ! -f "${ZONE_NAME_FILE}" ]; then
echo ""
return
fi
var="${1}_zone="
name="$(cat ${ZONE_NAME_FILE} | grep ${var} | head -n 1 | cut -d'=' -f 2)"
echo "${name}"
}
# Get interface name for a device (e.g., br-lan -> lan)
find_interface_for_device() {
local dev="${1}"
local intf=""
local intf_dump idx
if [ -z "${dev}" ]; then
echo ""
return
fi
intf_dump="$(ubus -t 5 call network.interface dump)"
if [ -z "${intf_dump}" ]; then
echo ""
return
fi
json_load "${intf_dump}"
json_select interface
if [ "$?" -ne 0 ]; then
echo ""
return
fi
idx=1
while json_is_a ${idx} object; do
json_select ${idx}
if [ "$?" -ne 0 ]; then
break
fi
json_get_var device device
if [ "${device}" = "${dev}" ]; then
json_get_var intf interface
break
fi
idx=$(( idx + 1 ))
json_select ..
done
echo "${intf}"
}
# Setup iptables rule to allow multicast from upstream to downstream
setup_multicast_rule() {
local upstream_dev="$1"
local downstream_dev="$2"
local upstream_zone downstream_zone
local upstream_iface downstream_iface
upstream_iface=$(find_interface_for_device "$upstream_dev")
downstream_iface=$(find_interface_for_device "$downstream_dev")
[ -z "$upstream_iface" ] || [ -z "$downstream_iface" ] && {
log "Failed to map devices to interfaces"
return
}
upstream_zone=$(get_firewall_zone "$upstream_iface")
downstream_zone=$(get_firewall_zone "$downstream_iface")
[ -z "$upstream_zone" ] || [ -z "$downstream_zone" ] && {
log "Failed to map interfaces to zones"
return
}
iptables -w -t filter -A zone_${upstream_zone}_forward -p udp \
-d 224.0.0.0/240.0.0.0 \
-m comment --comment "!fw3: Allow-Multicast-UDP" \
-j zone_${downstream_zone}_dest_ACCEPT
}
apply_mcast_rule() {
local cfg="$1"
local up down proto
config_get proto "$cfg" proto
[ "$proto" = "igmp" ] || return
config_get up "$cfg" upstream_interface
config_get down "$cfg" downstream_interface
[ -n "$up" ] && [ -n "$down" ] && setup_multicast_rule "$up" "$down"
}
add_multicast_rules() {
config_load mcast
config_foreach apply_mcast_rule proxy
}
load_zone_names
add_multicast_rules
rm -f "${ZONE_NAME_FILE}"

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.1.6
PKG_VERSION:=1.1.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=f1422e4de76990f7037ca265431d5f1031621c93
PKG_SOURCE_VERSION:=6310f32b80f8abeccbf99ad55ce88792b19342d6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=1.1.2
PKG_VERSION:=1.1.5
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only

View File

@@ -207,6 +207,23 @@
}
]
},
"Type": {
"type": "string",
"read": true,
"write": true,
"description": "Datatype for this argument",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "type"
}
]
},
"Description": {
"type": "string",
"read": true,

View File

@@ -0,0 +1,127 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
source "/etc/device_info"
l2_mcast_config() {
# configure L2 mcast config for snooping
logger -s -p user.info -t "netmode" "Generating L2 mcast configuration"
# remove proxy sections
uci -q delete mcast.igmp_proxy_1
uci -q delete mcast.mc_proxy_MLD
# add igmp_snooping section
uci -q set mcast.igmp_snooping_1=snooping
uci -q set mcast.igmp_snooping_1.enable='1'
uci -q set mcast.igmp_snooping_1.proto='igmp'
uci -q set mcast.igmp_snooping_1.version='2'
uci -q set mcast.igmp_snooping_1.robustness='2'
uci -q set mcast.igmp_snooping_1.query_interval='125'
uci -q set mcast.igmp_snooping_1.query_response_interval='100'
uci -q set mcast.igmp_snooping_1.last_member_query_interval='10'
uci -q set mcast.igmp_snooping_1.fast_leave='1'
uci -q set mcast.igmp_snooping_1.snooping_mode='2'
uci -q set mcast.igmp_snooping_1.interface='br-lan'
uci -q add_list mcast.igmp_snooping_1.filter='239.0.0.0/8'
# add mld_snooping section
uci -q set mcast.mld_snooping_1=snooping
uci -q set mcast.mld_snooping_1.enable='1'
uci -q set mcast.mld_snooping_1.proto='mld'
uci -q set mcast.mld_snooping_1.version='2'
uci -q set mcast.mld_snooping_1.robustness='2'
uci -q set mcast.mld_snooping_1.query_interval='125'
uci -q set mcast.mld_snooping_1.query_response_interval='100'
uci -q set mcast.mld_snooping_1.last_member_query_interval='10'
uci -q set mcast.mld_snooping_1.fast_leave='1'
uci -q set mcast.mld_snooping_1.snooping_mode='2'
uci -q set mcast.mld_snooping_1.interface='br-lan'
uci -q commit mcast
}
l2_network_config() {
logger -s -p user.info -t "netmode" "Generating L2 network configuration"
# Configure L2 Network Mode
uci -q set network.lan=interface
uci -q set network.lan.proto='dhcp'
uci -q set network.lan.vendorid="$(uci -q get network.wan.vendorid)"
uci -q set network.lan.clientid="$(uci -q get network.wan.clientid)"
uci -q set network.lan.reqopts="$(uci -q get network.wan.reqopts)"
uci -q set network.lan.sendopts="$(uci -q get network.wan.sendopts)"
uci -q set network.lan.device='br-lan'
uci -q set network.lan.force_link='1'
uci -q set network.lan6=interface
uci -q set network.lan6.proto='dhcpv6'
uci -q set network.lan6.device='@lan'
uci -q set network.lan6.reqprefix='no'
uci -q set network.wan.disabled='1'
uci -q set network.wan6.disabled='1'
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_select wan 2>/dev/null
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
json_cleanup
fi
uci -q commit network
# Disable DHCP Server
uci -q set dhcp.lan.ignore=1
uci -q commit dhcp
/etc/init.d/odhcpd disable
# Disable SSDPD
uci -q set ssdpd.ssdp.enabled="0"
uci -q commit ssdpd
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="lan"
uci -q commit cwmp
# Update gateway WAN Interface
uci -q set gateway.global.wan_interface="lan"
uci -q commit gateway
# disable firewall
uci -q set firewall.globals.enabled="0"
uci -q commit firewall
}
l2_network_config
l2_mcast_config
# If device is already boot-up, assume netmode changed during runtime
if [ -f /var/run/boot_complete ]; then
/etc/init.d/odhcpd stop 2>/dev/null
for config in network dhcp ssdpd cwmp gateway firewall mcast; do
ubus call uci commit "{\"config\":\"$config\"}"
sleep 1
done
fi

View File

@@ -0,0 +1,108 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
source "/etc/device_info"
l3_mcast_config() {
# configure L3 mcast config
logger -s -p user.info -t "netmode" "Generating L3 mcast configuration"
rm -f /etc/config/mcast
sh /rom/etc/uci-defaults/61-mcast_config_generate
uci -q commit mcast
}
l3_network_config() {
logger -s -p user.info -t "netmode" "Generating L3 network configuration"
# Configure L3 Network Mode
uci -q set network.lan=interface
uci -q set network.lan.device='br-lan'
uci -q set network.lan.proto='static'
uci -q set network.lan.ipaddr='192.168.1.1'
uci -q set network.lan.netmask='255.255.255.0'
uci -q set network.lan.ip6assign='60'
uci -q delete network.lan.vendorid
uci -q delete network.lan.clientid
uci -q delete network.lan.reqopts
uci -q delete network.lan.sendopts
uci -q delete network.lan6
uci -q set network.wan=interface
uci -q set network.wan.proto='dhcp'
uci -q delete network.wan.disabled
uci -q delete network.wan.username
uci -q delete network.wan.password
uci -q set network.wan6=interface
uci -q set network.wan6.proto='dhcpv6'
uci -q delete network.wan6.disabled
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_select wan 2>/dev/null
json_get_var device device
if [ -n "$device" ]; then
uci -q set network.wan.device="$device"
uci -q set network.wan6.device="$device"
fi
json_cleanup
fi
uci -q commit network
# Enable DHCP Server
uci -q set dhcp.lan.ignore=0
uci -q set dhcp.wan.ignore=1
uci -q commit dhcp
/etc/init.d/odhcpd enable
# Enable SSDPD
uci -q set ssdpd.ssdp.enabled="1"
uci -q commit ssdpd
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="wan"
uci -q commit cwmp
# Update gateway WAN Interface
uci -q set gateway.global.wan_interface="wan"
uci -q commit gateway
# Enable firewall
uci -q set firewall.globals.enabled="1"
uci -q commit firewall
}
l3_network_config
l3_mcast_config
# If device is already boot-up, assume netmode changed during runtime
if [ -f /var/run/boot_complete ]; then
/etc/init.d/odhcpd restart 2>/dev/null
for config in network dhcp ssdpd cwmp gateway firewall mcast; do
ubus call uci commit "{\"config\":\"$config\"}"
sleep 1
done
fi

View File

@@ -0,0 +1,106 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
source "/etc/device_info"
l3_mcast_config() {
# configure L3 mcast config
logger -s -p user.info -t "netmode" "Generating L3 mcast configuration"
rm -f /etc/config/mcast
sh /rom/etc/uci-defaults/61-mcast_config_generate
uci -q commit mcast
}
l3_network_pppoe_config() {
logger -s -p user.info -t "netmode" "Generating L3 network configuration"
# Configure L3 Network Mode
uci -q set network.lan=interface
uci -q set network.lan.device='br-lan'
uci -q set network.lan.proto='static'
uci -q set network.lan.ipaddr='192.168.1.1'
uci -q set network.lan.netmask='255.255.255.0'
uci -q set network.lan.ip6assign='60'
uci -q delete network.lan.vendorid
uci -q delete network.lan.clientid
uci -q delete network.lan.reqopts
uci -q delete network.lan.sendopts
uci -q delete network.lan6
uci -q set network.wan=interface
uci -q set network.wan.proto='pppoe'
uci -q set network.wan.username="$NETMODE_username"
uci -q set network.wan.password="$NETMODE_password"
uci -q delete network.wan.disabled
uci -q set network.wan6.disabled='1'
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_select wan 2>/dev/null
json_get_var device device
if [ -n "$device" ]; then
uci -q set network.wan.device="$device"
uci -q set network.wan6.device="$device"
fi
json_cleanup
fi
uci -q commit network
# Enable DHCP Server
uci -q set dhcp.lan.ignore=0
uci -q set dhcp.wan.ignore=1
uci -q commit dhcp
/etc/init.d/odhcpd enable
# Enable SSDPD
uci -q set ssdpd.ssdp.enabled="1"
uci -q commit ssdpd
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="wan"
uci -q commit cwmp
# Update gateway WAN Interface
uci -q set gateway.global.wan_interface="wan"
uci -q commit gateway
# Enable firewall
uci -q set firewall.globals.enabled="1"
uci -q commit firewall
}
l3_network_pppoe_config
l3_mcast_config
# If device is already boot-up, assume netmode changed during runtime
if [ -f /var/run/boot_complete ]; then
/etc/init.d/odhcpd restart 2>/dev/null
for config in network dhcp ssdpd cwmp gateway firewall mcast; do
ubus call uci commit "{\"config\":\"$config\"}"
sleep 1
done
fi

View File

@@ -11,21 +11,19 @@
"supported_args": [
{
"name": "username",
"description": "PPoE username",
"description": "PPPoE username",
"required": true,
"type": "string",
"#value": "TestUser"
},
{
"name": "password",
"description": "PPoE password",
"description": "PPPoE password",
"required": true,
"type": "string",
"#value": "TestPassword"
}
]
},
{
"name": "bridged",
"description": "Bridged mode (Layer 2)"
}
]
}

View File

@@ -17,7 +17,7 @@ fi
configure_supp_modes_args()
{
local obj inst name description required value parent
local obj inst name description required value parent type
obj="${1}"
inst="${2}"
@@ -32,12 +32,14 @@ configure_supp_modes_args()
json_get_var description description
json_get_var value value
json_get_var required required
json_get_var type type
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}=supported_args
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.name="${name}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.description="${description}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.required="${required}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.value="${value}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.type="${type}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.dm_parent="${parent}"
json_select ..

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# This script is to cleanup dmmap and restart datamodel related services
# when wan mode changes
if [ -d "/etc/bbfdm/dmmap/" ]; then
rm -rf /etc/bbfdm/dmmap/*
fi
# If device is booting up, no need to restart services
if [ ! -f /var/run/boot_complete ]; then
return 0
fi
if [ -x "/etc/init.d/bbfdm.services" ]; then
/etc/init.d/bbfdm.services restart
fi
if [ -x "/etc/init.d/bbfdmd" ]; then
/etc/init.d/bbfdmd restart
fi
if [ -x "/etc/init.d/obuspa" ]; then
/etc/init.d/obuspa restart
fi

42
nlohmann-json/Makefile Normal file
View File

@@ -0,0 +1,42 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nlohmann-json
PKG_VERSION:=3.11.2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nlohmann/json.git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.MIT
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/nlohmann-json
SECTION:=libs
CATEGORY:=Libraries
TITLE:=JSON for Modern C++ (nlohmann/json)
endef
define Package/nlohmann-json/description
JSON for Modern C++ is a single-header C++ library for working with JSON.
endef
define Build/Compile
# Header-only, nothing to compile
true
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/nlohmann
$(CP) $(PKG_BUILD_DIR)/single_include/nlohmann/json.hpp $(1)/usr/include/nlohmann/
endef
define Package/nlohmann-json/install
true
endef
$(eval $(call BuildPackage,nlohmann-json))

43
nng/Makefile Normal file
View File

@@ -0,0 +1,43 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nng
PKG_VERSION:=1.11
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/nanomsg/nng.git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE.txt
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/nng
SECTION:=libs
CATEGORY:=Libraries
TITLE:=NNG - nanomsg-next-gen
URL:=https://github.com/nanomsg/nng
DEPENDS:=+libpthread +libatomic
endef
define Package/nng/description
NNG is a lightweight messaging library, a successor to nanomsg.
endef
CMAKE_OPTIONS += \
-DBUILD_SHARED_LIBS=ON \
-DNNG_ENABLE_EXAMPLES=OFF \
-DNNG_ENABLE_TESTS=OFF
define Package/nng/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnng.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,nng))

View File

@@ -70,4 +70,13 @@ config OBUSPA_VENDOR_PREFIX
config OBUSPA_OVERRIDE_CT_ROLE
bool "Override ControllerTrust role with factory default roles"
default y
config OBUSPA_VC_POLL_PERIOD
int "Polling interval in sec for ValueChange Subscriptions"
range 15 120
default "15"
help
Obuspa relies on a polling mechanism to determine the ValueChange, Add, Del Subscriptions.
Short poll period could give more responsive subscription events, but might delay overall experience in slower CPUs with good amount of subscriptions, on the other hand, a bigger value results into less responsive subscription handling. This value must be in range of 15 to 120 secs. (default 15)
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=10.0.0.8
PKG_VERSION:=10.0.0.14
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=3e9299063e3c65565d2c834b5ab654fda830f749
PKG_SOURCE_VERSION:=aeda0145e269cad49d326800fbd39d87c0d30087
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -107,6 +107,10 @@ ifneq ($(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM),)
TARGET_CFLAGS += -DOBUSPA_MAX_CONTROLLERS_NUM=$(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM)
endif
ifneq ($(CONFIG_OBUSPA_VC_POLL_PERIOD),)
TARGET_CFLAGS += -DOBUSPA_VC_POLL_PERIOD=$(CONFIG_OBUSPA_VC_POLL_PERIOD)
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/

View File

@@ -10,4 +10,4 @@ config obuspa 'global'
#option client_cert '/etc/obuspa/client.pem'
option log_dest 'syslog'
option dm_caching_exclude '/etc/obuspa/transient_dm.json'
option dualstack_pref 'IPv6'

View File

@@ -241,7 +241,8 @@ validate_mqtt_client_section()
'Password:string' \
'ProtocolVersion:or("3.1", "3.1.1","5.0"):5.0' \
'TransportProtocol:or("TCP/IP","TLS"):TCP/IP' \
'ClientID:string'
'ClientID:string' \
'RequestResponseInfo:bool:1'
}
validate_challenge_section()
@@ -277,6 +278,11 @@ update_reset_reason()
fi
}
update_dual_stack_pref()
{
db_set Internal.DualStackPreference "${1}"
}
get_role_index()
{
local name drole
@@ -602,7 +608,7 @@ configure_stomp_connection() {
configure_mqtt_client() {
local BrokerAddress BrokerPort Enable Username Password ProtocolVersion
local TransportProtocol ClientID
local TransportProtocol ClientID RequestResponseInfo
local sec
sec="${1}"
@@ -627,6 +633,7 @@ configure_mqtt_client() {
db_set "${BASEPATH}.ProtocolVersion" "${ProtocolVersion}"
db_set "${BASEPATH}.TransportProtocol" "${TransportProtocol}"
db_set "${BASEPATH}.ClientID" "${ClientID}"
db_set "${BASEPATH}.RequestResponseInfo" "${RequestResponseInfo}"
}
@@ -987,6 +994,8 @@ db_init()
#log "Create reset file ...."
config_load $CONFIGURATION
config_get dualstack_pref global dualstack_pref "IPv6"
global_init
config_foreach configure_localagent localagent
global_init
@@ -1001,8 +1010,10 @@ db_init()
config_foreach configure_subscription subscription
global_init
config_foreach configure_challenges challenge
global_init
update_reset_reason
update_dual_stack_pref "${dualstack_pref}"
uci_commit ${CONFIGURATION}
cp /etc/config/obuspa /tmp/obuspa/

View File

@@ -35,3 +35,16 @@ Index: obuspa-10.0.0.2/src/core/data_model.c
return USP_ERR_OBJECT_DOES_NOT_EXIST;
}
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 388697a..444b4da 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -4020,7 +4020,7 @@ void MessageV5Callback(struct mosquitto *mosq, void *userdata, const struct mosq
if (mosquitto_property_read_string(props, RESPONSE_TOPIC,
&response_info_ptr, false) == NULL)
{
- USP_LOG_Warning("%s: No response topic in received MESSAGE frame", __FUNCTION__);
+ USP_LOG_Info("%s: No response topic in received MESSAGE frame", __FUNCTION__);
}
// Send the message to the data model thread for further processing

View File

@@ -0,0 +1,401 @@
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 70978501b1..96119fe080 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -53,6 +53,7 @@
#include <openssl/bio.h>
#include <openssl/err.h>
#include <openssl/x509v3.h>
+#include <netdb.h>
#include <mosquitto.h>
#include "mqtt.h"
@@ -201,8 +202,9 @@ int EnableMosquitto(mqtt_client_t *client);
void SetupCallbacks(mqtt_client_t *client);
void QueueUspConnectRecord_MQTT(mqtt_client_t *client, mtp_send_item_t *msi, char *controller_topic, time_t expiry_time);
int SendQueueHead(mqtt_client_t *client);
+bool check_connectivity(struct addrinfo *list_addr, unsigned int port, sa_family_t family, char *dst_ip, int size);
void Connect(mqtt_client_t *client);
-int PerformMqttClientConnect(mqtt_client_t *client);
+int PerformMqttClientConnect(mqtt_client_t *client, const char *host_ip);
int ConnectSetEncryption(mqtt_client_t *client);
void ConnectCallback(struct mosquitto *mosq, void *userdata, int result);
void ConnectV5Callback(struct mosquitto *mosq, void *userdata, int result, int flags, const mosquitto_property *props);
@@ -245,7 +247,7 @@ void HandleMqttReconnect(mqtt_client_t *client);
void HandleMqttReconnectAfterDisconnect(mqtt_client_t *client);
void HandleMqttDisconnect(mqtt_client_t *client);
void DisconnectIfAllSubscriptionsFailed(mqtt_client_t *client);
-bool IsMqttBrokerUp(mqtt_client_t *client);
+bool IsMqttBrokerUp(mqtt_client_t *client, char *dst_ip, int size);
void RemoveMqttQueueItem(mqtt_client_t *client, mqtt_send_item_t *queued_msg);
void RemoveExpiredMqttMessages(mqtt_client_t *client);
void ParseSubscribeTopicsFromConnack(mqtt_client_t *client, mosquitto_property *prop);
@@ -2350,6 +2352,143 @@ int SendQueueHead(mqtt_client_t *client)
return err;
}
+bool check_connectivity(struct addrinfo *list_addr, unsigned int port, sa_family_t family, char *dst_ip, int size)
+{
+ int err;
+ struct sockaddr_storage saddr;
+ socklen_t saddr_len;
+ sa_family_t sock_family;
+ int socket_fd = INVALID;
+ fd_set writefds;
+ struct timeval timeout;
+ int num_sockets;
+ int so_err;
+ socklen_t so_len = sizeof(so_err);
+ struct addrinfo *iterator;
+ struct sockaddr_in *a;
+ struct sockaddr_in6 *a6;
+ nu_ipaddr_t dst;
+
+ if (list_addr == NULL || dst_ip == NULL)
+ {
+ return false;
+ }
+
+ for (iterator=list_addr; iterator!=NULL; iterator=iterator->ai_next)
+ {
+ if (iterator->ai_family != family)
+ {
+ continue;
+ }
+
+ if (family == AF_INET)
+ {
+ a = (struct sockaddr_in *) iterator->ai_addr;
+ err = nu_ipaddr_from_inaddr(&a->sin_addr, &dst);
+
+ if (err != USP_ERR_OK)
+ {
+ USP_LOG_Error("%s: nu_ipaddr_from_inaddr() failed: %s", __FUNCTION__, strerror(err));
+ continue;
+ }
+ }
+ else
+ {
+ a6 = (struct sockaddr_in6 *) iterator->ai_addr;
+ err = nu_ipaddr_from_in6addr(&a6->sin6_addr, &dst);
+
+ if (err != USP_ERR_OK)
+ {
+ USP_LOG_Error("%s: nu_ipaddr_from_in6addr() failed: %s", __FUNCTION__, strerror(err));
+ continue;
+ }
+ }
+
+ // Next IP if unable to make a socket address structure to probe the MQTT server
+ err = nu_ipaddr_to_sockaddr(&dst, port, &saddr, &saddr_len);
+ if (err != USP_ERR_OK)
+ {
+ continue;
+ }
+
+ // Next IP if unable to determine which address family to use to contact the MQTT broker
+ err = nu_ipaddr_get_family(&dst, &sock_family);
+ if (err != USP_ERR_OK)
+ {
+ continue;
+ }
+
+ // Return if unable to create the socket
+ socket_fd = socket(sock_family, SOCK_STREAM, 0);
+ if (socket_fd == -1)
+ {
+ USP_LOG_Error("%s: failed to open socket", __FUNCTION__);
+ return false;
+ }
+
+ // Return if unable to set the socket as non blocking
+ // We do this before connecting so that we can timeout on connect taking too long
+ err = fcntl(socket_fd, F_SETFL, O_NONBLOCK);
+ if (err == -1)
+ {
+ USP_ERR_ERRNO("fcntl", errno);
+ close(socket_fd);
+ return false;
+ }
+
+ // Next IP if unable to connect to the MQTT Broker
+ // NOTE: The connect is performed in non-blocking mode
+ err = connect(socket_fd, (struct sockaddr *) &saddr, saddr_len);
+ if ((err == -1) && (errno != EINPROGRESS))
+ {
+ USP_ERR_ERRNO("connect", errno);
+ close(socket_fd);
+ continue;
+ }
+
+ // Set up arguments for the select() call
+ FD_ZERO(&writefds);
+ FD_SET(socket_fd, &writefds);
+ timeout.tv_sec = MQTT_CONNECT_TIMEOUT;
+ timeout.tv_usec = 0;
+
+ // Next IP if the connect timed out
+ num_sockets = select(socket_fd + 1, NULL, &writefds, NULL, &timeout);
+ if (num_sockets == 0)
+ {
+ USP_LOG_Error("%s: connect timed out", __FUNCTION__);
+ close(socket_fd);
+ continue;
+ }
+
+ // Next IP if unable to determine whether the connect was successful or not
+ err = getsockopt(socket_fd, SOL_SOCKET, SO_ERROR, &so_err, &so_len);
+ if (err == -1)
+ {
+ USP_ERR_ERRNO("getsockopt", errno);
+ close(socket_fd);
+ continue;
+ }
+
+ // Next IP if connect was not successful
+ if (so_err != 0)
+ {
+ USP_LOG_Error("%s: async connect failed", __FUNCTION__);
+ close(socket_fd);
+ continue;
+ }
+
+ close(socket_fd);
+
+ // Connect was successful
+ nu_ipaddr_str(&dst, dst_ip, size);
+
+ return true;
+ }
+
+ return false;
+}
+
/*********************************************************************//**
**
** IsMqttBrokerUp
@@ -2364,109 +2503,92 @@ int SendQueueHead(mqtt_client_t *client)
** \return true if the MQTT Broker is up, false otherwise
**
**************************************************************************/
-bool IsMqttBrokerUp(mqtt_client_t *client)
+bool IsMqttBrokerUp(mqtt_client_t *client, char *dst_ip, int size)
{
int err;
bool prefer_ipv6;
- nu_ipaddr_t dst;
- struct sockaddr_storage saddr;
- socklen_t saddr_len;
- sa_family_t family;
- int socket_fd = INVALID;
- fd_set writefds;
- struct timeval timeout;
- int num_sockets;
- int so_err;
- socklen_t so_len = sizeof(so_err);
+ bool ipv4_supported = false;
+ bool ipv6_supported = false;
bool result = false;
+ struct addrinfo *addr_list = NULL;
+ struct addrinfo hints;
// Get the preference for IPv4 or IPv6, if dual stack
prefer_ipv6 = DEVICE_LOCAL_AGENT_GetDualStackPreference();
- // Exit if unable to determine the IP address of the MQTT Broker
- err = tw_ulib_diags_lookup_host(client->conn_params.host, AF_UNSPEC, prefer_ipv6, NULL, &dst);
- if (err != USP_ERR_OK)
- {
- goto exit;
- }
+ USP_LOG_Debug("%s: dual-stack preference is: %s", __FUNCTION__, prefer_ipv6 ? "IPv6" : "IPv4");
- // Exit if unable to make a socket address structure to probe the MQTT server
- err = nu_ipaddr_to_sockaddr(&dst, client->conn_params.port, &saddr, &saddr_len);
- if (err != USP_ERR_OK)
- {
- goto exit;
- }
+ // Initialise the hints to use, when obtaining the IP address of the specified host using getaddrinfo()
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = AF_UNSPEC;
+ hints.ai_flags |= AI_ADDRCONFIG;
- // Exit if unable to determine which address family to use to contact the MQTT broker
- // NOTE: This shouldn't fail if tw_ulib_diags_lookup_host() is correct
- err = nu_ipaddr_get_family(&dst, &family);
- if (err != USP_ERR_OK)
+ err = getaddrinfo(client->conn_params.host, NULL, &hints, &addr_list);
+ if (err != USP_ERR_OK || addr_list == NULL)
{
- goto exit;
+ USP_ERR_SetMessage("%s: getaddrinfo() failed to resolve: %s", __FUNCTION__, client->conn_params.host);
+ return result;
}
- // Exit if unable to create the socket
- socket_fd = socket(family, SOCK_STREAM, 0);
- if (socket_fd == -1)
+ // Exit if unable to determine which address families are supported by the device
+ // NOTE: In theory, setting getaddrinfo hints to AI_ADDRCONFIG, should filter by supported address family
+ // However, unfortunately that flag does not take into account whether the address is globally routable (for IPv6) as well
+ err = nu_ipaddr_get_ip_supported_families(&ipv4_supported, &ipv6_supported);
+ if (err != USP_ERR_OK)
{
- goto exit;
+ USP_LOG_Error("%s: Failed to determine device IP families", __FUNCTION__);
+ return result;
}
- // Exit if unable to set the socket as non blocking
- // We do this before connecting so that we can timeout on connect taking too long
- err = fcntl(socket_fd, F_SETFL, O_NONBLOCK);
- if (err == -1)
+ if (ipv4_supported == false && ipv6_supported == false)
{
- USP_ERR_ERRNO("fcntl", errno);
- goto exit;
+ // couldn't determine device ip mode
+ USP_LOG_Error("%s: Could not determine device IP families", __FUNCTION__);
+ return result;
}
- // Exit if unable to connect to the MQTT Broker
- // NOTE: The connect is performed in non-blocking mode
- err = connect(socket_fd, (struct sockaddr *) &saddr, saddr_len);
- if ((err == -1) && (errno != EINPROGRESS))
+ if (ipv6_supported == false)
{
- USP_ERR_ERRNO("connect", errno);
- goto exit;
+ // device has only ipv4 address so only try with ipv4 addresses
+ USP_LOG_Debug("%s: Check connectivity with IPv4 only", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET, dst_ip, size);
}
-
- // Set up arguments for the select() call
- FD_ZERO(&writefds);
- FD_SET(socket_fd, &writefds);
- timeout.tv_sec = MQTT_CONNECT_TIMEOUT;
- timeout.tv_usec = 0;
-
- // Exit if the connect timed out
- num_sockets = select(socket_fd + 1, NULL, &writefds, NULL, &timeout);
- if (num_sockets == 0)
+ else if (ipv4_supported == false)
{
- USP_LOG_Error("%s: connect timed out", __FUNCTION__);
- goto exit;
+ // device has only ipv6 address so only try with ipv6 addresses
+ USP_LOG_Debug("%s: Check connectivity with IPv6 only", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET6, dst_ip, size);
}
-
- // Exit if unable to determine whether the connect was successful or not
- err = getsockopt(socket_fd, SOL_SOCKET, SO_ERROR, &so_err, &so_len);
- if (err == -1)
+ else
{
- USP_ERR_ERRNO("getsockopt", errno);
- goto exit;
- }
+ // device has both ipv6 and ipv4 address, so we need to search as per preference
+ if (prefer_ipv6 == true)
+ {
- // Exit if connect was not successful
- if (so_err != 0)
- {
- USP_LOG_Error("%s: async connect failed", __FUNCTION__);
- goto exit;
+ // First try with v6 then fallback to v4
+ USP_LOG_Debug("%s: Check connectivity with IPv6 first", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET6, dst_ip, size);
+ if (result == false)
+ {
+ USP_LOG_Debug("%s: Check connectivity fallback with IPv4", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET, dst_ip, size);
+ }
+ }
+ else
+ {
+ // First try with v4 then fallback to v6
+ USP_LOG_Debug("%s: Check connectivity with IPv4 first", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET, dst_ip, size);
+ if (result == false)
+ {
+ USP_LOG_Debug("%s: Check connectivity fallback with IPv6", __FUNCTION__);
+ result = check_connectivity(addr_list, client->conn_params.port, AF_INET6, dst_ip, size);
+ }
+ }
}
- // Connect was successful
- result = true;
-
-exit:
- // Tidy up
- if (socket_fd != INVALID)
- {
- close(socket_fd);
+ if (addr_list != NULL) {
+ (void) freeaddrinfo(addr_list);
}
return result;
@@ -2487,18 +2609,20 @@ void Connect(mqtt_client_t *client)
{
int err = USP_ERR_OK;
bool is_up;
+ char dst_ip[INET6_ADDRSTRLEN] = {0};
// Exit if after probing the MQTT Broker, it is not up
// In this case, we do not attempt to call libmosquitto's connect function, as that function will end up blocking for 2 minutes (since the MQTT broker is down)
- is_up = IsMqttBrokerUp(client);
- if (is_up == false)
+ is_up = IsMqttBrokerUp(client, dst_ip, sizeof(dst_ip));
+ if (is_up == false || strlen(dst_ip) == 0)
{
+ USP_LOG_Debug("%s: MQTT broker(%s) is not UP", __FUNCTION__, client->conn_params.host);
err = USP_ERR_INTERNAL_ERROR;
goto exit;
}
// Start the MQTT Connect
- err = PerformMqttClientConnect(client);
+ err = PerformMqttClientConnect(client, dst_ip);
// Exit if failed to connect
if (err != USP_ERR_OK)
@@ -2531,7 +2655,7 @@ exit:
** \return USP_ERR_INTERNAL_ERROR if failed to connect (and should retry)
**
**************************************************************************/
-int PerformMqttClientConnect(mqtt_client_t *client)
+int PerformMqttClientConnect(mqtt_client_t *client, const char *host_ip)
{
int version;
mosquitto_property *proplist = NULL;
@@ -2601,19 +2725,19 @@ int PerformMqttClientConnect(mqtt_client_t *client)
// We do this to prevent the data model thread from potentially being blocked, whilst the connect call is taking place
OS_UTILS_UnlockMutex(&mqtt_access_mutex);
- USP_LOG_Info("Sending CONNECT frame to (host=%s, port=%d)", client->conn_params.host, client->conn_params.port);
+ USP_LOG_Info("Sending CONNECT frame to (host=%s, ip=%s, port=%d)", client->conn_params.host, host_ip, client->conn_params.port);
FRAME_TRACE_DUMP(client);
// Perform the TCP connect
// NOTE: TCP connect can block for around 2 minutes if the broker does not respond to the TCP handshake
if (version == kMqttProtocol_5_0)
{
- mosq_err = mosquitto_connect_bind_v5(client->mosq, client->conn_params.host, client->conn_params.port,
+ mosq_err = mosquitto_connect_bind_v5(client->mosq, host_ip, client->conn_params.port,
keep_alive, NULL, proplist);
}
else
{
- mosq_err = mosquitto_connect(client->mosq, client->conn_params.host, client->conn_params.port,
+ mosq_err = mosquitto_connect(client->mosq, host_ip, client->conn_params.port,
keep_alive);
}

View File

@@ -1,12 +1,10 @@
if PACKAGE_parental-control
config PARENTAL_CONTROL_INCLUDE_URLFILTER_BUNDLES
bool "Include default bundle files"
default n
config PARENTAL_CONTROL_URLFILTERING
bool "Enables URL Filter functions and datamodel"
default y
help
Set this option to include bundle files by default,
they are also included in the UCI, urlfilter
still needs to be enabled though.
Set this option to include url filter feature
config PARENTAL_CONTROL_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"

View File

@@ -1,17 +1,17 @@
#
# Copyright (C) 2021-2024 IOPSYS
# Copyright (C) 2021-2025 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=parental-control
PKG_VERSION:=1.1.6
PKG_VERSION:=1.2.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/parental-control.git
PKG_SOURCE_VERSION:=5128498a36c8f1ac48d320850c292c7e66256884
PKG_SOURCE_VERSION:=120dbcd6508b817d2ce3d579a1bfbd5bfd1a44cb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -49,8 +49,11 @@ endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
TARGET_LDFLAGS += \
-lcmph
ifeq ($(CONFIG_PARENTAL_CONTROL_URLFILTERING),y)
TARGET_CFLAGS+=-DPARENTAL_CONTROL_ULRFILTER
endif
TARGET_LDFLAGS += -lcmph
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
@@ -85,8 +88,12 @@ define Package/parental-control/install
$(BBFDM_REGISTER_SERVICES) -v ${VENDOR_PREFIX} ./bbfdm_service.json $(1) parentalcontrol
ifeq ($(CONFIG_PARENTAL_CONTROL_INCLUDE_URLFILTER_BUNDLES),y)
$(INSTALL_DATA) ./files/etc/parentalcontrol/urlbundles.tar.xz $(1)/etc/parentalcontrol/
ifeq ($(CONFIG_PARENTAL_CONTROL_URLFILTERING),y)
$(INSTALL_DATA) ./files/etc/uci-defaults/55-add-default-bundles $(1)/etc/uci-defaults/
$(CP) ./files/urlbundle_override.json $(1)/etc/parentalcontrol/
else
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/urlbundle_override.json $(1) parentalcontrol
$(INSTALL_DATA) ./files/etc/uci-defaults/50-parental_control_urlfilter $(1)/etc/uci-defaults/
endif
endef

View File

@@ -1,93 +1,4 @@
config globals 'globals'
option enable '0'
option loglevel '3'
config urlbundle 'urlbundle_1'
option enable '0'
option name 'Abuse'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/abuse-nl.txt'
config urlbundle 'urlbundle_2'
option enable '0'
option name 'Ads'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt'
config urlbundle 'urlbundle_3'
option enable '0'
option name 'Crypto'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/crypto-nl.txt'
config urlbundle 'urlbundle_4'
option enable '1'
option name 'Drugs'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/drugs-nl.txt'
config urlbundle 'urlbundle_5'
option enable '0'
option name 'Everything else'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/everything-nl.txt'
config urlbundle 'urlbundle_6'
option enable '1'
option name 'Facebook/Instagram'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/facebook-nl.txt'
config urlbundle 'urlbundle_7'
option enable '1'
option name 'Fraud'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/fraud-nl.txt'
config urlbundle 'urlbundle_8'
option enable '1'
option name 'Gambling'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/gambling-nl.txt'
config urlbundle 'urlbundle_9'
option enable '0'
option name 'Malware'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/malware-nl.txt'
config urlbundle 'urlbundle_10'
option enable '1'
option name 'Phishing'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/phishing-nl.txt'
config urlbundle 'urlbundle_11'
option enable '1'
option name 'Piracy'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/piracy-nl.txt'
config urlbundle 'urlbundle_12'
option enable '0'
option name 'Porn'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/porn-nl.txt'
config urlbundle 'urlbundle_13'
option enable '1'
option name 'Ransomware'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/ransomware-nl.txt'
config urlbundle 'urlbundle_14'
option enable '0'
option name 'Redirect'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/redirect-nl.txt'
config urlbundle 'urlbundle_15'
option enable '1'
option name 'Scam'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/scam-nl.txt'
config urlbundle 'urlbundle_16'
option enable '0'
option name 'TikTok'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/tiktok-nl.txt'
config urlbundle 'urlbundle_17'
option enable '0'
option name 'Torrent'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/torrent-nl.txt'
config urlbundle 'urlbundle_18'
option enable '0'
option name 'Tracking'
option download_url 'https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt'
option urlfilter '1'

View File

@@ -2,15 +2,22 @@
. /lib/parentalcontrol/parentalcontrol.sh
enabled="$(uci -q get parentalcontrol.globals.enable)"
urlfilter="$(uci -q get parentalcontrol.globals.urlfilter)"
# if parentalcontrol is enabled, add the rules, else remove them
if [ "$(uci -q get parentalcontrol.globals.enable)" == "1" ]; then
if [ "${enabled}" -eq "1" ]; then
# this is for urlfilter daemon
add_iptables_nfqueue_rules
# this for internet_access and profile_bedtime_schedule sections
add_internet_schedule_rules
if [ "${urlfilter}" -eq "1" ]; then
# this for internet_access and profile_bedtime_schedule sections
add_internet_schedule_rules
fi
else
# remove urlfilter daemon rules
remove_iptables_nfqueue_rules
# remove internet_access and profile_bedtime_schedule rules
remove_internet_schedule_rules
if [ "${urlfilter}" -eq "1" ]; then
# remove internet_access and profile_bedtime_schedule rules
remove_internet_schedule_rules
fi
fi

View File

@@ -12,7 +12,8 @@ validate_global_section() {
uci_validate_section parentalcontrol globals globals \
'enable:bool:1' \
'loglevel:uinteger:3' \
'bundle_path:string'
'bundle_path:string' \
'urlfilter:bool'
}
remove_fw_rules() {
@@ -23,27 +24,36 @@ remove_fw_rules() {
}
configure_fw_rules() {
local enable
remove_fw_rules
local enable urlfilter
config_load parentalcontrol
config_get_bool enable globals enable 0
config_get_bool urlfilter globals urlfilter 0
remove_fw_rules
if [ "${enable}" -eq "0" ]; then
# Parental control is disabled
return 0
fi
# Now flush the existing connections, otherwise,
# URL filtering cannot be performed on already open sites.
if [ -n "$(which conntrack)" ]; then
sleep 5
conntrack -F
if [ "${urlfilter}" -eq "1" ]; then
if [ ! -f "${OVERRIDE_JSON}" ]; then
# throw error
log "ERROR: urlfiltering disabled at compile time but enabled in config"
else
# Now flush the existing connections, otherwise,
# URL filtering cannot be performed on already open sites.
if [ -n "$(which conntrack)" ]; then
sleep 5
conntrack -F
fi
# this is for urlfilter daemon
add_iptables_nfqueue_rules
fi
fi
# this is for urlfilter daemon
add_iptables_nfqueue_rules
# this for internet_access and profile_bedtime_schedule sections
add_internet_schedule_rules
}
@@ -68,7 +78,7 @@ copy_dhcp_leases() {
}
start_service() {
local enable loglevel bundle_path
local enable loglevel bundle_path urlfilter
config_load parentalcontrol
validate_global_section
@@ -80,6 +90,12 @@ start_service() {
# add firewall rules
configure_fw_rules
if [ "${urlfilter}" -eq "1" ]; then
enable_urlfilter_dm
else
disable_urlfilter_dm
fi
# if the router is, for example, upgraded and then it boots up
# then /tmp/dhcp.leases will be empty until clients try to get a lease,
# in that case, hostnames will not be processed by the daemon,
@@ -88,7 +104,7 @@ start_service() {
# and will be used as a backup in case /tmp/dhcp.leases is empty
copy_dhcp_leases
procd_open_instance "parentalcontrol_dm"
procd_open_instance "parentalcontrol"
procd_set_param command nice -n 10 "${PROG}" # Lower priority
procd_append_param command -l ${loglevel}
procd_set_param respawn
@@ -103,7 +119,7 @@ stop_service() {
}
reload_service() {
ret=$(ubus call service list '{"name":"parentalcontrol"}' | jsonfilter -qe '@.parentalcontrol.instances.parentalcontrol_dm.running')
ret=$(ubus call service list '{"name":"parentalcontrol"}' | jsonfilter -qe '@.parentalcontrol.instances.parentalcontrol.running')
if [ "$ret" != "true" ]; then
stop
start

View File

@@ -0,0 +1,7 @@
#!/bin/sh
. /lib/functions.sh
[ ! -f "/etc/config/parentalcontrol" ] && exit 0
uci -q set parentalcontrol.globals.urlfilter='0'

View File

@@ -0,0 +1,40 @@
#!/bin/sh
COUNT=1
add_urlbundle()
{
local enabled name url
enabled="${1}"; shift
url="${1}"; shift
name="${@}"
uci -q set parentalcontrol.urlbundle_${COUNT}=urlbundle
uci -q set parentalcontrol.urlbundle_${COUNT}.enable="${enabled}"
uci -q set parentalcontrol.urlbundle_${COUNT}.name="${name}"
uci -q set parentalcontrol.urlbundle_${COUNT}.download_url="${url}"
COUNT="$((COUNT+1))"
}
add_urlbundle "0" "https://blocklistproject.github.io/Lists/alt-version/abuse-nl.txt" "Abuse"
add_urlbundle "0" "https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt" "Ads"
add_urlbundle "0" "https://blocklistproject.github.io/Lists/alt-version/crypto-nl.txt" "Crypto"
add_urlbundle "1" "https://blocklistproject.github.io/Lists/alt-version/drugs-nl.txt" "Drugs"
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/everything-nl.txt' "Everything else"
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/facebook-nl.txt' 'Facebook/Instagram'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/fraud-nl.txt' 'Fraud'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/gambling-nl.txt' 'Gambling'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/malware-nl.txt' 'Malware'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/phishing-nl.txt' 'Phishing'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/piracy-nl.txt' 'Piracy'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/porn-nl.txt' 'Porn'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/ransomware-nl.txt' 'Ransomware'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/redirect-nl.txt' 'Redirect'
add_urlbundle "1" 'https://blocklistproject.github.io/Lists/alt-version/scam-nl.txt' 'Scam'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/tiktok-nl.txt' 'TikTok'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/torrent-nl.txt' 'Torrent'
add_urlbundle "0" 'https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt' 'Tracking'
exit 0

View File

@@ -311,6 +311,9 @@ parse_macs_or_hostnames() {
local input="$1"
local lease_file="/tmp/dhcp.leases"
[ -f "$lease_file" ] || lease_file="/etc/parentalcontrol/dhcp.leases"
[ -f "$lease_file" ] || { log "Error: No DHCP lease file found."; return 1; }
for item in $input; do
case "$item" in
??:??:??:??:??:??)
@@ -509,3 +512,25 @@ remove_internet_schedule_rules() {
ip6tables -w -X parentalcontrol_forward
fi
}
OVERRIDE_JSON="/etc/parentalcontrol/urlbundle_override.json"
DM_PLUGIN_PATH="/usr/share/bbfdm/micro_services/parentalcontrol/urlbundle_override.json"
enable_urlfilter_dm() {
if [ -f "${DM_PLUGIN_PATH}" ]; then
rm ${DM_PLUGIN_PATH}
echo "Please restart to apply"
fi
}
disable_urlfilter_dm() {
mkdir -p "$(dirname ${DM_PLUGIN_PATH})"
if [ ! -f "${DM_PLUGIN_PATH}" ]; then
if [ -f "${OVERRIDE_JSON}" ]; then
cp "${OVERRIDE_JSON}" "${DM_PLUGIN_PATH}"
echo "Please restart to apply"
fi
fi
}

View File

@@ -224,6 +224,14 @@ cleanup_bundle_files() {
# Main handler for all profile URL bundles
handle_filter_for_bundles() {
local urlfilter
urlfilter="$(uci -q get parentalcontrol.globals.urlfilter)"
if [ "${urlfilter}" -ne "1" ]; then
logger -p info "urlbundle not supported"
return
fi
ubus -t 20 wait_for bbfdm.parentalcontrol
if [ "$?" -ne 0 ]; then

View File

@@ -0,0 +1,89 @@
{
"json_plugin_version": 2,
"Device.X_IOWRT_EU_ParentalControl.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"DefaultBundles": {
"type": "string",
"protocols": [
"none"
],
"read": true,
"write": false
},
"MaxBlockHistory": {
"type": "unsignedInt",
"protocols": [
"none"
],
"read": true,
"write": true,
"datatype": "unsignedInt"
},
"BlockHistoryNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"none"
],
"datatype": "unsignedInt"
},
"URLBundleNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"none"
],
"datatype": "unsignedInt"
},
"Device.X_IOWRT_EU_ParentalControl.BlockHistory.": {
"type": "object",
"protocols": [
"none"
],
"access": false,
"array": true
},
"Device.X_IOWRT_EU_ParentalControl.URLBundle.": {
"type": "object",
"protocols": [
"none"
],
"access": true,
"array": true
}
},
"Device.X_IOWRT_EU_ParentalControl.Profile.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"URLFilterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"none"
],
"datatype": "unsignedInt"
},
"Device.X_IOWRT_EU_ParentalControl.Profile.{i}.URLFilter.": {
"type": "object",
"protocols": [
"none"
],
"access": true,
"array": true
}
}
}

View File

@@ -94,6 +94,16 @@
"file": "/tmp/dhcp.client.options"
}
]
},
{
"description": "Firewall fw3 reload status",
"cmd": "cat /var/log/firewall.log",
"dependency" : [
{
"type": "file",
"file": "/var/log/firewall.log"
}
]
}
]
}

Some files were not shown because too many files have changed in this diff Show More