Compare commits

..

1 Commits

Author SHA1 Message Date
Vivek Kumar Dutta
9426567bc3 usp-js: remove dependency from obuspa test controller 2025-06-26 17:49:59 +05:30
63 changed files with 478 additions and 721 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.16.8
PKG_VERSION:=1.16.4
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=1615b42e405faceceac825f9c0387a58b90785ae
PKG_SOURCE_VERSION:=928443c5c89803e7d1ca95dfc2db1b0acaeb9380
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -10,10 +10,19 @@ log() {
echo "${@}"|logger -t bbf.config -p info
}
create_needed_directories()
{
mkdir -p /tmp/bbfdm/.cwmp
mkdir -p /tmp/bbfdm/.usp
mkdir -p /tmp/bbfdm/.bbfdm
}
start_service()
{
local log_level
create_needed_directories
config_load bbfdm
config_get log_level "reload_handler" log_level 2

View File

@@ -5,7 +5,6 @@ STOP=05
USE_PROCD=1
PROG=/usr/sbin/dm-service
DM_AGENT_PROG=/usr/sbin/dm-agent
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/services"
@@ -25,8 +24,7 @@ validate_bbfdm_micro_service_section()
_add_microservice()
{
local name path loglevel
local enable enable_core unified_daemon dm_framework
local daemon_prog
local enable enable_core unified_daemon
# Check enable from micro-service
path="${1}"
@@ -49,25 +47,14 @@ _add_microservice()
return 0
fi
json_get_var dm_framework dm-framework 0
if [ "${dm_framework}" -eq "1" ] || [ "${dm_framework}" = "true" ]; then
daemon_prog="${DM_AGENT_PROG}"
else
daemon_prog="${PROG}"
fi
json_select config
json_get_var loglevel loglevel 4
procd_open_instance "${name}"
procd_set_param command ${daemon_prog}
# Only add parameters for dm-service, not for dm-agent
if [ "${daemon_prog}" = "${PROG}" ]; then
procd_append_param command -m "${name}"
procd_append_param command -l "${loglevel}"
fi
procd_set_param command ${PROG}
procd_append_param command -m "${name}"
procd_append_param command -l "${loglevel}"
if [ "${enable_core}" -eq "1" ]; then
procd_set_param limits core="unlimited"

View File

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

17
bridgemngr/Config.in Normal file
View File

@@ -0,0 +1,17 @@
if PACKAGE_bridgemngr
config BRIDGEMNGR_BRIDGE_VLAN
bool "Use bridge-vlan backend"
help
Set this option to use bridge-vlan as backend for VLAN objects.
config BRIDGEMNGR_BRIDGE_VENDOR_EXT
bool "Use bridge BBF vendor extensions"
default y
help
Set this option to use bridge BBF vendor extensions.
config BRIDGEMNGR_BRIDGE_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endif

76
bridgemngr/Makefile Normal file
View File

@@ -0,0 +1,76 @@
#
# Copyright (C) 2020-2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
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:=36e6e8319a95dad3bccfe9f2d8a298b39c6ce86b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/bridgemngr
CATEGORY:=Utilities
TITLE:=Bridge Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/bridgemngr/description
Package to add Device.Bridging. data model support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
MAKE_PATH:=src
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_PREFIX)
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VLAN),y)
TARGET_CFLAGS += -DBRIDGE_VLAN_BACKEND
endif
define Package/bridgemngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME) 10
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME) 11
endif
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/bridging $(1)/etc/config/
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) ~/git/bridgemngr/* $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,bridgemngr))

View File

@@ -2,7 +2,6 @@
"daemon": {
"enable": "1",
"service_name": "bridgemngr",
"dm-framework": true,
"unified_daemon": false,
"services": [
{

View File

@@ -0,0 +1,31 @@
{
"json_plugin_version": 2,
"Device.Bridging.Bridge.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"{BBF_VENDOR_PREFIX}VLANFiltering": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"description": "Enable or disable VLAN Filtering on this bridge.",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "vlan_filtering"
}
]
}
}
}

View File

@@ -77,7 +77,6 @@ handle_ebtables_rule() {
}
start_service() {
ubus -t 30 wait_for network.device uci
config_load bridging
config_foreach handle_ebtables_chain chain
config_foreach handle_ebtables_rule rule

View File

@@ -1,207 +0,0 @@
#
# Copyright (c) 2023 Genexis B.V. All rights reserved.
# This Software and its content are protected by the Dutch Copyright Act
# ('Auteurswet'). All and any copying and distribution of the software
# and its content without authorization by Genexis B.V. is
# prohibited. The prohibition includes every form of reproduction and
# distribution.
#
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dm-framework
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/lcm/dm-framework.git
PKG_SOURCE_VERSION:=e9978675399c5fdc7233645a9192443e41c41904
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
# Build directories for each component
DATAMODELS_BUILD_DIR:=$(PKG_BUILD_DIR)/datamodels-build
DMAPI_BUILD_DIR:=$(PKG_BUILD_DIR)/dm-api-build
DMAGENT_BUILD_DIR:=$(PKG_BUILD_DIR)/dm-agent-build
include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
#
# Datamodels Package Definition
#
define Package/datamodels
SECTION:=utils
CATEGORY:=Genexis
TITLE:=dm-framework Datamodel
URL:=http://www.genexis.eu
PKG_LICENSE:=GENEXIS
PKG_LICENSE_URL:=
endef
define Package/datamodels/description
This package contains dm-framework datamodel.
endef
#
# DM-API Package Definition
#
define Package/dm-api
CATEGORY:=Genexis
TITLE:=dm-api
PKG_BUILD_DEPENDS:=datamodels
DEPENDS:=+libsqlite3 \
+libjson-c +libstdcpp +quickjs \
+libubus +libubox +libuci
URL:=http://www.genexis.eu
PKG_LICENSE:=GENEXIS
PKG_LICENSE_URL:=
endef
define Package/dm-api/description
This package contains api for the dm-framework
endef
#
# DM-Agent Package Definition
#
define Package/dm-agent
DEPENDS:=+dm-api +datamodels +libubox +libubus +ubus
CATEGORY:=Genexis
TITLE:=dm-framework agent
URL:=http://www.genexis.eu
PKG_LICENSE:=GENEXIS
PKG_LICENSE_URL:=
endef
define Package/dm-agent/description
This package contains dm-framework agent.
endef
#
# Build Preparation
#
define Build/Prepare
$(call Build/Prepare/Default)
# Prepare datamodels
mkdir -p $(DATAMODELS_BUILD_DIR)
$(CP) -rf $(PKG_BUILD_DIR)/datamodels/* $(DATAMODELS_BUILD_DIR)/
# Copy scripts from top-level scripts directory
mkdir -p $(DATAMODELS_BUILD_DIR)/scripts
$(CP) -rf $(PKG_BUILD_DIR)/scripts/* $(DATAMODELS_BUILD_DIR)/scripts/
cd $(DATAMODELS_BUILD_DIR); \
npm install better-sqlite3 quickjs && \
node ./scripts/json2code.js && \
node ./scripts/qjs-handlers-validate.js
# Prepare dm-api
mkdir -p $(DMAPI_BUILD_DIR)
$(CP) -rf $(PKG_BUILD_DIR)/dm-api/* $(DMAPI_BUILD_DIR)/
# Prepare dm-agent
mkdir -p $(DMAGENT_BUILD_DIR)
$(CP) -rf $(PKG_BUILD_DIR)/dm-agent/* $(DMAGENT_BUILD_DIR)/
endef
TARGET_CFLAGS += $(FPIC)
#
# Build Compilation
#
define Build/Compile
# Build datamodels first (dependency for others)
$(MAKE) -C $(DATAMODELS_BUILD_DIR)\
PROJECT_ROOT="$(DATAMODELS_BUILD_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(DATAMODELS_BUILD_DIR)" \
all
# Build dm-api (depends on datamodels)
$(MAKE) -C $(DMAPI_BUILD_DIR)\
PROJECT_ROOT="$(DMAPI_BUILD_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(DMAPI_BUILD_DIR)" \
all
# Build dm-agent (depends on both)
$(MAKE) -C $(DMAGENT_BUILD_DIR)\
PROJECT_ROOT="$(DMAGENT_BUILD_DIR)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
ARCH="$(LINUX_KARCH)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) -I$(DMAGENT_BUILD_DIR)" \
all
endef
#
# Development Installation (headers and libraries)
#
define Build/InstallDev
# Datamodels development files
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(DATAMODELS_BUILD_DIR)/dm.h $(1)/usr/include/
$(CP) $(DATAMODELS_BUILD_DIR)/libdm.so $(1)/usr/lib/
# DM-API development files - headers are now in dm-api/include/
$(CP) $(DMAPI_BUILD_DIR)/include/dm_types.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/include/dm_node.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/core/dm_api.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/core/dm_linker.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/core/dbmgr.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/include/dm_log.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/utils/dm_list.h $(1)/usr/include/
$(CP) $(DMAPI_BUILD_DIR)/libdmapi.so $(1)/usr/lib/
endef
#
# Package Installation - Datamodels
#
define Package/datamodels/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/lib/dmf_handlers
$(INSTALL_BIN) $(DATAMODELS_BUILD_DIR)/default.db $(1)/etc/bbfdm/default_dm.db
$(INSTALL_BIN) $(DATAMODELS_BUILD_DIR)/libdm.so $(1)/usr/lib/
# Copy handler files from datamodels directory (new structure)
# Copy .js files from root datamodels directory
( cd $(DATAMODELS_BUILD_DIR); \
find . -maxdepth 1 -type f -name '*.js' -not -path './.*' -exec $(INSTALL_BIN) {} $(1)/usr/lib/dmf_handlers/{} \; )
# Copy .js files from subdirectories, preserving folder structure (skip hidden files/folders)
( cd $(DATAMODELS_BUILD_DIR); \
find . -type d -mindepth 1 -not -path './.*' -not -path './scripts*' -exec $(INSTALL_DIR) $(1)/usr/lib/dmf_handlers/{} \; ; \
find . -type f -name '*.js' -mindepth 2 -not -path './.*' -not -path './scripts*' -exec $(INSTALL_BIN) {} $(1)/usr/lib/dmf_handlers/{} \; )
endef
#
# Package Installation - DM-API
#
define Package/dm-api/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/sbin/
$(INSTALL_BIN) $(DMAPI_BUILD_DIR)/libdmapi.so $(1)/usr/lib/
endef
#
# Package Installation - DM-Agent
#
define Package/dm-agent/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/bridging $(1)/etc/config/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) dm-agent
$(INSTALL_BIN) $(DMAGENT_BUILD_DIR)/dm-agent $(1)/usr/sbin
endef
# Register all three packages
$(eval $(call BuildPackage,datamodels))
$(eval $(call BuildPackage,dm-api))
$(eval $(call BuildPackage,dm-agent))

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.10
PKG_VERSION:=1.2.9
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE_VERSION:=8fb4093b4d26b3cb06603e110d424005e33cf5d6
PKG_SOURCE_VERSION:=5340cb31f759301f5aca3fd848fc3a63b0b4663f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip

View File

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

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.10
PKG_VERSION:=1.0.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=05ad0d6f7f21520eecd05429c14d1963de2a8463
PKG_SOURCE_VERSION:=77ad8425b73a3ac63f6160dc217635394ac87907
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,16 +5,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fluent-bit
PKG_VERSION:=4.0.4
PKG_VERSION:=4.0.2
PKG_RELEASE:=$(AUTORELEASE)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
PKG_SOURCE_VERSION=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit/archive/refs/tags/
PKG_HASH:=aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08
endif
PKG_LICENSE:=Apache-2.0
@@ -66,9 +65,9 @@ CMAKE_OPTIONS += \
-DFLB_IN_DISK=Yes \
-DFLB_IN_EXEC=Yes \
-DFLB_IN_HEAD=Yes \
-DFLB_IN_KMSG=Yes \
-DFLB_IN_TAIL=Yes \
-DFLB_IN_FORWARD=No \
-DFLB_IN_KMSG=No \
-DFLB_IN_PROC=No \
-DFLB_IN_RANDOM=No \
-DFLB_IN_SERIAL=No \

View File

@@ -9,10 +9,6 @@
tag syslog
path /dev/log
[INPUT]
name kmsg
tag kernel
[OUTPUT]
name null
match *

View File

@@ -1,32 +0,0 @@
diff --git a/plugins/in_kmsg/in_kmsg.c b/plugins/in_kmsg/in_kmsg.c
index cd5c4cd17..9524cf194 100644
--- a/plugins/in_kmsg/in_kmsg.c
+++ b/plugins/in_kmsg/in_kmsg.c
@@ -165,6 +165,15 @@ static inline int process_line(const char *line,
flb_time_set(&ts, ctx->boot_time.tv_sec + tv.tv_sec, tv.tv_usec * 1000);
+ /* Format syslog timestamp: "Jul 03 10:31:53" */
+ time_t real_time = ctx->boot_time.tv_sec + tv.tv_sec;
+ struct tm tm_info;
+ char syslog_ts[32];
+
+ localtime_r(&real_time, &tm_info);
+ strftime(syslog_ts, sizeof(syslog_ts), "%b %d %H:%M:%S", &tm_info);
+ int syslog_ts_len = strlen(syslog_ts);
+
/* Now process the human readable message */
p = strchr(p, ';');
if (!p) {
@@ -198,7 +207,10 @@ static inline int process_line(const char *line,
FLB_LOG_EVENT_UINT64_VALUE(tv.tv_usec),
FLB_LOG_EVENT_CSTRING_VALUE("msg"),
- FLB_LOG_EVENT_STRING_VALUE((char *) p, line_len - 1));
+ FLB_LOG_EVENT_STRING_VALUE((char *) p, line_len - 1),
+
+ FLB_LOG_EVENT_CSTRING_VALUE("syslog_ts"),
+ FLB_LOG_EVENT_STRING_VALUE(syslog_ts, syslog_ts_len));
}
if (ret == FLB_EVENT_ENCODER_SUCCESS) {

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.3.1
PKG_VERSION:=1.3.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3663ca4d001508509774115d6797b932f9ed4f69
PKG_SOURCE_VERSION:=91fb6b7857d6cb4fc6fd9a0ee26c4a055fb9d7c8
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.10
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:=1a842e0a3836f616973e6a92f0b0b6ca82ec39bb
PKG_SOURCE_VERSION:=070e812e1bfb81a35a95a9c16cc20e8ffa6e30e4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -88,7 +88,6 @@ 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

@@ -16,6 +16,79 @@ 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
@@ -138,6 +211,28 @@ 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

@@ -1,107 +0,0 @@
#!/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

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.7.33
PKG_VERSION:=8.7.26
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cb5b8f76c854b89607cd1750d3a4052ecd71ac9d
PKG_SOURCE_VERSION:=253c232ad892b1aaf8e7a7c007869d4287c26cdf
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
@@ -116,7 +116,7 @@ MAKE_PATH:=src
define Package/ieee1905/install
$(CP) ./files/etc $(1)/
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin

View File

@@ -1,23 +0,0 @@
{
"Device.IEEE1905.AL.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"{BBF_VENDOR_PREFIX}LocalOnlyMode": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"description": "Enable or disable interfaces from ieee1905.",
"datatype": "boolean"
}
}
}

View File

@@ -12,7 +12,6 @@ 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

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdsl
PKG_VERSION:=7.3.0
PKG_VERSION:=7.2.100
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
@@ -38,8 +38,10 @@ 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
TARGET_PLATFORM=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
# TARGET_PLATFORM=AIROHA
# TARGET_CFLAGS +=-DIOPSYS_AIROHA
endif
TARGET_CFLAGS += \

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.13.7
PKG_VERSION:=7.13.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=65a7cd643c07e3f0a11d5b20225d4d87b8646513
PKG_SOURCE_VERSION:=afa18ea6a47d8f518cacccf040623398da3abafd
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

@@ -29,6 +29,7 @@ define Package/logmngr
CATEGORY:=Utilities
TITLE:=Logging Manager
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit
DEPENDS+=+@LOGMNGR_BACKEND_FLUENTBIT:BUSYBOX_CONFIG_KLOGD
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
DEPENDS+=+LOGMNGR_LOGROTATE:logrotate
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
@@ -60,6 +61,8 @@ define Package/logmngr/install
$(INSTALL_DIR) $(1)/lib/logmngr
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) ./files/logmngr-klogd $(1)/usr/libexec/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) ./files/logread $(1)/sbin/
endif

View File

@@ -36,20 +36,6 @@ create_service_section() {
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
echo " hot_reload on" >> ${TMP_CONF_FILE}
echo "" >> ${TMP_CONF_FILE}
# Generate default input for kmsg
echo "[INPUT]" >> ${TMP_CONF_FILE}
echo " name kmsg" >> ${TMP_CONF_FILE}
echo " Tag KMSG" >> ${TMP_CONF_FILE}
echo "" >> ${TMP_CONF_FILE}
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
echo " name file" >> ${TMP_CONF_FILE}
echo " match KMSG" >> ${TMP_CONF_FILE}
echo " file /var/log/messages" >> ${TMP_CONF_FILE}
echo " format template" >> ${TMP_CONF_FILE}
echo " template {syslog_ts} {hostname} kernel: {msg}" >> ${TMP_CONF_FILE}
echo "" >> ${TMP_CONF_FILE}
}
create_input_section() {
@@ -354,4 +340,9 @@ logmngr_init() {
fi
procd_set_param respawn
procd_close_instance
procd_open_instance klogd
procd_set_param command /usr/libexec/logmngr-klogd
procd_set_param respawn
procd_close_instance
}

View File

@@ -0,0 +1,7 @@
#!/bin/sh
until [ -S /dev/log ]; do
sleep 1
done
exec /sbin/klogd -n

View File

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

View File

@@ -61,14 +61,6 @@ 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"
@@ -76,15 +68,14 @@ 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 $network_id > /dev/null 2>&1
wpa_cli -i "$ifname" disable_network 0 > /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 $network_id > /dev/null 2>&1
wpa_cli -i "$ifname" enable_network 0 > /dev/null 2>&1
# wpa_cli -i "$ifname" save_config > /dev/null 2>&1
fi
}

View File

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

View File

@@ -32,7 +32,7 @@ define Package/mcastmngr
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+!TARGET_brcmbca:mcproxy +!TARGET_brcmbca:sipcalc
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +!TARGET_brcmbca:kmod-ebt-igmpsnooping +!TARGET_brcmbca:kmod-ebt-mldsnooping
DEPENDS+=+!TARGET_brcmbca:ebtables-legacy +dm-agent
DEPENDS+=+!TARGET_brcmbca:ebtables-legacy +bridgemngr
endef
define Package/mcastmngr/description

View File

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

View File

@@ -1,43 +0,0 @@
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

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=10.0.4.1
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:=6b888812299de0d836a8dcf33bc899ec8ff16030
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

View File

@@ -1,8 +1,8 @@
Index: obuspa-10.0.4.0/src/core/device_controller.c
Index: obuspa-10.0.0.1/src/core/device_controller.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device_controller.c
+++ obuspa-10.0.4.0/src/core/device_controller.c
@@ -4214,6 +4214,14 @@ int ProcessControllerAdded(int cont_inst
--- obuspa-10.0.0.1.orig/src/core/device_controller.c
+++ obuspa-10.0.0.1/src/core/device_controller.c
@@ -4211,6 +4211,14 @@ int ProcessControllerAdded(int cont_inst
goto exit;
}
@@ -17,7 +17,7 @@ Index: obuspa-10.0.4.0/src/core/device_controller.c
// Exit if unable to get the object instance numbers present in this controller's MTP table
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
err = DATA_MODEL_GetInstances(path, &iv);
@@ -4255,14 +4263,6 @@ int ProcessControllerAdded(int cont_inst
@@ -4252,14 +4260,6 @@ int ProcessControllerAdded(int cont_inst
DEVICE_MQTT_UpdateControllerTopics();
#endif

View File

@@ -1,7 +1,7 @@
Index: obuspa-10.0.4.0/src/core/bdc_exec.c
Index: obuspa-10.0.0.1/src/core/bdc_exec.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/bdc_exec.c
+++ obuspa-10.0.4.0/src/core/bdc_exec.c
--- obuspa-10.0.0.1.orig/src/core/bdc_exec.c
+++ obuspa-10.0.0.1/src/core/bdc_exec.c
@@ -549,10 +549,25 @@ int StartSendingReport(bdc_connection_t
// Set the list of headers
@@ -30,10 +30,10 @@ Index: obuspa-10.0.4.0/src/core/bdc_exec.c
bc->headers = curl_slist_append(bc->headers, "Content-Encoding: gzip");
}
Index: obuspa-10.0.4.0/src/core/bdc_exec.h
Index: obuspa-10.0.0.1/src/core/bdc_exec.h
===================================================================
--- obuspa-10.0.4.0.orig/src/core/bdc_exec.h
+++ obuspa-10.0.4.0/src/core/bdc_exec.h
--- obuspa-10.0.0.1.orig/src/core/bdc_exec.h
+++ obuspa-10.0.0.1/src/core/bdc_exec.h
@@ -54,6 +54,8 @@ void BDC_EXEC_ScheduleExit(void);
#define BDC_FLAG_PUT 0x00000001 // If set, HTTP PUT should be used instead of HTTP POST when sending the report to the BDC server
#define BDC_FLAG_GZIP 0x00000002 // If set, the reports contants are Gzipped
@@ -45,10 +45,10 @@ Index: obuspa-10.0.4.0/src/core/bdc_exec.h
+#define BDC_FLAG_HEADER_PER_ROW 0x00000020 // If set, report format in header would be csv ParameterPerRow
+#define BDC_FLAG_HEADER_PER_COL 0x00000040 // If set, report format in header would be csv ParameterPerColumn
#endif
Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device_bulkdata.c
+++ obuspa-10.0.4.0/src/core/device_bulkdata.c
--- obuspa-10.0.0.1.orig/src/core/device_bulkdata.c
+++ obuspa-10.0.0.1/src/core/device_bulkdata.c
@@ -71,8 +71,12 @@
//------------------------------------------------------------------------------
@@ -95,7 +95,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
int Validate_BulkDataHTTPMethod(dm_req_t *req, char *value);
@@ -247,7 +259,8 @@ bulkdata_profile_t *bulkdata_find_free_p
bulkdata_profile_t *bulkdata_find_profile(int profile_id);
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map, combined_role_t *combined_role);
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
-char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp);
+char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
@@ -103,16 +103,16 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
int bulkdata_start_profile(bulkdata_profile_t *bp);
@@ -263,6 +276,8 @@ int bulkdata_platform_get_param_refs(int
int bulkdata_platform_calc_combined_role(int instance, combined_role_t **bulkdata_role, combined_role_t *combined_role, int *cont_instance);
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv, combined_role_t *combined_role);
@@ -262,6 +275,8 @@ char *bulkdata_platform_calc_uri_query_s
int bulkdata_platform_get_param_refs(int profile_id, param_ref_vector_t *param_refs);
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv);
void bulkdata_append_to_result_map(param_ref_entry_t *pr, group_get_vector_t *ggv, kv_vector_t *report_map);
+void append_string_to_target(char *str, char **output);
+char *csv_encode(const char *str);
int GetAuto_BulkDataController(dm_req_t *req, char *buf, int len);
#ifdef ENABLE_MQTT
int Validate_BulkDataMqttReference(dm_req_t *req, char *value);
@@ -301,7 +316,7 @@ int DEVICE_BULKDATA_Init(void)
void bulkdata_process_profile_mqtt(bulkdata_profile_t *bp);
@@ -299,7 +314,7 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_VendorParam_ReadOnly("Device.BulkData.Status", Get_BulkDataGlobalStatus, DM_STRING);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MinReportingInterval", BULKDATA_MINIMUM_REPORTING_INTERVAL_STR, DM_UINT);
err |= USP_REGISTER_Param_SupportedList("Device.BulkData.Protocols", bdc_protocols, NUM_ELEM(bdc_protocols));
@@ -121,7 +121,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
err |= USP_REGISTER_Param_Constant("Device.BulkData.ParameterWildCardSupported", "true", DM_BOOL);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfProfiles", BULKDATA_MAX_PROFILES_STR, DM_INT);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfParameterReferences", "-1", DM_INT);
@@ -316,7 +331,7 @@ int DEVICE_BULKDATA_Init(void)
@@ -314,7 +329,7 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Name", "", NULL, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.NumberOfRetainedFailedReports", "0", Validate_NumberOfRetainedFailedReports, NULL, DM_INT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Protocol", BULKDATA_PROTOCOL_HTTP, Validate_BulkDataProtocol, NULL, DM_STRING);
@@ -129,8 +129,8 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
+ err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.EncodingType", BULKDATA_ENCODING_TYPE_JSON, Validate_BulkDataEncodingType, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.ReportingInterval", "86400", Validate_BulkDataReportingInterval, NotifyChange_BulkDataReportingInterval, DM_UINT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.TimeReference", UNKNOWN_TIME_STR, NULL, NotifyChange_BulkDataTimeReference, DM_DATETIME);
err |= USP_REGISTER_DBParam_ReadOnlyAuto("Device.BulkData.Profile.{i}.Controller", GetAuto_BulkDataController, DM_STRING);
@@ -329,9 +344,16 @@ int DEVICE_BULKDATA_Init(void)
@@ -326,9 +341,16 @@ int DEVICE_BULKDATA_Init(void)
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Parameter.{i}.Reference", "", Validate_BulkDataReference, NULL, DM_STRING);
// Device.BulkData.Profile.{i}.JSONEncoding
@@ -148,7 +148,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
// Device.BulkData.Profile.{i}.HTTP
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.URL", "", NULL, NotifyChange_BulkDataURL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.Username", "", NULL, NULL, DM_STRING);
@@ -687,9 +709,10 @@ int Validate_BulkDataProtocol(dm_req_t *
@@ -614,9 +636,10 @@ int Validate_BulkDataProtocol(dm_req_t *
int Validate_BulkDataEncodingType(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
@@ -162,7 +162,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
return USP_ERR_INVALID_VALUE;
}
@@ -793,9 +816,36 @@ int Validate_BulkDataReference(dm_req_t
@@ -720,9 +743,36 @@ int Validate_BulkDataReference(dm_req_t
int Validate_BulkDataReportFormat(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
@@ -201,7 +201,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
return USP_ERR_INVALID_VALUE;
}
@@ -2151,6 +2201,14 @@ int bulkdata_platform_get_profile_contro
@@ -2053,6 +2103,14 @@ int bulkdata_platform_get_profile_contro
return err;
}
@@ -216,7 +216,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
// Exit if unable to get ReportTimestamp
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_timestamp, sizeof(ctrl_params->report_timestamp), 0);
@@ -2159,6 +2217,54 @@ int bulkdata_platform_get_profile_contro
@@ -2061,6 +2119,54 @@ int bulkdata_platform_get_profile_contro
return err;
}
@@ -271,7 +271,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
#ifdef ENABLE_MQTT
{
char protocol[32];
@@ -2492,7 +2598,7 @@ void bulkdata_process_profile_http(bulkd
@@ -2334,7 +2440,7 @@ void bulkdata_process_profile_http(bulkd
{
int err;
report_t *cur_report;
@@ -280,7 +280,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
profile_ctrl_params_t ctrl;
unsigned char *compressed_report;
int compressed_len;
@@ -2541,26 +2647,39 @@ void bulkdata_process_profile_http(bulkd
@@ -2373,10 +2479,23 @@ void bulkdata_process_profile_http(bulkd
}
// Exit if unable to generate the report
@@ -308,9 +308,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
return;
}
// Print out the JSON report, if debugging is enabled
- USP_LOG_Info("\nBULK DATA: %sing at time %s, to url=%s", ctrl.method, iso8601_cur_time(buf, sizeof(buf)), ctrl.url);
+ USP_LOG_Info("BULK DATA: %sing at time %s, to url=%s", ctrl.method, iso8601_cur_time(buf, sizeof(buf)), ctrl.url);
@@ -2385,14 +2504,14 @@ void bulkdata_process_profile_http(bulkd
USP_LOG_Info("BULK DATA: using compression method=%s", ctrl.compression);
if (enable_protocol_trace)
{
@@ -329,7 +327,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
}
// NOTE: From this point on, only the compressed_report exists
@@ -2590,8 +2709,15 @@ void bulkdata_process_profile_usp_event(
@@ -2422,8 +2541,15 @@ void bulkdata_process_profile_usp_event(
kv_vector_t event_args;
kv_pair_t kv;
report_t *cur_report;
@@ -343,11 +341,11 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
+ char escape_char[10];
+ char csv_format[20];
+ char row_timestamp[33];
combined_role_t *bulkdata_role;
combined_role_t combined_role;
int cont_instance;
@@ -2610,13 +2736,63 @@ void bulkdata_process_profile_usp_event(
return;
// Exit if the MTP has not been connected to successfully after bootup
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
@@ -2432,13 +2558,63 @@ void bulkdata_process_profile_usp_event(
goto exit;
}
- // Exit if unable to get ReportTimestamp
@@ -417,7 +415,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
// When sending via USP events, only one report is ever sent in each USP event
// So ensure all retained reports are removed. NOTE: Clearing the reports here is only necessary when switching protocol from HTTP to USP event, and where HTTP had some unsent reports
@@ -2634,11 +2810,17 @@ void bulkdata_process_profile_usp_event(
@@ -2456,11 +2632,17 @@ void bulkdata_process_profile_usp_event(
}
bp->num_retained_reports = 1;
@@ -438,7 +436,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
return;
}
@@ -2646,15 +2828,15 @@ void bulkdata_process_profile_usp_event(
@@ -2468,15 +2650,15 @@ void bulkdata_process_profile_usp_event(
// Construct event_args manually to avoid the overhead of a malloc and copy of the report in KV_VECTOR_Add()
kv.key = "Data";
@@ -448,7 +446,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
event_args.num_entries = 1;
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.Push!", bp->profile_id);
DEVICE_SUBSCRIPTION_ProcessAllEventCompleteSubscriptions(path, &event_args, cont_instance);
DEVICE_SUBSCRIPTION_ProcessAllEventCompleteSubscriptions(path, &event_args);
- // Free the report. No need to free the event_args as json_report is the only thing dynamically allocated in it
- free(json_report); // The report is not allocated via USP_MALLOC
@@ -457,7 +455,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
// From the point of view of this code, the report(s) have been successfully sent, so don't retain them
// NOTE: Sending of the reports successfully is delegated to the USP notification retry mechanism
@@ -2736,15 +2918,28 @@ void bulkdata_process_profile_mqtt(bulkd
@@ -2548,11 +2730,24 @@ void bulkdata_process_profile_mqtt(bulkd
}
// Exit if unable to generate the report
@@ -487,21 +485,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
}
// Print out the JSON report, if debugging is enabled
- USP_LOG_Debug("\nBULK DATA: Sending at time %s to MQTT topic %s", iso8601_cur_time(buf, sizeof(buf)), ctrl.mqtt_publish_topic);
+ USP_LOG_Debug("BULK DATA: Sending at time %s to MQTT topic %s", iso8601_cur_time(buf, sizeof(buf)), ctrl.mqtt_publish_topic);
if (enable_protocol_trace)
{
USP_LOG_String(kLogLevel_Info, kLogType_Protocol, report);
@@ -2939,7 +3134,7 @@ int bulkdata_reduce_to_alt_name(char *sp
/*********************************************************************//**
**
-** bulkdata_generate_json_report
+** bulkdata_generate_json_name_value_pair_report
**
** Generates a JSON name-value pair format report
** NOTE: The report contains all retained failed reports, as well as the current report
@@ -2951,7 +3146,7 @@ int bulkdata_reduce_to_alt_name(char *sp
@@ -2763,7 +2958,7 @@ int bulkdata_reduce_to_alt_name(char *sp
** \return pointer to NULL terminated dynamically allocated buffer containing the serialized report to send
**
**************************************************************************/
@@ -510,7 +494,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
{
JsonNode *top; // top of report
JsonNode *array; // array of reports (retained + current)
@@ -3056,6 +3251,483 @@ char *bulkdata_generate_json_report(bulk
@@ -2868,6 +3063,483 @@ char *bulkdata_generate_json_report(bulk
return result;
}
@@ -994,7 +978,7 @@ Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
/*********************************************************************//**
**
** bulkdata_compress_report
@@ -3259,6 +3931,20 @@ int bulkdata_schedule_sending_http_repor
@@ -3071,6 +3743,20 @@ int bulkdata_schedule_sending_http_repor
flags |= BDC_FLAG_DATE_HEADER;
}

View File

@@ -1,7 +1,7 @@
Index: obuspa-10.0.4.0/src/core/expr_vector.c
Index: obuspa-10.0.0.1/src/core/expr_vector.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/expr_vector.c
+++ obuspa-10.0.4.0/src/core/expr_vector.c
--- obuspa-10.0.0.1.orig/src/core/expr_vector.c
+++ obuspa-10.0.0.1/src/core/expr_vector.c
@@ -59,6 +59,7 @@ char *expr_op_2_str[kExprOp_Max] =
"<", // kExprOp_LessThan
">", // kExprOp_GreaterThan
@@ -10,7 +10,7 @@ Index: obuspa-10.0.4.0/src/core/expr_vector.c
};
@@ -487,6 +488,15 @@ char *SplitOnOperator(char *buf, expr_op
@@ -483,6 +484,15 @@ char *SplitOnOperator(char *buf, expr_op
*op = '\0';
return &op[2];
}
@@ -26,10 +26,10 @@ Index: obuspa-10.0.4.0/src/core/expr_vector.c
// Exit if found the "<" operator
op = strchr(buf, '<');
Index: obuspa-10.0.4.0/src/core/path_resolver.c
Index: obuspa-10.0.0.1/src/core/path_resolver.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/path_resolver.c
+++ obuspa-10.0.4.0/src/core/path_resolver.c
--- obuspa-10.0.0.1.orig/src/core/path_resolver.c
+++ obuspa-10.0.0.1/src/core/path_resolver.c
@@ -1088,7 +1088,7 @@ int ResolveUniqueKey(char *resolved, cha
char temp[MAX_DM_PATH];
bool is_match;
@@ -107,10 +107,10 @@ Index: obuspa-10.0.4.0/src/core/path_resolver.c
// Determine the function to call to perform the comparison
if (type_flags & (DM_INT | DM_UINT | DM_ULONG | DM_LONG | DM_DECIMAL))
{
Index: obuspa-10.0.4.0/src/include/usp_api.h
Index: obuspa-10.0.0.1/src/include/usp_api.h
===================================================================
--- obuspa-10.0.4.0.orig/src/include/usp_api.h
+++ obuspa-10.0.4.0/src/include/usp_api.h
--- obuspa-10.0.0.1.orig/src/include/usp_api.h
+++ obuspa-10.0.0.1/src/include/usp_api.h
@@ -106,6 +106,7 @@ typedef enum
kExprOp_LessThan, // '<'
kExprOp_GreaterThan, // '>'

View File

@@ -1,8 +1,8 @@
Index: obuspa-10.0.4.0/src/core/device.h
Index: obuspa-10.0.0.2/src/core/device.h
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device.h
+++ obuspa-10.0.4.0/src/core/device.h
@@ -310,6 +310,8 @@ void DEVICE_CTRUST_ApplyPermissionsToSub
--- obuspa-10.0.0.2.orig/src/core/device.h
+++ obuspa-10.0.0.2/src/core/device.h
@@ -305,6 +305,8 @@ void DEVICE_CTRUST_ApplyPermissionsToSub
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);
@@ -11,11 +11,11 @@ Index: obuspa-10.0.4.0/src/core/device.h
int DEVICE_REQUEST_Init(void);
int DEVICE_REQUEST_Add(char *path, char *command_key, int *instance);
void DEVICE_REQUEST_OperationComplete(int instance, int err_code, char *err_msg, kv_vector_t *output_args);
Index: obuspa-10.0.4.0/src/core/device_ctrust.c
Index: obuspa-10.0.0.2/src/core/device_ctrust.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device_ctrust.c
+++ obuspa-10.0.4.0/src/core/device_ctrust.c
@@ -236,6 +236,7 @@ credential_t *FindCredentialByCertInstan
--- obuspa-10.0.0.2.orig/src/core/device_ctrust.c
+++ obuspa-10.0.0.2/src/core/device_ctrust.c
@@ -235,6 +235,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);
@@ -23,7 +23,7 @@ Index: obuspa-10.0.4.0/src/core/device_ctrust.c
#ifndef REMOVE_DEVICE_SECURITY
int InitChallengeTable();
@@ -355,6 +356,10 @@ int DEVICE_CTRUST_Init(void)
@@ -354,6 +355,10 @@ int DEVICE_CTRUST_Init(void)
challenge_response_input_args, NUM_ELEM(challenge_response_input_args),
NULL, 0);
#endif
@@ -34,7 +34,7 @@ Index: obuspa-10.0.4.0/src/core/device_ctrust.c
// Exit if any errors occurred
if (err != USP_ERR_OK)
{
@@ -2939,3 +2944,139 @@ exit:
@@ -2908,3 +2913,139 @@ exit:
return err;
}
#endif // REMOVE_DEVICE_SECURITY

View File

@@ -1,8 +1,8 @@
Index: obuspa-10.0.4.0/src/core/device_bulkdata.c
Index: obuspa-10.0.0.1/src/core/device_bulkdata.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device_bulkdata.c
+++ obuspa-10.0.4.0/src/core/device_bulkdata.c
@@ -378,6 +378,8 @@ int DEVICE_BULKDATA_Init(void)
--- obuspa-10.0.0.1.orig/src/core/device_bulkdata.c
+++ obuspa-10.0.0.1/src/core/device_bulkdata.c
@@ -375,6 +375,8 @@ int DEVICE_BULKDATA_Init(void)
// Device.BulkData.Profile.{i}.MQTT
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.MQTT.Reference", "", Validate_BulkDataMqttReference, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.MQTT.PublishTopic", "", NULL, NULL, DM_STRING);

View File

@@ -1,8 +1,8 @@
Index: obuspa-10.0.4.0/src/core/device.h
Index: obuspa-10.0.0.2/src/core/device.h
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device.h
+++ obuspa-10.0.4.0/src/core/device.h
@@ -352,6 +352,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
--- obuspa-10.0.0.2.orig/src/core/device.h
+++ obuspa-10.0.0.2/src/core/device.h
@@ -346,6 +346,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void);
#endif
@@ -13,10 +13,10 @@ Index: obuspa-10.0.4.0/src/core/device.h
#ifndef REMOVE_USP_BROKER
int DEVICE_SUBSCRIPTION_RouteNotification(Usp__Msg *usp, int instance, char *subscribed_path);
bool DEVICE_SUBSCRIPTION_MarkVendorLayerSubs(int broker_instance, subs_notify_t notify_type, char *path, int group_id);
Index: obuspa-10.0.4.0/src/core/device_controller.c
Index: obuspa-10.0.0.2/src/core/device_controller.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/device_controller.c
+++ obuspa-10.0.4.0/src/core/device_controller.c
--- obuspa-10.0.0.2.orig/src/core/device_controller.c
+++ obuspa-10.0.0.2/src/core/device_controller.c
@@ -968,6 +968,78 @@ int DEVICE_CONTROLLER_QueueBinaryMessage
return USP_ERR_OK;
}
@@ -96,10 +96,10 @@ Index: obuspa-10.0.4.0/src/core/device_controller.c
/*********************************************************************//**
**
** DEVICE_CONTROLLER_IsMTPConfigured
Index: obuspa-10.0.4.0/src/core/msg_handler.c
Index: obuspa-10.0.0.2/src/core/msg_handler.c
===================================================================
--- obuspa-10.0.4.0.orig/src/core/msg_handler.c
+++ obuspa-10.0.4.0/src/core/msg_handler.c
--- obuspa-10.0.0.2.orig/src/core/msg_handler.c
+++ obuspa-10.0.0.2/src/core/msg_handler.c
@@ -1220,6 +1220,15 @@ int ValidateUspRecord(UspRecord__Record
usp_service_instance = USP_BROKER_GetUspServiceInstance(rec->from_id, 0);
#endif

View File

@@ -32,7 +32,7 @@ define Package/qosmngr
TITLE:=QoS Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
DEPENDS+=+kmod-ebt-vlantranslation +kmod-ebt-dscp2pbit +!(TARGET_brcmbca):ebtables-legacy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +dm-agent
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +bridgemngr
endef
define Package/qosmngr/description

2
quickjs/Makefile Executable file → Normal file
View File

@@ -15,8 +15,6 @@ PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -fPIC
define Package/quickjs
SECTION:=lang
CATEGORY:=Languages

View File

@@ -1,7 +1,7 @@
if PACKAGE_sshmngr
choice
prompt "Select backend for SSH management"
default SSHMNGR_BACKEND_OPENSSH_PAM
default SSHMNGR_BACKEND_OPENSSH
depends on PACKAGE_sshmngr
help
Select which backend daemon to use for SSH

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-base
PKG_VERSION:=5.0.4
PKG_VERSION:=5.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=47f52fb0fe4a9824590c8be9ee7b8985631c39cf
PKG_SOURCE_VERSION:=a010487ac81e41e9419ba74bc49b04f92fed7f05
PKG_MIRROR_HASH:=skip
SULU_MOD:=core

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=5.0.5
PKG_VERSION:=5.0.2
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-builder.git
PKG_SOURCE_VERSION:=ef5345ea0275e632f021dfcf3b62c8d09fbb5800
PKG_SOURCE_VERSION:=2353d2c365f870e1bd078d0b5985df85d7e4df50
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)
@@ -28,7 +28,7 @@ define Package/sulu/default
CATEGORY:=Utilities
SUBMENU:=SULU
TITLE:=SULU-CE
DEPENDS:=+mosquitto-auth-shadow +usermngr +jq +userinterface +obuspa
DEPENDS:=+mosquitto-auth-shadow +usermngr +jq +userinterface +obuspa +qrencode
EXTRA_DEPENDS:=nginx
endef

View File

@@ -33,6 +33,7 @@ start_service() {
log "Reloading related services"
/etc/sulu/sulu.sh -r
fi
/etc/sulu/sulu.sh -q
procd_close_instance
}

View File

@@ -215,6 +215,54 @@ function update_obuspa_config() {
fi
}
generate_qr_code() {
local NA="UNKNOWN"
local TMP="/tmp/wifi_qr.svg"
local QR="/sulu/assets/QR.svg"
local SSID=""
local KEY=""
which qrencode || return
local PASS="$(get_user_password)"
if [ -z "$PASS" ]; then
PASS="$NA"
fi
get_ssid_and_key() {
local sec="$1"
local filter_vid="$2"
if [ "$SSID" != "" ]; then
return
fi
config_get type "$sec" type
if [ "$type" != "fronthaul" ]; then
return
fi
if [ "$filter_vid" = "1" ]; then
config_get vid "$sec" vid
if [ "$vid" != "1" ]; then
return
fi
fi
config_get ssid "$sec" ssid
config_get key "$sec" key
SSID="$ssid"
KEY="$key"
}
config_load mapcontroller
config_foreach get_ssid_and_key "ap" "0"
if [ "$SSID" == "" ]; then
config_foreach get_ssid_and_key "ap" "1"
fi
SSID=${SSID:-$NA}
KEY=${KEY:-$NA}
PASS=${PASS:-$NA}
qrencode -t svg -m 0 -o "$TMP" "WIFI:S:$SSID;T:WPA;P:$KEY;;GNX:U:user;Q:$PASS;;"
if [ "$(sha256sum "$TMP" | cut -d ' ' -f1)" != "$(sha256sum "$QR" | cut -d ' ' -f1)" ]; then
mv "$TMP" "$QR"
else
rm "$TMP"
fi
}
function configure_sulu() {
_create_mosquitto_acl
update_obuspa_config
@@ -226,6 +274,10 @@ while getopts ":rq" opt; do
r)
_RESTART_SERVICES="1"
;;
q)
generate_qr_code
exit 0
;;
*)
slog "Invalid option: ${OPTARG}"
exit 1

View File

@@ -311,6 +311,10 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.IEEE1905.AL.",
"perm": [ "PERMIT_NONE" ]
},
{
"object": "Device.InterfaceStack.",
"perm": [
@@ -439,7 +443,9 @@
},
{
"object": "Device.SoftwareModules.",
"perm": ["PERMIT_NONE"]
"perm": [
"PERMIT_NONE"
]
},
{
"object": "Device.Users.",
@@ -510,8 +516,6 @@
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",

View File

@@ -310,6 +310,10 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.IEEE1905.AL.",
"perm": [ "PERMIT_NONE" ]
},
{
"object": "Device.InterfaceStack.",
"perm": [
@@ -438,7 +442,9 @@
},
{
"object": "Device.SoftwareModules.",
"perm": ["PERMIT_NONE"]
"perm": [
"PERMIT_NONE"
]
},
{
"object": "Device.Users.User.",
@@ -498,8 +504,6 @@
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-theme-genexis
PKG_VERSION:=5.0.3
PKG_VERSION:=5.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/sulu-theme-genexis
PKG_SOURCE_VERSION:=69b72c2e589a3f73db3cb219ee7f59ab40b1bf48
PKG_SOURCE_VERSION:=430cb9efb7efa61105a9e85cb7a5870cc043f3fe
PKG_MIRROR_HASH:=skip
include ../sulu-builder/sulu.mk

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=timemngr
PKG_VERSION:=1.1.11
PKG_VERSION:=1.1.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/timemngr.git
PKG_SOURCE_VERSION:=af7ae9ba1f88321294c35ef7afa5a64fa3b459fa
PKG_SOURCE_VERSION:=c0c15beee2b60925f51b8ba78be516d2f5536c65
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -81,7 +81,6 @@ endif
$(INSTALL_DATA) ./files/etc/config/time $(1)/etc/config/
ifeq ($(CONFIG_TIMEMNGR_NTPD),y)
$(CP) ./files/etc/timemngr/ntpd_config.sh $(1)/etc/timemngr/time.sh
$(CP) ./files/etc/timemngr/generate_supported_zones.sh $(1)/etc/timemngr/generate_supported_zones.sh
endif
endif

View File

@@ -2,4 +2,3 @@ config global 'global'
option enable '1'
option dst '1'
option loglevel '2'
option supported_zones_file '/etc/timemngr/supported_zones.json'

View File

@@ -4,13 +4,10 @@ START=20
STOP=01
. /etc/timemngr/time.sh
. /etc/timemngr/generate_supported_zones.sh
USE_PROCD=1
PROG_UBUS=/usr/sbin/timemngr
DEFAULT_SUPPORTED_ZONES_PATH="/etc/timemngr/supported_zones.json"
log() {
echo "${@}"|logger -t timemngr.init -p info
}
@@ -33,20 +30,6 @@ boot() {
else
sed -i '/#timemngr-dst/d' /etc/crontabs/root
fi
config_get file_path global supported_zones_file
# If option is not configured, use the default path
if [ -z "${file_path}" ]; then
file_path="${DEFAULT_SUPPORTED_ZONES_PATH}"
uci -q set time.global.supported_time_zone_file="${DEFAULT_SUPPORTED_ZONES_PATH}"
uci -q commit time
fi
# If the JSON file doesn't exist, generate it
if [ ! -f "${file_path}" ]; then
generate_supported_zones > "${file_path}"
fi
start
}

View File

@@ -1,75 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
# Default temporary file for timezone mapping
TMP_MAP="/tmp/timezone_map.txt"
# -----------------------------------------------------------------------------
# Function: generate_supported_zones
# Description: Generates a JSON array of supported zones in the format:
# [
# { "time_zone": "TZ_STRING", "zone_name": "Region/City,Region/City" },
# ...
# ]
# Output: Prints the JSON to stdout (caller can redirect to a file)
# -----------------------------------------------------------------------------
generate_supported_zones() {
: > "$TMP_MAP"
# Step 1: Collect zonename -> timezone mappings into TMP_MAP
for entry in /usr/share/zoneinfo/*; do
[ -d "$entry" ] || continue
region=$(basename "$entry")
for zonefile in "$entry"/*; do
[ -f "$zonefile" ] || continue
city=$(basename "$zonefile")
zonename="${region}/${city}"
tz_string=$(tail -n 1 "$zonefile" 2>/dev/null)
[ -n "$tz_string" ] && echo "$tz_string|$zonename" >> "$TMP_MAP"
done
done
# Step 2: Group zone names by tz_string and format to intermediate file
TMP_LINES="/tmp/timezone_lines.txt"
awk -F'|' '
{
tz = $1
zn = $2
if (tz in tzmap) {
tzmap[tz] = tzmap[tz] "," zn
} else {
tzmap[tz] = zn
}
}
END {
for (tz in tzmap) {
printf("TZSEP%sSEPZN%s\n", tz, tzmap[tz])
}
}
' "$TMP_MAP" > "$TMP_LINES"
# Step 3: Convert the grouped result to JSON output
json_init
json_add_array "supported_zones"
while IFS= read -r line; do
timezone=$(echo "$line" | sed -n 's/^TZSEP\(.*\)SEPZN.*/\1/p')
zonenames=$(echo "$line" | sed -n 's/^TZSEP.*SEPZN\(.*\)/\1/p')
[ -n "$timezone" ] || continue
json_add_object ""
json_add_string "time_zone" "$timezone"
json_add_string "zone_name" "$zonenames"
json_close_object
done < "$TMP_LINES"
json_close_array
json_dump
# Cleanup
rm -f "$TMP_MAP" "$TMP_LINES"
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tr143
PKG_VERSION:=1.1.4
PKG_VERSION:=1.1.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/tr143d.git
PKG_SOURCE_VERSION:=eb931f20de5c3da4aad46530e38ed54e0820b8e7
PKG_SOURCE_VERSION:=3220a7e88ffc2d2dbd5f729f36b4617ed3588c95
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -39,6 +39,8 @@ define Package/tr143/install
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libtr143d.so $(1) netmngr 11
ifeq ($(CONFIG_TARGET_SUBTARGET),"an7581")
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./airoha/etc/init.d/tr143 $(1)/etc/init.d/tr143
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/airoha/scripts/download $(1)
else
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/download $(1)

View File

@@ -0,0 +1,25 @@
#!/bin/sh /etc/rc.common
START=18
boot() {
if ! lsmod | grep -qe "^arht_timer "; then
status="-1"
if [ -f /lib/modules/5.4.55/arht_timer.ko ]; then
insmod /lib/modules/5.4.55/arht_timer.ko
status="$?"
fi
if [ "${status}" -ne 0 ]; then
return 0
fi
fi
if ! lsmod | grep -qe "^speedtest "; then
if [ -f /lib/modules/5.4.55/speedtest.ko ]; then
insmod /lib/modules/5.4.55/speedtest.ko
fi
fi
return 0
}

View File

@@ -28,12 +28,9 @@ define Package/usermngr
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
DEPENDS:=+shadow-utils +libopenssl +libuci +libubox +ubus
DEPENDS:= +shadow-utils +libopenssl +libuci +libubox +ubus
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +bbfdmd
DEPENDS+=+@BUSYBOX_CONFIG_ADDUSER +@BUSYBOX_CONFIG_DELUSER +@BUSYBOX_CONFIG_ADDGROUP +@BUSYBOX_CONFIG_DELGROUP +shadow-usermod
DEPENDS+=+@SHADOW_UTILS_USE_PAM
DEPENDS+=+linux-pam
DEPENDS+=+passwdqc
TITLE:=Package to add Device.Users. datamodel support
endef

View File

@@ -23,7 +23,7 @@ define Package/usp-js
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A JS library for USP(TR369) protocol
DEPENDS:=+quickjs +quickjs-websocket +@OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
DEPENDS:=+quickjs +quickjs-websocket
EXTRA_DEPENDS:=obuspa mosquitto-ssl
endef

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidmd
PKG_VERSION:=1.1.38
PKG_VERSION:=1.1.30
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/wifidmd.git
PKG_SOURCE_VERSION:=84fe14515d09380a45d75acf22329a13b9fed312
PKG_SOURCE_VERSION:=061975da0858a0ea8d182267f1753d9e2624ac6b
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:=wifimngr
PKG_VERSION:=17.7.6
PKG_VERSION:=17.7.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a441a9ece6cd279013cb52ce1c6cfb79b72d53f3
PKG_SOURCE_VERSION:=e9b13032b3574bbd341fa653276a65c9975bb5a5
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@genexis.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=xmppc
PKG_VERSION:=2.2.14
PKG_VERSION:=2.2.13
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/xmppc.git
PKG_SOURCE_VERSION:=8d2999134683153c0971791230373afabe204afe
PKG_SOURCE_VERSION:=5dc59fec17f9259ce40959b3fc0fc344322d5435
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif