Compare commits

...

75 commits

Author SHA1 Message Date
Vivek Dutta
68ab42b29e
Merge branch 'reset_reason' into 'devel'
Reset reason

See merge request feed/iopsys!1933
2025-12-09 14:08:25 +05:30
Mohd Husaam Mehdi
61bda623ca iopsys-analytics: run non-threaded fluent-bit input plugins 2025-12-09 13:44:46 +05:30
Suvendhu Hansa
e2eaf6221a
tr143: per connection upload test using fast path 2025-12-09 12:27:44 +05:30
Vivek Kumar Dutta
82183e9e3b
parental-control: disable urlfilter by default 2025-12-08 21:58:50 +05:30
Vivek Kumar Dutta
edfbcb1074
Revert "parental-control: disable urlfilter by default"
This reverts commit 5af1df3493.
2025-12-08 21:45:01 +05:30
Vivek Kumar Dutta
5af1df3493 parental-control: disable urlfilter by default 2025-12-08 20:56:21 +05:30
Jakob Olsson
3ec6c21456 map-controller: 6.4.4.14 2025-12-08 16:09:18 +01:00
Reidar Cederqvist
9d251b5d9d
sulu: update to version 5.3.8
(cherry picked from commit 54f08fc89b)

Co-authored-by: Reidar Cederqvist <reidar.cederqvist@genexis.eu>
2025-12-08 14:38:37 +00:00
Amin Ben Romdhane
a3e4a0f6e9 map-controller: uci-defaults: Assign unique ID to qos_rule sections 2025-12-08 14:17:20 +01:00
Vivek Dutta
d5044df134
parental-control: read urlbundle definition from json 2025-12-08 18:07:13 +05:30
Jakob Olsson
cef4d4efea ieee1905: 8.7.43 2025-12-08 12:17:06 +01:00
Jakob Olsson
1f093159d8 map-agent: 6.5.0.8 2025-12-08 11:14:57 +01:00
Vivek Kumar Dutta
22e6d80384
bbfdm: 1.18.16 2025-12-08 12:21:10 +05:30
Sukru Senli
fe1bf101c3 sulu: 5.3.7 2025-12-07 11:11:12 +01:00
Reidar Cederqvist
24c30a098e
sulu: update to version 5.3.6 2025-12-05 18:53:16 +01:00
Sukru Senli
a0c1801511 netmode: fallback to checking usr_data if /opconf/opconf.json is not available 2025-12-05 17:24:09 +01:00
Reidar Cederqvist
59e7ece054
sulu: update to version 5.3.5 2025-12-05 17:00:22 +01:00
Jakob Olsson
cb9825504d Revert "map-agent: 6.5.0.8"
This reverts commit 3158f92912.
2025-12-05 16:26:44 +01:00
Jakob Olsson
628331c808 Revert "map-controller: 6.4.4.14"
This reverts commit 9bb0da51cf.
2025-12-05 16:26:43 +01:00
Reidar Cederqvist
229f62a906
sulu: update to version 5.3.4 2025-12-05 15:24:31 +01:00
Vivek Kumar Dutta
034bd7e8b2
sysmngr: 1.1.6 2025-12-05 18:32:51 +05:30
Vivek Kumar Dutta
c594a4957f
tr143: 1.1.12 2025-12-05 18:13:04 +05:30
Vivek Kumar Dutta
5fd540d5ba bbfdm: increase IPC max len to 20M 2025-12-05 16:10:38 +05:30
Vivek Kumar Dutta
64fcaaadc7
userinterface: Use FirstLogin as false, if not set 2025-12-05 15:20:45 +05:30
Vivek Dutta
64f4ceda35
netmode: clean all vlans before creating new ones 2025-12-05 14:37:31 +05:30
Vivek Kumar Dutta
0485c372bd
dnsmngr: Fix DNS Client Interface reference 2025-12-05 14:12:31 +05:30
Suvendhu Hansa
155b4fe2b3 netmode: fix lowerlayers on mode change 2025-12-04 21:16:33 +05:30
Vivek Kumar Dutta
cf573d3fad
logmngr: fix typo
(cherry picked from commit d39b3ebaa4)
2025-12-04 20:01:21 +05:30
Sukru Senli
09aa9746d5
netmode: remove wan6 for pppoe and static modes 2025-12-04 19:50:23 +05:30
Vivek Kumar Dutta
e56ad858aa
tr143: 1.1.11 2025-12-04 19:42:14 +05:30
Vivek Dutta
362bb8b1cf
logmngr: reload fluent-bit on ntp sync event (via hotplug)
(cherry picked from commit bdc435c392)

Co-authored-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
2025-12-04 19:41:25 +05:30
Jakob Olsson
9bb0da51cf map-controller: 6.4.4.14 2025-12-04 15:08:46 +01:00
Jakob Olsson
3158f92912 map-agent: 6.5.0.8 2025-12-04 14:23:07 +01:00
Vivek Kumar Dutta
2847fdd2c2
dhcpmngr: vendor extn to set name with static lease
(cherry picked from commit 9aa6878efc)
2025-12-04 18:45:48 +05:30
Reidar Cederqvist
bde6e11169 sulu: update to versiohn 5.3.3 2025-12-04 14:08:08 +01:00
Vivek Kumar Dutta
543ba2ac7a
hostmngr: add uniqueness check for name extn 2025-12-04 18:25:32 +05:30
Vivek Kumar Dutta
c02548298d
tr143: 1.1.10 2025-12-04 18:23:37 +05:30
Xiaofeng Meng
0f03e3ae70 dmcli: v1.9.6 2025-12-04 16:48:59 +05:30
Amin Ben Romdhane
2c4307f83a decollector: 6.2.3.8 2025-12-04 11:24:50 +01:00
Suvendhu Hansa
98925cc464
netmode: Fix missing IP interface after wan mode change 2025-12-04 14:12:31 +05:30
Vivek Kumar Dutta
d8d2d0090b
dhcpmngr: Fix clinet info on lan ip change 2025-12-04 09:32:12 +05:30
Suvendhu Hansa
2fc98ac307
tr143: Added support of NumberOfConnection for airoha download test 2025-12-03 18:34:57 +05:30
Suvendhu Hansa
98f5e19916
netmode: Fix switching wan mode from pppoe to other modes 2025-12-03 17:33:48 +05:30
Vivek Kumar Dutta
e8da3d1cd7
sysmngr: 1.1.5 2025-12-03 15:11:01 +05:30
Vivek Kumar Dutta
4112fbd17c
dmcli: align with usp-js version 2025-12-03 09:51:12 +05:30
Vivek Kumar Dutta
26f202edb7
usp-js: 1.2.10 2025-12-03 09:35:39 +05:30
Amin Ben Romdhane
67b4ba0301 decollector: 6.2.3.7 2025-12-02 17:22:04 +01:00
Jakob Olsson
68fb3bea32 libdpp: 2.1.3 2025-12-02 12:46:52 +01:00
Meng
c0a1139764 dmcli: v1.9.5 2025-12-02 10:08:10 +01:00
Vivek Kumar Dutta
39f30cd31a
sysmngr: use sysfs for TemperatureStatus 2025-12-02 13:59:21 +05:30
Vivek Kumar Dutta
ac78f69136
bbfdm: improve generic browse logic to skip dirty sections 2025-12-02 10:41:04 +05:30
Anjan Chanda
f72d4e35d0 usp-js: fix build 2025-12-02 10:04:26 +05:30
Vivek Kumar Dutta
e5fc33e941
obuspa: 10.0.7.10 2025-12-02 08:56:33 +05:30
Mohd Husaam Mehdi
5faab025cc libqos: econet fix proc file for downstream queue 2025-12-02 08:50:30 +05:30
Jakob Olsson
7a62843c29 map-agent: 6.5.0.7 2025-12-01 16:13:34 +01:00
Vivek Kumar Dutta
b0d2b10055
Revert "libqos: econet fix proc file for downstream queue"
This reverts commit 7129b55362.
2025-12-01 16:58:32 +05:30
Husaam Mehdi
7129b55362
libqos: econet fix proc file for downstream queue 2025-12-01 15:02:44 +05:30
Mohd Husaam Mehdi
6662f27493 logmngr: set coro_stack_size 1MB by default
according to libco documentation: "Heapsize is the amount of
memory allocated for the cothread stack, specified in bytes. This
is unfortunately impossible to make fully portable. It is
recommended to specify sizes using `n * sizeof(void*)'. It is
better to err on the side of caution and allocate more memory than
will be needed to ensure compatibility with other platforms,
within reason. A typical heapsize for a 32-bit architecture is
~1MB.", so we follow this advice in hopes of reducing crashes.
2025-12-01 12:47:04 +05:30
Vivek Kumar Dutta
b42c0201cf
dhcpmngr: 1.1.4 2025-12-01 11:19:34 +05:30
Jakob Olsson
d626a673b5 map-agent: 6.5.0.6 2025-11-28 15:04:36 +01:00
Vivek Dutta
18a5f6ca5b
sulu: fix mosquitto acl permission
(cherry picked from commit 9ccae677a6)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-11-28 19:10:03 +05:30
Amin Ben Romdhane
97045b2d39 decollector: 6.2.3.6 2025-11-28 12:58:58 +01:00
Reidar Cederqvist
8475fa81bc
sulu: update to version 5.3.2 2025-11-28 12:05:45 +01:00
Vivek Dutta
e67f2bbcf7
netmode: check mode from opconf in uci-default
(cherry picked from commit fe7a0b7d0c)

12c8a916 netmode: check mode from opconf.json in uci-default

Co-authored-by: Vivek Dutta <vivek.dutta@iopsys.eu>
2025-11-28 15:57:28 +05:30
Vivek Kumar Dutta
a3d7280423
obuspa: Fix schema registration 2025-11-28 13:49:03 +05:30
Amin Ben Romdhane
61de08f440 decollector: 6.2.3.5 2025-11-27 17:04:20 +01:00
Amin Ben Romdhane
05ecde4f55 wifidmd: 1.4.6 2025-11-27 16:58:51 +01:00
Reidar Cederqvist
55c3233739
sulu: update to version 5.3.1 2025-11-27 16:27:04 +01:00
Vivek Dutta
6e9a38beac
obuspa: Fix segfault while getting endpointid 2025-11-27 20:11:42 +05:30
Amin Ben Romdhane
fea9e4de88
wifidmd: Update the handling of Multi-AP Mode vendor extension 2025-11-27 14:13:52 +00:00
Jakob Olsson
ceb5a9f2e4 map-agent: 6.5.0.5 2025-11-27 12:03:22 +01:00
Vivek Kumar Dutta
cb8623a862
netmngr: 1.2.4 2025-11-27 14:28:45 +05:30
Vivek Dutta
c6672e3cf0
self-diagnostics: fix datamodel access
(cherry picked from commit ab5e3a42b9)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-11-27 14:21:59 +05:30
Amin Ben Romdhane
75d0b18f09 wifidmd: 1.4.5 2025-11-27 09:32:02 +01:00
Vivek Kumar Dutta
b087faf6b9 sysmngr: run reset_reason if present 2025-11-18 12:50:34 +05:30
54 changed files with 592 additions and 643 deletions

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.18.14
PKG_VERSION:=1.18.16
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=a0347e59b69d8e0b20d6c26b7ddb02450813545d
PKG_SOURCE_VERSION:=72c3307651cb583121fa5b4abcaad957ddc264bd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@ -107,7 +107,7 @@ endif
CMAKE_OPTIONS += \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760 \
-DBBFDMD_MAX_MSG_LEN:Integer=20971520 \
-DCMAKE_BUILD_TYPE:String="Debug" \

View file

@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.2.3.4
PKG_VERSION:=6.2.3.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=aa09f90ca39101a0a33ec9c61993a944671e0724
PKG_SOURCE_VERSION:=8396091a83aefaf8423dfd41a957b04f3ed821e7
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

12
dhcpmngr/Config.in Normal file
View file

@ -0,0 +1,12 @@
if PACKAGE_dhcpmngr
config DHCPMNGR_ENABLE_VENDOR_EXT
bool "Use datamodel vendor extensions"
default y
help
Set this option to use bridge BBF vendor extensions.
config DHCPMNGR_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.1.3
PKG_VERSION:=1.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=5c10fc1228c7e62f18315df57460dd8a876964e3
PKG_SOURCE_VERSION:=74d96cd70119e4ea08767d68b45b4922162d0328
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@ -39,6 +39,22 @@ define Package/dhcpmngr/description
Package to add Device.DHCPv4. and Device.DHCPv6. data model support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(CONFIG_DHCPMNGR_ENABLE_VENDOR_EXT),y)
MAKE_FLAGS += DHCPMNGR_ENABLE_VENDOR_EXT=y
endif
ifeq ($(CONFIG_DHCPMNGR_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_DHCPMNGR_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/dhcpmngr/* $(PKG_BUILD_DIR)/

View file

@ -11,11 +11,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dmcli
PKG_LICENSE:=PROPRIETARY GENEXIS
PKG_VERSION:=1.9.4
PKG_VERSION:=1.9.6
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/dmcli.git
PKG_SOURCE_VERSION:=6171e208611ba4ea1abdab2b70a8fa30f55476ca
PKG_SOURCE_VERSION:=f03188eff6c2cab59e4c8f18a435c940ff5043f5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.19
PKG_VERSION:=1.0.20
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=205938aa1f686d5b43460e4a17f3900ed82bd29f
PKG_SOURCE_VERSION:=83e485fae8905f9061257264cf43ea41e47743a6
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:=hostmngr
PKG_VERSION:=1.4.2
PKG_VERSION:=1.4.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ac50f621e19f74b7af4e4b8c1e810503507cc3dd
PKG_SOURCE_VERSION:=667866b8149d3df83a05536319eac02aee0b6d75
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

@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.7.42
PKG_VERSION:=8.7.43
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=2e7d1377794b8d4f8aad252265110b09b129fdc8
PKG_SOURCE_VERSION:=48f1eb0ffceea5b6cd98846d7f774387f1e57401
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

View file

@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=PROPRIETARY
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=25e32ac5a860aec6e53e3449565b71595073e014
PKG_SOURCE_VERSION:=7c2780b4c24e5a1078c060bf9d3a03365f71f06a
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

View file

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdpp
PKG_VERSION:=2.1.1
PKG_VERSION:=2.1.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6024efd3db9dd490c07465ea9b0c15120063165c
PKG_SOURCE_VERSION:=fdfe23e51ff77ca6d2661ad6208d097758524147
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/libdpp.git
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@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:=libqos
PKG_VERSION:=7.2.110
PKG_VERSION:=7.2.111
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.git
PKG_SOURCE_VERSION:=b36f26d6d14c8fa65b4559381f6a43219d55e93a
PKG_SOURCE_VERSION:=2e4c6a9c27e0f4f68dfe7a5c930afefd8dc7119a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@ -65,7 +65,7 @@ define Package/libqos
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= QoS library (libqos)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp +TARGET_airoha:libuci
endef
define Package/libqos/config

View file

@ -65,8 +65,10 @@ define Package/logmngr/install
$(INSTALL_DIR) $(1)/lib/logmngr
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_DIR) $(1)/etc/hotplug.d/ntp/
$(INSTALL_BIN) ./files/logread $(1)/sbin/
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
$(INSTALL_BIN) ./files/etc/hotplug.d/ntp/20-reload_fluent_bit $(1)/etc/hotplug.d/ntp/
else ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/
endif

View file

@ -0,0 +1,14 @@
#!/bin/sh
# This hotplug script reloads fluent-bit, so that kmsg logs' timestamp gets in sync
[ "$ACTION" = stratum ] || exit 0
# only once
if ! uci -q get time.global.first_use_date > /dev/null 2>&1; then
flb_pid="$(pidof fluent-bit)"
if [ -n "$flb_pid" ]; then
logger -t "logmngr.hotplug" -p info "reload fluent-bit due to ntp sync"
kill -SIGHUP "$flb_pid"
fi
fi

View file

@ -63,7 +63,7 @@ create_service_section() {
append_conf " flush 1"
append_conf " daemon off"
append_conf " log_level info"
append_conf " coro_stack_size 24576"
append_conf " coro_stack_size 1048576"
append_conf " parsers_file /etc/fluent-bit/parsers.conf"
append_conf " hot_reload on"
append_conf ""

View file

@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.5.0.4
PKG_VERSION:=6.5.0.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=75277cf709742138db3f24fa07546e3e555ba818
PKG_SOURCE_VERSION:=725909127f3ba4be38ae6e8f13b70260062737a6
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause

View file

@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.4.4.13
PKG_VERSION:=6.4.4.14
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=bd0fb2b63830e19038d9495517c03fdc3900cdfa
PKG_SOURCE_VERSION:=abd127215616717506fb03c94ca629f22768ff4f
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
LOCAL_DEV=0

View file

@ -0,0 +1,66 @@
#!/bin/sh
. /lib/functions.sh
cfg="mapcontroller"
config_load "$cfg"
used_ids=""
collect_used_ids() {
local section="$1"
local id
id=$(uci -q get ${cfg}.${section}.id)
if [ -n "$id" ] && printf "%s" "$id" | grep -qE '^[0-9]+$'; then
used_ids="$used_ids $id"
fi
}
# Find first available ID from 0 to INT32_MAX
find_first_available_id() {
local max_int=2147483647
local expected=0
local id
# Convert list to sorted unique list
sorted_ids=$(printf "%s\n" $used_ids | sort -n | uniq)
for id in $sorted_ids; do
if [ "$id" -eq "$expected" ]; then
expected=$((expected + 1))
elif [ "$id" -gt "$expected" ]; then
# Found a gap -> return the gap
echo "$expected"
return
fi
done
# If no gaps, next available is `expected`
if [ "$expected" -le "$max_int" ]; then
echo "$expected"
else
echo -1
fi
}
# Assign ID if missing
add_qos_rule_id() {
local section="$1"
local id
id=$(uci -q get ${cfg}.${section}.id)
if [ -z "$id" ]; then
new_id=$(find_first_available_id)
[ "$new_id" -ge 0 ] || return # No available ID
uci -q set ${cfg}.${section}.id="$new_id"
used_ids="$used_ids $new_id"
fi
}
# Step 1: Collect all existing IDs
config_foreach collect_used_ids qos_rule
# Step 2: Assign IDs to rules missing them
config_foreach add_qos_rule_id qos_rule

View file

@ -14,5 +14,3 @@ for sec in $sections; do
uci rename $cfg.$s=$sec
done
uci commit $cfg

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.2.3
PKG_VERSION:=1.2.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=943959a082c13c3dcff707c9554a733e99d309ca
PKG_SOURCE_VERSION:=8240c6089cdd44f268db135920800b8fc1d65ca9
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.10
PKG_VERSION:=1.1.11
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only

View file

@ -117,6 +117,7 @@ start_service() {
config_get_bool enabled global enabled '0'
[ $enabled -eq 0 ] && return
[ -d $MODEDIR ] || mkdir -p $MODEDIR
# Get the desired netmode from config
config_get mode global mode ""
# Check if netmode is set as boot environment parameter
@ -127,9 +128,12 @@ start_service() {
# Get the last saved mode
lastmode="$(cat $MODEDIR/.last_mode 2>/dev/null)"
# Return if desired mode is same as last saved mode
[ "$mode" == "$lastmode" ] && return
if [ "$mode" = "$lastmode" ]; then
_log "Not switching mode[${mode}], lastmode[${lastmode}]"
return
fi
_log "Switching to [${mode}] Mode" >/dev/console
_log "Switching to [${mode}] Mode"
# Configure env variables
configure_env_vars ${mode}
@ -147,20 +151,19 @@ start_service() {
# Execute mode specific scripts
if [ -d $MODEDIR/$mode/scripts ]; then
_log "Executing $MODEDIR/$mode/scripts/* scripts"
for script in $(ls $MODEDIR/$mode/scripts/); do
_log "Executing [${mode}], script [${script}]"
sh $MODEDIR/$mode/scripts/$script
done
fi
# Save mode as last mode
echo "$mode" > $MODEDIR/.last_mode
_log "Switching to Mode [${mode}] done, last mode updated"
# Execute netmode generic post-mode-switch scripts
libnetmode_exec "post"
cleanup_env_vars "${mode}"
# Save mode as last mode
[ -d $MODEDIR ] || mkdir -p $MODEDIR
echo "$mode" > $MODEDIR/.last_mode
_log "Switching to Mode [${mode}] done, last mode updated" >/dev/console
}
service_triggers()

View file

@ -61,8 +61,8 @@ l2_network_config() {
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.wan
uci -q delete network.wan6
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
@ -116,12 +116,3 @@ l2_network_config() {
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

@ -43,17 +43,24 @@ l3_network_config() {
uci -q delete network.wan.netmask
uci -q set network.wan6=interface
uci -q set network.wan6.proto='dhcpv6'
uci -q set network.wan6.proto="dhcpv6"
uci -q delete network.wan6.disabled
if [ -n "$wandev" ] && echo "$NETMODE_vlanid" | grep -Eq '^[0-9]+$' && [ "$NETMODE_vlanid" -ge 1 ]; then
uci -q set network.vlan_${NETMODE_vlanid}=device
uci -q set network.vlan_${NETMODE_vlanid}.type="8021q"
uci -q set network.vlan_${NETMODE_vlanid}.name="$wandev.$NETMODE_vlanid"
uci -q set network.vlan_${NETMODE_vlanid}.ifname="$wandev"
uci -q set network.vlan_${NETMODE_vlanid}.vid=$NETMODE_vlanid
# Delete all VLAN sections; new ones will be created in next function if required
for vlandev_sec in $(uci show network | grep "type=.*8021q" | cut -d'.' -f1,2); do
uci -q delete $vlandev_sec
done
wandev="$wandev.$NETMODE_vlanid"
if [ -n "$wandev" ] && echo "$NETMODE_vlanid" | grep -Eq '^[0-9]+$' && [ "$NETMODE_vlanid" -ge 1 ]; then
vlandev="$wandev.$NETMODE_vlanid"
vlandev_sec=$(echo $vlandev | tr '.' '_')
uci -q set network.${vlandev_sec}=device
uci -q set network.${vlandev_sec}.type="8021q"
uci -q set network.${vlandev_sec}.name="$vlandev"
uci -q set network.${vlandev_sec}.ifname="$wandev"
uci -q set network.${vlandev_sec}.vid=$NETMODE_vlanid
wandev="$vlandev"
fi
uci -q set network.wan.device="$wandev"
@ -119,12 +126,3 @@ l3_network_config() {
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

@ -42,20 +42,26 @@ l3_network_pppoe_config() {
uci -q delete network.wan.gateway
uci -q delete network.wan.netmask
uci -q set network.wan6.disabled='1'
uci -q delete network.wan6
# Delete all VLAN sections; new ones will be created in next function if required
for vlandev_sec in $(uci show network | grep "type=.*8021q" | cut -d'.' -f1,2); do
uci -q delete $vlandev_sec
done
if [ -n "$wandev" ] && echo "$NETMODE_vlanid" | grep -Eq '^[0-9]+$' && [ "$NETMODE_vlanid" -ge 1 ]; then
uci -q set network.vlan_${NETMODE_vlanid}=device
uci -q set network.vlan_${NETMODE_vlanid}.type="8021q"
uci -q set network.vlan_${NETMODE_vlanid}.name="$wandev.$NETMODE_vlanid"
uci -q set network.vlan_${NETMODE_vlanid}.ifname="$wandev"
uci -q set network.vlan_${NETMODE_vlanid}.vid=$NETMODE_vlanid
vlandev="$wandev.$NETMODE_vlanid"
vlandev_sec=$(echo $vlandev | tr '.' '_')
uci -q set network.${vlandev_sec}=device
uci -q set network.${vlandev_sec}.type="8021q"
uci -q set network.${vlandev_sec}.name="$vlandev"
uci -q set network.${vlandev_sec}.ifname="$wandev"
uci -q set network.${vlandev_sec}.vid=$NETMODE_vlanid
wandev="$wandev.$NETMODE_vlanid"
wandev="$vlandev"
fi
uci -q set network.wan.device="$wandev"
uci -q set network.wan6.device="$wandev"
uci -q set network.WAN.mtu="$NETMODE_mtu"
@ -117,12 +123,3 @@ l3_network_pppoe_config() {
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

@ -43,20 +43,26 @@ l3_network_config() {
uci -q delete network.wan.username
uci -q delete network.wan.password
uci -q set network.wan6.disabled='1'
uci -q delete network.wan6
# Delete all VLAN sections; new ones will be created in next function if required
for vlandev_sec in $(uci show network | grep "type=.*8021q" | cut -d'.' -f1,2); do
uci -q delete $vlandev_sec
done
if [ -n "$wandev" ] && echo "$NETMODE_vlanid" | grep -Eq '^[0-9]+$' && [ "$NETMODE_vlanid" -ge 1 ]; then
uci -q set network.vlan_${NETMODE_vlanid}=device
uci -q set network.vlan_${NETMODE_vlanid}.type="8021q"
uci -q set network.vlan_${NETMODE_vlanid}.name="$wandev.$NETMODE_vlanid"
uci -q set network.vlan_${NETMODE_vlanid}.ifname="$wandev"
uci -q set network.vlan_${NETMODE_vlanid}.vid=$NETMODE_vlanid
vlandev="$wandev.$NETMODE_vlanid"
vlandev_sec=$(echo $vlandev | tr '.' '_')
uci -q set network.${vlandev_sec}=device
uci -q set network.${vlandev_sec}.type="8021q"
uci -q set network.${vlandev_sec}.name="$vlandev"
uci -q set network.${vlandev_sec}.ifname="$wandev"
uci -q set network.${vlandev_sec}.vid=$NETMODE_vlanid
wandev="$wandev.$NETMODE_vlanid"
wandev="$vlandev"
fi
uci -q set network.wan.device="$wandev"
uci -q set network.wan6.device="$wandev"
uci -q set network.WAN.mtu="$NETMODE_mtu"
@ -118,12 +124,3 @@ l3_network_config() {
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

@ -1,7 +1,28 @@
#!/bin/sh
enabled="$(uci -q get netmode.global.enabled)"
[ "$enabled" == "1" ] || exit 0
if [ "$enabled" != "1" ]; then
exit 0
fi
opconf_file="/opconf/opconf.json"
[ -f $opconf_file ] || opconf_file="/usr_data/opconf/opconf.json"
# Check if netmode getting provisioned from opconf, in case of opconf
# provisioning, mode setting not required
mode="$(jsonfilter -i $opconf_file -e @.netmode.mode 2>/dev/null)"
if [ -n "${mode}" ]; then
exit 0
fi
# Check if opconf has wan provisioning enabled, if yes, get the proto/mode from opconf
proto="$(jsonfilter -i $opconf_file -e '@.network.wan[@.name="wan"].proto' 2>/dev/null)"
if [ -n "${proto}" ]; then
mode="routed-${proto}"
uci -q set netmode.global.mode="${mode}"
echo "${mode}" > /etc/netmodes/.last_mode
exit 0
fi
mode="$(uci -q get netmode.global.mode)"
wanproto=$(uci -q get network.wan.proto)
@ -13,7 +34,9 @@ if [ -n "$mode" ]; then
fi
fi
[ -f /etc/netmodes/supported_modes.json ] || exit 0
if [ ! -f "/etc/netmodes/supported_modes.json" ]; then
exit 0
fi
# NetMode is enabled without a Mode being set
# Figure out the current mode from network config
@ -26,10 +49,12 @@ esac
found=0
for md in $(jsonfilter -i /etc/netmodes/supported_modes.json -e "@.supported_modes.*.name"); do
[ "$md" == "$curmode" ] && found=1
[ "$md" = "$curmode" ] && found=1
done
if [ $found -eq 1 ]; then
uci -q set netmode.global.mode="$curmode"
echo "$curmode" > /etc/netmodes/.last_mode
else
exit 1
fi

View file

@ -1,11 +1,21 @@
#!/bin/sh
# This script is to restart related datamodel microservices
# when wan mode changes
if [ ! -f /var/run/boot_complete ]; then
return 0
exit 0
fi
reboot &
if [ -f /etc/bbfdm/dmmap/PPP ]; then
rm -f /etc/bbfdm/dmmap/PPP
fi
if [ -f /etc/bbfdm/dmmap/IP ]; then
rm -f /etc/bbfdm/dmmap/IP
fi
if [ -f /etc/bbfdm/dmmap/Ethernet ]; then
rm -f /etc/bbfdm/dmmap/Ethernet
fi
sleep 5
reboot -f

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=10.0.7.7
PKG_VERSION:=10.0.7.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=f3b5b79476adadc55830de9466361c0eeced473e
PKG_SOURCE_VERSION:=c3b7c7653edb63326e7070b6891a95ad6cf7a2ee
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View file

@ -1,176 +0,0 @@
Index: obuspa-10.0.5.0/src/core/device.h
===================================================================
--- obuspa-10.0.5.0.orig/src/core/device.h
+++ obuspa-10.0.5.0/src/core/device.h
@@ -311,6 +311,9 @@ int DEVICE_CTRUST_InstSelToRoleInstance(
char *DEVICE_CTRUST_InstSelToPermTarget(int role_index, void *is, int *perm_instance);
int DEVICE_CTRUST_SetRoleParameter(int instance, char *param_name, char *new_value);
int DEVICE_CTRUST_SetPermissionParameter(int instance1, int instance2, char *param_name, char *new_value);
+
+bool DEVICE_CTRUST_IsControllerSecured(void);
+
int DEVICE_CTRUST_DumpPermissionSelectors(int role_instance, char *path);
int DEVICE_REQUEST_Init(void);
int DEVICE_REQUEST_Add(char *path, char *command_key, int *instance);
Index: obuspa-10.0.5.0/src/core/device_ctrust.c
===================================================================
--- obuspa-10.0.5.0.orig/src/core/device_ctrust.c
+++ obuspa-10.0.5.0/src/core/device_ctrust.c
@@ -246,6 +246,7 @@ credential_t *FindCredentialByCertInstan
int Get_CredentialRole(dm_req_t *req, char *buf, int len);
int Get_CredentialCertificate(dm_req_t *req, char *buf, int len);
int Get_CredentialNumEntries(dm_req_t *req, char *buf, int len);
+int Validate_SecuredRoles(dm_req_t *req, char *value);
void ApplySearchExpressionPermissions(char *path, inst_sel_t *sel);
bool ValidateDataModelPathSegment(char *segment, bool is_last, char *path);
@@ -293,6 +294,9 @@ int DEVICE_CTRUST_Init(void)
// Create a timer which will be used to apply all modified permissions to the data model, after processing a USP Message
SYNC_TIMER_Add(ApplyModifiedPermissions, 0, END_OF_TIME);
+ // Register Device.LocalAgent.ControllerTrust.SecuredRoles parameter
+ err |= USP_REGISTER_DBParam_ReadWrite(DEVICE_CTRUST_ROOT ".SecuredRoles", "", Validate_SecuredRoles, NULL, DM_STRING);
+
// Register parameters implemented by this component
// Device.LocalAgent.ControllerTrust.Role.{i}
err |= USP_REGISTER_Object(DEVICE_ROLE_ROOT, ValidateAdd_CTrustRole, NULL, Notify_CTrustRoleAdded,
@@ -3533,3 +3537,139 @@ exit:
return err;
}
#endif // REMOVE_DEVICE_SECURITY
+
+
+/*********************************************************************//**
+**
+** Validate_SecuredRoles
+**
+** Validates Device.LocalAgent.ControllerTrust.SecuredRoles
+** Each list item MUST be the Path Name of a row in the Device.LocalAgent.ControllerTrust.Role table
+**
+** \param req - pointer to structure identifying the parameter
+** \param value - value that the controller would like to set the parameter to
+**
+** \return USP_ERR_OK if successful
+**
+**************************************************************************/
+int Validate_SecuredRoles(dm_req_t *req, char *value)
+{
+ char *role_path;
+ char *saveptr;
+ char *str;
+ char temp[MAX_DM_PATH];
+ int role_instance;
+ int err;
+
+ // Empty string is valid
+ if (*value == '\0')
+ {
+ return USP_ERR_OK;
+ }
+
+ // Copy the value as strtok_r modifies the string
+ USP_STRNCPY(temp, value, sizeof(temp));
+
+ // Iterate through comma-separated list
+ str = temp;
+ role_path = strtok_r(str, ",", &saveptr);
+ while (role_path != NULL)
+ {
+ // Trim whitespace
+ role_path = TEXT_UTILS_TrimBuffer(role_path);
+
+ // Verify that this path exists in the Role table using DM_ACCESS_ValidateReference
+ err = DM_ACCESS_ValidateReference(role_path, "Device.LocalAgent.ControllerTrust.Role.{i}", &role_instance);
+ if (err != USP_ERR_OK)
+ {
+ USP_ERR_SetMessage("%s: Role path '%s' does not exist in Device.LocalAgent.ControllerTrust.Role table", __FUNCTION__, role_path);
+ return USP_ERR_INVALID_VALUE;
+ }
+
+ role_path = strtok_r(NULL, ",", &saveptr);
+ }
+
+ return USP_ERR_OK;
+}
+
+/*********************************************************************//**
+**
+** DEVICE_CTRUST_IsControllerSecured
+**
+** Determines whether the specified controller has a secured role
+**
+** \param combined_role - pointer to structure containing the role indexes for this controller
+**
+** \return true if the controller has a secured role, false otherwise
+**
+**************************************************************************/
+bool DEVICE_CTRUST_IsControllerSecured()
+{
+ char secured_roles[MAX_DM_PATH];
+ char *role_path;
+ char *saveptr;
+ char *str;
+ char temp[MAX_DM_PATH];
+ int err;
+ role_t *role;
+ int role_instance;
+ combined_role_t combined_role;
+ controller_info_t ci;
+
+ // Exit if unable to get the secured roles
+ err = DATA_MODEL_GetParameterValue("Device.LocalAgent.ControllerTrust.SecuredRoles", secured_roles, sizeof(secured_roles), 0);
+ if (err != USP_ERR_OK)
+ {
+ return false;
+ }
+
+ // Empty string means no secured roles
+ if (*secured_roles == '\0')
+ {
+ return false;
+ }
+
+ MSG_HANDLER_GetControllerInfo(&ci);
+ if (ci.endpoint_id == NULL)
+ {
+ return false;
+ }
+ if(strlen(ci.endpoint_id) == 0)
+ {
+ return false;
+ }
+
+ MSG_HANDLER_GetMsgRole(&combined_role);
+ // Copy the value as strtok_r modifies the string
+ USP_STRNCPY(temp, secured_roles, sizeof(temp));
+
+ // Iterate through comma-separated list
+ str = temp;
+ role_path = strtok_r(str, ",", &saveptr);
+ while (role_path != NULL)
+ {
+ // Trim whitespace
+ role_path = TEXT_UTILS_TrimBuffer(role_path);
+
+ // Extract the instance number from the role path
+ err = DM_ACCESS_ValidateReference(role_path, "Device.LocalAgent.ControllerTrust.Role.{i}", &role_instance);
+ if (err == USP_ERR_OK)
+ {
+ // Find the role in our internal array
+ role = FindRoleByInstance(role_instance);
+ if (role != NULL)
+ {
+ // Check if this role matches either the inherited or assigned role
+ if ((role - roles == combined_role.inherited_index) ||
+ (role - roles == combined_role.assigned_index))
+ {
+ return true;
+ }
+ }
+ }
+
+ role_path = strtok_r(NULL, ",", &saveptr);
+ }
+
+ return false;
+}

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=parental-control
PKG_VERSION:=1.4.4
PKG_VERSION:=1.4.5
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:=d0eabdda9790d1df3cec30589c97214731108367
PKG_SOURCE_VERSION:=11777ff069888fc543c2501110313b654bbbfbc9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@ -27,7 +27,7 @@ define Package/parental-control
CATEGORY:=Utilities
TITLE:=URL filter
DEPENDS:=+libuci +libnetfilter-queue +libnfnetlink +iptables-mod-nfqueue +libpthread
DEPENDS+=+libubox +ubus +conntrack +libcurl +cmph
DEPENDS+=+libubox +ubus +conntrack +libcurl +cmph +libjson-c
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
@ -87,12 +87,12 @@ define Package/parental-control/install
$(INSTALL_DATA) ./files/etc/uci-defaults/40-parental_control_update_bundle_path $(1)/etc/uci-defaults/
ifeq ($(CONFIG_PARENTAL_CONTROL_URLFILTERING),y)
$(INSTALL_DATA) ./files/etc/uci-defaults/50-parental_control_add_bundles $(1)/etc/uci-defaults/
$(CP) ./files/urlbundle_override.json $(1)/etc/parentalcontrol/
$(INSTALL_DATA) ./files/etc/parentalcontrol/url_bundles.json $(1)/etc/parentalcontrol/
$(INSTALL_DATA) ./files/etc/parentalcontrol/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_disable_urlfilter $(1)/etc/uci-defaults/
endif
$(INSTALL_DATA) ./files/etc/uci-defaults/50-parental_control_disable_urlfilter $(1)/etc/uci-defaults/
endef
$(eval $(call BuildPackage,parental-control))

View file

@ -0,0 +1,76 @@
{
"urlBundles": [
{
"url": "https://blocklistproject.github.io/Lists/alt-version/abuse-nl.txt",
"name": "Abuse"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/ads-nl.txt",
"name": "Ads"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/crypto-nl.txt",
"name": "Crypto"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/drugs-nl.txt",
"name": "Drugs"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/everything-nl.txt",
"name": "Everything else"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/facebook-nl.txt",
"name": "Facebook/Instagram"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/fraud-nl.txt",
"name": "Fraud"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/gambling-nl.txt",
"name": "Gambling"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/malware-nl.txt",
"name": "Malware"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/phishing-nl.txt",
"name": "Phishing"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/piracy-nl.txt",
"name": "Piracy"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/porn-nl.txt",
"name": "Porn"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/ransomware-nl.txt",
"name": "Ransomware"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/redirect-nl.txt",
"name": "Redirect"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/scam-nl.txt",
"name": "Scam"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/tiktok-nl.txt",
"name": "TikTok"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/torrent-nl.txt",
"name": "Torrent"
},
{
"url": "https://blocklistproject.github.io/Lists/alt-version/tracking-nl.txt",
"name": "Tracking"
}
]
}

View file

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

View file

@ -5,10 +5,3 @@
[ ! -f "/etc/config/parentalcontrol" ] && exit 0
uci -q set parentalcontrol.globals.urlfilter='0'
_delete_urlbundle() {
uci_remove parentalcontrol "${1}"
}
config_load "parentalcontrol"
config_foreach _delete_urlbundle urlbundle

View file

@ -1,10 +1,12 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
LOCKFILE="/tmp/sync_bundles.lock"
log_level="$(uci -q get parentalcontrol.globals.loglevel)"
log_level="${log_level:-1}"
URLBUNDLE_JSON="/etc/parentalcontrol/url_bundles.json"
DEBUG=0
log_err() {
@ -85,6 +87,7 @@ update_bundle_file_from_url() {
local success=0
while [ $attempt -le 3 ]; do
if curl -s -o "$temp_file" "$download_url"; then
log_info "Download successful for $download_url"
success=1
break
else
@ -218,24 +221,33 @@ cleanup_bundle_files() {
# Collect all download_url entries using config_foreach
local urls=""
get_download_url() {
local section="$1"
config_get url "$section" download_url
config_get_bool enable "$1" enable 1
local enable url
json_select "${2}"
json_get_var url url
json_get_var enable enable
enable="${enable:-1}"
if [ "${enable}" -eq 0 ]; then
# bundle is disabled
log_info "get_download_url: Skipping bundle ${name} not enabled"
json_select ..
return 0
fi
url="${url#file://}"
url="${url#https://}"
url="${url#http://}"
url="${url##*/}" # Get everything after the last '/'
urls="$urls $url"
json_select ..
}
config_load parentalcontrol
config_foreach get_download_url urlbundle
json_init
json_load_file "${URLBUNDLE_JSON}"
json_for_each_item get_download_url "urlBundles"
# Loop through all files in the directory
for file in "$dir"/*; do
@ -294,30 +306,29 @@ handle_filter_for_bundles() {
fi
check_bundle_exists() {
local enable download_url name cfg
local enable url name
cfg="$1"
config_get name "$cfg" name
config_get_bool enable "$cfg" enable 1
config_get download_url "$cfg" download_url
json_select "${2}"
json_get_var name name
json_get_var url url
json_get_var enable enable
enable="${enable:-1}"
if [ "${enable}" -eq 0 ]; then
log_info "Skipping bundle ${name} not enabled"
log_info "check_bundle_exists: Skipping bundle ${name} not enabled"
json_select ..
return 0
fi
handle_download_url "$download_url" "$name"
local exit_status=$?
if [ "$exit_status" -eq 1 ]; then
uci -q set "parentalcontrol.${cfg}.status"="Error"
else
uci -q set "parentalcontrol.${cfg}.status"=""
fi
uci commit parentalcontrol
handle_download_url "${url}" "${name}"
json_select ..
}
config_foreach check_bundle_exists urlbundle
json_init
json_load_file "${URLBUNDLE_JSON}"
json_for_each_item check_bundle_exists "urlBundles"
}
# Open file descriptor 200 for locking

View file

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=self-diagnostics
PKG_VERSION:=1.0.16
PKG_VERSION:=1.0.17
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0-only

View file

@ -1,39 +0,0 @@
#!/bin/sh
BIN="/usr/sbin/self-diagnostics"
. /usr/share/libubox/jshn.sh
case "$1" in
list)
echo '{"list": {}, "generate" : {"modules":"String"}}'
;;
call)
case "$2" in
generate)
read -t 1 -r input
local out
json_load "${input}"
json_get_var modules modules
if [ -z "${modules}" ]; then
out="$(${BIN} -j)"
else
out="$(${BIN} -j -m "${modules}")"
fi
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
list)
out="$(${BIN} -j -l)"
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
esac
;;
esac

View file

@ -1,11 +1,12 @@
#!/bin/sh
# shellcheck disable=SC1091
. /usr/share/libubox/jshn.sh
JSON_OUT=0
SPEC_DIR="/usr/share/self-diagnostics/spec"
SPEC_EXT_DIR="/etc/self-diagnostics/spec"
REPORT_PATH="/var/log/"
REPORT_PATH="/var/log"
REPORT_TEMP_DIR="$(mktemp -p ${REPORT_PATH} -d)"
REPORT_NAME="self-test-diagnostics"
VERBOSE=0
@ -17,18 +18,19 @@ log()
{
log_file="${REPORT_TEMP_DIR}/execution.log"
if [ "$VERBOSE" -eq 1 ]; then
logger -p debug -t $0 "$*"
logger -p debug -t "$0" "$*"
fi
echo "[$(date +%Y:%m:%d-%H:%M:%S)] $*" >> ${log_file}
echo "[$(date +%Y:%m:%d-%H:%M:%S)] $*" >> "${log_file}"
}
err_log()
{
log_file="${REPORT_TEMP_DIR}/execution.log"
logger -p err -t $0 "$*"
echo "[$(date +%Y:%m:%d-%H:%M:%S) ERR] $*" >> ${log_file}
logger -p err -t "$0" "$*"
echo "[$(date +%Y:%m:%d-%H:%M:%S) ERR] $*" >> "${log_file}"
}
# shellcheck disable=SC3043
generate_report()
{
local filename
@ -39,19 +41,19 @@ generate_report()
[ -f "${filename}.tar.gz" ] && rm "${filename}.tar.gz"
log "# Report generation completed #"
cd ${REPORT_TEMP_DIR} && {
cd "${REPORT_TEMP_DIR}" && {
filename="${filename}.tar"
tar -cf "${filename}" *
tar -cf "${filename}" ./*.log
}
if [ -n "$COMPOPTS" ]; then
gzip -${COMPOPTS} -f "${filename}"
gzip -"${COMPOPTS}" -f "${filename}"
filename="${filename}.gz"
fi
# Move logs if failed to generate tar
if [ ! -f "${filename}" ]; then
mv ${REPORT_TEMP_DIR}/*.log ${REPORT_PATH}/
mv "${REPORT_TEMP_DIR}"/*.log "${REPORT_PATH}"/
fi
if [ "${JSON_OUT}" -eq 1 ]; then
@ -78,7 +80,7 @@ cleanup()
{
if [ -d "${REPORT_TEMP_DIR}" ]; then
generate_report
rm -rf ${REPORT_TEMP_DIR}
rm -rf "${REPORT_TEMP_DIR}"
fi
}
@ -87,7 +89,7 @@ term_cleanup()
if [ -d "${REPORT_TEMP_DIR}" ]; then
err_log "Exiting due to TERM/INT signal"
generate_report
rm -rf ${REPORT_TEMP_DIR}
rm -rf "${REPORT_TEMP_DIR}"
fi
}
@ -111,8 +113,8 @@ help()
# Alias ubus to have a smaller 5-second timeout on all subsequent calls
ubus()
{
if [ "${1}" == "call" ]; then
if command ubus list $2 >/dev/null 2>&1; then
if [ "${1}" = "call" ]; then
if command ubus list >/dev/null 2>&1; then
command ubus "$@";
fi
else
@ -121,6 +123,7 @@ ubus()
}
# shellcheck disable=SC3043,SC3060,SC2034
config_load()
{
local temp
@ -157,7 +160,7 @@ config_load()
temp="$(uci -q get self-diagnostics.globals.report_name)"
[ -n "${temp}" ] && \
REPORT_NAME="$(eval echo ${temp})"
REPORT_NAME="$(eval echo "${temp}")"
REPORT_NAME="${REPORT_NAME//[ \/]/_}"
@ -170,9 +173,42 @@ config_load()
VERBOSE="${temp}"
}
# shellcheck disable=SC2129,SC3043
run_cmd()
{
local exec_timeout name cmd description
local export_path rc start_time end_time
exec_timeout="${1}"; shift
name="${1}"; shift
cmd="${1}"; shift
description="${*}"
start_time="$(date +%s)"
export_path="${REPORT_TEMP_DIR}/${name}.log"
log "Executing $cmd with timeout $exec_timeout"
echo "##########################################" >> "$export_path"
echo "# $description #">> "$export_path"
echo "# Exec [$cmd], timeout [$exec_timeout], start_time [$(date +%Y:%m:%d-%H:%M:%S)] #" >> "$export_path"
echo "##########################################" >> "$export_path"
eval timeout "${exec_timeout}" "$cmd" >> "$export_path" 2>&1
rc=$?
end_time="$(date +%s)"
echo "######## Execution done in [$((end_time - start_time)) ], return code $rc ######" >> "$export_path"
if [ "$rc" -eq 0 ]; then
log "Execution [$cmd] completed"
else
err_log "Execution [$cmd] Failed/Timeout with $rc exit code"
fi
echo >> "$export_path"
}
# shellcheck disable=SC2154,SC3060,SC3043
exec_spec()
{
local json_file exec_skip name timeout exec_timeout rc start_time end_time
local json_file exec_skip name timeout exec_timeout start_time end_time
start_time="$(date +%s)"
json_file="$1"
@ -189,20 +225,18 @@ exec_spec()
return 1
}
name="$(basename ${json_file})"
export_path="${REPORT_TEMP_DIR}/${name//.json/.log}"
name="$(basename "${json_file}")"
exec_skip=0
if json_is_a dependency array; then
json_select "dependency"
json_get_keys ekeys
for key in $ekeys; do
if json_is_a $key object; then
json_select $key
if json_is_a "$key" object; then
json_select "$key"
json_get_var type type
if [ "$type" == "file" ]; then
if [ "$type" = "file" ]; then
json_get_var file file
if [ ! -e "$file" ]; then
err_log "${json_file} has unmet file dependency $file"
@ -230,8 +264,8 @@ exec_spec()
json_get_keys keys
for key in $keys; do
if json_is_a $key object; then
json_select $key
if json_is_a "$key" object; then
json_select "${key}"
local cmd_skip file
cmd_skip=0
@ -240,13 +274,13 @@ exec_spec()
json_select "dependency"
json_get_keys d_keys
for d_key in $d_keys; do
if json_is_a $d_key object; then
json_select $d_key
for d_key in ${d_keys}; do
if json_is_a "${d_key}" object; then
json_select "${d_key}"
json_get_var type type
if [ "$type" == "file" ]; then
if [ "$type" = "file" ]; then
json_get_var file file
if [ ! -e $file ]; then
if [ ! -e "${file}" ]; then
json_select ..
cmd_skip=1
continue
@ -273,22 +307,7 @@ exec_spec()
else
exec_timeout=$TIMEOUT
fi
log "Executing $cmd with timeout $exec_timeout"
echo "##########################################" >> $export_path
echo "# $description #">> $export_path
echo "# Exec [$cmd], timeout [$exec_timeout] #" >> $export_path
echo "##########################################" >> $export_path
eval timeout ${exec_timeout} $cmd >> $export_path 2>&1
rc=$?
echo "######## Execution done return code $rc ######" >> $export_path
if [ "$rc" -eq 0 ]; then
log "Execution [$cmd] completed"
else
err_log "Execution [$cmd] Failed/Timeout with $rc exit code"
fi
echo >> $export_path
run_cmd "${exec_timeout}" "${name//.json/}" "${cmd}" "${description}"
json_select ..
fi
done
@ -300,20 +319,21 @@ exec_spec()
log ""
}
# shellcheck disable=SC3043,SC3060
generate_module()
{
local modules="${@}"
local modules="${*}"
local file module
config_load
log "Modules [$@]"
log "Modules [$*]"
for module in $modules; do
module="${module/.json/}"
file="$(find $SPEC_DIR -type f -name ${module}.json)"
file="$(find "${SPEC_DIR}" -type f -name "${module}.json")"
[ -z "$file" ] && {
[ -d "${SPEC_EXT_DIR}" ] && \
file="$(find $SPEC_EXT_DIR -type f -name ${module}.json)"
file="$(find "${SPEC_EXT_DIR}" -type f -name "${module}.json")"
}
[ -f "$file" ] && \
@ -321,15 +341,16 @@ generate_module()
done
}
# shellcheck disable=SC3043
generate_all()
{
local files
config_load
files="$(find ${SPEC_DIR} -type f -name *.json)"
files="$(find "${SPEC_DIR}" -type f -name "*.json")"
[ -d "${SPEC_EXT_DIR}" ] && \
files="${files} $(find $SPEC_EXT_DIR -type f -name *.json)"
files="${files} $(find "${SPEC_EXT_DIR}" -type f -name "*.json")"
[ -z "$files" ] && {
return 0
@ -341,6 +362,7 @@ generate_all()
}
# shellcheck disable=SC3060,SC3043
list_modules()
{
local files
@ -354,7 +376,7 @@ list_modules()
fi
cd ${SPEC_DIR} && {
for file in $(ls); do
for file in *.json; do
if [ "${JSON_OUT}" -eq 1 ]; then
json_add_string "" "${file/.json/}"
else
@ -372,7 +394,7 @@ list_modules()
fi
cd ${SPEC_EXT_DIR} && {
for file in $(ls); do
for file in *.json; do
if [ "${JSON_OUT}" -eq 1 ]; then
json_add_string "" "${file/.json/}"
else
@ -411,6 +433,10 @@ while getopts "m:hlj" opts; do
m)
modules="$modules ${OPTARG}"
;;
*)
help
exit
;;
esac
done
@ -422,5 +448,5 @@ fi
if [ -z "${modules}" ]; then
generate_all
else
generate_module ${modules}
generate_module "${modules}"
fi

View file

@ -54,18 +54,35 @@ int get_operate_args_SelfTest(char *refparam, struct dmctx *ctx, void *data, cha
int operate_Device_SelfTest(char *refparam, struct dmctx *ctx, void *data, char *instance, char *value, int action)
{
char cmd[512] = {0};
char output[512] = {0};
char buffer[512] = {0};
json_object *jobj = NULL;
const char *filename;
snprintf(cmd, sizeof(cmd), "sh %s", DIAG_BIN);
snprintf(cmd, sizeof(cmd), "sh %s -j 2>/dev/null", DIAG_BIN);
if (run_cmd(cmd, output, sizeof(output)) != 0)
if (run_cmd(cmd, buffer, sizeof(buffer)) != 0) {
BBFDM_ERR("Failed to run cmd[%s]", cmd);
goto err;
}
// truncate the new line char from end
remove_new_line(output);
if (!file_exists(output))
if (DM_STRLEN(buffer) == 0) {
BBFDM_ERR("No output from cmd[%s]", cmd);
goto err;
}
jobj = json_tokener_parse(buffer);
if (jobj == NULL) {
BBFDM_ERR("Fail to parse output[%s] in json", buffer);
goto err;
}
filename = dmjson_get_value(jobj, 1, "result");
snprintf(buffer, sizeof(buffer), "%s", filename);
json_object_put(jobj);
if (!file_exists(filename)) {
BBFDM_ERR("File [%s] does not exists or not accessible", filename);
goto err;
}
/* Add in dmmap_logmngr */
struct uci_section *s = get_origin_section_from_dmmap("dmmap_logmngr", "self_test", "self_test_log");
@ -74,7 +91,7 @@ int operate_Device_SelfTest(char *refparam, struct dmctx *ctx, void *data, char
dmuci_rename_section_by_section(s, "self_test_log");
}
dmuci_set_value_by_section(s, "log_file", output);
dmuci_set_value_by_section(s, "log_file", filename);
dmuci_commit_package_bbfdm("dmmap_logmngr");
/* Get self test log instance */

View file

@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-base
PKG_VERSION:=5.3.0
PKG_VERSION:=5.3.8
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=e282df789259a4ed1812e72a91e1b8d4373189db
PKG_SOURCE_VERSION:=d539ffdea1640b7cdeb55765c5737d8d7b6ab630
PKG_MIRROR_HASH:=skip
SULU_MOD:=core

View file

@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=5.3.0
PKG_VERSION:=5.3.8
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-builder.git
PKG_SOURCE_VERSION:=4cdc7d7cf4e566256be2608d1b70af5e489ec3bc
PKG_SOURCE_VERSION:=fae099019a4dc74e529a909c110966c1cf10b4c7
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/sulu-$(PKG_VERSION)/sulu-builder-$(PKG_SOURCE_VERSION)

View file

@ -126,6 +126,8 @@ create_mosquitto_acl() {
} >> "${SULU_ACL_FILE}"
fi
done
chown mosquitto:mosquitto "${SULU_ACL_FILE}"
chmod 640 "${SULU_ACL_FILE}"
}
get_sulu_roles() {

View file

@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-theme-genexis
PKG_VERSION:=5.3.0
PKG_VERSION:=5.3.8
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/sulu-theme-genexis

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sysmngr
PKG_VERSION:=1.1.3
PKG_VERSION:=1.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/sysmngr.git
PKG_SOURCE_VERSION:=2643356bde5bc45c79f46c7e8969a085d2f3e39d
PKG_SOURCE_VERSION:=9e5cbc3c00e4e8ab1678baf5d8ff369a9345da09
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@ -112,16 +112,6 @@ define Package/$(PKG_NAME)/install
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(INSTALL_BIN) ./files/etc/sysmngr/fwbank $(1)/etc/sysmngr/fwbank
ifeq ($(CONFIG_SYSMNGR_TEMPERATURE_STATUS),y)
$(INSTALL_DIR) $(1)/etc/sysmngr
ifeq ($(CONFIG_TARGET_brcmbca),y)
$(INSTALL_BIN) ./files/etc/sysmngr/broadcom.sh $(1)/etc/sysmngr/temperature.sh
else
$(INSTALL_BIN) ./files/etc/sysmngr/default.sh $(1)/etc/sysmngr/temperature.sh
endif
endif
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View file

@ -1,10 +1,19 @@
#!/bin/sh /etc/rc.common
START=15
START=12
STOP=8
USE_PROCD=1
PROG=/usr/sbin/sysmngr
RESET_REASON="/etc/sysmngr/reset_reason"
boot()
{
if [ -x "${RESET_REASON}" ]; then
eval ${RESET_REASON}
fi
start
}
start_service()
{

View file

@ -1,84 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
function get_wlan_temperature()
{
add_wlan_temp() {
local temp="$(wlctl -i "$1" phy_tempsense)"
[ -n "$temp" ] || temp='-274'
json_add_object
json_add_string "name" "wlan-$1"
json_add_int "temperature" "$temp"
json_close_object
}
config_load wireless
config_foreach add_wlan_temp wifi-device
}
function get_sfp_temperature()
{
local temp=""
local sfp="$(ubus call sfp.ddm get-temperature)"
json_load "$sfp"
json_get_var temp temperature
[ -n "$temp" ] || temp='-274'
echo "$temp"
}
function get_cpu_temperature()
{
local cpu="$(cat /sys/devices/virtual/thermal/thermal_zone0/temp 2>/dev/null)"
[ -n "$cpu" ] || cpu='-274000'
echo "${cpu:0:-3}"
}
function get_temperature_status()
{
local hasSfp="$(db -q get hw.board.hasSfp)"
json_init
json_add_array "status"
json_add_object
json_add_string "name" "cpu"
json_add_int "temperature" "$(get_cpu_temperature)"
json_close_object
[ -s /etc/config/wireless ] && get_wlan_temperature
[ "$hasSfp" = "1" ] && {
json_add_object
json_add_string "name" "sfp"
json_add_int "temperature" "$(get_sfp_temperature)"
json_close_object
}
json_close_array
json_dump
}
function dump_invalid()
{
json_init
json_add_string "fault" "invalid request"
json_dump
}
case "$1" in
status)
get_temperature_status
;;
*)
dump_invalid
;;
esac

View file

@ -1,62 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
function get_wlan_temperature()
{
:
}
function get_sfp_temperature()
{
echo "-274"
}
function get_cpu_temperature()
{
echo "-274"
}
function get_temperature_status()
{
local hasSfp="$(db -q get hw.board.hasSfp)"
json_init
json_add_array "status"
json_add_object
json_add_string "name" "cpu"
json_add_int "temperature" "$(get_cpu_temperature)"
json_close_object
[ -s /etc/config/wireless ] && get_wlan_temperature
[ "$hasSfp" = "1" ] && {
json_add_object
json_add_string "name" "sfp"
json_add_int "temperature" "$(get_sfp_temperature)"
json_close_object
}
json_close_array
json_dump
}
function dump_invalid()
{
json_init
json_add_string "fault" "invalid request"
json_dump
}
case "$1" in
status)
get_temperature_status
;;
*)
dump_invalid
;;
esac

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tr143
PKG_VERSION:=1.1.8
PKG_VERSION:=1.1.13
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/tr143d.git
PKG_SOURCE_VERSION:=5f8404e01e5e4478de528027fa12717c1a2256f3
PKG_SOURCE_VERSION:=be8ee7b6c52817914f66875d36061f2f62b80af8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@ -36,16 +36,20 @@ endef
MAKE_PATH:=src
define Package/tr143/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libtr143d.so $(1) netmngr 11
ifeq ($(CONFIG_TARGET_SUBTARGET),"an7581")
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/airoha/scripts/download $(1)
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/airoha/scripts/upload $(1)
$(INSTALL_DATA) ./files/an7581/etc/uci-defaults/* $(1)/etc/uci-defaults/
else
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/download $(1)
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/upload $(1)
$(INSTALL_DATA) ./files/other/etc/uci-defaults/* $(1)/etc/uci-defaults/
endif
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/traceroute $(1)
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/upload $(1)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/bbf_diag/ipping $(1)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/bbf_diag/serverselection $(1)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/bbf_diag/udpecho $(1)

View file

@ -0,0 +1,19 @@
#!/bin/sh
set_tr143_diagnostic_defaults() {
if [ ! -f /etc/bbfdm/dmmap/dmmap_diagnostics ]; then
touch /etc/bbfdm/dmmap/dmmap_diagnostics
fi
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download='download'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download.DefaultNumberOfConnections='4'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download.DownloadDiagnosticMaxConnections='8'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload='upload'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload.DefaultNumberOfConnections='1'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload.UploadDiagnosticMaxConnections='8'
uci -q -c /etc/bbfdm/dmmap commit dmmap_diagnostics
}
set_tr143_diagnostic_defaults

View file

@ -0,0 +1,19 @@
#!/bin/sh
set_tr143_diagnostic_defaults() {
if [ ! -f /etc/bbfdm/dmmap/dmmap_diagnostics ]; then
touch /etc/bbfdm/dmmap/dmmap_diagnostics
fi
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download='download'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download.DefaultNumberOfConnections='1'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.download.DownloadDiagnosticMaxConnections='1'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload='upload'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload.DefaultNumberOfConnections='1'
uci -q -c /etc/bbfdm/dmmap set dmmap_diagnostics.upload.UploadDiagnosticMaxConnections='1'
uci -q -c /etc/bbfdm/dmmap commit dmmap_diagnostics
}
set_tr143_diagnostic_defaults

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=userinterface
PKG_VERSION:=1.1.9
PKG_VERSION:=1.1.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/userinterface.git
PKG_SOURCE_VERSION:=52f8bff5941c5e91d7ed8eed33cf5adf364960c5
PKG_SOURCE_VERSION:=70733fcc20b099309a79f0404e6dd799d6b1005d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -6,16 +6,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usp-js
PKG_VERSION:=1.2.9
PKG_VERSION:=1.2.10
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/usp-js.git
PKG_SOURCE_VERSION:=31d652f91e8581d19840a8fdde1f87b0acca44ed
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=5faa585dff45ceba99f6e8a89a47b1ca34fa5bf3
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE

View file

@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidmd
PKG_VERSION:=1.4.4
PKG_VERSION:=1.4.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/wifidmd.git
PKG_SOURCE_VERSION:=b93c31a762234ab1bb4cd0a05b70b3e3f875bc5d
PKG_SOURCE_VERSION:=f53063a052b6538b70f83f5310c9deaaf69bdef9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View file

@ -107,6 +107,63 @@ wait_for_wifi_reload() {
return 1
}
###############################################################################
# mark_ap_instances_applied
#
# Description:
# Finalizes newly created WiFi AccessPoint instances in the dmmap WiFi
# configuration.
#
# An AccessPoint instance is considered a *new instance* when the option
# __is_new__ exists and its value is "1".
#
# New instance handling logic:
#
# • The AccessPoint's controller-side section name is obtained from
# the __section_name__ option (e.g., "mapcontroller.xxx" or "wireless.xxx").
#
# • For new instances where __section_name__ begins with "mapcontroller.":
# - Remove __is_new__
# - No additional actions required
#
# • For new instances where __section_name__ begins with "wireless.":
# - Set mapcontroller=0 (indicates mapcontroller reload is not required)
# - Remove __is_new__
#
# • For all other prefixes:
# - Remove __is_new__ only
#
# After all new instances are processed, the dmmap WiFi configuration is committed.
###############################################################################
mark_ap_instances_applied() {
for sec in $(uci -q -c /etc/bbfdm/dmmap show WiFi | grep "=AccessPoint" | cut -d. -f2 | cut -d= -f1); do
is_new=$(uci -q -c /etc/bbfdm/dmmap get WiFi.${sec}.__is_new__)
if [ "${is_new}" = "1" ]; then
config_sec_name=$(uci -q -c /etc/bbfdm/dmmap get WiFi.${sec}.__section_name__)
case "${config_sec_name}" in
mapcontroller.*)
# New mapcontroller AP instance — remove creation flag only
uci -q -c /etc/bbfdm/dmmap delete WiFi.${sec}.__is_new__
;;
wireless.*)
# New wireless AP instance — skip mapcontroller reload
mapcontroller=0
uci -q -c /etc/bbfdm/dmmap delete WiFi.${sec}.__is_new__
;;
*)
# Other AP instance types — remove creation flag only
uci -q -c /etc/bbfdm/dmmap delete WiFi.${sec}.__is_new__
;;
esac
fi
done
uci -q -c /etc/bbfdm/dmmap commit WiFi
}
# Define function to reload mapcontroller
reload_mapcontroller() {
pid=$(pidof mapcontroller)
@ -126,6 +183,9 @@ commit_wireless_config() {
wait_for_wifi_reload
}
# Finalize newly created AP AccessPoint instances
mark_ap_instances_applied
# Apply logic based on flags
if [ "$mapcontroller" -eq 1 ]; then
reload_mapcontroller