Compare commits

..

47 Commits

Author SHA1 Message Date
Vivek Kumar Dutta
74f11c7b74 bbfdm: unified path for services 2024-04-10 09:44:47 +05:30
Mohd Husaam Mehdi
b10d8e0ec6 ponmngr: add Device.XPON. bbf object as a micro service
add Device.XPON. object as a bbf micro service instead of a plugin
as is done currently
2024-04-09 16:16:23 +05:30
Mohd Husaam Mehdi
1ec66d5732 mcastmngr: add IGMP and MLD vendor extensions as micro service
move IGMP and MLD vendor extensions from bbfdm to mcastmngr and
add them as a bbfdm micro service
2024-04-09 08:55:22 +00:00
Andreas Gnau
084691a29a voicemngr: Do not manually specify BCM lib paths
Do not explicitly specify BCM libary search paths. All binaries have a
correct RUNPATH set via feeds/broadcom/bcmkernel/bcm-toolchain.mk and
the Makefile has been updated to respect LDFLAGS. Setting LD_LIBARY_PATH
and specifiying custome library search paths is thus no longer
necessary.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-04-09 10:06:47 +02:00
Amin Ben Romdhane
d083dc041e ethmngr: 2.1.6 2024-04-09 09:39:36 +02:00
Amin Ben Romdhane
c0c30ca012 bbfdm: 1.7.28 2024-04-09 09:38:37 +02:00
Markus Gothe
65fbf9958d mcastmngr: Fix typo in Broadcom snooping. 2024-04-09 03:52:52 +00:00
Janusz Dziedzic
c0a6739981 sshmngr: set MaxAuthTries=10
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2024-04-09 03:50:46 +00:00
Yalu Zhang
81fdef1991 voicemngr-1.1.10: Fix a misleading log message 2024-04-08 16:13:00 +02:00
Janusz Dziedzic
dc0dbb29ff wifimngr: 17.0.17 2024-04-08 07:07:53 +00:00
Vivek Kumar Dutta
aa98c2fff5 bbfdm: move Device.QoS. to qosmngr 2024-04-06 12:53:39 +05:30
Vivek Kumar Dutta
5c935f03fe bbfdm: removed deprecated bbfdm_services.sh script
bbfdm_services.sh script had dependency on init script of package, which adds
the datamodel microserice.

This functionality now optimized and provided with 'bbfdm.mk' compile time
helper utility's 'BbfdmInstallMicroServiceInputFile' function.
2024-04-05 18:15:06 +05:30
Mohd Mehdi
b44e25c8ee sshmngr: remove bbfdm_add_service call from init script 2024-04-05 12:44:47 +00:00
Mohd Husaam Mehdi
822f5624b1 qosmngr: remove bbfdm_add_service call from init script 2024-04-05 17:22:25 +05:30
Vivek Kumar Dutta
60f2fdd7cb sulu: 3.1.59 2024-04-05 15:18:06 +05:30
Mohd Husaam Mehdi
6518f92be7 qosmngr: move Device.QoS. from bbfdm to qosmngr
qos.c and qos.h are now added as a bbfdm micro service
2024-04-05 12:47:08 +05:30
Jakob Olsson
f674d32c4e map-controller: 4.7.0.2 2024-04-04 12:57:41 +02:00
Vivek Kumar Dutta
e81c9f80cd bbfdm: Update OperatingChannelBandwidth for 320MHz 2024-04-04 11:50:53 +05:30
Vivek Kumar Dutta
e1fffddf85 obuspa: workaround to skip unreachable mqtt broker 2024-04-04 05:56:57 +00:00
Jakob Olsson
1ddc202fd0 ieee1905: 8.3.12 2024-04-03 18:04:44 +02:00
Janusz Dziedzic
9ed4bea12e libwifi: 7.4.54 2024-04-03 13:35:19 +00:00
Rahul Thakur
cebc62066b sshmngr: fix makefile
update install section to install files to correct paths
2024-04-03 11:30:25 +00:00
Jakob Olsson
ebba65c729 ieee1905: 8.3.11 2024-04-03 12:33:47 +02:00
Jakob Olsson
0373547a79 libwifi: 7.4.53 2024-04-03 11:33:01 +02:00
Jakob Olsson
1076ca4bd8 libwifi: 7.4.52 2024-04-03 11:16:15 +02:00
Vivek Kumar Dutta
fda5aed59c bbfdm: move Device.SSH. to sshmngr 2024-04-02 17:43:33 +05:30
Rahul Thakur
1393125ceb sshmngr: configurable backend
Make the backend daemon configurable, please note, still need
to disable dropbear as default in config and choose the backend
based on config in sshmngr
2024-04-02 16:30:49 +05:30
Mohd Husaam Mehdi
8557dbc1a7 sshmngr: add Device.SSH. support as a microservice 2024-04-01 23:16:57 +05:30
Jakob Olsson
c4ca2ec55c map-controller: 4.7.0.1 2024-03-28 12:52:26 +01:00
Jakob Olsson
3090636827 map-agent: 4.6.0.3 2024-03-28 12:50:17 +01:00
Jakob Olsson
804e2c1568 map-agent: 4.6.0.2 2024-03-27 14:04:50 +01:00
Jakob Olsson
1a2b31e159 wifimngr: 17.0.16 2024-03-27 14:04:44 +01:00
Jakob Olsson
37e930f183 libwifi: 7.4.51 2024-03-27 14:04:36 +01:00
Anjan Chanda
c2560af1e9 decollector: 4.4.0.1 2024-03-27 14:01:24 +01:00
Sukru Senli
1d24d5c4f7 ethmngr: add ruleng ethport recipe and generate deprecated ubus event 2024-03-26 14:09:18 +00:00
Jakob Olsson
ce5e7a3f61 map-agent: config: set enabled '1' as default 2024-03-26 14:08:53 +01:00
Sukru Senli
a1a7bd02f5 map-agent: map_genconfig: set full as default multiap_mode 2024-03-26 09:27:07 +00:00
Rahul Thakur
1068ffa0eb Update package libethernet
* cc72f5a libethernet: fix log spam
2024-03-26 12:52:06 +05:30
Vivek Kumar Dutta
628887b426 bbfdm: refresh instances with events 2024-03-26 11:06:28 +05:30
Erik Karlsson
ec7ba74900 testnet: avoid potential race condition
Instead of running a second instance of testnet once and in parallel
with the background task on interface up/down, the background task is
woken up. The avoids the potential for a race where under certain
circumstances a ubus event for internet up or down may never be sent.

Also remove unused include and add missing quotation.
2024-03-25 15:18:16 +00:00
Vivek Kumar Dutta
e383d1d145 sulu: 3.1.58 2024-03-25 20:22:03 +05:30
Amin Ben Romdhane
abe813b656 bbfdm: 1.7.22 2024-03-25 14:18:29 +01:00
Amin Ben Romdhane
d690cf904c bulkdata: Fix init.d permission issue 2024-03-25 14:15:42 +01:00
Jakob Olsson
fe82de8bd5 map-agent: 4.6.0.1 2024-03-25 11:37:43 +01:00
Amin Ben Romdhane
7a943dc49a bbfdm: 1.7.21 2024-03-22 13:32:36 +01:00
Arne Jonsson
bc2278e89b libqos: add support for Broadcom SDK bcm_5.04L.04p3 2024-03-22 12:08:47 +00:00
Jakob Olsson
2996f2313c libeasy: 7.4.4 2024-03-22 11:57:02 +01:00
78 changed files with 897 additions and 367 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.7.20
PKG_VERSION:=1.8.0
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=2b62491910498d68055891b552c6d7078ce2dbc7
PKG_SOURCE_VERSION:=f64c33163742fb1b379952ea8ae34dac677f5e57
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -107,7 +107,8 @@ define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/share/bbfdm/
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/usr/share/bbfdm/libbbfdm.so
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
@@ -117,13 +118,13 @@ define Package/libbbfdm/install
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/iopsys/libbbfdm_iopsys_ext.so)
endif
$(call BbfdmInstallCorePlugin, $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/iopsys/libbbfdm_iopsys_ext.so, $(1))
endif
ifeq ($(CONFIG_BBF_TR143),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(CP) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm/scripts/
$(LN) /usr/share/bbfdm/scripts/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endif
endef
@@ -143,7 +144,6 @@ define Package/bbfdmd/install
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
endef

View File

@@ -38,77 +38,3 @@ $ echo -n "Sup3rS3cur3Passw0rd" | sha512sum
bbfdm provides a helper utility [bbfdm.mk](./bbfdm.mk) to install datamodel plugins in bbfdm core or in microservice directory.
### Install datamodel DotSO/JSON plugin in bbfdm core
Utility to install the DotSO/JSON plugin in bbfdm core plugin path
```bash
# inputs:
# $1 => package install directory
# $2 => Plugin artifact
```
Example:
```make
define Package/$(PKG_NAME)/install
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
endef
```
### Install datamodel DotSO/JSON plugin in bbfdm core with priority
Its now possible to overwrite/remove core datamodel with plugin, so, if some datamodel objects/parameters are present in more than one plugin, order in which they loaded into memory becomes crucial, this Utility help to configure a priority order in which they gets loaded in memory.
```bash
# inputs:
# $1 => package install directory
# $2 => Priority of the installed plugin
# $3 => Plugin artifact
```
Example:
```make
define Package/$(PKG_NAME)/install
$(call BbfdmInstallPluginWithPriority,$(1),01,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
endef
```
> Note: Last loaded plugin gets the highest priority
### Install plugin into micro-service directory
Utility to install the plugin in datamodel microservice directory, ex. user wants to run a datamodel micro-service, it required to install the DotSO/JSON plugin into a non bbf core directory, this utility helps in installing the DotSO/JSON plugin in mentioned directory.
```bash
# inputs:
# $1 => package install directory with micro-service directory
# $2 => Plugin artifact
```
Example:
```make
define Package/$(PKG_NAME)/install
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
endef
```
### Install datamodel micro-service input file
Utility to install the datamodel plugin input file into the bbfdm micro-service directory, so that bbfdm auto start the datamodel micro-service before main bbfdm process.
```bash
# inputs:
# $1 => package install directory
# $2 => Microservice input.json path
```
Example:
```make
define Package/$(PKG_NAME)/install
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
endef
```

View File

@@ -2,56 +2,107 @@
# Copyright (C) 2023 IOPSYS
#
BBFDM_BASE_DM_PATH=/usr/share/bbfdm
# Utility to install the plugin in bbfdm core path
# inputs:
# $1 => package install directory
# $2 => Plugin artifact
# $1 => Plugin artifact
# $2 => package install directory
#
# Example:
# $(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
# $(call BbfdmInstallCorePlugin, ./files/etc/bbfdm/json/CWMPManagementServer.json, $(1))
#
define BbfdmInstallPlugin
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
define BbfdmInstallCorePlugin
$(INSTALL_DIR) $(strip $(2))$(BBFDM_BASE_DM_PATH)/plugins
$(INSTALL_DATA) $(1) $(strip $(2))$(BBFDM_BASE_DM_PATH)/plugins/
endef
# Utility to install the plugin in bbfdm core path with priority
# Utility to install the plugin in bbfdm core path with priority.
# Its now possible to overwrite/remove core datamodel with plugin, so, if some
# datamodel objects/parameters are present in more than one plugin, order in
# which they loaded into memory becomes crucial, this Utility help to configure
# a priority order in which they gets loaded in memory.
#
# inputs:
# $1 => package install directory
# $2 => Priority of the installed plugin
# $3 => Plugin artifact
# $1 => Plugin artifact
# $2 => package install directory
# $3 => Priority of the installed plugin
#
# Note:
# - Last loaded plugin gets the highest priority
#
# Example:
# $(call BbfdmInstallPluginWithPriority,$(1),01,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
# $(call BbfdmInstallCorePluginPriority, $(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json, $(1), 01)
#
define BbfdmInstallPluginWithPriority
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(3) $(1)/etc/bbfdm/plugins/$(2)_$(shell basename ${3})
endef
# Utility to install the plugin in datamodel microservice directory
# inputs:
# $1 => package install directory with micro-service directory
# $2 => Plugin artifact
#
# Example:
# $(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
#
define BbfdmInstallPluginInMicroservice
$(INSTALL_DIR) $(1)
$(INSTALL_DATA) $(2) $(1)/
define BbfdmInstallCorePluginPriority
$(INSTALL_DIR) $(strip $(2))$(BBFDM_BASE_DM_PATH)/plugins
$(INSTALL_DATA) $(1) $(strip $(2))$(BBFDM_BASE_DM_PATH)/plugins/$(strip $(3))_$(notdir $(strip $(1)))
endef
# Utility to install the datamodel plugin input file
# inputs:
# $1 => package install directory
# $2 => Microservice input.json path
# $1 => Microservice input.json path
# $2 => package install directory
#
# Example:
# $(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
# $(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/bulkdata/input.json, $(1))
#
define BbfdmInstallMicroServiceInputFile
$(INSTALL_DIR) $(1)/etc/bbfdm/micro_services
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/micro_services/$(PKG_NAME).json
define BbfdmInstallMicroServiceDMInputFile
$(INSTALL_DIR) $(strip $(2))/etc/bbfdm/micro_services
$(INSTALL_DATA) $(1) $(strip $(2))/etc/bbfdm/micro_services/$(PKG_NAME).json
endef
# Utility to install the main plugin in bbfdm service directory, ex.
# user wants to run a datamodel micro-service, it required to install the
# DotSO/JSON plugin into a bbf shared directory, this utility helps in
# installing the DotSO/JSON plugin in bbfdm shared directory.
#
# inputs:
# $1 => DotSo or Json plugin with complete path
# $2 => package install directory
#
# Note:
# - There could be only one main plugin file, so its bind to PKG_NAME
#
# Example:
# $(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/libcwmp.so, $(1))
#
define BbfdmInstallMicroServiceDM
$(INSTALL_DIR) $(strip $(2))$(BBFDM_BASE_DM_PATH)/micro_services
$(INSTALL_DATA) $(1) $(strip $(2))$(BBFDM_BASE_DM_PATH)/micro_services/$(strip $(PKG_NAME))$(suffix $(strip $(1)))
endef
# Utility to install the plugins and datamodel extensions inside a microservice plugin directory
# inputs:
# $1 => package install directory
# $2 => DotSo or Json datamodel plugin/extension with complete path
# $3 => service name
#
# Note:
# - Use the service_name/PKG_NAME of the service in which this has to run
#
# Example:
# $(call BbfdmInstallMicroServicePlugin, $(PKG_BUILD_DIR)/libxmpp.so, $(1), icwmp)
#
define BbfdmInstallMicroServicePlugin
$(INSTALL_DIR) $(strip $(2))$(BBFDM_BASE_DM_PATH)/micro_services/$(strip $(3))
$(INSTALL_DATA) $(1) $(strip $(2))$(BBFDM_BASE_DM_PATH)/micro_services/$(strip $(3))/
endef
# Deprecated functions errors
define BbfdmInstallPluginInMicroservice
$(error # BbfdmInstallPluginInMicroservice is deprecated, use BbfdmInstallMicroServiceDM or BbfdmInstallMicroServicePlugin #)
endef
define BbfdmInstallMicroServiceInputFile
$(error # BbfdmInstallMicroServiceInputFile deprecated, use BbfdmInstallMicroServiceDMInputFile #)
endef
define BbfdmInstallPlugin
$(error # BbfdmInstallPlugin deprecated, use BbfdmInstallCorePlugin #)
endef
define BbfdmInstallPluginWithPriority
$(error # BbfdmInstallPluginWithPriority deprecated, use BbfdmInstallCorePluginPriority #)
endef

View File

@@ -1,48 +0,0 @@
#!/bin/sh
BBFDMD="/usr/sbin/bbfdmd"
bbfdm_add_service()
{
local name path
name="${1}"
path="${2}"
if [ -z "${name}" -o -z "$path" ]; then
return 0;
fi
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
echo "Use of bbfdm_add_service deprecated, please use bbfdm micro_service uci"
}
bbfdm_stop_service()
{
local name
name="${1}"
if [ -z "${name}" ]; then
return 0;
fi
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
fi
}
usages()
{
echo "Usages $0: <OPTIONS>..."
echo
echo " -h show help"
echo " -k micro-service name to stop"
echo
}
while getopts "s:k:h" opts; do
case "$opts" in
h) usages; exit 0;;
k) bbfdm_stop_service "${OPTARG}";;
esac
done

View File

@@ -4,8 +4,8 @@
},
"input": {
"type": "DotSo",
"name": "/lib/libbbfdm.so",
"plugin_dir": "/etc/bbfdm/plugins"
"name": "/usr/share/bbfdm/libbbfdm.so",
"plugin_dir": "/usr/share/bbfdm/plugins"
},
"output": {
"type": "UBUS",

View File

@@ -36,22 +36,25 @@ validate_bbfdm_micro_service_section()
'enable_respawn:bool:true'
}
bbfdm_add_micro_service()
_add_microservice()
{
local name path cmd
local enable enable_core enable_respawn
validate_bbfdm_micro_service_section || {
log "Validation of micro_service section failed"
return 1;
}
[ "${enable}" -eq "0" ] && return 0
# Check enable from micro-service
path="${1}"
enable_respawn="${2}"
enable_core="${3}"
name="$(basename ${path})"
name="${name//.json}"
enable="$(jq '.daemon.enable//1' ${path})"
if [ "${enable}" -eq "0" ]; then
log "datamodel micro-service ${name} not enabled"
return 0
fi
json_init
json_add_string name "bbfdm.services"
json_add_object "instances"
@@ -59,7 +62,7 @@ bbfdm_add_micro_service()
json_add_array "command"
json_add_string "" "${PROG}"
json_add_string "" "-m"
json_add_string "" "${path}"
json_add_string "" "${name}"
json_close_array
if [ "${enable_core}" -eq "1" ]; then
@@ -84,30 +87,24 @@ bbfdm_add_micro_service()
ubus call service add "${cmd}"
}
_add_microservice()
{
local enable loglevel input_json name
name="${1}"
input_json="$(jq -r '.daemon.input.name' ${name})"
if [ -f "${input_json}" ]; then
bbfdm_add_micro_service "${name}"
else
log "Input json [${input_json}] does not defined/present"
fi
}
configure_bbfdm_micro_services()
{
local enable enable_core enable_respawn
validate_bbfdm_micro_service_section || {
log "Validation of micro_service section failed"
return 1;
}
[ "${enable}" -eq "0" ] && return 0
if [ -d "${BBFDM_MICROSERVICE_DIR}" ]; then
FILES="$(ls -1 ${BBFDM_MICROSERVICE_DIR}/*.json)"
for service in $FILES;
do
[ -e "$service" ] || continue
_add_microservice $service
_add_microservice $service "${enable_respawn}" "${enable_core}"
done
fi
ubus call service state '{"name":"bbfdm.services", "spawn":true}'

View File

@@ -1,6 +1,6 @@
#!/bin/sh
UNIFIED_PATH="/etc/bbfdm/plugins/"
UNIFIED_PATH="/usr/share/bbfdm/plugins/"
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/json/*.json`; do

View File

@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.8
PKG_VERSION:=2.1.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -50,10 +50,10 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
$(INSTALL_DATA) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/uci-defaults/95-bulkdata-translation-options $(1)/etc/uci-defaults/
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/bulkdata,$(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bulkdata/input.json)
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/bulkdata/input.json, $(1))
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "bulkdata",
"config": {
"loglevel": "1"
},
"input": {
"type": "JSON",
"name": "/etc/bulkdata/bulkdata.json"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -49,17 +49,15 @@ endef
endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/ddnsmngr
$(INSTALL_DIR) $(1)/etc/ddnsmngr/ddns
$(INSTALL_DIR) $(1)/etc/ddnsmngr/servers
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ddnsmngr
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/ddnsmngr,$(PKG_BUILD_DIR)/src/libddnsmngr.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/ddnsmngr/input.json)
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/src/libddnsmngr.so, $(1), $(PKG_NAME))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/ddnsmngr/input.json, $(1))
$(INSTALL_DATA) ./files/etc/config/ddnsmngr $(1)/etc/config/ddnsmngr
$(INSTALL_BIN) ./files/etc/uci-defaults/01-ddns-config-migrate $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/init.d/ddnsmngr $(1)/etc/init.d/ddnsmngr

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "ddnsmngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/ddnsmngr/libddnsmngr.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.2.1.4
PKG_VERSION:=4.4.0.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c18d0f411eea6974fc99dd9e717269087e75e874
PKG_SOURCE_VERSION:=a42af441d0efc315714305d6b944e6b09a29b64d
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -42,9 +42,8 @@ endef
endif
define Package/dnsmngr/install
$(INSTALL_DIR) $(1)/etc/dnsmngr
$(CP) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1)/etc/dnsmngr
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/dnsmngr/input.json)
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/src/libdnsmngr.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/dnsmngr/input.json, $(1))
endef
$(eval $(call BuildPackage,dnsmngr))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "dnsmngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/dnsmngr/libdnsmngr.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -77,7 +77,7 @@ ifeq ($(CONFIG_TARGET_brcmbca),y)
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
$(CP) $(PKG_BUILD_DIR)/libbbfdsl.so $(1)/etc/dsl/
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/libbbfdsl.so, $(1))
endef
$(eval $(call BuildPackage,dslmngr))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "dslmngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/dsl/libbbfdsl.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.5
PKG_VERSION:=2.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=53d31f7027f759a36f47c026c50eaee2888619cc
PKG_SOURCE_VERSION:=b1ca967248cc5c7b852e8a904134e0bed451a116
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -69,9 +69,9 @@ ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
$(CP) $(PKG_BUILD_DIR)/libbbfethernet.so $(1)/etc/ethmngr
$(CP) $(PKG_BUILD_DIR)/libbbfethernetmacvlan.so $(1)/etc/ethmngr/plugins
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bbfdm/micro_services/ethernet.json)
$(call BbfdmInstallMicroServiceDM,$(PKG_BUILD_DIR)/libbbfethernet.so, $(1))
$(call BbfdmInstallMicroServicePlugin, $(PKG_BUILD_DIR)/libbbfethernetmacvlan.so, $(1), $(PKG_NAME))
$(call BbfdmInstallMicroServiceDMInputFile,./files/etc/bbfdm/micro_services/ethernet.json, $(1))
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -1,13 +1,9 @@
{
"daemon": {
"service_name": "ethmngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/ethmngr/libbbfethernet.so",
"plugin_dir": "/etc/ethmngr/plugins"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -0,0 +1,23 @@
#!/bin/sh
[ -n "$PORT" -a -n "$LINK" ] || exit 0
case "$PORT" in
# do not generate ethport ubus event
# for wifi, dsl and brige devices
wl*|wds*|atm*|ptm*|br-*)
exit 0
;;
esac
speed=0
duplex=full
if [ "$LINK" = "up" ]; then
devspeed="$(ubus -t 2 call network.device status "{\"name\":\"$PORT\"}" | jsonfilter -e @.speed)"
speed=${devspeed:0:-1}
duplex=${devspeed:0-1}
[ "$duplex" == "H" ] && duplex="half" || duplex="full"
fi
ubus send ethport "{\"ifname\":\"$PORT\",\"link\":\"$LINK\",\"speed\":\"$speed\",\"duplex\":\"$duplex\"}"

View File

@@ -0,0 +1,2 @@
uci -q set ruleng.ethport=rule
uci -q set ruleng.ethport.recipe='/etc/ruleng/ethport.json'

View File

@@ -22,6 +22,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/hostmngr
@@ -58,13 +59,18 @@ endif
MAKE_PATH:=src
define Package/hostmngr/install
$(CP) ./files/etc $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/hostmngr/
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
$(INSTALL_DIR) $(1)/usr/share/hostmngr
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
$(INSTALL_BIN) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
$(INSTALL_DATA) ./files/etc/config/hosts $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/init.d/hostmngr $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
$(call BbfdmInstallMicroServiceDMInputFile, ./files/bbfdm/input.json, $(1))
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so, $(1))
endef
ifeq ($(LOCAL_DEV),1)

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "hostmngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/hostmngr/libhostmngr.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -59,9 +59,9 @@ define Package/icwmp/install
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/icwmpd,$(PKG_BUILD_DIR)/libcwmpdm.so)
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/icwmpd/plugins,./files/etc/bbfdm/json/CWMPManagementServer.json)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/icwmpd/input.json)
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/libcwmpdm.so, $(1))
$(call BbfdmInstallMicroServicePlugin, ./files/etc/bbfdm/json/CWMPManagementServer.json, $(1), icwmp)
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/icwmpd/input.json, $(1))
endef
$(eval $(call BuildPackage,icwmp))

View File

@@ -1,13 +1,9 @@
{
"daemon": {
"service_name": "icwmp",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/icwmpd/libcwmpdm.so",
"plugin_dir": "/etc/icwmpd/plugins/"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.3.10
PKG_VERSION:=8.3.12
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=dc1f5af80bbea7bd03b8f87184636efd5373cd7e
PKG_SOURCE_VERSION:=4f94b73ac3e9472bbcd84c6c8f91118aa6ca9f6b
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

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libeasy
PKG_VERSION:=7.4.3
PKG_VERSION:=7.4.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ba80dcc51056772c906cac8022a2537b74959e6a
PKG_SOURCE_VERSION:=7a9e69c413c2d0b950a1a2e0f2964439fb797f48
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libeasy.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.108
PKG_VERSION:=7.2.109
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=df0181ae4e8391901a8005ffa17ff28fbce8ec64
PKG_SOURCE_VERSION:=cc72f5ab0171cd0fc29bb48dafff6751ab2f0d9c
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libethernet.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -10,7 +10,7 @@ PKG_VERSION:=7.2.106
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=02dba6571fddd9b4c5b4b671270604b4c0faf9ae
PKG_SOURCE_VERSION:=0e54d7a992c506d6302d7cc32a39eb64e9b2c42e
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.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:=libwifi
PKG_VERSION:=7.4.50
PKG_VERSION:=7.4.54
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=665fd6fd51d2676b4384938e695157f9a2e937b4
PKG_SOURCE_VERSION:=89db12dd11025fd4b6d7dfa3ec497a4b9b2d1ab8
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.6.0.0
PKG_VERSION:=4.6.0.3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=34314514affb47a11b85d4cfe30211fa7a94abff
PKG_SOURCE_VERSION:=4ecb56d8069896c1ca555e2acdbac94126002add
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -1,5 +1,5 @@
config agent 'agent'
option enabled '0'
option enabled '1'
option debug '0'
option profile '3'
option al_bridge 'br-lan'

View File

@@ -5,8 +5,8 @@
generate_mapagent_config=0
generate_wireless_sta_config=0
network_mode="$(fw_printenv -n netmode)"
multiap_mode="$(fw_printenv -n multiap_mode)"
network_mode="$(fw_printenv -n netmode)" # default is layer3
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
is_airoha() {
[ -f /proc/device-tree/compatible ] || return
@@ -175,16 +175,15 @@ map_genconf () {
elif [ "$multiap_mode" == "auto" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=0
elif [ "$multiap_mode" == "full" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
elif [ "$multiap_mode" == "none" ]; then
uci set mapagent.agent.enabled="0"
else # default to full
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
fi
uci -q commit mapagent
fi
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.7.0.0
PKG_VERSION:=4.7.0.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=cf047cf3b9b545f36a8e4c4e32da784253fb0853
PKG_SOURCE_VERSION:=433218c312cde4e72e77de307172e899fa0f58a1
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0

View File

@@ -1,36 +1,48 @@
#
# Copyright (C) 2013-2020 iopsys
# Copyright (C) 2013-2024 iopsys
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.1.0
PKG_VERSION:=1.2.0
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/hal/mcastmngr.git
PKG_SOURCE_VERSION:=5d5b42f5b46457ed938765f29994471485e7de81
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
MAKE_PATH:=bbf_plugin
define Package/mcastmngr
CATEGORY:=Utilities
TITLE:=Multicast Proxy/Snooping Manager
DEPENDS:=+!TARGET_brcmbca:mcproxy
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
endef
define Package/mcastmngr/description
Configures IGMP and MLD snooping and proxy
endef
#define Build/Prepare
# $(CP) -rf ./mcastmngr/* $(PKG_BUILD_DIR)/
#endef
define Build/Compile
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/mcastmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
define Package/mcastmngr/install
$(CP) ./files/common/* $(1)/
@@ -39,6 +51,8 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else
$(CP) ./files/linux/* $(1)/
endif
$(call BbfdmInstallPluginInMicroservice, $(1)/etc/mcastmngr,$(PKG_BUILD_DIR)/bbf_plugin/libmcast_bbf.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/common/etc/mcastmngr/input.json)
endef
$(eval $(call BuildPackage,mcastmngr))

View File

@@ -49,7 +49,7 @@ config_snooping_upstream_interface() {
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && $snooping_upstream_intf="$dev" && break
ifconfig $dev | grep RUNNING >/dev/null && snooping_upstream_intf="$dev" && break
fi
;;
esac

View File

@@ -0,0 +1,14 @@
{
"daemon": {
"input": {
"type": "DotSo",
"name": "/etc/mcastmngr/libmcast_bbf.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",
"root_obj": "bbfdm",
"multiple_objects": ["X_IOPSYS_EU_IGMP","X_IOPSYS_EU_MLD"]
}
}
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=7.0.5.19
PKG_VERSION:=7.0.5.20
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=83e4608de2dd316efbe336b93dab90aa47a2b4a6
PKG_SOURCE_VERSION:=8706169718211848d85af9aa6bcdb7b97db2b9b8
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -108,7 +108,7 @@ define Package/obuspa/install
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/02-obuspa-dhcp-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/USPAgent.json)
$(call BbfdmInstallCorePlugin, ./files/etc/bbfdm/json/USPAgent.json, $(1))
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)
$(INSTALL_BIN) ./files/etc/init.d/usptest $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/uci-defaults/55-test-usp-controller $(1)/etc/uci-defaults/

View File

@@ -0,0 +1,95 @@
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 04a1a9c..00b95a4 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -2124,6 +2124,75 @@ exit:
}
}
+static int _check_host_rechability(CURL *handle, curl_infotype type, char *data, size_t size, void *userp)
+{
+ bool *palive = (bool *)userp;
+
+ USP_ASSERT(palive != NULL);
+ switch(type) {
+ case CURLINFO_HEADER_OUT:
+ case CURLINFO_HEADER_IN:
+ *palive = true;
+ break;
+ case CURLINFO_TEXT:
+ {
+ USP_LOG_Debug("CURL DATA:: [%s]", data);
+ if (strstr(data, "Connected to ") != NULL) {
+ *palive = true;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+int check_mqtt_host_reachability(mqtt_client_t *client)
+{
+ CURL *curl;
+ mqtt_conn_params_t *cparam = &client->conn_params;
+ char buffer[128] = {0};
+ int ret = USP_ERR_INTERNAL_ERROR;
+ bool is_alive = false;
+
+ curl = curl_easy_init();
+ if(curl) {
+ USP_SNPRINTF(buffer, 128, "mqtt://%s:%d", cparam->host, cparam->port);
+ curl_easy_setopt(curl, CURLOPT_URL, buffer);
+
+ if (strlen(cparam->username) > 0) {
+ curl_easy_setopt(curl, CURLOPT_USERNAME, cparam->username);
+ }
+
+ if (strlen(cparam->password) > 0) {
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, cparam->password);
+ }
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &is_alive);
+ curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, _check_host_rechability);
+
+ /* complete within 2 seconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2L);
+
+ ret = curl_easy_perform(curl);
+ /* Check for errors */
+ if(ret == CURLE_OK || ret == CURLE_URL_MALFORMAT || is_alive == true) {
+ USP_LOG_Debug("CURL MQTT host %s, ret %d, alive %d ...", buffer, ret, is_alive);
+ ret = USP_ERR_OK;
+ } else {
+ USP_LOG_Info("# CURL MQTT host %s unreachable: %d=>%s ...", buffer, ret, curl_easy_strerror(ret));
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return ret;
+}
+
/*********************************************************************//**
**
** PerformMqttClientConnect
@@ -2193,6 +2262,14 @@ int PerformMqttClientConnect(mqtt_client_t *client)
keep_alive = 5;
}
+ // Below function is a workaround to check the host reachability with a timeout
+ // mosquitto_connect_* API block the thread for 2 mins if host is not reachable,
+ // which halts other clients connectivity
+ err = check_mqtt_host_reachability(client);
+ if (err != USP_ERR_OK) {
+ err = USP_ERR_INTERNAL_ERROR;
+ goto exit;
+ }
// Release the access mutex temporarily whilst performing the connect call
// We do this to prevent the data model thread from potentially being blocked, whilst the connect call is taking place
OS_UTILS_UnlockMutex(&mqtt_access_mutex);

View File

@@ -20,6 +20,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/periodicstats
SECTION:=utils
@@ -39,12 +40,14 @@ endef
endif
define Package/periodicstats/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/periodicstatsd $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/periodicstats
$(CP) $(PKG_BUILD_DIR)/bbf_plugin/libperiodicstats.so $(1)/etc/periodicstats
$(INSTALL_DATA) ./files/etc/config/periodicstats $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/init.d/periodicstats $(1)/etc/init.d/
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/bbf_plugin/libperiodicstats.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/bbfdm/micro_services/periodicstats.json, $(1))
endef
$(eval $(call BuildPackage,periodicstats))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "periodicstats",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/periodicstats/libperiodicstats.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -40,7 +40,8 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/
endif
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/xpon.json)
$(call BbfdmInstallMicroServiceDM, ./files/etc/ponmngr/xpon.json, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/ponmngr/input.json, $(1))
endef
$(eval $(call BuildPackage,ponmngr))

View File

@@ -0,0 +1,14 @@
{
"daemon": {
"service_name": "ponmngr",
"config": {
"loglevel": "1"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",
"object": "XPON",
"root_obj": "bbfdm"
}
}
}

View File

@@ -48,8 +48,8 @@ define Package/port-trigger/install
$(INSTALL_BIN) ./files/etc/init.d/port-trigger $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/port-trigger $(1)/etc/config/
$(INSTALL_DATA) ./files/lib/port-trigger/port_trigger.sh $(1)/lib/port-trigger/
$(call BbfdmInstallPluginInMicroservice, $(1)/etc/port-trigger,$(PKG_BUILD_DIR)/bbf_plugin/libporttrigger.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/bbfdm/micro_services/port-trigger.json)
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/bbf_plugin/libporttrigger.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/bbfdm/micro_services/port-trigger.json, $(1))
endef
$(eval $(call BuildPackage,port-trigger))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "port-trigger",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/port-trigger/libporttrigger.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.NAT.",

View File

@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qosmngr
PKG_VERSION:=1.0.7
PKG_VERSION:=1.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4179d88a94d8d5989c67504228f9d61ec8a57aac
PKG_SOURCE_VERSION:=c07b4631e42191a45426e3a7dd1e000700c48edc
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/qosmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -22,12 +22,13 @@ PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/qosmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=QoS Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
DEPENDS:=+libbbfdm-api +libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
endef
define Package/qosmngr/description
@@ -41,6 +42,7 @@ endef
endif
define Package/qosmngr/install
$(INSTALL_DIR) $(1)/etc/qos_bbf
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
@@ -51,6 +53,8 @@ else
endif
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/qosmngr $(1)/usr/sbin
$(call BbfdmInstallMicroServiceDM, $(PKG_BUILD_DIR)/bbf_plugin/libqos_bbf.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/common/etc/qos_bbf/input.json, $(1))
endef
$(eval $(call BuildPackage,qosmngr))

View File

@@ -0,0 +1,14 @@
{
"daemon": {
"service_name": "qosmngr",
"config": {
"loglevel": "1"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",
"object": "QoS",
"root_obj": "bbfdm"
}
}
}

25
sshmngr/Config.in Normal file
View File

@@ -0,0 +1,25 @@
if PACKAGE_sshmngr
choice
prompt "Select backend for SSH management"
default SSHMNGR_BACKEND_OPENSSH
depends on PACKAGE_sshmngr
help
Select which backend daemon to use for SSH
config SSHMNGR_BACKEND_OPENSSH
bool "Use openssh for ssh"
help
Enable this option to use openssh for ssh.
config SSHMNGR_BACKEND_OPENSSH_PAM
bool "Use openssh with PAM for ssh"
help
Enable this option to use PAM for ssh.
config SSHMNGR_BACKEND_DROPBEAR
bool "Use dropbear for ssh"
help
Enable this option to use dropbear for ssh.
endchoice
endif

70
sshmngr/Makefile Normal file
View File

@@ -0,0 +1,70 @@
#
# Copyright (C) 2022-2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sshmngr
PKG_VERSION:=1.0.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/sshmngr.git
PKG_SOURCE_VERSION:=9758a7a0f798ad2b19597f4ec161e82edbdb2753
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=src
define Package/sshmngr
SECTION:=net
CATEGORY:=Network
TITLE:=Package to add Device.SSH data model support.
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api
DEPENDS+=+SSHMNGR_BACKEND_OPENSSH:openssh-server +SSHMNGR_BACKEND_OPENSSH:openssh-client-utils
DEPENDS+=+SSHMNGR_BACKEND_OPENSSH_PAM:openssh-server-pam +SSHMNGR_BACKEND_OPENSSH_PAM:openssh-client-utils
DEPENDS+=+SSHMNGR_BACKEND_DROPBEAR:dropbear
endef
define Package/sshmngr/description
Package to add Device.SSH data model support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./sshmngr/* $(PKG_BUILD_DIR)/
endef
endif
define Package/sshmngr/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/lib/sshmngr
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_DATA) ./files/common/etc/config/sshmngr $(1)/etc/config/
$(INSTALL_BIN) ./files/common/etc/init.d/sshmngr $(1)/etc/init.d/
$(INSTALL_DATA) ./files/common/lib/sshmngr/sshmngr.sh $(1)/lib/sshmngr/
$(INSTALL_BIN) ./files/common/usr/libexec/rpcd/sshmngr $(1)/usr/libexec/rpcd/
ifeq ($(CONFIG_SSHMNGR_BACKEND_DROPBEAR),y)
$(INSTALL_DATA) ./files/dropbear_backend/lib/sshmngr/backend.sh $(1)/lib/sshmngr/
else
$(INSTALL_DATA) ./files/openssh_backend/lib/sshmngr/backend.sh $(1)/lib/sshmngr/
endif
$(call BbfdmInstallMicroServiceDM,$(PKG_BUILD_DIR)/src/libsshmngr.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile, ./files/common/etc/sshmngr/input.json, $(1))
endef
$(eval $(call BuildPackage,sshmngr))

View File

@@ -0,0 +1,7 @@
config server 'ssh1'
option enable '1'
option PasswordAuth '1'
option RootPasswordAuth '1'
option RootLogin '1'
option Port '22'
option MaxAuthTries '10'

View File

@@ -0,0 +1,11 @@
#!/bin/sh /etc/rc.common
START=18
USE_PROCD=1
. /lib/sshmngr/sshmngr.sh
service_triggers() {
configure_ssh
procd_add_reload_trigger sshmngr
}

View File

@@ -0,0 +1,14 @@
{
"daemon": {
"service_name": "sshmngr",
"config": {
"loglevel": "1"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",
"object": "SSH",
"root_obj": "bbfdm"
}
}
}

View File

@@ -0,0 +1,64 @@
#!/bin/sh
. /lib/sshmngr/backend.sh
TEMP_UCI_PATH="/tmp/sshmngr"
handle_server_section()
{
local cfg="$1"
local enable
local PasswordAuth=""
local Port=""
local RootPasswordAuth=""
local RootLogin=""
local Interface=""
local SSHKeepAlive=""
local IdleTimeout=""
local MaxAuthTries=""
local ServerName="${cfg}"
config_get_bool enable $cfg enable 0
[ $enable -eq 0 ] && return
config_get PasswordAuth $cfg PasswordAuth
config_get Port $cfg Port
config_get RootPasswordAuth $cfg RootPasswordAuth
config_get RootLogin $cfg RootLogin
config_get Interface $cfg Interface
config_get SSHKeepAlive $cfg SSHKeepAlive
config_get IdleTimeout $cfg IdleTimeout
config_get MaxAuthTries $cfg MaxAuthTries
# add section
uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName=$CONFIG
# set options
[ -n "$PasswordAuth" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.PasswordAuth=$PasswordAuth
[ -n "$Port" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.Port=$Port
[ -n "$RootPasswordAuth" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.RootPasswordAuth=$RootPasswordAuth
[ -n "$RootLogin" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.RootLogin=$RootLogin
[ -n "$Interface" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.Interface=$Interface
[ -n "$SSHKeepAlive" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.SSHKeepAlive=$SSHKeepAlive
[ -n "$IdleTimeout" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.IdleTimeout=$IdleTimeout
[ -n "$MaxAuthTries" ] && uci -c "$TEMP_UCI_PATH" set $CONFIG.$ServerName.MaxAuthTries=$MaxAuthTries
}
configure_ssh()
{
# remove temp UCI
rm -rf "$TEMP_UCI_PATH"/$CONFIG 2>/dev/null
mkdir -p "$TEMP_UCI_PATH"
touch "$TEMP_UCI_PATH"/$CONFIG
# read all sshmngr server sections and then apply them to $CONFIG UCI
config_load sshmngr
config_foreach handle_server_section server
uci -c "$TEMP_UCI_PATH" commit $CONFIG
cp "$TEMP_UCI_PATH"/$CONFIG /etc/config/$CONFIG
/etc/init.d/$CONFIG reload
}

View File

@@ -0,0 +1,222 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/sshmngr/backend.sh
TEMP_KEY_FILE="/tmp/tempkeyfile"
add_server_name()
{
local server_sec="${1}"
config_get_bool enable "${server_sec}" enable 0
if [ "${enable}" -eq 0 ]; then
return
fi
server_names="${server_names} ${server_sec}"
}
get_all_servers()
{
server_names=""
config_load sshmngr
config_foreach add_server_name server
echo "${server_names}"
}
get_pid()
{
local server_name="$1"
local pid_file="$(get_pid_file "$server_name")"
local server_pid=0
# if proper file exists
if [ -f "${pid_file}" ] && [ -s "${pid_file}" ]; then
server_pid="$(cat "${pid_file}")"
fi
echo "$server_pid"
}
case "$1" in
list)
echo '{ "dump" : {"server_name":"string"}, "kill_session" : {"session_pid":"string","server_name":"string"}, "list_keys" : {}, "add_pubkey" : {"current_key":"string","new_key":"string"}, "remove_pubkey" : {"key":"string"} }'
;;
call)
case "$2" in
dump)
read -r input
json_load "${input}"
json_get_var server_name "server_name"
json_cleanup
if [ -z "$server_name" ]; then
servers="$(get_all_servers)"
else
servers="$server_name"
fi
json_init
for server in $servers; do
json_add_object "$server"
pid_file="$(get_pid_file "$server")"
server_pid="$(get_pid "$server")"
if [ "$server_pid" -eq 0 ]; then
return
fi
# get all current sessions
session_pids="$(get_session_pids "$pid_file")"
json_add_string "pid" "$server_pid"
json_add_array "sessions"
for session_pid in $session_pids; do
# if pid equals server pid then skip
[ "$session_pid" -eq "$server_pid" ] && continue
# get this session's ppid
session_ppid="$(grep PPid /proc/$session_pid/status | awk '{print $2}')"
# if session's parent is this server
if [ "$session_ppid" -eq "$server_pid" ]; then
session="$(netstat -ntp | grep $session_pid/ | awk '{print $5,$7}' | cut -d'/' -f 1)"
# return session IP, Port, PID
ip=$(echo "$session" | cut -d ':' -f 1)
port=$(echo "$session" | cut -d ':' -f 2 | cut -d ' ' -f 1)
pid=$(echo "$session" | cut -d ':' -f 2 | cut -d ' ' -f 2)
json_add_object
json_add_string "ip" "$ip"
json_add_string "port" "$port"
json_add_string "pid" "$pid"
json_close_object
fi
done
json_close_array
json_close_object
done
json_dump
;;
kill_session)
read -r input
json_load "${input}"
json_get_var session_pid "session_pid"
json_get_var server_name "server_name"
json_cleanup
if [ "$session_pid" -gt 0 ]; then
kill -15 "$session_pid"
else
[ -n "$server_name" ] || return
# if server_name is present
# get all current sessions
pid_file="$(get_pid_file "$server_name")"
server_pid="$(get_pid "$server_name")"
if [ "$server_pid" -eq 0 ]; then
return
fi
# get all current sessions
session_pids="$(get_session_pids "$pid_file")"
for session_pid in $session_pids; do
# if pid equals server pid then skip
[ "$session_pid" -eq "$server_pid" ] && continue
# get this session's ppid
session_ppid="$(grep PPid /proc/$session_pid/status | awk '{print $2}')"
# if session's parent is this server
if [ "$session_ppid" -eq "$server_pid" ]; then
kill -15 "$session_pid"
fi
done
fi
;;
list_keys)
# remove empty lines from file
sed -i '/^[[:space:]]*$/d' "$KEY_FILE"
json_init
json_add_array "keys"
while read line; do
json_add_string "key" "${line}"
done < "$KEY_FILE"
json_close_array
json_dump
;;
add_pubkey)
read -r input
json_load "${input}"
json_get_var current_key "current_key"
json_get_var new_key "new_key"
json_cleanup
if [ -n "${new_key}" ]; then
if [ -n "${current_key}" ]; then
rm -rf TEMP_KEY_FILE
touch TEMP_KEY_FILE
# sed -i "s/${current_key}/${new_key}/g" ${KEY_FILE}
# sed is not advisable because the separator ("/") or anything else
# can be present in the string
while read line; do
if [ "${line}" == "${current_key}" ]; then
echo "${new_key}" >> TEMP_KEY_FILE
else
echo "${line}" >> TEMP_KEY_FILE
fi
done < "$KEY_FILE"
mv TEMP_KEY_FILE "$KEY_FILE"
else
echo "${new_key}" >> ${KEY_FILE}
fi
fi
;;
remove_pubkey)
read -r input
json_load "${input}"
json_get_var key "key"
json_cleanup
if [ -n "${key}" ]; then
rm -rf TEMP_KEY_FILE
touch TEMP_KEY_FILE
# sed -i "/${key}/d" ${KEY_FILE}
# sed -i "s/${current_key}/${new_key}/g" ${KEY_FILE}
# sed is not advisable because the separator ("/") or anything else
# can be present in the string
while read line; do
if [ "${line}" != "${key}" ]; then
echo "${line}" >> TEMP_KEY_FILE
fi
done < "$KEY_FILE"
mv TEMP_KEY_FILE "$KEY_FILE"
fi
;;
esac
;;
esac

View File

@@ -0,0 +1,20 @@
#!/bin/sh
. /lib/functions.sh
KEY_FILE="/etc/dropbear/authorized_keys"
CONFIG="dropbear"
get_pid_file()
{
local ServerName="$1"
echo "/var/run/$CONFIG.$ServerName.pid"
}
get_session_pids()
{
local PidFile="$1"
echo "$(ps -w | grep $PidFile | grep -v grep | awk '{print $1}')"
}

View File

@@ -0,0 +1,18 @@
#!/bin/sh
. /lib/functions.sh
CONFIG="sshd"
KEY_FILE="/root/.ssh/authorized_keys"
get_pid_file()
{
local ServerName="$1"
echo "/var/run/$CONFIG.$ServerName.pid"
}
get_session_pids()
{
echo "$(ps -w | grep sshd | grep pts | awk '{print $1}')"
}

View File

@@ -23,6 +23,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
MAKE_PATH:=src
@@ -52,7 +53,7 @@ define Package/stunc/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/stunc $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/stunc $(1)/etc/init.d/stunc
$(INSTALL_DATA) ./files/etc/config/stunc $(1)/etc/config/stunc
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/libstunc.so $(1)/etc/icwmpd/plugins/
$(call BbfdmInstallMicroServicePlugin, $(PKG_BUILD_DIR)/src/libstunc.so, $(1), icwmp)
endef
$(eval $(call BuildPackage,stunc))

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-base
PKG_VERSION:=3.1.57
PKG_VERSION:=3.1.59
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=5c031a2e3c3ebc0b71566073a8296c75f422b8aa
PKG_SOURCE_VERSION:=729253b3864edc3dfbb10c839f5b6e3db7a26cc1
PKG_MIRROR_HASH:=skip
SULU_MOD:=core

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=3.1.57
PKG_VERSION:=3.1.59
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-builder.git
PKG_SOURCE_VERSION:=f40a83b669b9a6abb527f3e7e6babbcd7c00622a
PKG_SOURCE_VERSION:=51c0d46343b3b1122b4f1df73399526160f968dd
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

@@ -96,8 +96,8 @@ ifeq ($(CONFIG_PACKAGE_crun),y)
$(INSTALL_BIN) ./files/etc/config/crun $(1)/etc/config/crun
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/crun_create $(1)/usr/sbin/crun_create
endif
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/swmodd,$(PKG_BUILD_DIR)/libswmodd.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/swmodd/input.json)
$(call BbfdmInstallMicroServiceDM,$(PKG_BUILD_DIR)/libswmodd.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile,./files/etc/swmodd/input.json, $(1))
endef
define Package/swmodd-cgroup/install

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "swmodd",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/swmodd/libswmodd.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -19,5 +19,5 @@ start_service() {
}
reload_service() {
[ -n "$TESTNET" ] && procd_running testnet && "$TESTNET" once
procd_send_signal testnet
}

View File

@@ -1,6 +1,7 @@
#!/bin/sh
. /lib/functions.sh
RELOAD=0
WAITING=0
NETCON=0
LASTSTATUS=""
@@ -13,32 +14,32 @@ test_connection() {
local defroute="$(ip r | grep default | awk '{print$3}' | head -1)"
local def6route="$(ip -f inet6 r | grep default | awk '{print$3}')"
local ping6dev="$(ip -f inet6 r | grep default | awk '{print$5}')"
local resolvfile="$(uci -q get dhcp.@dnsmasq[0].resolvfile)"
local resolvfile="$(uci -q get 'dhcp.@dnsmasq[0].resolvfile')"
if [ -n "$addr" ]; then
ping -q -w 5 -c 1 $addr >/dev/null 2>&1 && return 0
ping -q -w 5 -c 1 "$addr" >/dev/null 2>&1 && return 0
elif [ -n "$defroute" ]; then
ping -q -w 5 -c 1 $defroute >/dev/null 2>&1 && return 0
ping -q -w 5 -c 1 "$defroute" >/dev/null 2>&1 && return 0
if [ -e "$resolvfile" ]; then
for nmsrv in $(grep nameserver "$resolvfile" | awk '{print$2}'); do
ping -q -w 5 -c 1 $nmsrv >/dev/null 2>&1 && return 0
ping -q -w 5 -c 1 "$nmsrv" >/dev/null 2>&1 && return 0
done
fi
elif [ -n "$def6route" -a -n "$ping6dev" ]; then
ndisc6 -w 5 -1 $def6route $ping6dev >/dev/null 2>&1 && return 0
ndisc6 -w 5 -1 "$def6route" "$ping6dev" >/dev/null 2>&1 && return 0
fi
return 1
}
internet_test() {
local link dest
local dest
# use the destination address given in config for connectivity check
dest="$(uci -q get testnet.global.destination)"
# for backwards compatibility
[ -n "$dest" ] || dest="$(uci -q get system.@system[0].netping_addr)"
[ -n "$dest" ] || dest="$(uci -q get 'system.@system[0].netping_addr')"
test_connection $dest
test_connection "$dest"
if [ "$?" -eq 0 ]; then
NETCON=1
@@ -52,7 +53,7 @@ internet_test() {
connectivity_test() {
internet_test
if [ $NETCON -eq 1 ]; then
if [ "$NETCON" -eq 1 ]; then
CURSTATUS=1
[ "$CURSTATUS" == "$LASTSTATUS" ] || ubus send internet '{"status" : "online"}'
LASTSTATUS=1
@@ -63,12 +64,14 @@ connectivity_test() {
fi
}
if [ "$1" == "once" ]; then
connectivity_test
exit 0
fi
trap RELOAD=1 HUP
while true; do
if [ "$WAITING" -eq 0 ]; then
sleep "$SLEEP_TIME" &
WAITING=1
fi
RELOAD=0
connectivity_test
sleep $SLEEP_TIME
[ "$RELOAD" -eq 0 ] && wait && WAITING=0
done

View File

@@ -57,8 +57,8 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/timemngr $(1)/usr/sbin/timemngr
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/timemngr,$(PKG_BUILD_DIR)/src/libtimemngr.so)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/timemngr/input.json)
$(call BbfdmInstallMicroServiceDM,$(PKG_BUILD_DIR)/src/libtimemngr.so, $(1))
$(call BbfdmInstallMicroServiceDMInputFile,./files/etc/timemngr/input.json, $(1))
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/21-timemngr $(1)/etc/hotplug.d/iface/
$(INSTALL_BIN) ./files/etc/hotplug.d/ntp/40-firstUseDate $(1)/etc/hotplug.d/ntp/
$(INSTALL_BIN) ./files/etc/init.d/timemngr $(1)/etc/init.d/

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "timemngr",
"config": {
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/timemngr/libtimemngr.so"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -72,12 +72,12 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/tr104/plugins/
$(INSTALL_DIR) $(1)/etc/uci-defaults/
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/tr104,$(PKG_BUILD_DIR)/libdm/tr104/libtr104.so)
$(call BbfdmInstallMicroServiceDM,$(PKG_BUILD_DIR)/libdm/tr104/libtr104.so, $(1))
ifeq ($(CONFIG_TR104_VENDOR_EXTENSIONS),y)
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/tr104/plugins,$(PKG_BUILD_DIR)/libdm/extensions/iowrt/libtr104ext.so)
$(call BbfdmInstallMicroServicePlugin, $(PKG_BUILD_DIR)/libdm/extensions/iowrt/libtr104ext.so, $(1), tr104)
endif
ifeq ($(CONFIG_TR104_RUNAS_BBFDM_MICROSERVICE),y)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/tr104/input.json)
$(call BbfdmInstallMicroServiceDMInputFile, ./files/etc/tr104/bbfdm_input.json, $(1))
else
$(INSTALL_BIN) ./files/etc/tr104/input.json $(1)/etc/tr104/input.json
$(INSTALL_DIR) $(1)/usr/sbin

View File

@@ -0,0 +1,14 @@
{
"daemon": {
"service_name": "tr104",
"config": {
"loglevel": "1"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.Services.",
"object": "VoiceService",
"root_obj": "bbfdm"
}
}
}

View File

@@ -1,14 +1,12 @@
{
"daemon": {
"config": {
"loglevel": "1",
"refresh_time": "10",
"transaction_timeout": "30"
"loglevel": "1"
},
"input": {
"type": "DotSo",
"name": "/etc/tr104/libtr104.so",
"plugin_dir": "/etc/tr104/plugins/"
"name": "/usr/share/bbfdm/tr104.so",
"plugin_dir": "/usr/share/bbfdm/tr104/"
},
"output": {
"type": "UBUS",

View File

@@ -56,7 +56,7 @@ define Package/$(PKG_NAME)/install
$(INSTALL_BIN) ./files/etc/firewall.twamp $(1)/etc/firewall.twamp
$(INSTALL_BIN) ./files/etc/uci-defaults/92-twampfirewall $(1)/etc/uci-defaults/92-twampfirewall
$(INSTALL_BIN) ./files/etc/uci-defaults/93-twamp_fix_reflector $(1)/etc/uci-defaults/93-twamp_fix_reflector
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libtwamp.so)
$(call BbfdmInstallCorePlugin, $(PKG_BUILD_DIR)/libtwamp.so, $(1))
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -70,7 +70,7 @@ define Package/$(PKG_NAME)-server/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/udpechoserverd $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/config/udpechoserver $(1)/etc/config/udpechoserver
$(INSTALL_BIN) ./files/etc/init.d/udpechoserverd $(1)/etc/init.d/udpechoserverd
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/src/libudpechoserver.so)
$(call BbfdmInstallCorePlugin, $(PKG_BUILD_DIR)/src/libudpechoserver.so, $(1))
endef
define Package/$(PKG_NAME)-client/install

View File

@@ -52,8 +52,8 @@ define Package/urlfilter/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/urlfilter $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/urlfilter $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/urlfilter $(1)/etc/config/
$(call BbfdmInstallPluginInMicroservice,$(1)/etc/urlfilter,./files/etc/urlfilter/urlfilter.json)
$(call BbfdmInstallMicroServiceInputFile,$(1),./files/etc/urlfilter/input.json)
$(call BbfdmInstallMicroServiceDM,./files/etc/urlfilter/urlfilter.json, $(1))
$(call BbfdmInstallMicroServiceDMInputFile,./files/etc/urlfilter/input.json, $(1))
endef
$(eval $(call BuildPackage,urlfilter))

View File

@@ -1,12 +1,9 @@
{
"daemon": {
"service_name": "urlfilter",
"config": {
"loglevel": "1"
},
"input": {
"type": "JSON",
"name": "/etc/urlfilter/urlfilter.json"
},
"output": {
"type": "UBUS",
"parent_dm": "Device.",

View File

@@ -1,9 +0,0 @@
#
# Copyright (C) 2023 IOPSYS
#
define BbfdmInstallPlugin
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
endef

View File

@@ -50,7 +50,7 @@ define Package/usermngr/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/uci-defaults/90-indicate-bootstrap $(1)/etc/uci-defaults/90-indicate-bootstrap
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/uci-defaults/91-sync-shells $(1)/etc/uci-defaults/91-sync-shells
$(INSTALL_BIN) ./files/etc/config/users $(1)/etc/config/users
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/src/libusermngr.so)
$(call BbfdmInstallCorePlugin, $(PKG_BUILD_DIR)/src/libusermngr.so, $(1))
endef
$(eval $(call BuildPackage,usermngr))

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=voicemngr
PKG_RELEASE:=1
PKG_VERSION:=1.1.9
PKG_VERSION:=1.1.11
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
@@ -19,7 +19,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=6ca306ea8e0bcc38deb94961b3ecac3bad3d046c
PKG_SOURCE_VERSION:=33db1b82fbb161d5a4dc253ecb6e0fb0648de3c8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -48,7 +48,7 @@ define Package/$(PKG_NAME)
ifeq ($(CONFIG_TARGET_brcmbca),y)
include $(TOPDIR)/feeds/broadcom/bcmkernel/bcm-toolchain.mk
TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/bcm963xx/ -L$(STAGING_DIR)/root-brcmbca/usr/lib/broadcom -L$(STAGING_DIR)/usr/lib/broadcom
TARGET_CFLAGS := -I$(STAGING_DIR)/usr/include/bcm963xx/
TARGET_CPPFLAGS :=
TARGET_CXXFLAGS :=
EXTRA_CFLAGS :=
@@ -89,4 +89,3 @@ define Package/$(PKG_NAME)/install
$(CP) $(PKG_BUILD_DIR)/libvoice/libvoice.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -9,12 +9,10 @@ NAME=voicemngr
start_service() {
[ "$(db -q get hw.board.hasVoice)" = "1" ] || return
[ -d "/usr/lib/broadcom" ] && BCM_LIBS=LD_LIBRARY_PATH=/lib/broadcom:/usr/lib/broadcom
procd_open_instance
procd_set_param env hw_board_hasDect="$(db get hw.board.hasDect)" \
hw_board_VoicePortNames="$(db get hw.board.VoicePortNames)" \
$BCM_LIBS
procd_set_param command $NAME
procd_set_param respawn "5" "0" "3"
procd_set_param nice -12

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifimngr
PKG_VERSION:=17.0.15
PKG_VERSION:=17.0.17
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=778e7d99ec4440a91604aac2b6893c288b73e473
PKG_SOURCE_VERSION:=f4bafa67da2fd15bc21f2a9c4926d3a0de60d9d9
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -28,6 +28,7 @@ PKG_LICENSE_FILES:=LICENSE
MAKE_PATH:=src
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/$(PKG_NAME)
SECTION:=utils
@@ -54,9 +55,9 @@ TARGET_CFLAGS += \
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/etc/icwmpd/plugins
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/libxmppc.so $(1)/etc/icwmpd/plugins/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/xmppc $(1)/usr/sbin/
$(CP) ./files/* $(1)/
$(call BbfdmInstallMicroServicePlugin, $(PKG_BUILD_DIR)/src/libxmppc.so, $(1), icwmp)
endef
$(eval $(call BuildPackage,$(PKG_NAME)))