Compare commits

...

30 Commits

Author SHA1 Message Date
Jakob Olsson
d1bdf49fdf map-agent: kick hash 2024-09-03 15:35:48 +02:00
Jakob Olsson
0d2fbbf77f map-agent: 4.5.0.25 2024-09-02 15:59:50 +02:00
Rahul Thakur
c1d70ea983 update package libethernet
* 3853c55 libethernet: Improve counter logic for Airoha.
2024-08-27 17:07:24 +05:30
Markus Gothe
385bf86e99 update package libethernet
* libethernet: Improve counter logic for Airoha.
2024-08-23 16:47:54 +02:00
Rahul Thakur
31645bc7fa update package libethernet
* d94e302 libethernet: removed unwanted code in rmon stats
* a82181d libethernet: corrected bcm rmonstats
* be00aa9 econet: Handle unbound HSGMII LAN interfaces.
2024-08-23 16:47:46 +02:00
Rahul Thakur
f1a355b7b8 urlfilter: update regex
* update regex handling
* simplify iptables rules to setup nfq into single rule
* update makefile to not compile urlfilter as a kernel module
2024-08-20 11:57:54 +00:00
Vivek Kumar Dutta
fb245c8279 bbfdm: Fix setting empty values with json plugins 2024-08-19 17:25:14 +05:30
Jakob Olsson
e0e2ed34ab map-controller: 4.5.0.10 2024-08-09 16:22:25 +02:00
Jakob Olsson
303d26a12e Revert "map-agent: 4.5.0.25"
This reverts commit f7ec53c0a1.
2024-08-09 16:20:50 +02:00
Jakob Olsson
f7ec53c0a1 map-agent: 4.5.0.25 2024-08-09 16:07:44 +02:00
Vivek Kumar Dutta
b390b46c07 obuspa: enabled dm_caching_exclude in default config 2024-08-02 18:52:33 +05:30
Mohd Husaam Mehdi
ac19369e3e bbfdm: move Device.IP.ActivePort. implementation to libbbfdm
the implementation has been merged with ip.c
2024-07-31 11:52:44 +05:30
Mohd Husaam Mehdi
4565208573 bbfdm: remove active port package
Support for Device.IP.ActivePort has been added directly in
libbbfdm, so separate package is not needed.
* Removed from bbfdm
* Removed from iop/config
2024-07-29 12:22:41 +05:30
Amit Kumar
f174cd5e12 urlfilter: updated ebtables command
* used concurrent option with ebatables
2024-07-26 16:17:34 +05:30
Amit Kumar
b1aa6341a2 urlfilter: iptables rule handled for dns over tcp
* changes taken from devel for handling DNS over tcp
2024-07-26 12:20:27 +05:30
Vivek Kumar Dutta
bf6af55ba6 hostmngr: remove host instances from dmmap 2024-07-25 19:35:57 +05:30
Mohd Husaam Mehdi
ad0d093b23 iop: enable active-port package
This package provides support for Device.IP.ActivePort. datamodel
object.
2024-07-22 10:44:23 +05:30
Mohd Husaam Mehdi
bcf799389d bbfdm: add support for Device.IP.ActivePort
A package is added in bbfdm Makefile, which installs:

* json file for ActivePort data model object mapped to ubus call
* daemon that implements active-port ubus call
2024-07-16 12:04:04 +05:30
Vivek Kumar Dutta
950023a786 obuspa: Updated Hosts ACL for user 2024-07-08 16:43:55 +05:30
Vivek Kumar Dutta
73246e703a obuspa: fix crash in reboot/reset 2024-07-05 14:04:58 +05:30
Suvendhu Hansa
0e59720ad9 obuspa: new MQTT client connection at runtime 2024-07-01 08:54:14 +00:00
Suvendhu Hansa
79e91c2458 obuspa: mqtt retry params change at runtime 2024-07-01 08:52:43 +00:00
Filip Matusiak
43b5cdf816 wifimngr: 16.2.1.6 2024-06-21 13:57:24 +02:00
Vivek Kumar Dutta
f48cf5a3ab swmodd: 2.5.3.2
Update default bundle root to '/container', swmodd only starts if '/container'
mounted and accessible. Mounting of persistent storage to '/container' is
out of scope of swmodd.

Sharing host network added with config.json
2024-06-17 18:35:22 +05:30
Erik Karlsson
0924ffc34a usp-js: depend on OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
This avoids the need for duplicating local MQTT broker setup.
2024-06-14 14:48:07 +02:00
Erik Karlsson
ee38bf37d9 obuspa: split up OBUSPA_ENABLE_TEST_CONTROLLER configuration
A separate OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL configuration is added
which can be used by for example usp-js to accomplish local MQTT
broker setup but without compromising security by enabling remote
access. Appropriate dependencies are also added. In addition
unnecessary uci_load commands and misspelled and unnecessary
require_certificates mosquitto option are removed.
2024-06-14 14:48:07 +02:00
Filip Matusiak
853ae1f351 ieee1905: 8.3.4.11 2024-06-14 13:17:31 +02:00
Marina Maslova
1e5effb7fb map-agent: 4.5.0.24 2024-06-13 14:59:26 +04:00
Marek Puzyniak
c1a83b94f3 map-controller: 4.5.0.9 2024-06-12 11:59:18 +00:00
Marek Puzyniak
d68aee3e75 libwifi: 7.4.16.14 2024-06-11 15:17:21 +00:00
28 changed files with 295 additions and 227 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.4.23.22
PKG_VERSION:=1.4.23.25
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=73d49e600e2cdf2aadcc23133b922916c6cd8c69
PKG_SOURCE_VERSION:=3b23b212c86d09f856f53d3147dcac30cb664ba2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.1.7
PKG_VERSION:=1.1.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=79a6649995752da3501808debeed9e3ddfdf4d59
PKG_SOURCE_VERSION:=993336a09137451758f38d7ebc643dc590ba0227
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

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.3.4.10
PKG_VERSION:=8.3.4.11
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4231e9496e63fb6d0ab74870c06f9345b001c5bf
PKG_SOURCE_VERSION:=99093fec4c441bc90179b3fd557882c88007cdac
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:=libethernet
PKG_VERSION:=7.2.109
PKG_VERSION:=7.2.112
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cc72f5ab0171cd0fc29bb48dafff6751ab2f0d9c
PKG_SOURCE_VERSION:=3853c55573fda0a21abdb9572d0315552520262b
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

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.4.16.13
PKG_VERSION:=7.4.16.14
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=38b946b847a6d8e12dbc12a2b1a8f16b9c59ae33
PKG_SOURCE_VERSION:=a010d77fa8b711df202f6f70d0a9fdf6d59d1487
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.5.0.23
PKG_VERSION:=4.5.0.25
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=eb1138dfc1a87193a03c8e71590e4be0a466dfad
PKG_SOURCE_VERSION:=b9ef3e28e5566575db70af5d87ac7d0631c66ed1
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.5.0.8
PKG_VERSION:=4.5.0.10
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=c719a86bb2485b8de79a639cc42a8f1d6303253c
PKG_SOURCE_VERSION:=b5812a12241b80a555b9f435405f586015195fb4
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0

View File

@@ -22,6 +22,11 @@ config OBUSPA_CONTROLLER_MTP_VERIFY
config OBUSPA_ENABLE_TEST_CONTROLLER
bool "Adds a test controller by default"
default n
select OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
config OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
bool "Adds a test controller by default (local access only)"
default n
config OBUSPA_MAX_CONTROLLERS_NUM
int "The maximum number of controllers to be supported"

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=7.0.5.6.6
PKG_VERSION:=7.0.5.6.11
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=0bb1ddd46e4a2abf93dadfc34e6bc44bf6a3f063
PKG_SOURCE_VERSION:=131e04ec5c6ddd8c2fb47f95fe7da2b9836ed925
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -32,7 +32,9 @@ define Package/obuspa
SUBMENU:=TRx69
TITLE:=USP agent
MENU:=1
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl +ca-certificates
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl +ca-certificates \
+OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-ssl +OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-client-ssl \
+OBUSPA_ENABLE_TEST_CONTROLLER:mosquitto-auth-shadow
endef
define Package/obuspa/description
@@ -109,6 +111,9 @@ define Package/obuspa/install
$(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)
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)
$(INSTALL_BIN) ./files/etc/uci-defaults/54-test-usp-remote $(1)/etc/uci-defaults/
endif
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL),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/
endif

View File

@@ -6,7 +6,7 @@ config obuspa 'global'
option prototrace '0'
option db_file '/etc/obuspa/usp.db'
option role_file '/etc/obuspa/roles.json'
#option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
#option trust_cert '/etc/ssl/cert.pem'
#option client_cert '/etc/obuspa/client.pem'
#option log_dest '/tmp/obuspa.log'

View File

@@ -1,7 +1,6 @@
{
"dmcaching_exclude": [
"Device.Hosts.Host.",
"Device.IEEE1905.",
"Device.WiFi.DataElements."
"Device.Services.VoiceService."
]
}

View File

@@ -598,9 +598,11 @@
"object":"Device.Hosts.",
"perm": [
"PERMIT_GET",
"PERMIT_SET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},

View File

@@ -0,0 +1,20 @@
#!/bin/sh
. /lib/functions.sh
if [ ! -f "/etc/config/mosquitto" ]; then
echo "Local mosquitto broker not available"
return 0
fi
add_usp_test()
{
uci_add mosquitto listener usptest
uci_set mosquitto usptest enabled 1
uci_set mosquitto usptest port '9001'
uci_set mosquitto usptest protocol 'websockets'
uci_set mosquitto usptest auth_plugin '/usr/lib/mosquitto_auth_shadow.so'
}
# Install test MQTT over WS listener
add_usp_test

View File

@@ -40,16 +40,6 @@ add_obuspa_test_controller()
uci_set obuspa testcontroller assigned_role_name 'full_access'
}
add_usp_test()
{
uci_add mosquitto listener usptest
uci_set mosquitto usptest enabled 1
uci_set mosquitto usptest port '9001'
uci_set mosquitto usptest protocol 'websockets'
uci_set mosquitto usptest require_certificates '0'
uci_set mosquitto usptest auth_plugin '/usr/lib/mosquitto_auth_shadow.so'
}
add_obuspa_config()
{
uci_add mosquitto listener obuspa
@@ -60,11 +50,8 @@ add_obuspa_config()
}
# Install test usp controller config
uci_load mosquitto
add_usp_test
add_obuspa_config
uci_load obuspa
add_obuspa_test_mtp
add_obuspa_test_mqtt
add_obuspa_test_controller

View File

@@ -0,0 +1,76 @@
diff --git a/src/core/device_mqtt.c b/src/core/device_mqtt.c
index 7b3c3df7eb..7beb78ef86 100755
--- a/src/core/device_mqtt.c
+++ b/src/core/device_mqtt.c
@@ -1602,14 +1602,23 @@ int Validate_MQTTConnectRetryTime(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryTime(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
// Set the new value.
+ if ((mp->retry.connect_retrytime != val_uint) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
mp->retry.connect_retrytime = val_uint;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}
@@ -1645,14 +1654,23 @@ int Validate_MQTTConnectRetryIntervalMultiplier(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryIntervalMultiplier(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
+ if ((mp->retry.interval_multiplier != val_int) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
// Set the new value.
mp->retry.interval_multiplier = val_int;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}
@@ -1688,14 +1706,23 @@ int Validate_MQTTConnectRetryMaxInterval(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryMaxInterval(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
+ if ((mp->retry.max_interval != val_uint) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
// Set the new value.
mp->retry.max_interval = val_uint;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}

View File

@@ -0,0 +1,90 @@
diff --git a/src/core/device_controller.c b/src/core/device_controller.c
index a6335f5..57b8486 100644
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
@@ -2340,6 +2340,26 @@ int Notify_ControllerEnable(dm_req_t *req, char *value)
}
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if (cont->enable)
+ {
+ int i;
+ for (i=0; i<MAX_CONTROLLER_MTPS; i++)
+ {
+ controller_mtp_t *mtp;
+
+ mtp = &cont->mtps[i];
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->mqtt_connection_instance != INVALID) && (mtp->enable))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+ }
+ }
+}
#endif
return USP_ERR_OK;
@@ -2468,6 +2488,17 @@ int Notify_ControllerMtpEnable(dm_req_t *req, char *value)
}
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->enable) && (cont->enable) &&
+ (mtp->mqtt_connection_instance != INVALID))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+}
#endif
// NOTE: We do not have to do anything for STOMP, as these parameters are only searched when we send
@@ -2559,6 +2590,16 @@ int Notify_ControllerMtpProtocol(dm_req_t *req, char *value)
WSCLIENT_StartClient(cont->instance, mtp->instance, cont->endpoint_id, &mtp->websock);
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->mqtt_connection_instance != INVALID))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+}
#endif
// NOTE: We don't need to do anything explicitly for STOMP
diff --git a/src/core/device_mtp.c b/src/core/device_mtp.c
index e78a305..d690978 100644
--- a/src/core/device_mtp.c
+++ b/src/core/device_mtp.c
@@ -964,6 +964,9 @@ int NotifyChange_AgentMtpProtocol(dm_req_t *req, char *value)
}
#endif
+ // Cache the changed value
+ mtp->protocol = new_protocol;
+
#ifdef ENABLE_MQTT
// Schedule the affected MQTT connection to reconnect (because it might have lost or gained a agent queue to subscribe to)
if ((mtp->enable) && (mtp->mqtt_connection_instance != INVALID))
@@ -972,9 +975,6 @@ int NotifyChange_AgentMtpProtocol(dm_req_t *req, char *value)
}
#endif
- // Cache the changed value
- mtp->protocol = new_protocol;
-
#ifndef DISABLE_STOMP
// Schedule the affected STOMP connection to reconnect (because it might have lost or gained a agent queue to subscribe to)
if ((mtp->enable) && (mtp->stomp_connection_instance != INVALID))

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=swmodd
PKG_VERSION:=2.5.3.1
PKG_VERSION:=2.5.3.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View File

@@ -3,3 +3,7 @@ config globals 'globals'
option debug '1'
option log_level '3'
option lan_bridge 'br-lan'
option root '/container'
config execenv 'execenv_1'
option name 'oci'

View File

@@ -241,7 +241,7 @@ start_service() {
env=$(uci -q get swmodd.@execenv[0].name)
if [ -z "${root}" ] || [ -z "${bridge}" ]; then
log "Base bundle root[$root] or bridge[$bridge] not defined"
log "# Base bundle root[$root] or bridge[$bridge] not defined"
return 0;
fi

View File

@@ -91,13 +91,8 @@ start_service() {
[ ! -d "/run" ] && ln -fs /var/run /run
if [ ! -d "${root}" ]; then
log "# root [${root}] not present, creating ..."
if [ -n "${root}" ]; then
mkdir -p "${root}"
else
log "# Not starting, root [${root}] not defined"
return 1
fi
log "# Not starting, Base root [${root}] not accessible/defined"
return 1
fi
# Currently only one execenv supported

View File

@@ -74,7 +74,7 @@ setup_container_network() {
}
run_container() {
local bundle name bridge
local bundle name bridge network
bundle="${1}"
name="${2}"
@@ -85,7 +85,13 @@ run_container() {
return 1
fi
setup_container_network "${name}" "${bridge}"
# Only do the network setup if defined in config
network="$(cat ${BUNDLE}/${NAME}/config.json |jq '.linux.namespaces[] |select (.type == "network")')"
if [ -n "${network}" ] ; then
setup_container_network "${name}" "${bridge}"
else
log "Network not defined in config, using host network..."
fi
script -q -c "crun run -b ${bundle}/${name} ${name}" /dev/null
}

View File

@@ -10,32 +10,31 @@ configure_ee_path() {
config_get oci_bundle globals oci_bundle_root ""
mkdir -p /etc/lxc
if [ -n "${lxc_bundle}" ]; then
# if lxc_bundle_root define in swmodd, then remove it
name=$(echo ${lxc_bundle##/*/})
root=$(echo ${lxc_bundle%/$name})
echo "lxc.lxcpath = ${lxc_bundle}" > /etc/lxc/lxc.conf
uci_set swmodd globals lxc_bundle_root ""
fi
if [ -n "${oci_bundle}" ]; then
# if oci_bundle_root define in swmodd, then remove it
name=$(echo ${oci_bundle##/*/})
root=$(echo ${oci_bundle%/$name})
echo "lxc.lxcpath = ${oci_bundle}" > /etc/lxc/lxc.conf
elif [ -n "${lxc_bundle}" ]; then
# if lxc_bundle_root define in swmodd, then remove it
name=$(echo ${lxc_bundle##/*/})
root=$(echo ${lxc_bundle%/$name})
echo "lxc.lxcpath = ${lxc_bundle}" > /etc/lxc/lxc.conf
elif [ -f /etc/lxc/lxc.conf ]; then
bundle_path=$(cat /etc/lxc/lxc.conf | grep "lxc.lxcpath" | cut -d "=" -f 2 | sed 's/[[:blank:]]//g')
name=$(echo ${bundle_path##/*/})
root=$(echo ${bundle_path%/$name})
else
name="lxc"
root="/srv"
echo "lxc.lxcpath = /srv/lxc" > /etc/lxc/lxc.conf
uci_set swmodd globals oci_bundle_root ""
fi
uci_set swmodd globals oci_bundle_root ""
uci_set swmodd globals lxc_bundle_root ""
# configure root in globals section
if ! uci_get swmodd globals root >/dev/null; then
uci_set swmodd globals root ${root}
if [ -n "${root}" ]; then
if ! uci_get swmodd globals root >/dev/null; then
uci_set swmodd globals root ${root}
fi
fi
if [ -z "${name}" ]; then
name="oci"
fi
# configure execenv in swmodd

View File

@@ -3,16 +3,15 @@
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=urlfilter
PKG_VERSION:=1.1.14
PKG_VERSION:=2.0.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/urlfilter.git
PKG_SOURCE_VERSION:=ebf8afb44ff808d3b99c45a7c636fb12a774f357
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/urlfilter.git
PKG_SOURCE_VERSION:=08044747036259db23d6581fcbaa51750516749e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=21
START=95
STOP=10
USE_PROCD=1
@@ -13,34 +13,39 @@ configure_firewall()
if [ "$?" -ne 0 ]; then
# setup netfilter queue 0, use queue bypass so that if no application is
# listening to this queue then traffic is unaffected.
iptables -w -I FORWARD 1 -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I FORWARD 2 -p tcp --dport 443 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I FORWARD 3 -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I FORWARD 4 -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I INPUT 1 -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I INPUT 2 -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I FORWARD 1 -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I FORWARD 1 -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I INPUT 1 -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -I INPUT 1 -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
# disable acceleration for https packet so that they can be read by urlfilter
ebtables -A FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG 2> /dev/null
ebtables --concurrent -A FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG 2> /dev/null
ebtables --concurrent -A FORWARD -p ip --ip-protocol 6 --ip-source-port 53 -j SKIPLOG 2> /dev/null
ebtables --concurrent -A FORWARD -p ip --ip-protocol 17 --ip-source-port 53 -j SKIPLOG 2> /dev/null
fi
ip6tables -w -nL FORWARD|grep -iqE "NFQUEUE"
if [ "$?" -ne 0 ]; then
#ip6table rules
ip6tables -w -I FORWARD 1 -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I FORWARD 2 -p tcp --dport 443 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I FORWARD 3 -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I FORWARD 4 -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I INPUT 1 -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I INPUT 2 -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I FORWARD 1 -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I FORWARD 1 -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I INPUT 1 -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -I INPUT 1 -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
# disable acceleration for https packet so that they can be read by urlfilter
ebtables --concurrent -A FORWARD -p ip6 --ip6-protocol 6 --ip6-destination-port 443 -j SKIPLOG 2> /dev/null
ebtables --concurrent -A FORWARD -p ip6 --ip6-protocol 6 --ip6-source-port 53 -j SKIPLOG 2> /dev/null
ebtables --concurrent -A FORWARD -p ip6 --ip6-protocol 17 --ip6-source-port 53 -j SKIPLOG 2> /dev/null
fi
}
start_service() {
if [ "$(uci -q get urlfilter.globals.enable)" == "1" ]; then
configure_firewall
procd_open_instance urlfilter
procd_set_param command ${PROG}
configure_firewall
procd_set_param respawn
procd_close_instance
@@ -56,23 +61,28 @@ start_service() {
stop_service() {
iptables -w -nL FORWARD|grep -iqE "NFQUEUE"
if [ "$?" -eq 0 ]; then
iptables -w -D FORWARD -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D FORWARD -p tcp --dport 443 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D FORWARD -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D FORWARD -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D INPUT -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D INPUT -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ebtables -D FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG 2> /dev/null
iptables -w -D FORWARD -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D FORWARD -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D INPUT -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
iptables -w -D INPUT -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ebtables --concurrent -D FORWARD -p ip --ip-protocol 6 --ip-destination-port 443 -j SKIPLOG 2> /dev/null
ebtables --concurrent -D FORWARD -p ip --ip-protocol 6 --ip-source-port 53 -j SKIPLOG 2> /dev/null
ebtables --concurrent -D FORWARD -p ip --ip-protocol 17 --ip-source-port 53 -j SKIPLOG 2> /dev/null
fi
ip6tables -w -nL FORWARD|grep -iqE "NFQUEUE"
if [ "$?" -eq 0 ]; then
#ip6table rules
ip6tables -w -D FORWARD -p tcp --dport 80 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D FORWARD -p tcp --dport 443 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D FORWARD -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D FORWARD -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D INPUT -p udp --dport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D INPUT -p udp --sport 53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D FORWARD -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D FORWARD -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D INPUT -p tcp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ip6tables -w -D INPUT -p udp --match multiport --ports 80,443,53 -j NFQUEUE --queue-num 0 --queue-bypass
ebtables --concurrent -D FORWARD -p ip6 --ip6-protocol 6 --ip6-destination-port 443 -j SKIPLOG 2> /dev/null
ebtables --concurrent -D FORWARD -p ip6 --ip6-protocol 6 --ip6-source-port 53 -j SKIPLOG 2> /dev/null
ebtables --concurrent -D FORWARD -p ip6 --ip6-protocol 17 --ip6-source-port 53 -j SKIPLOG 2> /dev/null
fi
}
reload_service() {

View File

@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usp-js
PKG_VERSION:=1.2.4
PKG_VERSION:=1.2.6
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/usp-js.git
@@ -23,7 +23,7 @@ define Package/usp-js
SECTION:=libs
CATEGORY:=Libraries
TITLE:=A JS library for USP(TR369) protocol
DEPENDS:=+quickjs +quickjs-websocket
DEPENDS:=+quickjs +quickjs-websocket +@OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
EXTRA_DEPENDS:=obuspa mosquitto-ssl
endef
@@ -37,9 +37,7 @@ endef
define Package/usp-js/install
$(INSTALL_DIR) $(1)/usr/lib/usp-js
$(INSTALL_DIR) $(1)/etc
$(CP) $(PKG_BUILD_DIR)/qjs/* $(1)/usr/lib/usp-js/
$(CP) ./files/etc/* $(1)/etc/
endef
$(eval $(call BuildPackage,usp-js))

View File

@@ -1,68 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
USE_PROCD=1
log()
{
echo "$*"|logger -t usp-js -p debug
}
get_oui_from_db()
{
db -q get device.deviceinfo.ManufacturerOUI
}
get_serial_from_db()
{
db -q get device.deviceinfo.SerialNumber
}
publish_endpoint()
{
local AgentEndpointID serial oui user pass
if ! uci -q get obuspa.testmqtt; then
return 0;
fi
# return if mosquitto_pub is not present
if [ ! "$(command -v mosquitto_pub)" ]; then
log "mosquitto_pub not present can't publish EndpointID"
return 0;
fi
# Get endpoint id from obuspa config first
config_load obuspa
config_get AgentEndpointID localagent EndpointID ""
if [ -z "${AgentEndpointID}" ]; then
serial=$(get_serial_from_db)
oui=$(get_oui_from_db)
AgentEndpointID="os::${oui}-${serial//+/%2B}"
fi
config_get user testmqtt Username ""
config_get pass testmqtt Password ""
# publish Agent's EndpointID in mosquito broker for discovery by usp-js
# This is a work around till obuspa adds supports for mDNS discovery
if [ -n "${user}" ] && [ -n "${pass}" ]; then
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker with username, password"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" -u "${user}" -P "${pass}"
elif [ -n "${user}" ]; then
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker with username only"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}" -u "${user}"
else
log "Publishing EndpointID ${AgentEndpointID} to local mqtt broker"
mosquitto_pub -r -t "obuspa/EndpointID" -m "${AgentEndpointID}"
fi
}
start_service() {
publish_endpoint
}
service_triggers() {
procd_add_reload_trigger "obuspa"
}

View File

@@ -1,59 +0,0 @@
#!/bin/sh
. /lib/functions.sh
if [ ! -f "/etc/config/obuspa" ]; then
echo "Local obuspa not available"
return 0
fi
if [ ! -f "/etc/config/mosquitto" ]; then
echo "Local mosquitto broker not available"
return 0
fi
add_obuspa_test_mtp()
{
uci_add obuspa mtp test_mtp
uci_set obuspa test_mtp Protocol 'MQTT'
uci_set obuspa test_mtp ResponseTopicConfigured '/usp/endpoint'
uci_set obuspa test_mtp mqtt 'testmqtt'
}
add_obuspa_test_mqtt()
{
# Adds Device.MQTT.Client.
uci_add obuspa mqtt testmqtt
uci_set obuspa testmqtt BrokerAddress '127.0.0.1'
uci_set obuspa testmqtt BrokerPort '1883'
uci_set obuspa testmqtt TransportProtocol 'TCP/IP'
}
add_obuspa_test_controller()
{
# Adds Device.LocalAgent.Controller.
uci_add obuspa controller testcontroller
uci_set obuspa testcontroller EndpointID 'proto::interop-usp-controller'
uci_set obuspa testcontroller Protocol 'MQTT'
uci_set obuspa testcontroller Topic '/usp/controller'
uci_set obuspa testcontroller mqtt 'testmqtt'
uci_set obuspa testcontroller assigned_role_name 'full_access'
}
add_obuspa_config()
{
uci_add mosquitto listener obuspa
uci_set mosquitto obuspa enabled 1
uci_set mosquitto obuspa port '1883'
uci_set mosquitto obuspa no_remote_access '1'
uci_set mosquitto obuspa allow_anonymous '1'
}
# Add local controller for usp-js
uci_load mosquitto
add_obuspa_config
uci_load obuspa
add_obuspa_test_mtp
add_obuspa_test_mqtt
add_obuspa_test_controller

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifimngr
PKG_VERSION:=16.2.1.5
PKG_VERSION:=16.2.1.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5696f739e765e221e2f882a659cf509296572250
PKG_SOURCE_VERSION:=fd400a6e8e7f8401772b22e994fd8fb936dd093f
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