Compare commits

..

127 Commits

Author SHA1 Message Date
Amin Ben Romdhane
ded9e8d248 timemngr: 1.1.0 2024-08-29 12:14:25 +02:00
Amin Ben Romdhane
4b5a232a9e bbfdm: Introduce a new libbbfdm-ubus library 2024-08-29 12:12:58 +02:00
Mohd Husaam Mehdi
bbe85d77a3 dhcpmngr: handle the case when unbound is used instead of dnsmasq 2024-08-29 15:34:18 +05:30
Mohd Husaam Mehdi
172581b794 dnsmngr: add logic to select and handle unbound backend 2024-08-29 15:33:50 +05:30
Anjan Chanda
2b965738cb decollector: 6.0.1.0 2024-08-29 11:51:37 +02:00
Mohd Husaam Mehdi
47fe2abfe0 dnsmngr: add unbound as selectable backend
* add dependencies for different backends in dhcpmngr and
  dnsmngr
* use CFLAG to indicate to data model code which backend is being
  used currently
* add uci-defaults script to set leasetrigger if unbound is dns
  backend
2024-08-29 09:06:15 +00:00
Vivek Kumar Dutta
5068f2ae2d fluent-bit: updated HASH 2024-08-29 14:25:40 +05:30
Janusz Dziedzic
479df88a67 map-agent: 6.1.1.12 2024-08-29 06:44:09 +00:00
Suvendhu Hansa
be93ce6e1e obuspa: expose mqtt and stomp datamodel for cwmp 2024-08-29 06:36:17 +00:00
Janusz Dziedzic
f41f010aa9 map-controller: 6.1.1.8 2024-08-29 06:30:15 +00:00
Yalu Zhang
72aa9ac89a Update packages libvoice-d2 and voicemngr
Generate RTP events for DTMF pressed on a DECT handset
2024-08-28 15:33:09 +02:00
Anjan Chanda
77a4bee249 ieee1905: 8.5.6 2024-08-28 15:22:43 +02:00
Janusz Dziedzic
54bd79427e wifimngr: 17.3.6 2024-08-28 11:04:57 +00:00
Filip Matusiak
1d773de3ca map-controller: 6.1.1.7 2024-08-28 10:24:22 +02:00
Jakob Olsson
791881dd85 map-agent: 6.1.1.11 2024-08-27 16:45:27 +02:00
Janusz Dziedzic
fc7c6e123d wifimngr: 17.3.5 2024-08-26 14:45:29 +00:00
Janusz Dziedzic
e3af6258f5 Revert "map-agent: disable mlo for extender and 6GHz"
This reverts commit 45bb27cff4.
2024-08-26 14:43:46 +00:00
Piotr Kubik
0bf9cc31d0 dectmngr 3.6.9: Fix a build error for strtol() after OpenWrt version uplift 2024-08-26 07:53:43 +00:00
Suvendhu Hansa
c3a0c839a8 obuspa: Run USPAgent as datamodel micro-service 2024-08-26 11:39:23 +05:30
Suvendhu Hansa
4b84c570b5 Fix e2e session configuration 2024-08-23 20:11:06 +05:30
Markus Gothe
57a8f7e98a update package libethernet
* libethernet: Improve counter logic for Airoha.
2024-08-23 12:48:52 +02:00
Andreas Gnau
0483212986 iopsys-analytics: Do not set hostname
* f448cfe9264 Revert "uci-defaults: Add hostname script"

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-08-22 17:24:07 +02:00
Janusz Dziedzic
96ad10a2b0 wifimngr: 17.3.4 2024-08-22 12:33:57 +00:00
Janusz Dziedzic
a7fbef8753 libwifi: 7.5.3 2024-08-22 12:32:56 +00:00
Marek Puzyniak
1443111081 map-agent: 6.1.1.10 2024-08-21 14:22:09 +00:00
Amin Ben Romdhane
9c78c6e78d bbfdm: 1.10.4 2024-08-20 12:56:15 +02:00
Amin Ben Romdhane
0aa3452fdb tr143: 1.0.5 2024-08-20 12:52:51 +02:00
Amin Ben Romdhane
2ca261f10d tr471: 1.0.5 2024-08-20 12:52:17 +02:00
Amin Ben Romdhane
bbe62b4c7b udpecho: 2.2.3 2024-08-20 12:51:54 +02:00
Amin Ben Romdhane
fd08ddde07 twamp: 1.4.6 2024-08-20 12:51:26 +02:00
Amin Ben Romdhane
6020c2d64b netmngr: 1.0.0 2024-08-20 12:50:30 +02:00
Vivek Kumar Dutta
012efefbad obuspa: enable SessionMode uci config 2024-08-20 12:38:33 +05:30
Vivek Kumar Dutta
a18d9af782 obuspa: Integrate obuspa v8.0.8 2024-08-20 10:25:45 +05:30
Vivek Kumar Dutta
5bc6d6aaa9 obuspa: Fix parsing of event data 2024-08-19 22:34:38 +05:30
Vivek Kumar Dutta
bedb6b8afb bbfdm: Update event schema to align 2024-08-19 22:06:21 +05:30
Filip Matusiak
3eeb24fea8 map-controller: 6.1.1.6 2024-08-19 13:34:13 +00:00
Filip Matusiak
645d6d9beb map-controller: config: steering intervals 2024-08-19 13:34:13 +00:00
Vivek Kumar Dutta
20cf6d1654 bbfdm: fix setting empty value for json plugin 2024-08-19 16:54:03 +05:30
Vivek Kumar Dutta
5bbab3b822 icwmp: align with bbfdm 2024-08-17 13:43:27 +00:00
Vivek Kumar Dutta
0a73c8150b obuspa: use bbf.config in place of transactions 2024-08-17 13:43:27 +00:00
Amin Ben Romdhane
8619514bdb bbfdm: Remove transaction APIs 2024-08-17 13:43:27 +00:00
Yalu Zhang
1ad9254588 dectmngr-3.6.8: Change the reset procedures for DCX81 chip 2024-08-16 16:00:22 +02:00
Mohd Husaam Mehdi
2bff75633e dnsmngr: add compile time option for enabling DNS.SD support 2024-08-16 18:12:50 +05:30
Rahul Thakur
fa9bfb428e logmngr: implement fail2ban for ssh
* handle both openssh and dropbear for fail2ban
2024-08-16 12:21:30 +00:00
Rahul Thakur
ab2766f79b logmngr: integrate fail2ban 2024-08-16 12:21:30 +00:00
Markus Gothe
bcdb31c830 qosmngr: Solve issue with L3 HW NAT for DSCP.
When doing classification on DSCP values we need
to ensure that the values are correctly hashed
for the L3 HW NAT, otherwise identical flows
with different DSCP values will end up with
the same QoS priority and queue.
2024-08-16 11:37:32 +02:00
Markus Gothe
32203771f6 qosmngr: Handle L3 flows with different p-bits correctly.
The L3 HW NAT will match the flows based on an IP header 5-tuple.
However if we are doing classification based on p-bits at the
same time and we want to use this for QoS we need to make sure
to add a VIP packet matcher to send this info to the PPE for
hashing the flow.
2024-08-15 16:51:48 +02:00
Sukru Senli
2ff18658c9 netmode: Add README 2024-08-13 11:57:32 +02:00
Rahul Thakur
29979d3559 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-13 06:10:08 +00:00
Vivek Kumar Dutta
7e56b7eca4 dnsmngr: align with bbfdm 2024-08-13 10:35:19 +05:30
Suvendhu Hansa
7d7c89d24f icwmp: apply non-critical services immediately 2024-08-08 14:55:48 +00:00
Jakob Olsson
07701b459b map-agent: 6.1.1.9 2024-08-08 16:41:52 +02:00
Vivek Kumar Dutta
6c6d1eae5f icwmp: Align with bbfdm 2024-08-08 10:30:55 +05:30
Vivek Kumar Dutta
58a91d6a7d bbfdm: 1.10.0
- Optimize CPU usages
- Remove support to delete all instances at once
2024-08-08 10:28:25 +05:30
Yalu Zhang
b033b53958 dectmngr 3.6.7: Fix building errors in pipeline job api_test due to libgpiod APIs 2024-08-06 15:41:29 +02:00
Jakob Olsson
f5df102fd9 map-agent: 6.1.1.8 2024-08-06 15:01:29 +02:00
Rahul Thakur
d1f16dc432 logmngr: add logrotate support
* add support for logrotate functionality to logmngr
2024-08-06 08:43:32 +00:00
Jakob Olsson
0884ecd15e libdpp: 2.1.1 2024-08-06 10:33:24 +02:00
Vivek Kumar Dutta
787570e7c7 sulu: updated readme 2024-08-05 14:46:14 +05:30
Vivek Kumar Dutta
33387c8e40 sulu: updated readme 2024-08-05 14:14:14 +05:30
Vivek Kumar Dutta
1b63c05762 sulu: readme update 2024-08-05 13:46:36 +05:30
Vivek Kumar Dutta
c816ee7358 sulu: readme update 2024-08-05 12:53:53 +05:30
Markus Gothe
71c92846d2 update package ebtables-extensions
* 35fb79f9 ebt_vlantranslation: Fix check for tag.
2024-08-03 08:00:48 +02:00
Mohd Husaam Mehdi
fdf005fd8f logmngr: update data model implementation
update to use correct data type for FilePath param and add
DM_REFERENCE flag to VendorLogFile param
2024-08-02 07:12:28 +00:00
Vivek Kumar Dutta
ddac1730e6 bbfdm: fix setting list of datamodel references 2024-08-01 16:39:13 +05:30
Vivek Kumar Dutta
c5e76fe6d4 icwmp: Fix enable/disable of ManagementServer from USP 2024-08-01 16:22:21 +05:30
Vivek Kumar Dutta
eb7df8993c sulu: doc update on how to add sulu user 2024-08-01 16:14:22 +05:30
Vivek Kumar Dutta
0c0e09fb2d timemngr: 1.0.22 2024-08-01 10:31:21 +05:30
Markus Gothe
834921f50b Integrate obuspa 8.0.1.9. 2024-07-31 18:55:22 +02:00
Amin Ben Romdhane
f161417d64 self-diagnostics: 1.0.8 2024-07-31 17:38:13 +02:00
Amin Ben Romdhane
98689253d0 swmodd: 2.5.16 2024-07-31 15:35:53 +02:00
Amin Ben Romdhane
2be2045403 usermngr: 1.2.18 2024-07-31 15:34:55 +02:00
Amin Ben Romdhane
332793e0a8 periodicstats: 1.5.12 2024-07-31 15:34:02 +02:00
Amin Ben Romdhane
736f77087e packet-capture-diagnostics: 1.0.1 2024-07-31 15:32:53 +02:00
Amin Ben Romdhane
274d25094d tr471: 1.0.4 2024-07-31 15:31:55 +02:00
Amin Ben Romdhane
636249c142 tr143: 1.0.4 2024-07-31 15:31:07 +02:00
Amin Ben Romdhane
7bf598573b bbfdm: 1.9.15 2024-07-31 15:30:06 +02:00
Amin Ben Romdhane
09588fe45e wifidmd: 1.0.8 2024-07-31 15:29:14 +02:00
Amin Ben Romdhane
3f95d1f3f1 dnsmngr: 1.0.7 2024-07-31 15:27:01 +02:00
Vivek Kumar Dutta
87425e5db9 wifidmd: Fix ChannelScanRequest() without ChannelList 2024-07-30 19:12:27 +05:30
Suvendhu Hansa
a7f1342ad7 bulkdata: Fix status value 2024-07-30 19:09:16 +05:30
Vivek Kumar Dutta
680c4b8f2a self-diagnostics: updated netstat command to collect all 2024-07-30 07:27:47 +00:00
Vivek Kumar Dutta
c897647054 icwmp: fix random 9005 error with GPN 2024-07-30 12:30:05 +05:30
Mohd Husaam Mehdi
d4715fd1ad bbfdm: merge activeport.c into ip.c 2024-07-29 19:54:54 +05:30
Vivek Kumar Dutta
8c2a7cfeac bbfdm: Fix segfault while loading json plugin 2024-07-27 18:26:15 +05:30
Amit Kumar
b898b5761b urlfilter: added delete of ebtables rule on stop 2024-07-26 11:43:29 +00:00
Mohd Husaam Mehdi
c298b611d2 bbfdm: remove active-port package
implementation has been moved to libbfdm, so json based micro
service is not needed anymore for Device.IP.ActivePort
2024-07-26 17:12:09 +05:30
Vivek Kumar Dutta
b43fd6a3c0 timemngr: use stratum level for status 2024-07-26 17:04:16 +05:30
Suvendhu Hansa
53fc9f5782 icwmp: wait for clock sync before first inform 2024-07-26 11:24:16 +00:00
Janusz Dziedzic
7e975f95b5 map-agent: 6.1.1.7 2024-07-25 11:41:44 +00:00
Mohd Husaam Mehdi
3ee64793cc logmngr: add support for Device.Syslog. datamodel object 2024-07-25 16:51:28 +05:30
Janusz Dziedzic
45bb27cff4 map-agent: disable mlo for extender and 6GHz
Temporary workaround for QCA crash
2024-07-25 10:00:23 +00:00
Amit Kumar
b15d45731e urlfilter: handled DNS received over TCP
* Added iptables rule to handle DNS packet received over TCP
* Added ebtables rule with skiplog to avoid DNS packet accelration

urlfilter: updated commit hash in Makefile
2024-07-25 05:59:58 +00:00
Amit Kumar
f043b4e0d9 firewallmngr: updated commit hash
* updated commit hash for changes for Device.Firewall.Type.
2024-07-25 10:52:34 +05:30
Vivek Kumar Dutta
328bc26684 tr471: fix datatype for IPLayerCapSupportedControlProtocolVersion 2024-07-25 09:49:15 +05:30
Markus Gothe
7a06a9e479 ebtables: Use --concurrent to avoid race conditions.
Add --concurrent to missing places.
2024-07-24 20:01:05 +02:00
Vivek Kumar Dutta
77f50aaa16 icwmp: Fix 503 error on CR when path defined 2024-07-24 12:12:35 +05:30
Vivek Kumar Dutta
ca646f8243 tr471: Fix default values 2024-07-23 16:47:42 +05:30
Vivek Kumar Dutta
b7efd787cb swmodd: Fix RequestedState cwmp parameter 2024-07-23 16:22:48 +05:30
Rahul Thakur
91e9278cba logmngr: add logread and default uci config
* all logging packages have a custom implmentation for logread,
  which is a command that can be invoked to view the logs. Hence,
  it makes sense for logmngr to have a logread to accompany it
  as well. Support for the same is added via this commit.
* the approach is simplistic and follows syslog-ng with the
  slight enhancement of reading the logfile from logmngr uci
* support to generate default uci config for logmngr which is
  to write logs to /var/log/messages
2024-07-23 10:32:18 +00:00
Vivek Kumar Dutta
1b1598273d usbmngr: added missing required dm params 2024-07-22 19:57:28 +05:30
Vivek Kumar Dutta
272b7fce34 ieee1905: remove unsupported datamodel parameters 2024-07-22 14:53:23 +05:30
Vivek Kumar Dutta
72f0044f1a dslmngr: Fix validation error on DestinationAddress 2024-07-22 14:48:15 +05:30
Vivek Kumar Dutta
a22a2c4386 icwmp: Allow configuration of cwmp params from USP 2024-07-22 12:30:46 +05:30
Vivek Kumar Dutta
a7a3352bca icwmp: increased diagnostics timer to 60 sec 2024-07-21 09:58:17 +05:30
Vivek Kumar Dutta
38e12b5b95 bbfdm: Added FriendlyName in DeviceInfo 2024-07-19 16:01:50 +05:30
Rahul Thakur
10f3015d32 logmngr: remote uci option file_path
* this is a bit of an overkill and not needed. Instead, we can use
option file to have full path to file including file name.

example: /var/log/messages

* other formatting errors and remove unused function in syslog-ng
2024-07-18 15:48:51 +05:30
Rahul Thakur
3e14637e3d logmngr: add support for syslog-ng backend
- add lib script to convert logmngr uci to syslog-ng.conf
- update makefile to install proper lib file
- fix couple of minor bugs found in fluent-bit.sh
- fix fluent-bit makefile to download code from git
2024-07-18 07:09:41 +00:00
Suvendhu Hansa
a03c7f0681 xmppc: Added LastChangeDate and TLSEstablished DM 2024-07-18 09:20:41 +05:30
Vivek Kumar Dutta
2053e3281f wifidmd: Added MLDUnit in SSID 2024-07-18 09:17:22 +05:30
Vivek Kumar Dutta
625fd2a488 bbfdm: 1.9.11 2024-07-16 21:24:12 +05:30
Vivek Kumar Dutta
99178dacd1 swmodd: Fix race condition in DUStateChange event 2024-07-16 19:54:03 +05:30
Mohd Mehdi
947fe9ef99 bbfdm: add support for Device.IP.ActivePort
active-port sub-package added, which installs:

* JSON datamodel plugin for ActivePort data model object
* daemon that implements active-port ubus call
2024-07-16 14:10:37 +00:00
Vivek Kumar Dutta
d99da1039b tr143: Added required missing usp parameters 2024-07-16 19:27:51 +05:30
Anjan Chanda
94e507b607 libwifi: 7.5.2 2024-07-16 15:38:31 +02:00
Rahul Thakur
eb7fe9572d logmngr: add package
* add logmngr pkg makefile
* add logmngr lib file for fluent-bit as backend
* add logmngr init file
2024-07-15 12:51:45 +00:00
Rahul Thakur
4f9dae3d0e fluent-bit: make functional
* make the fluent-bit functional on target with iowrt
* resolve crash with file output plugin
* setup init file
* setup default conf file - no logging
2024-07-15 12:51:45 +00:00
Anjan Chanda
dc650533f4 ieee1905: 8.5.0 2024-07-15 14:00:49 +02:00
Anjan Chanda
6521b012b3 wifimngr: 17.3.3 2024-07-15 13:59:56 +02:00
Janusz Dziedzic
c75fb703d2 wifimngr: 17.3.2 2024-07-15 11:43:37 +00:00
Janusz Dziedzic
ab250abfdb libwifi: 7.5.1 2024-07-15 11:43:37 +00:00
Rahul Thakur
37111f2233 update package libethernet
* d94e302 libethernet: removed unwanted code in rmon stats
* a82181d libethernet: corrected bcm rmonstats
* be00aa9 econet: Handle unbound HSGMII LAN interfaces.
2024-07-15 16:32:24 +05:30
Rahul Thakur
c4fa5713a2 update package qosmngr
* f6b77d1 Removed unsupported App and Flow parameters
2024-07-15 16:29:39 +05:30
Vivek Kumar Dutta
657b2c7b65 bbfdm: Fix add/del object notification with operate cmd 2024-07-15 11:57:22 +05:30
Vivek Kumar Dutta
b702ff6564 swmodd: Fix duplicate parameters in DUStateChange! 2024-07-15 11:55:18 +05:30
Vivek Kumar Dutta
fb1dc90367 icwmp: optimized InstanceAlias handling 2024-07-13 13:13:38 +05:30
Vivek Kumar Dutta
e57b39b430 bbfdm: Move support for InstanceAlias to cwmp 2024-07-13 13:11:36 +05:30
83 changed files with 1985 additions and 1334 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.9.7
PKG_VERSION:=1.11.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:=7cdea20a2de6bb03eb01f6335e8d4d9660292fee
PKG_SOURCE_VERSION:=1537993fc84f9abf367d39c2b83676c5c6d5c58c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,6 +32,14 @@ define Package/libbbfdm-api
ABI_VERSION:=1.0
endef
define Package/libbbfdm-ubus
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF datamodel ubus library, provides API to expose datamodel over ubus
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api
endef
define Package/libbbfdm
SECTION:=utils
CATEGORY:=Utilities
@@ -46,7 +54,7 @@ define Package/bbfdmd
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm +jq +bbf_configmngr
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm-ubus +libbbfdm +jq +bbf_configmngr
endef
define Package/bbf_configmngr
@@ -70,6 +78,10 @@ define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm-ubus/description
Library contains the APIs to expose data model over ubus
endef
define Package/libbbfdm/description
Library contains the data model tree, It includes basic TR181 nodes.
endef
@@ -112,6 +124,11 @@ define Package/libbbfdm-api/install
echo "$(CONFIG_BBF_OBFUSCATION_KEY)" > $(1)/etc/bbfdm/.secure_hash
endef
define Package/libbbfdm-ubus/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-ubus/libbbfdm-ubus.so $(1)/lib/
endef
define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
@@ -170,11 +187,16 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-api
$(INSTALL_DIR) $(1)/usr/include/libbbfdm-ubus
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/*.h $(1)/usr/include/libbbfdm-api/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-ubus/bbfdm-ubus.h $(1)/usr/include/libbbfdm-ubus/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbfdm-api/include/*.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-ubus/libbbfdm-ubus.so $(1)/usr/lib
endef
$(eval $(call BuildPackage,bbf_configmngr))
$(eval $(call BuildPackage,libbbfdm-api))
$(eval $(call BuildPackage,libbbfdm-ubus))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,bbfdmd))

View File

@@ -1,8 +1,6 @@
config bbfdmd 'bbfdmd'
option enable '1'
option loglevel '1'
option refresh_time '120'
option transaction_timeout '30'
option loglevel '3'
option subprocess_level '2'
config micro_services 'micro_services'

View File

@@ -6,10 +6,20 @@ STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbf_configd
create_needed_directories()
{
mkdir -p /tmp/bbfdm/.cwmp
mkdir -p /tmp/bbfdm/.usp
mkdir -p /tmp/bbfdm/.bbfdm
}
start_service()
{
create_needed_directories
procd_open_instance "bbf_configd"
procd_set_param command ${PROG}
#procd_append_param command -d
procd_set_param respawn
procd_close_instance "bbf_configd"
}

View File

@@ -22,8 +22,6 @@ validate_bbfdm_bbfdmd_section()
'sock:string' \
'debug:bool:false' \
'loglevel:uinteger:1' \
'refresh_time:uinteger:0' \
'transaction_timeout:uinteger:30' \
'subprocess_level:uinteger'
}
@@ -41,7 +39,7 @@ configure_bbfdmd()
[ "${enable}" -eq 0 ] && return 0
if [ -f "${BBFDM_JSON_INPUT}" ]; then
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
echo "$(jq --arg log ${loglevel} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "subprocess_level": $level}' ${BBFDM_JSON_INPUT})" > "${BBFDM_TEMP_DIR}/input.json"
fi
procd_set_param command ${PROG}

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.10
PKG_VERSION:=2.1.11
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=e472e90feec31d9f318ea8c732ab564002e25db1
PKG_SOURCE_VERSION:=5dd9cd3cfc95e9dce5f64fe9cadd274bb31b8fa6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -12,12 +12,21 @@ start_service() {
config_load bulkdata
config_get_bool enable bulkdata enable 1
[ "$enable" -eq "1" ] && {
if [ ! -f "/var/state/bulkdatad" ]; then
touch /var/state/bulkdatad
uci -q -c /var/state set bulkdatad.global='global'
uci -q -c /var/state commit bulkdatad
fi
if [ "$enable" -eq "1" ]; then
procd_open_instance "bulkdata"
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance "bulkdata"
}
else
uci -q -c /var/state set bulkdatad.global.status='Disabled'
uci -q -c /var/state commit bulkdatad
fi
}
reload_service() {

View File

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

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.6.6
PKG_VERSION:=3.6.9
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=85c173d1fac535726b2e750be8c282b74fb7dbca
PKG_SOURCE_VERSION:=82d5bae7ef1d54b41029c9f87e8c821cde38a28e
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.2
PKG_VERSION:=1.0.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=4c89a3f12686343e3cca23819255744ac06dfb22
PKG_SOURCE_VERSION:=93f756f80a9391afd9b01f2608e031c4db3ca48b
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,9 @@ define Package/dhcpmngr
SECTION:=net
CATEGORY:=Network
TITLE:=Package to add Device.DHCPv4 and v6 data model support.
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +odhcpd
DEPENDS+=+DNSMNGR_DNS_SD:umdns
DEPENDS+=+DNSMNGR_BACKEND_DNSMASQ:dnsmasq
endef
define Package/dhcpmngr/description
@@ -44,6 +46,10 @@ endif
define Package/dhcpmngr/install
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_lease_start_time.user $(1)/etc/udhcpc.user.d/udhcpc_lease_start_time.user
ifeq ($(CONFIG_DNSMNGR_BACKEND_UNBOUND),y)
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DATA) ./files/etc/uci-defaults/unbound.odhcpd.uci_default $(1)/etc/uci-defaults/16-set-unbound-as-odhcpd-leasetrigger
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdhcpmngr.so $(1) $(PKG_NAME)
endef

View File

@@ -0,0 +1,18 @@
#!/bin/sh
# update odhcpd uci to use unbound's script as leasetrigger
uci -q get dhcp.odhcpd >/dev/null 2>&1 && {
maindhcp="$(uci -q get dhcp.odhcpd.maindhcp)"
# if odhcpd is the main dhcp
[ "$maindhcp" = "1" ] || [ "$maindhcp" = "true" ] || [ "$maindhcp" = "on" ] && {
# if unbound daemon and unbound script file is present
[ -e /usr/lib/unbound/odhcpd.sh ] && [ -e /usr/sbin/unbound ] && {
# then set unbound script as leasetrigger in dhcp UCI
uci -q set dhcp.odhcpd.leasetrigger='/usr/lib/unbound/odhcpd.sh'
uci commit dhcp
}
}
}
exit 0

30
dnsmngr/Config.in Normal file
View File

@@ -0,0 +1,30 @@
if PACKAGE_dnsmngr
menu "Configuration"
config DNSMNGR_DNS_SD
bool "Include Device.DNS.SD. TR-181 support"
default y
help
Set this option to include support for TR-181 DNS.SD. object.
choice
prompt "Select backend for DNS management"
default DNSMNGR_BACKEND_DNSMASQ
depends on PACKAGE_dnsmngr
help
Select which backend daemon to use for DNS
config DNSMNGR_BACKEND_DNSMASQ
bool "Use dnsmasq for dns and dhcp"
help
Enable this option to use dnsmasq + odhcpd for dns and dhcp.
config DNSMNGR_BACKEND_UNBOUND
bool "Use unbound with odhcpd-full for dns and dhcp"
help
Enable this option to use unbound + odhcpd for dns and dhcp.
endchoice
endmenu
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.6
PKG_VERSION:=1.0.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=03d8d79c1221adb92b5789c03e2489d26c6ae184
PKG_SOURCE_VERSION:=dd7a285798b48e199f5e5d90d9c20cb5e0c14888
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -27,23 +27,47 @@ MAKE_PATH:=src
define Package/dnsmngr
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +dnsmasq +umdns
TITLE:=Package to add Device.DNS. datamodel support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +odhcpd
DEPENDS+=+DNSMNGR_DNS_SD:umdns
DEPENDS+=+DNSMNGR_BACKEND_DNSMASQ:dnsmasq
DEPENDS+=+DNSMNGR_BACKEND_UNBOUND:unbound-daemon +DNSMNGR_BACKEND_UNBOUND:unbound-control
TITLE:=Package to configure DNS backend and TR-181 support
endef
define Package/dnsmngr/description
Package to add Device.DNS. datamodel support.
Package to configure DNS backend and TR-181 support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(CONFIG_DNSMNGR_DNS_SD),y)
define Build/Compile
$(call Build/Compile/Default,all)
endef
else
define Build/Compile
$(call Build/Compile/Default,dns)
endef
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/dnsmngr/* $(PKG_BUILD_DIR)/
endef
endif
ifeq ($(CONFIG_DNSMNGR_BACKEND_DNSMASQ),y)
TARGET_CFLAGS += -DDNSMASQ_BACKEND
endif
define Package/dnsmngr/install
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/nslookup $(1)
ifeq ($(CONFIG_DNSMNGR_DNS_SD),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libdns_sd.so $(1) $(PKG_NAME)
endif
endef
$(eval $(call BuildPackage,dnsmngr))

View File

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

View File

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ebtables-extensions
PKG_VERSION:=1.0.3
PKG_VERSION:=1.0.4
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d3de8b0ac52ce9f96ef5a0a6277a6730879fc793
PKG_SOURCE_VERSION:=35fb79f95c47d90e3791c7e126048b451f078f24
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ebtables-extensions.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.4
PKG_VERSION:=1.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=d4bdd162cf37b3373df2448a70dcb4fbc1113535
PKG_SOURCE_VERSION:=94246676dc2e2db29b94fcffec1be3cee3ec8e9f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,18 +1,20 @@
#
# Copright (C) 2018 The Internet Foundation In Sweden
# Copyright (C) 2024 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fluentbit
PKG_VERSION:=1.0.0
PKG_NAME:=fluent-bit
PKG_VERSION:=3.1.0
PKG_RELEASE:=1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
PKG_SOURCE_VERSION:=v3.0.5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_VERSION=v$(PKG_VERSION)
PKG_MIRROR_HASH:=9a0730ee9b181b0514d50b32700fa29d711d1f44c6e3a78d67e4e5d830962d0f
endif
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
@@ -20,25 +22,32 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/fluentbit
define Package/fluent-bit
CATEGORY:=Utilities
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts
TITLE:=FluentBit
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
TITLE:=Fluent-Bit
URL:=https://fluentbit.io/
endef
define Package/fluentbit/description
define Package/fluent-bit/description
Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./fluent-bit/* $(PKG_BUILD_DIR)/
endef
endif
# General options
TARGET_LDFLAGS+=-lfts -latomic
TARGET_LDFLAGS +=-lfts -latomic
CMAKE_OPTIONS+= \
-DFLB_RELEASE=Yes \
-DFLB_SMALL=Yes \
-DFLB_SMALL=No \
-DEXCLUDE_FROM_ALL=true \
-DBUILD_SHAREDD_LIBS=Yes \
-DFLB_DEBUG=No \
-DFLB_SHARED_LIBS=Yes \
-DFLB_DEBUG=Yes \
-DFLB_ALL=No \
-DFLB_JEMALLOC=No \
-DFLB_EXAMPLES=No \
@@ -156,10 +165,12 @@ CMAKE_OPTIONS += \
-DFLB_OUT_CHRONICLE=No \
-DFLB_OUT_PGSQL=No
define Package/fluentbit/install
$(INSTALL_DIR) $(1)/etc/init.d
define Package/fluent-bit/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/fluent-bit
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/
$(INSTALL_DATA) ./files/fluent-bit.conf $(1)/etc/fluent-bit/fluent-bit.conf
$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/parsers.conf $(1)/etc/fluent-bit/parsers.conf
endef
$(eval $(call BuildPackage,fluentbit))
$(eval $(call BuildPackage,fluent-bit))

View File

@@ -0,0 +1,15 @@
[SERVICE]
flush 3
daemon Off
log_level info
parsers_file /etc/fluent-bit/parsers.conf
[INPUT]
name syslog
tag syslog
path /dev/log
[OUTPUT]
name null
match *

View File

@@ -0,0 +1,14 @@
diff --git a/plugins/out_file/file.c b/plugins/out_file/file.c
index 2e47c9666..42ace24c6 100644
--- a/plugins/out_file/file.c
+++ b/plugins/out_file/file.c
@@ -45,6 +45,9 @@
#define NEWLINE "\n"
#endif
+#undef PATH_MAX
+#define PATH_MAX 256
+
struct flb_file_conf {
const char *out_path;
const char *out_file;

View File

@@ -0,0 +1,45 @@
diff --git a/plugins/out_file/file.c b/plugins/out_file/file.c
index 2e47c9666..95d28e438 100644
--- a/plugins/out_file/file.c
+++ b/plugins/out_file/file.c
@@ -27,6 +27,7 @@
#include <msgpack.h>
#include <stdio.h>
+#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -55,6 +56,7 @@ struct flb_file_conf {
int csv_column_names;
int mkdir;
struct flb_output_instance *ins;
+ char hostname[256];
};
static char *check_delimiter(const char *str)
@@ -141,6 +143,9 @@ static int cb_file_init(struct flb_output_instance *ins,
}
}
+ if (gethostname(ctx->hostname, sizeof(ctx->hostname)) != 0)
+ snprintf(ctx->hostname, sizeof(ctx->hostname), "%s", "localhost");
+
tmp = flb_output_get_property("delimiter", ins);
ret_str = check_delimiter(tmp);
if (ret_str != NULL) {
@@ -233,12 +238,8 @@ static int template_output_write(struct flb_file_conf *ctx,
int i;
msgpack_object_kv *kv;
- /*
- * Right now we treat "{time}" specially and fill the placeholder
- * with the metadata timestamp (formatted as float).
- */
- if (!strncmp(key, "time", size)) {
- fprintf(fp, "%f", flb_time_to_double(tm));
+ if (!strncmp(key, "hostname", size)) {
+ fprintf(fp, "%s", ctx->hostname);
return 0;
}

6
icwmp/Config.in Normal file
View File

@@ -0,0 +1,6 @@
menu "Configuration"
config ICWMP_MGMT_FROM_USP
bool "Support configuration of ManagementServer from USP"
default y
endmenu

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.7.20
PKG_VERSION:=9.8.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=42ac1398f9b4c250f35fdff50f1a389405900cd1
PKG_SOURCE_VERSION:=f16a9bcb529b199c5cebe2afe18828b5fa53e497
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,8 +32,21 @@ define Package/icwmp
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbfdm-api +libopenssl
MENU:=1
endef
define Package/icwmp/description
TR069 client implementation with bbfdm backend for TR181 support
endef
define Package/icwmp/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(CONFIG_ICWMP_MGMT_FROM_USP),y)
EXTRA_CFLAGS += -DCWMP_DUAL_SUPPORT=BBFDM_BOTH
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
@@ -51,6 +64,7 @@ define Package/icwmp/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_BIN) ./files/etc/critical_services.json $(1)/etc/icwmpd/critical_services.json
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/

View File

@@ -41,6 +41,7 @@ config cpe 'cpe'
option active_notif_throttle '0'
option disable_gatewayinfo '0'
option fw_upgrade_keep_settings '1'
option clock_sync_timeout '128'
config lwn 'lwn'
option enable '0'

View File

@@ -0,0 +1,11 @@
{
"services_list": [
"firewall",
"network",
"dhcp",
"stunc",
"xmpp",
"wireless",
"time"
]
}

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.4.6
PKG_VERSION:=8.5.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e2f68a0ba54a6abf3481cdbb24d2dcc81e7f199c
PKG_SOURCE_VERSION:=25925684c21de7494d4973b1799f5bd121014518
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=PROPRIETARY
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=aea91816de703cf1c72490f51c2aa73c2f61640d
PKG_SOURCE_VERSION:=f448cfe9264b4079f616b065244c4be24b516aba
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopsys-analytics.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdpp
PKG_VERSION:=2.1.0
PKG_VERSION:=2.1.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1f82436531d4bb094b0b74e99613e0dfc84eada3
PKG_SOURCE_VERSION:=6024efd3db9dd490c07465ea9b0c15120063165c
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/libdpp.git
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.109
PKG_VERSION:=7.2.111
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cc72f5ab0171cd0fc29bb48dafff6751ab2f0d9c
PKG_SOURCE_VERSION:=6e7216e657dfb59e869e393ef58e6b4593c16fc7
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

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_RELEASE:=1
PKG_VERSION:=1.1.12
PKG_VERSION:=1.1.13
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=772955d814af8bbf91cf5c76f128cd1d17755625
PKG_SOURCE_VERSION:=0b00d6e2772bf31e696fc974df071e6fcf972fa3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.5.0
PKG_VERSION:=7.5.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b85c43cca01d001a90604e11c7cf9286a5332c33
PKG_SOURCE_VERSION:=9a17fc7c9857f5976707322469a0e8581ead88a6
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

26
logmngr/Config.in Normal file
View File

@@ -0,0 +1,26 @@
if PACKAGE_logmngr
choice
prompt "Select backend for syslog management"
default LOGMNGR_BACKEND_FLUENTBIT
depends on PACKAGE_logmngr
help
Select which backend daemon to use for syslog management
config LOGMNGR_BACKEND_FLUENTBIT
bool "Use fluent-bit for log management"
help
Enable this option to use fluent-bit for log management.
config LOGMNGR_BACKEND_SYSLOG_NG
bool "Use syslog-ng for log management"
help
Enable this option to use syslog-ng for log management.
endchoice
config LOGMNGR_LOGROTATE
bool "Logrotate support"
depends on PACKAGE_logmngr
default y
help
It adds support for logrotate functionality.
endif

74
logmngr/Makefile Normal file
View File

@@ -0,0 +1,74 @@
#
# Copyright (C) 2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=logmngr
PKG_VERSION:=1.0.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=ec10abb3cc0f3b96eb806c9c67e18d9d134287e9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_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/logmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Logging Manager
DEPENDS:=+libbbfdm-api +LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
endef
define Package/logmngr/description
Configure log management. This package has the datamodel as well as the
the backend implementation for handling syslog.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./logmngr/* $(PKG_BUILD_DIR)/
endef
endif
define Package/logmngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/logmngr.init $(1)/etc/init.d/logmngr
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/logread $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/10-logmngr_config_generate $(1)/etc/uci-defaults/
$(INSTALL_DIR) $(1)/lib/logmngr
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/.
endif
ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/.
endif
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1)
ifeq ($(CONFIG_LOGMNGR_LOGROTATE),y)
$(INSTALL_BIN) ./files/11-logmngr_logrotate_config_generate $(1)/etc/uci-defaults/
$(INSTALL_DATA) ./files/lib/logmngr/logrotate.sh $(1)/lib/logmngr/.
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1)
endif
endef
$(eval $(call BuildPackage,logmngr))

View File

@@ -0,0 +1,23 @@
#!/bin/sh
if [ -s "/etc/config/logmngr" ]; then
if uci -q get logmngr.@globals[0] >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/logmngr
fi
fi
touch /etc/config/logmngr
uci set logmngr.globals=globals
uci set logmngr.globals.enable=1
uci set logmngr.a1=action
uci set logmngr.a1.name="ac1"
uci set logmngr.lf1=log_file
uci set logmngr.lf1.enable=1
uci set logmngr.lf1.action="ac1"
uci set logmngr.lf1.file="/var/log/messages"
uci commit logmngr

View File

@@ -0,0 +1,14 @@
#!/bin/sh
if [ -s "/etc/config/logmngr" ]; then
if uci -q get logmngr.@log_rotate[0] >/dev/null; then
# return if there is any valid content
exit
fi
uci set logmngr.lro1=log_rotate
uci set logmngr.lro1.enable=1
uci set logmngr.lro1.file_name="/var/log/messages"
uci set logmngr.lro1.file_count=1
uci set logmngr.lro1.max_file_size=1000000
uci commit logmngr
fi

View File

@@ -0,0 +1,321 @@
#!/bin/sh
. /lib/functions.sh
. /lib/logmngr/logrotate.sh
CONF_FILE=/etc/fluent-bit/fluent-bit.conf
TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf
create_config_file() {
mkdir -p /tmp/fluent-bit
rm -f ${TMP_CONF_FILE}
touch ${TMP_CONF_FILE}
}
create_service_section() {
# the service section of the fluent-bit.conf file has hardcoded values,
# no need to lookup any uci section to configure this section
echo "[SERVICE]" >> ${TMP_CONF_FILE}
echo " flush 3" >> ${TMP_CONF_FILE}
echo " daemon off" >> ${TMP_CONF_FILE}
echo " log_level info" >> ${TMP_CONF_FILE}
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
}
create_input_section() {
local tag="$1"
# the input in our case is always syslog, hence, this section of the
# fluent-bit.conf file has hardcoded values as well that do not depend
# on any uci value
echo "[INPUT]" >> ${TMP_CONF_FILE}
echo " name syslog" >> ${TMP_CONF_FILE}
echo " tag $tag" >> ${TMP_CONF_FILE}
echo " path /dev/log" >> ${TMP_CONF_FILE}
}
generate_facility_regex() {
local facility_level=$1
local pri=0
if [ "$facility_level" == "24" ]; then
# value 24 means all facility level, which is as good as not
# generating a filter section, so return
return
fi
# facility_level is a list value, hence, generate regex for
# each value
IFS=" "
for val in $facility_level; do
# as per rfc 5424 and 3164, pri in syslog msg is
# facility*8+severity. Severity value can range from 0-7 hence
# generate regex for each.
for sval in 0 1 2 3 4 5 6 7; do
pri=`expr $val \* 8 + $sval`
echo " regex pri $pri" >> ${TMP_CONF_FILE}
done
done
}
generate_severity_regex() {
local sev_level="$1"
local sev_compare="$2"
local sev_action="$3"
local pri=0
local param="exclude"
if [ "$sev_action" == "0" ]; then
param="regex"
fi
local fval=0
if [ "$sev_compare" == "0" ]; then
# generate regex for all facility values, with severity=sev_level
while [ $fval -le 23 ] ; do
pri=`expr $fval \* 8 + $sev_level`
echo " $param pri $pri" >> ${TMP_CONF_FILE}
fval=$((fval + 1))
done
elif [ "$sev_compare" == "1" ]; then
# generate regex for all severity value greater than or equal to
# sev_level. please, lower value have higher precedence, so sev_level
# 0 which is emergency has higher precedence than error which is 3
while [ $fval -le 23 ] ; do
sval=0
while [ $sev_level -ge $sval ]; do
pri=`expr $fval \* 8 + $sval`
echo " $param pri $pri" >> ${TMP_CONF_FILE}
sval=$((sval + 1))
done
fval=$((fval + 1))
done
fi
}
handle_filter_conf() {
local section="$1" # config filter
local filter_name="$2"
local name
# no need to proceed if name of filter section is not one of the values
# listed in option filter in config action section
config_get name $section name
if [ "$name" != "$filter_name" ]; then
return
fi
# as per data model, at a time either facility_level or severity_level can
# be specified along with pattern_match. hence, first process and generate
# regex for pattern_match which is common in both condition. Next, we will
# process facility_level and return if facility level is defined and not
# process severity related params at all.
local pattern_match
config_get pattern_match $section pattern_match
if [ -n "$pattern_match" ]; then
echo " regex $pattern_match" >> ${TMP_CONF_FILE}
fi
local facility_level
config_get facility_level $section facility_level
if [ -n "$facility_level" ]; then
generate_facility_regex $facility_level
# return from here since if facility_level is defined, then no
# need to process severity_level
return
fi
local sev_level
local sev_compare
local sev_action
config_get sev_level $section severity_level
if [ -n "$sev_level" ]; then
# value 1 of severity compare corresponds to data model
# and system default which is EqualorHigher
config_get sev_compare $section severity_compare 1
# value 0 of severity action corresponds to data model
# and system default that is log
config_get sev_action $section severity_action 0
generate_severity_regex $sev_level $sev_compare $sev_action
fi
}
create_filter_section() {
local match="$1"
echo "[FILTER]" >> ${TMP_CONF_FILE}
echo " name grep" >> ${TMP_CONF_FILE}
echo " match $match" >> ${TMP_CONF_FILE}
echo " logical_op or" >> ${TMP_CONF_FILE} # handle multiple filters
}
handle_filter_ref() {
local filter_name="$1"
config_foreach handle_filter_conf filter "$filter_name"
}
handle_log_file() {
local section="$1" # out_file section
local match="$2"
local action_ref
config_get action_ref $section action
if [ "$action_ref" != "$match" ]; then
return
fi
local enabled
config_get enabled $section enable
if [ "$enabled" == 0 ]; then
return
fi
local file
config_get file $section file
if [ -z "$file" ]; then
return
fi
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
echo " name file" >> ${TMP_CONF_FILE}
echo " match $match" >> ${TMP_CONF_FILE}
echo " file $file" >> ${TMP_CONF_FILE}
echo " format template" >> ${TMP_CONF_FILE}
echo " template {time} {hostname} {ident}: {message}" >> ${TMP_CONF_FILE}
}
handle_log_remote() {
local section="$1"
local match="$2"
local action_ref
config_get action_ref $section action
if [ "$action_ref" != "$match" ]; then
return
fi
local enabled
config_get enabled $section enable
if [ "$enabled" == 0 ]; then
return
fi
local address
config_get address $section log_ip
if [ -z "$address" ]; then
return
fi
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
echo " name syslog" >> ${TMP_CONF_FILE}
echo " match $match" >> ${TMP_CONF_FILE}
echo " host $address" >> ${TMP_CONF_FILE}
local proto # holds value tcp or udp
config_get proto $section proto
if [ -n "$proto" ]; then
if [ "$proto" == "tls" ]; then
echo " mode tcp" >> ${TMP_CONF_FILE}
echo " tls on" >> ${TMP_CONF_FILE}
else
echo " mode $proto" >> ${TMP_CONF_FILE}
fi
fi
local port
config_get port $section port
if [ -n "$port" ]; then
echo " port $port" >> ${TMP_CONF_FILE}
fi
local cert
local peer_verify
config_get cert $section cert
if [ -n "$cert" ]; then
echo " tls.crt_file $cert" >> ${TMP_CONF_FILE}
config_get peer_verify $section peer_verify
if [ "$peer_verify" == "1" ]; then
echo " tls.verify on" >> ${TMP_CONF_FILE}
fi
fi
}
handle_action() {
local section="$1"
local filter
config_get filter $section filter
# use config action option name as tag for input
local tag
config_get tag $section name
if [ -z "$tag" ]; then
return
fi
create_input_section $tag
if [ -n "$filter" ]; then
# the only fluentbit filter that is useful for the datamodel is
# grep. Also, fluentbit does not seem to handle multiple instances
# of FILTER of same kind. Hence, each filter section corresponding
# to an action entry in the uci would translate for us into a set of
# regex/exclude values instead of individual FILTER section per uci
# section filter is a list, treat according
create_filter_section $tag
IFS=" "
for finst in $filter; do
handle_filter_ref $finst
done
fi
# handle output, each action can be associated with a out_log and out_syslog
# section so figure out if any out_log or out_syslog section is associated
# with this and action and setup output accordingly.
config_foreach handle_log_file log_file "$tag"
config_foreach handle_log_remote log_remote "$tag"
}
handle_action_section() {
config_foreach handle_action action
}
apply_config_file() {
cp ${TMP_CONF_FILE} ${CONF_FILE}
}
PROG=/usr/sbin/fluent-bit
logmngr_init() {
create_config_file
config_load logmngr
local enabled
config_get enabled globals enable
if [ "$enabled" == "0" ]; then
return
fi
create_service_section
handle_action_section
apply_config_file
if [ -f /lib/logmngr/logrotate.sh ]; then
logrotate_init
fi
procd_open_instance logmngr
procd_set_param command $PROG -c $CONF_FILE
procd_set_param file $CONF_FILE
procd_set_param respawn
procd_close_instance
}

View File

@@ -0,0 +1,96 @@
#!/bin/sh
. /lib/functions.sh
LOGROTATE_FILE=/etc/logrotate.conf
LOGROTATE_TMP_FILE=/tmp/logrotate/logrotate.conf
create_logrotate_file() {
mkdir -p /tmp/logrotate
rm -f ${LOGROTATE_TMP_FILE}
touch ${LOGROTATE_FILE}
}
handle_logrotate() {
local section="$1"
local enabled
config_get enabled $section enable
if [ "$enabled" == "0" ]; then
return
fi
local file_name
config_get file_name $section file_name
if [ -z "$file_name" ]; then
# no file to rotate, return
return
fi
echo -e "$file_name {" >> ${LOGROTATE_TMP_FILE}
echo -e "\tcreate" >> ${LOGROTATE_TMP_FILE}
echo -e "\tmissingok" >> ${LOGROTATE_TMP_FILE}
echo -e "\tnotifempty" >> ${LOGROTATE_TMP_FILE}
local file_count
config_get file_count $section file_count
if [ -n "$file_count" ]; then
echo -e "\trotate $file_count" >> ${LOGROTATE_TMP_FILE}
fi
local max_file_size
config_get max_file_size $section max_file_size
if [ -n "$max_file_size" ]; then
echo -e "\tmaxsize $max_file_size" >> ${LOGROTATE_TMP_FILE}
fi
local duration
config_get duration $section duration
if [ -n "$duration" ]; then
echo -e "\tminutes $duration" >> ${LOGROTATE_TMP_FILE}
fi
local retention
config_get retention $section retention
if [ -n "$retention" ]; then
echo -e "\tmaxage $retention" >> ${LOGROTATE_TMP_FILE}
fi
local compression
config_get compression $section compression
if [ -n "$compression" ]; then
echo -e "\tcompress" >> ${LOGROTATE_TMP_FILE}
echo -e "\tcompresscmd $compression" >> ${LOGROTATE_TMP_FILE}
fi
echo -e "\tpostrotate" >> ${LOGROTATE_TMP_FILE}
echo -e "\t\tservice logmngr restart" >> ${LOGROTATE_TMP_FILE}
echo -e "\t\tsleep 1" >> ${LOGROTATE_TMP_FILE}
echo -e "\tendscript" >> ${LOGROTATE_TMP_FILE}
echo -e "}" >> ${LOGROTATE_TMP_FILE} # close the logfile section
}
apply_logrotate_file() {
cp ${LOGROTATE_TMP_FILE} ${LOGROTATE_FILE}
}
config_cron_job() {
# taking the liberty to configure the cron job hourly, that is, at the end
# of each hour, check if logrotation is needed. The logrotate daemon, when
# triggered hourly, will still honour the configure log rotation duration,
# the only slight different being that if the minutes for log rotation
# are configured in such a way that it falls within the hour, then the
# log rotation will be done at the completion of hour and not before. I do
# not think this is a drawback in the interest of keeping things simple.
sed -i '/logrotate/d' /etc/crontabs/root
echo "0 * * * * logrotate ${LOGROTATE_FILE}" >> /etc/crontabs/root
/etc/init.d/cron restart
}
logrotate_init() {
create_logrotate_file
config_foreach handle_logrotate log_rotate
apply_logrotate_file
config_cron_job
}

View File

@@ -0,0 +1,345 @@
#!/bin/sh
. /lib/functions.sh
. /lib/logmngr/logrotate.sh
CONF_FILE=/etc/syslog-ng.conf
TMP_CONF_FILE=/tmp/syslog-ng/syslog-ng.conf
create_config_file() {
mkdir -p /tmp/syslog-ng
rm -f ${TMP_CONF_FILE}
touch ${TMP_CONF_FILE}
}
create_option_section() {
# the option section of the syslog-ng.conf file has hardcoded values,
# no need to lookup any uci section to configure this section
echo -e "@version: 4.4" >> ${TMP_CONF_FILE}
echo -e '@include "scl.conf"' >> ${TMP_CONF_FILE}
echo -e "options {" >> ${TMP_CONF_FILE}
echo -e "\tchain_hostnames(no);" >> ${TMP_CONF_FILE}
echo -e "\tcreate_dirs(yes);" >> ${TMP_CONF_FILE}
echo -e "\tkeep_hostname(yes);" >> ${TMP_CONF_FILE}
echo -e "\tlog_fifo_size(256);" >> ${TMP_CONF_FILE}
echo -e "\tlog_msg_size(1024);" >> ${TMP_CONF_FILE}
echo -e "\tstats(freq(0));" >> ${TMP_CONF_FILE}
echo -e "\tflush_lines(0);" >> ${TMP_CONF_FILE}
echo -e "\tuse_fqdn(no);" >> ${TMP_CONF_FILE}
echo "};" >> ${TMP_CONF_FILE}
}
create_input_section() {
local tag="$1"
# the input in our case is always syslog, hence, this section of the
# fluent-bit.conf file has hardcoded values as well that do not depend
# on any uci value
echo -e "source $tag {" >> ${TMP_CONF_FILE}
echo -e "\tinternal();" >> ${TMP_CONF_FILE}
echo -e "\tunix-dgram("/dev/log");" >> ${TMP_CONF_FILE}
echo "};" >> ${TMP_CONF_FILE}
}
generate_facility_regex() {
local facility_level=$1
if [ "$facility_level" == "24" ]; then
# value 24 means all facility level, which is as good as not
# generating a filter section, so return
return
fi
# facility_level is a list value, hence, generate regex for
# each value
IFS=" "
for val in $facility_level; do
echo -e "\tfacility($val);" >> ${TMP_CONF_FILE}
done
}
generate_severity_regex() {
local sev_level="$1"
local sev_compare="$2"
local sev_action="$3"
if [ "$sev_compare" == "0" ]; then
case $sev_level in
"0") echo -e "\tlevel(emerg)" >> ${TMP_CONF_FILE}
;;
"1") echo -e "\tlevel(alert)" >> ${TMP_CONF_FILE}
;;
"2") echo -e "\tlevel(crit)" >> ${TMP_CONF_FILE}
;;
"3") echo -e "\tlevel(err)" >> ${TMP_CONF_FILE}
;;
"4") echo -e "\tlevel(warning)" >> ${TMP_CONF_FILE}
;;
"5") echo -e "\tlevel(notice)" >> ${TMP_CONF_FILE}
;;
"6") echo -e "\tlevel(info)" >> ${TMP_CONF_FILE}
;;
"7") echo -e "\tlevel(debug)" >> ${TMP_CONF_FILE}
;;
esac
elif [ "$sev_compare" == "1" ]; then
# generate regex for all severity value greater than or equal to
# sev_level
case $sev_level in
"0") echo -e "\tlevel(emerg)" >> ${TMP_CONF_FILE}
;;
"1") echo -e "\tlevel(alert..emerg)" >> ${TMP_CONF_FILE}
;;
"2") echo -e "\tlevel(crit..emerg)" >> ${TMP_CONF_FILE}
;;
"3") echo -e "\tlevel(err..emerg)" >> ${TMP_CONF_FILE}
;;
"4") echo -e "\tlevel(warning..emerg)" >> ${TMP_CONF_FILE}
;;
"5") echo -e "\tlevel(notice..emerg)" >> ${TMP_CONF_FILE}
;;
"6") echo -e "\tlevel(info..emerg)" >> ${TMP_CONF_FILE}
;;
"7") echo -e "\tlevel(debug..emerg)" >> ${TMP_CONF_FILE}
;;
esac
fi
}
handle_filter_conf() {
local section="$1" # config filter
local filter_name="$2"
local name
# no need to proceed if name of filter section is not one of the values
# listed in option filter in config action section
config_get name $section name
if [ "$name" != "$filter_name" ]; then
return
fi
echo -e "filter $name {" >> ${TMP_CONF_FILE}
# as per data model, at a time either facility_level or severity_level can
# be specified along with pattern_match. hence, first process and generate
# regex for pattern_match which is common in both condition. Next, we will
# process facility_level and return if facility level is defined and not
# process severity related params at all.
local pattern_match
config_get pattern_match $section pattern_match
if [ -n "$pattern_match" ]; then
# the pattern here is in tag=>value pair, hence, break the pattern
# and fill this filed
local tag=$(echo $pattern_match | awk '{print $1}')
local value=$(echo $pattern_match | awk '{print $2}')
echo -e "\tmatch("$value" value("$tag"))" >> ${TMP_CONF_FILE}
fi
local facility_level
config_get facility_level $section facility_level
if [ -n "$facility_level" ]; then
generate_facility_regex $facility_level
# return from here since if facility_level is defined, then no
# need to process severity_level
echo "};" >> ${TMP_CONF_FILE}
return
fi
local sev_level
local sev_compare
local sev_action
config_get sev_level $section severity_level
if [ -n "$sev_level" ]; then
# value 1 of severity compare corresponds to data model
# and system default which is EqualorHigher
config_get sev_compare $section severity_compare 1
# value 0 of severity action corresponds to data model
# and system default that is log
config_get sev_action $section severity_action 0
generate_severity_regex $sev_level $sev_compare $sev_action
fi
echo "};" >> ${TMP_CONF_FILE}
}
handle_filter_ref() {
local filter_name="$1"
config_foreach handle_filter_conf filter "$filter_name"
}
handle_log_file() {
local section="$1" # out_file section
local match="$2"
local filter="$3"
local action_ref
config_get action_ref $section action
if [ "$action_ref" != "$match" ]; then
return
fi
local enabled
config_get enabled $section enable
if [ "$enabled" == 0 ]; then
return
fi
local file
config_get file $section file
if [ -z "$file" ]; then
return
fi
echo -e "destination file_$match {" >> ${TMP_CONF_FILE}
echo -e "\tfile("$file");" >> ${TMP_CONF_FILE}
echo -e "};" >> ${TMP_CONF_FILE}
# now generate the log section for each action section to bring into effect
# the filter, destination, source sections create above
echo -e "log {" >> ${TMP_CONF_FILE}
echo -e "\tsource($tag);" >> ${TMP_CONF_FILE}
if [ -n "$filter" ]; then
IFS=" "
for finst in $filter; do
echo -e "\tfilter($finst);" >> ${TMP_CONF_FILE}
done
fi
echo -e "\tdestination(file_$match);" >> ${TMP_CONF_FILE} # log_file
echo -e "};" >> ${TMP_CONF_FILE} # close log section
}
handle_log_remote() {
local section="$1"
local match="$2"
local filter="$3"
local action_ref
config_get action_ref $section action
if [ "$action_ref" != "$match" ]; then
return
fi
local enabled
config_get enabled $section enable
if [ "$enabled" == 0 ]; then
return
fi
local address
config_get address $section log_ip
if [ -z "$address" ]; then
return
fi
echo -e "destination remote_$match {" >> ${TMP_CONF_FILE}
echo -e "\tsyslog(" >> ${TMP_CONF_FILE}
echo -e "\t\t"$address"" >> ${TMP_CONF_FILE}
local proto # holds value tcp or udp
config_get proto $section proto
if [ -n "$proto" ]; then
echo -e "\t\ttransport($proto)" >> ${TMP_CONF_FILE}
fi
local port
config_get port $section port
if [ -n "$port" ]; then
echo -e "\t\tport($port)" >> ${TMP_CONF_FILE}
fi
local cert
local peer_verify
config_get cert $section cert
if [ -n "$cert" ]; then
echo -e "\t\ttls(" >> ${TMP_CONF_FILE}
echo -e "\t\t\tcert-file($cert)" >> ${TMP_CONF_FILE}
config_get peer_verify $section peer_verify
if [ "$peer_verify" == "1" ]; then
echo -e "\t\t\tpeer-verify(required-trusted)" >> ${TMP_CONF_FILE}
fi
echo -e "\t\t)" >> ${TMP_CONF_FILE} # close tls section
fi
echo -e "\t);" >> ${TMP_CONF_FILE} # close syslog section
echo -e "};" >> ${TMP_CONF_FILE} # close destination section
# now generate the log section for each action section to bring into effect
# the filter, destination, source sections create above
echo -e "log {" >> ${TMP_CONF_FILE}
echo -e "\tsource($tag);" >> ${TMP_CONF_FILE}
if [ -n "$filter" ]; then
IFS=" "
for finst in $filter; do
echo -e "\tfilter($finst);" >> ${TMP_CONF_FILE}
done
fi
echo -e "\tdestination(remote_$match);" >> ${TMP_CONF_FILE} # log_file
echo -e "};" >> ${TMP_CONF_FILE} # close log section
}
handle_action() {
local section="$1"
local filter
config_get filter $section filter
# use config action option name as tag for input
local tag
config_get tag $section name
if [ -z "$tag" ]; then
return
fi
create_input_section $tag
if [ -n "$filter" ]; then
IFS=" "
for finst in $filter; do
handle_filter_ref $finst
done
fi
# handle output, each action can be associated with a out_log and out_syslog
# section so figure out if any out_log or out_syslog section is associated
# with this and action and setup output accordingly.
config_foreach handle_log_file log_file "$tag" "$filter"
config_foreach handle_log_remote log_remote "$tag" "$filter"
}
handle_action_section() {
config_foreach handle_action action
}
apply_config_file() {
cp ${TMP_CONF_FILE} ${CONF_FILE}
}
PROG=/usr/sbin/syslog-ng-ctl
logmngr_init() {
create_config_file
config_load logmngr
local enabled
config_get enabled globals enable
if [ "$enabled" == "0" ]; then
return
fi
create_option_section
handle_action_section
apply_config_file
if [ -f /lib/logmngr/logrotate.sh ]; then
logrotate_init
fi
procd_open_instance logmngr
procd_set_param command $PROG reload
procd_close_instance
}

View File

@@ -0,0 +1,16 @@
#!/bin/sh /etc/rc.common
START=12
STOP=89
USE_PROCD=1
. /lib/functions.sh
include /lib/logmngr
start_service() {
logmngr_init
}
service_triggers() {
procd_add_reload_trigger logmngr
}

108
logmngr/files/logread Normal file
View File

@@ -0,0 +1,108 @@
#!/bin/sh
# Shell script compatibility wrapper for /sbin/logread
#
# Copyright (C) 2019 Dirk Brenken <dev@brenken.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
. /lib/functions.sh
# use /var/log/messages as default
logfile="/var/log/messages"
handle_log_file() {
local section="$1"
local enabled
config_get enabled $section enable
if [ "$enabled" == 0 ]; then
return
fi
local file
config_get file $section file
if [ -z "$file" ]; then
return
fi
logfile="$file"
}
config_load logmngr
config_get logmngr_enabled globals enable
if [ "$logmngr_enabled" == "0" ]; then
printf "%s\n" "Error: logmngr is not enabled!"
exit 2
fi
# treat the last enabled log_file as logfile
config_foreach handle_log_file log_file
if [ ! -f "${logfile}" ]
then
printf "%s\n" "Error: logfile $logfile not found!"
exit 2
fi
usage()
{
printf "%s\n" "Usage: logread [options]"
printf "%s\n" "Options:"
printf "%5s %-10s%s\n" "-l" "<count>" "Got only the last 'count' messages"
printf "%5s %-10s%s\n" "-e" "<pattern>" "Filter messages with a regexp"
printf "%5s %-10s%s\n" "-f" "" "Follow log messages"
printf "%5s %-10s%s\n" "-h" "" "Print this help message"
}
if [ -z "${1}" ]
then
cat "${logfile}"
exit 0
else
while [ "${1}" ]
do
case "${1}" in
-l)
shift
count="${1//[^0-9]/}"
tail -n "${count:-50}" "${logfile}"
exit 0
;;
-e)
shift
pattern="${1}"
grep -E "${pattern}" "${logfile}"
exit 0
;;
-f)
tail -f "${logfile}"
exit 0
;;
-fe)
shift
pattern="${1}"
tail -f "${logfile}" | grep -E "${pattern}"
exit 0
;;
-h|*)
usage
exit 1
;;
esac
shift
done
fi

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.1.1.6
PKG_VERSION:=6.1.1.12
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=775f7d6316b980fba90c837ff483af914d546500
PKG_SOURCE_VERSION:=2f83ba1aa0655c07a2d3e40df034f4f81139a571
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:=6.1.1.5
PKG_VERSION:=6.1.1.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=cb27de727b787bdb58bc4bf42fdef8732cb78134
PKG_SOURCE_VERSION:=c947d0783032cc2eb6e627bf8d1d32c38196ab8b
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0

View File

@@ -27,6 +27,9 @@ config sta_steering
option report_rcpi_threshold_2g '80'
option report_rcpi_threshold_5g '96'
option report_rcpi_threshold_6g '96'
option steer_retry_int '30'
option steer_int '180'
option steer_disable_int '600'
###################
# Default AP sections credentials will by updated

48
netmngr/Makefile Normal file
View File

@@ -0,0 +1,48 @@
#
# Copyright (C) 2020-2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.0.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=775bd689558266380691207e1809b650ed90cee2
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
define Package/netmngr
CATEGORY:=Utilities
TITLE:=Network Data Model Support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
endef
define Package/netmngr/description
Package to add Network data model support.
endef
MAKE_PATH:=src
define Package/netmngr/install
$(BBFDM_INSTALL_MS_DM) -u Network $(PKG_BUILD_DIR)/src/libnetmngr.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/src/libinterface_stack.so $(1)
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) ~/git/netmngr/* $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,netmngr))

109
netmode/README.md Normal file
View File

@@ -0,0 +1,109 @@
# Creating Custom Netmodes in IOWRT
This guide provides developers with detailed instructions on how to create and manage custom network modes (netmodes) in IOWRT. The `netmode` script allows for flexible network configuration, and developers can define their own modes by structuring the necessary files and scripts within the `/etc/netmodes/` directory.
## Table of Contents
1. [Overview of Netmodes](#overview-of-netmodes)
2. [Directory Structure](#directory-structure)
3. [Creating a Custom Netmode](#creating-a-custom-netmode)
- [Step 1: Pre-Execution Scripts](#step-1-pre-execution-scripts)
- [Step 2: UCI Configuration Files](#step-2-uci-configuration-files)
- [Step 3: Custom Execution Scripts](#step-3-custom-execution-scripts)
- [Step 4: Post-Execution Scripts](#step-4-post-execution-scripts)
4. [Enabling and Switching Netmodes](#enabling-and-switching-netmodes)
## Overview of Netmodes
Netmodes in IOWRT provide a way to switch between different network configurations based on the needs of the environment. Developers can create custom netmodes by organizing scripts and configuration files in specific directories under `/etc/netmodes/<NETMODE_NAME>`.
## Directory Structure
A custom netmode is defined within the `/etc/netmodes/<NETMODE_NAME>` directory, which should contain the following subdirectories:
- **/lib/netmode/pre/**: Generic scripts executed before the netmode-specific configurations are applied.
- **/etc/netmodes/<NETMODE_NAME>/uci/**: Contains UCI configuration files that will be copied to `/etc/config/` during the application of the netmode.
- **/etc/netmodes/<NETMODE_NAME>/scripts/**: Custom scripts specific to the netmode that are executed after the UCI configurations are applied.
- **/lib/netmode/post/**: Generic scripts executed after the netmode-specific configurations are completed.
## Creating a Custom Netmode
To create a new netmode, follow these steps:
### Step 1: Pre-Execution Scripts
Scripts located in `/lib/netmode/pre/` are executed before any mode-specific actions. These are typically used for preparing the system or cleaning up configurations from the previous netmode.
- **Create Pre-Execution Scripts**:
- Place your generic pre-execution scripts in `/lib/netmode/pre/`.
- Example script (`/lib/netmode/pre/cleanup.sh`):
```bash
#!/bin/sh
echo "Cleaning up old network configurations..."
# Add commands here
```
### Step 2: UCI Configuration Files
The UCI configuration files stored in `/etc/netmodes/<NETMODE_NAME>/uci/` will be copied to `/etc/config/`, effectively applying the desired network configuration.
- **Place UCI Config Files**:
- Create UCI configuration files under `/etc/netmodes/<NETMODE_NAME>/uci/`.
- Example (`/etc/netmodes/bridge/uci/network`):
````bash
config device 'br_lan'
option name 'br-lan'
option type 'bridge'
option multicast_to_unicast '0'
option bridge_empty '1'
list ports 'eth1'
list ports 'eth3'
list ports 'eth4'
config interface 'lan'
option proto 'dhcp'
option device 'br-lan'
option force_link '1'
option reqopts '43 125'
````
### Step 3: Custom Execution Scripts
After the UCI files are applied, any scripts in `/etc/netmodes/<NETMODE_NAME>/scripts/` are executed. These can be used to perform additional configuration tasks that are specific to the netmode.
- **Create Custom Scripts**:
- Add scripts to `/etc/netmodes/<NETMODE_NAME>/scripts/`.
- Example (`/etc/netmodes/bridge/scripts/setup_bridge.sh`):
```bash
#!/bin/sh
echo "Setting up bridge mode..."
# Additional configuration commands here
```
### Step 4: Post-Execution Scripts
Finally, the generic scripts in `/lib/netmode/post/` are executed. These scripts typically finalize the setup or perform any necessary cleanups.
- **Create Post-Execution Scripts**:
- Place scripts in `/lib/netmode/post/`.
- Example script (`/lib/netmode/post/restart_services.sh`):
```bash
#!/bin/sh
echo "Restarting network services..."
# Add commands here
```
## Enabling and Switching Netmodes
The netmode mechanism can be enabled or disabled via the UCI configuration, and you can switch between netmodes using UCI commands.
- **Enable Netmode**:
```bash
uci set netmode.global.enabled=1
uci commit netmode
```
- **Switch Netmode**:
```bash
uci set netmode.global.mode='<NETMODE_NAME>'
uci commit netmode
```

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=8.0.5.4
PKG_VERSION:=8.0.8.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=eb7bddb8c0bd00b7e5d33daa9d51725309ac50b9
PKG_SOURCE_VERSION:=d315304de3a704a37673807d5b02b04243487764
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -34,7 +34,7 @@ define Package/obuspa
MENU:=1
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
+OBUSPA_ENABLE_TEST_CONTROLLER:mosquitto-auth-shadow +libbbfdm-api +libjson-c
endef
define Package/obuspa/description
@@ -127,7 +127,7 @@ define Package/obuspa/install
$(INSTALL_BIN) ./files/etc/uci-defaults/obuspa-set-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
$(INSTALL_BIN) ./files/obuspa.hotplug $(1)/etc/hotplug.d/iface/21-obuspa
$(BBFDM_INSTALL_CORE_PLUGIN) ./files/etc/bbfdm/json/USPAgent.json $(1)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libuspagentdm.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)
$(INSTALL_BIN) ./files/etc/uci-defaults/54-test-usp-remote $(1)/etc/uci-defaults/
endif

File diff suppressed because it is too large Load Diff

View File

@@ -352,9 +352,9 @@ configure_controller()
db_set "${BASEPATH}.PeriodicNotifInterval" "${PeriodicNotifInterval}"
fi
#if [ -n "${SessionMode}" ]; then
# db_set "${BASEPATH}.E2ESession.SessionMode" "${SessionMode}"
#fi
if [ -n "${SessionMode}" ]; then
db_set "${BASEPATH}.E2ESession.SessionMode" "${SessionMode}"
fi
if [ -n "${assigned_role_name}" ]; then
AssignedRole=$(get_role_index "${assigned_role_name}")

View File

@@ -5,7 +5,7 @@
#endif
+#ifdef OBUSPA_CONTROLLER_MTP_VERIFY
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_reply_to_t *mrt);
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_conn_t *mpc);
+#endif
+
#ifndef REMOVE_USP_BROKER
@@ -26,12 +26,12 @@
+** This function is used by ValidateUspRecord() to determine whether to process a received USP message
+**
+** \param endpoint_id - Endpoint ID of controller that sent a USP message
+** \param mrt - pointer to structure specifying on which MTP the message was received
+** \param mpc - pointer to structure specifying on which MTP the message was received
+**
+** \return true if the MTP is allowed, false otherwise
+**
+**************************************************************************/
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_reply_to_t *mrt)
+bool DEVICE_CONTROLLER_IsMTPAllowed(char *endpoint_id, mtp_conn_t *mpc)
+{
+ controller_t *cont = FindEnabledControllerByEndpointId(endpoint_id);
+ controller_mtp_t *mtp;
@@ -42,18 +42,18 @@
+ return false;
+ }
+
+ mtp = FindFirstEnabledMtp(cont, mrt->protocol);
+ mtp = FindFirstEnabledMtp(cont, mpc->protocol);
+
+#ifdef ENABLE_WEBSOCKETS
+ // Allow websocket server if no other MTP is configured
+ if ((mrt->protocol == kMtpProtocol_WebSockets) && (mrt->wsserv_conn_id != INVALID))
+ if ((mpc->protocol == kMtpProtocol_WebSockets) && (mpc->ws.serv_conn_id != INVALID))
+ {
+ return mtp == NULL;
+ }
+#endif
+
+ // Disallow if there is no MTP configured with matching protocol
+ if ((mtp == NULL) || (mtp->protocol != mrt->protocol))
+ if ((mtp == NULL) || (mtp->protocol != mpc->protocol))
+ {
+ return false;
+ }
@@ -63,7 +63,7 @@
+ {
+#ifndef DISABLE_STOMP
+ case kMtpProtocol_STOMP:
+ return mtp->stomp_connection_instance == mrt->stomp_instance;
+ return mtp->stomp_connection_instance == mpc->stomp.instance;
+#endif
+
+#ifdef ENABLE_COAP
@@ -73,12 +73,12 @@
+
+#ifdef ENABLE_MQTT
+ case kMtpProtocol_MQTT:
+ return mtp->mqtt_connection_instance == mrt->mqtt_instance;
+ return mtp->mqtt_connection_instance == mpc->mqtt.instance;
+#endif
+
+#ifdef ENABLE_WEBSOCKETS
+ case kMtpProtocol_WebSockets:
+ return (mrt->wsclient_cont_instance == cont->instance) && (mrt->wsclient_mtp_instance == mtp->instance);
+ return (mpc->ws.client_cont_instance == cont->instance) && (mpc->ws.client_mtp_instance == mtp->instance);
+#endif
+ default:
+ TERMINATE_BAD_CASE(mtp->protocol);
@@ -100,7 +100,7 @@
+#ifdef OBUSPA_CONTROLLER_MTP_VERIFY
+ // Exit if the controller is not allowed to use the MTP on which the message was received
+ if (DEVICE_CONTROLLER_IsMTPAllowed(rec->from_id, mrt) == false)
+ if (DEVICE_CONTROLLER_IsMTPAllowed(rec->from_id, mtpc) == false)
+ {
+ USP_ERR_SetMessage("%s: Ignoring message from endpoint_id=%s (unauthorized MTP)", __FUNCTION__, rec->from_id);
+ return USP_ERR_PERMISSION_DENIED;

View File

@@ -1,6 +1,6 @@
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -241,6 +241,8 @@ void AddConnackSubscription(mqtt_client_
@@ -254,6 +254,8 @@ void QueueUspRecord_MQTT(mqtt_client_t *
#define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \
int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \
{\
@@ -9,7 +9,7 @@
return DEVICE_SECURITY_TrustCertVerifyCallbackWithCertChain(preverify_ok, x509_ctx, &mqtt_clients[index].cert_chain);\
}
@@ -251,6 +253,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
@@ -264,6 +266,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
DEFINE_MQTT_TrustCertVerifyCallbackIndex(2);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(3);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(4);
@@ -21,7 +21,7 @@
// Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS
//------------------------------------------------------------------------------------
@@ -261,10 +268,15 @@ ssl_verify_callback_t* mqtt_verify_callb
@@ -274,10 +281,15 @@ ssl_verify_callback_t* mqtt_verify_callb
MQTT_TrustCertVerifyCallbackIndex(2),
MQTT_TrustCertVerifyCallbackIndex(3),
MQTT_TrustCertVerifyCallbackIndex(4),

View File

@@ -1,82 +0,0 @@
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -63,6 +63,8 @@
#include "retry_wait.h"
#include "text_utils.h"
#include "msg_handler.h"
+#include "data_model.h"
+#include "usp_api.h"
// Defines for MQTT Property Values
#define PUBLISH 0x30
@@ -2613,6 +2615,37 @@ exit:
/*********************************************************************//**
**
+** handle_db_set_client_id
+**
+** Allows the caller to set client Id in DB from the data model thread
+**
+** \param arg1 - pointer to the client id path
+** \param arg2 - pointer to the client id value
+**
+** \return None
+**
+**************************************************************************/
+void handle_db_set_client_id(void *arg1, void *arg2)
+{
+ if ((arg1 == NULL) || (arg2 == NULL)) {
+ USP_SAFE_FREE(arg1);
+ USP_SAFE_FREE(arg2);
+ return;
+ }
+
+ char *param_path = (char *)arg1;
+ char *param_val = (char *)arg2;
+
+ if (USP_ERR_OK != DATA_MODEL_SetParameterInDatabase(param_path, param_val)) {
+ USP_LOG_Debug("%s: Failed to set %s=>%s from CONNACK", __FUNCTION__, param_path, param_val);
+ }
+
+ USP_SAFE_FREE(param_path);
+ USP_SAFE_FREE(param_val);
+}
+
+/*********************************************************************//**
+**
** ConnectV5Callback
**
** Called by Libmosquitto when the CONNACK packet is received on an MQTTv5 connection
@@ -2685,10 +2718,28 @@ void ConnectV5Callback(struct mosquitto
&client_id_ptr, false /* skip first */) != NULL)
{
USP_LOG_Debug("%s: Received client_id: \"%s\"", __FUNCTION__, client_id_ptr);
- USP_SAFE_FREE(client->conn_params.client_id);
- client->conn_params.client_id = USP_STRDUP(client_id_ptr);
- USP_SAFE_FREE(client->next_params.client_id);
- client->next_params.client_id = USP_STRDUP(client_id_ptr);
+
+ if (client->conn_params.client_id == NULL || strcmp(client->conn_params.client_id, client_id_ptr) != 0) {
+ USP_SAFE_FREE(client->conn_params.client_id);
+ client->conn_params.client_id = USP_STRDUP(client_id_ptr);
+ USP_SAFE_FREE(client->next_params.client_id);
+ client->next_params.client_id = USP_STRDUP(client_id_ptr);
+
+ // Persist client id from CONNACK in DB
+ char buf[128] = {0}, *param_path = NULL, *param_val = NULL;
+
+ snprintf(buf, 128, "Device.MQTT.Client.%d.ClientID", instance);
+
+ param_path = USP_STRDUP(buf);
+ param_val = USP_STRDUP(client_id_ptr);
+
+ if (USP_ERR_OK != USP_PROCESS_DoWork(handle_db_set_client_id, param_path, param_val)) {
+ USP_LOG_Debug("%s: Failed to schedule set in data model thread for client id from CONNACK", __FUNCTION__);
+ USP_SAFE_FREE(param_path);
+ USP_SAFE_FREE(param_val);
+ }
+ }
+
free(client_id_ptr);
}

View File

@@ -0,0 +1,32 @@
--- a/src/core/device_controller.c 2024-08-23 18:22:55.378560809 +0530
+++ b/src/core/device_controller.c 2024-08-23 19:09:07.130278193 +0530
@@ -4282,6 +4282,14 @@
goto exit;
}
+#if defined(E2ESESSION_EXPERIMENTAL_USP_V_1_2)
+ err = ProcessControllerE2ESessionAdded(cont);
+ if (err != USP_ERR_OK)
+ {
+ goto exit;
+ }
+#endif
+
// Exit if unable to get the object instance numbers present in this controller's MTP table
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
err = DATA_MODEL_GetInstances(path, &iv);
@@ -4323,14 +4331,6 @@
DEVICE_MQTT_UpdateControllerTopics();
#endif
-#if defined(E2ESESSION_EXPERIMENTAL_USP_V_1_2)
- err = ProcessControllerE2ESessionAdded(cont);
- if (err != USP_ERR_OK)
- {
- goto exit;
- }
-#endif
-
// If the code gets here, then we successfully retrieved all data about the controller (even if some of the MTPs were not added)
err = USP_ERR_OK;

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=packet-capture-diagnostics
PKG_VERSION:=1.0.0
PKG_VERSION:=1.0.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/packet-capture-diagnostics.git
PKG_SOURCE_VERSION:=a47189b5faa9f678f1a27475c474cc1524d777f4
PKG_SOURCE_VERSION:=6c64e11d78b3be9990714bf5fcd97752cc15c4a8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.5.11
PKG_VERSION:=1.5.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/periodicstats.git
PKG_SOURCE_VERSION:=0bfe78ce9daf1cfbe9453e2cb08327dc7885cea2
PKG_SOURCE_VERSION:=e59f980306e9ef4c1e3e56839906b8c5cba18338
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=qosmngr
PKG_VERSION:=1.0.14
PKG_VERSION:=1.0.15
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c4db530aae2392f94494814eefc977118519089b
PKG_SOURCE_VERSION:=f6b77d16d2103b7336a476e710a10f1dd28274f6
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

View File

@@ -26,7 +26,17 @@ hw_intf_init() {
# Initialize the hardware setup library
hw_init_all() {
local tc=0
export TMP_HW_QUEUE_LIST=""
echo clear > /proc/ifc_debug
echo reinit > /proc/ifc_debug
for tc in $(seq 0 7); do
rm -rf "/tmp/qos/dscp_values_${tc}_4"
rm -rf "/tmp/qos/dscp_values_${tc}_6"
done
return 0
}
@@ -150,6 +160,8 @@ hw_commit_all() {
local shape_rate="$TMP_HW_SHAPE_RATE"
local q_count="0"
local mac_qos_flag=""
local pbit=0
local tc=0
# Reorder queues
for q in ${sorted_list} ; do
@@ -205,4 +217,33 @@ hw_commit_all() {
else
/userfs/bin/qosrule discpline Enable 0
fi
if [ -x /userfs/bin/blapi_cmd ]; then
echo 1 > /proc/ifc_send_to_ppe
for tc in $(seq 0 7); do
if [ -s "/tmp/qos/dscp_values_${tc}_4" ]; then
sort -un "/tmp/qos/dscp_values_${tc}_4" | awk 'NR==1{first=$1;last=$1;next}
$1 == last+1 {last=$1;next}
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
fi
if [ -s "/tmp/qos/dscp_values_${tc}_6" ]; then
[ -s "/tmp/qos/dscp_values_${tc}_4" ] && sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
$1 == last+1 {last=$1;next}
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0");first=$1;last=first}
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 0")}'
sort -un "/tmp/qos/dscp_values_${tc}_6" | awk 'NR==1{first=$1;last=$1;next}
$1 == last+1 {last=$1;next}
{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1");first=$1;last=first}
END{system("/userfs/bin/blapi_cmd traffic set_traffic_class DSCP " first*4 " " or(last*4, 0x3) " 1")}'
fi
done
fi
if [ -x /userfs/bin/ifc ]; then
echo 1 > /proc/ifc_send_to_ppe
for pbit in $(seq 0 7); do
/userfs/bin/ifc add vip pbit $pbit
done
fi
}

View File

@@ -26,6 +26,7 @@ broute_ipv4_rule_options()
config_get protocol "$cid" "proto"
config_get dscp_filter "$cid" "dscp_filter"
config_get icmp_type "$cid" "icmp_type"
config_get traffic_class "$cid" "traffic_class"
set_ip_addr "$cid" ebt_match_src_ip ebt_match_dst_ip
@@ -36,6 +37,7 @@ broute_ipv4_rule_options()
tos_val=$((dscp_filter<<2))
tos_hex=$(printf "%x" $tos_val)
broute_filter_on_dscp "$tos_hex"
[ -n "$traffic_class" -a "$dscp_filter" != "0" ] && echo "$((dscp_filter))" >> "/tmp/qos/dscp_values_${traffic_class}_4"
fi
if [ -n "$protocol" ]; then
@@ -57,6 +59,7 @@ broute_ipv6_rule_options()
config_get protocol "$cid" "proto"
config_get dscp_filter "$cid" "dscp_filter"
config_get icmp_type "$cid" "icmp_type"
config_get traffic_class "$cid" "traffic_class"
set_ip_addr "$cid" ebt_match_ipv6_src_ip ebt_match_ipv6_dst_ip
@@ -67,6 +70,7 @@ broute_ipv6_rule_options()
tos_val=$((dscp_filter<<2))
tos_hex=$(printf "%x" $tos_val)
ebt_match_ipv6_dscp "$tos_hex"
[ -n "$traffic_class" -a "$dscp_filter" != "0" ] && echo "$((dscp_filter))" >> "/tmp/qos/dscp_values_${traffic_class}_6"
fi
if [ -n "$protocol" ]; then

View File

@@ -549,9 +549,9 @@ create_ebtables_chains() {
}
flush_ebtables_chains() {
echo "ebtables -t nat -F qos_output" > /tmp/qos/classify.ebtables
echo "ebtables -t broute -F qos" > /tmp/qos/classify.ebtables
echo "ebtables -t broute -F dscp2pbits" >> /tmp/qos/classify.ebtables
echo "ebtables -t broute -F prevlanxlate" >> /tmp/qos/classify.ebtables
echo "ebtables --concurrent -t nat -F qos_output" > /tmp/qos/classify.ebtables
echo "ebtables --concurrent -t broute -F qos" > /tmp/qos/classify.ebtables
echo "ebtables --concurrent -t broute -F dscp2pbits" >> /tmp/qos/classify.ebtables
echo "ebtables --concurrent -t broute -F prevlanxlate" >> /tmp/qos/classify.ebtables
}

View File

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

View File

@@ -62,12 +62,8 @@
"cmd": "bridge fdb"
},
{
"description": "TCP listened ports",
"cmd": "netstat -tlnp"
},
{
"description": "UDP listened ports",
"cmd": "netstat -ulnp"
"description": "TCP/UDP/Raw ports/Sockets",
"cmd": "netstat -anp"
},
{
"description": "MAC layer firewall status list",

View File

@@ -78,8 +78,8 @@ int operate_Device_SelfTest(char *refparam, struct dmctx *ctx, void *data, char
/* Get self test log instance */
char *result = get_selftest_log_instance(ctx);
add_list_parameter(ctx, dmstrdup("Status"), dmstrdup("Complete"), DMT_TYPE[DMT_STRING], NULL);
add_list_parameter(ctx, dmstrdup("Results"), result, DMT_TYPE[DMT_STRING], NULL);
fill_blob_param(&ctx->bb, "Status", "Complete", DMT_TYPE[DMT_STRING], 0);
fill_blob_param(&ctx->bb, "Results", result, DMT_TYPE[DMT_STRING], 0);
if (ctx->dm_type != BBFDM_USP) {
diagnostics_set_option("selftest", "DiagnosticState", "Complete");
@@ -89,7 +89,7 @@ int operate_Device_SelfTest(char *refparam, struct dmctx *ctx, void *data, char
return 0;
err:
add_list_parameter(ctx, dmstrdup("Status"), dmstrdup("Error_Internal"), DMT_TYPE[DMT_STRING], NULL);
fill_blob_param(&ctx->bb, "Status", "Error_Internal", DMT_TYPE[DMT_STRING], 0);
if (ctx->dm_type != BBFDM_USP) {
diagnostics_set_option("selftest", "DiagnosticState", "Error");
dmuci_commit_package_bbfdm(DMMAP_DIAGNOSTIGS);

View File

@@ -63,6 +63,18 @@ else
$(INSTALL_DATA) ./files/openssh_backend/lib/sshmngr/backend.sh $(1)/lib/sshmngr/
endif
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libsshmngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_PACKAGE_fail2ban),y)
$(INSTALL_DIR) $(1)/etc/fail2ban/jail.d
$(INSTALL_DIR) $(1)/etc/fail2ban/filter.d/
ifeq ($(CONFIG_SSHMNGR_BACKEND_DROPBEAR),y)
$(INSTALL_CONF) ./files/dropbear_backend/fail2ban/sshmngr.local $(1)/etc/fail2ban/jail.d/
$(INSTALL_DATA) ./files/dropbear_backend/fail2ban/sshmngr.conf $(1)/etc/fail2ban/filter.d/
else
$(INSTALL_CONF) ./files/openssh_backend/fail2ban/sshmngr.local $(1)/etc/fail2ban/jail.d/
$(INSTALL_DATA) ./files/openssh_backend/fail2ban/sshmngr.conf $(1)/etc/fail2ban/filter.d/
endif
endif
endef
$(eval $(call BuildPackage,sshmngr))

View File

@@ -0,0 +1,52 @@
# Fail2Ban filter for dropbear
#
# NOTE: The regex below is ONLY intended to work with a patched
# version of Dropbear as described here:
# http://www.unchartedbackwaters.co.uk/pyblosxom/static/patches
# ^%(__prefix_line)sexit before auth from <HOST>.*\s*$
#
# The standard Dropbear output doesn't provide enough information to
# ban all types of attack. The Dropbear patch adds IP address
# information to the 'exit before auth' message which is always
# produced for any form of non-successful login. It is that message
# which this file matches.
#
# More information: http://bugs.debian.org/546913
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[Definition]
datepattern = ^%%b %%d %%H:%%M:%%S
_daemon = dropbear
prefregex = ^%(__prefix_line)s<F-CONTENT>(?:[Ll]ogin|[Bb]ad|[Ee]xit).+</F-CONTENT>$
failregex = ^[Ll]ogin attempt for nonexistent user ('.*' )?from <HOST>:\d+$
^[Bb]ad (PAM )?password attempt for .+ from <HOST>(:\d+)?$
^[Ee]xit before auth \(user '.+', \d+ fails\): Max auth tries reached - user '.+' from <HOST>:\d+\s*$
ignoreregex =
# DEV Notes:
#
# The first two regexs here match the unmodified dropbear messages. It isn't
# possible to match the source of the 'exit before auth' messages from dropbear
# as they don't include the "from <HOST>" bit.
#
# The second last failregex line we need to match with the modified dropbear.
#
# For the second regex the following apply:
#
# http://www.netmite.com/android/mydroid/external/dropbear/svr-authpam.c
# http://svn.dd-wrt.com/changeset/16642#file64
#
# http://svn.dd-wrt.com/changeset/16642/src/router/dropbear/svr-authpasswd.c
#
# Author: Francis Russell
# Zak B. Elep

View File

@@ -0,0 +1,9 @@
[dropbear]
enabled = true
port = ssh
filter = sshmngr
logpath = /var/log/messages
maxretry = 3
findtime = 10
bantime = 120
ignoreip = 127.0.0.1

View File

@@ -0,0 +1,138 @@
# Fail2Ban filter for openssh
#
# If you want to protect OpenSSH from being bruteforced by password
# authentication then get public key authentication working before disabling
# PasswordAuthentication in sshd_config.
#
#
# "Connection from <HOST> port \d+" requires LogLevel VERBOSE in sshd_config
#
[INCLUDES]
# Read common prefixes. If any customizations available -- read them from
# common.local
before = common.conf
[DEFAULT]
_daemon = sshd
# optional prefix (logged from several ssh versions) like "error: ", "error: PAM: " or "fatal: "
__pref = (?:(?:error|fatal): (?:PAM: )?)?
# optional suffix (logged from several ssh versions) like " [preauth]"
#__suff = (?: port \d+)?(?: \[preauth\])?\s*
__suff = (?: (?:port \d+|on \S+|\[preauth\])){0,3}\s*
__on_port_opt = (?: (?:port \d+|on \S+)){0,2}
# close by authenticating user:
__authng_user = (?: (?:invalid|authenticating) user <F-USER>\S+|.*?</F-USER>)?
# for all possible (also future) forms of "no matching (cipher|mac|MAC|compression method|key exchange method|host key type) found",
# see ssherr.c for all possible SSH_ERR_..._ALG_MATCH errors.
__alg_match = (?:(?:\w+ (?!found\b)){0,2}\w+)
# PAM authentication mechanism, can be overridden, e. g. `filter = sshd[__pam_auth='pam_ldap']`:
__pam_auth = pam_[a-z]+
[Definition]
datepattern = ^%%b %%d %%H:%%M:%%S
prefregex = ^<F-MLFID>%(__prefix_line)s</F-MLFID>%(__pref)s<F-CONTENT>.+</F-CONTENT>$
cmnfailre = ^[aA]uthentication (?:failure|error|failed) for <F-USER>.*</F-USER> from <HOST>( via \S+)?%(__suff)s$
^User not known to the underlying authentication module for <F-USER>.*</F-USER> from <HOST>%(__suff)s$
<cmnfailre-failed-pub-<publickey>>
^Failed <cmnfailed> for (?P<cond_inv>invalid user )?<F-USER>(?P<cond_user>\S+)|(?(cond_inv)(?:(?! from ).)*?|[^:]+)</F-USER> from <HOST>%(__on_port_opt)s(?: ssh\d*)?(?(cond_user): |(?:(?:(?! from ).)*)$)
^<F-USER>ROOT</F-USER> LOGIN REFUSED FROM <HOST>
^[iI](?:llegal|nvalid) user <F-USER>.*?</F-USER> from <HOST>%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> from <HOST> not allowed because not listed in AllowUsers%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> from <HOST> not allowed because listed in DenyUsers%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> from <HOST> not allowed because not in any group%(__suff)s$
^refused connect from \S+ \(<HOST>\)
^Received <F-MLFFORGET>disconnect</F-MLFFORGET> from <HOST>%(__on_port_opt)s:\s*3: .*: Auth fail%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> from <HOST> not allowed because a group is listed in DenyGroups%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> from <HOST> not allowed because none of user's groups are listed in AllowGroups%(__suff)s$
^<F-NOFAIL>%(__pam_auth)s\(sshd:auth\):\s+authentication failure;</F-NOFAIL>(?:\s+(?:(?:logname|e?uid|tty)=\S*)){0,4}\s+ruser=<F-ALT_USER>\S*</F-ALT_USER>\s+rhost=<HOST>(?:\s+user=<F-USER>\S*</F-USER>)?%(__suff)s$
^maximum authentication attempts exceeded for <F-USER>.*</F-USER> from <HOST>%(__on_port_opt)s(?: ssh\d*)?%(__suff)s$
^User <F-USER>\S+|.*?</F-USER> not allowed because account is locked%(__suff)s
^<F-MLFFORGET>Disconnecting</F-MLFFORGET>(?: from)?(?: (?:invalid|authenticating)) user <F-USER>\S+</F-USER> <HOST>%(__on_port_opt)s:\s*Change of username or service not allowed:\s*.*\[preauth\]\s*$
^Disconnecting: Too many authentication failures(?: for <F-USER>\S+|.*?</F-USER>)?%(__suff)s$
^<F-NOFAIL>Received <F-MLFFORGET>disconnect</F-MLFFORGET></F-NOFAIL> from <HOST>%(__on_port_opt)s:\s*11:
<mdre-<mode>-other>
^<F-MLFFORGET><F-MLFGAINED>Accepted \w+</F-MLFGAINED></F-MLFFORGET> for <F-USER>\S+</F-USER> from <HOST>(?:\s|$)
cmnfailed-any = \S+
cmnfailed-ignore = \b(?!publickey)\S+
cmnfailed-invalid = <cmnfailed-ignore>
cmnfailed-nofail = (?:<F-NOFAIL>publickey</F-NOFAIL>|\S+)
cmnfailed = <cmnfailed-<publickey>>
mdre-normal =
# used to differentiate "connection closed" with and without `[preauth]` (fail/nofail cases in ddos mode)
mdre-normal-other = ^<F-NOFAIL><F-MLFFORGET>(Connection closed|Disconnected)</F-MLFFORGET></F-NOFAIL> (?:by|from)%(__authng_user)s <HOST>(?:%(__suff)s|\s*)$
mdre-ddos = ^Did not receive identification string from <HOST>
^kex_exchange_identification: (?:[Cc]lient sent invalid protocol identifier|[Cc]onnection closed by remote host)
^Bad protocol version identification '.*' from <HOST>
^<F-NOFAIL>SSH: Server;Ltype:</F-NOFAIL> (?:Authname|Version|Kex);Remote: <HOST>-\d+;[A-Z]\w+:
^Read from socket failed: Connection <F-MLFFORGET>reset</F-MLFFORGET> by peer
# same as mdre-normal-other, but as failure (without <F-NOFAIL>) and [preauth] only:
mdre-ddos-other = ^<F-MLFFORGET>(Connection (?:closed|reset)|Disconnected)</F-MLFFORGET> (?:by|from)%(__authng_user)s <HOST>%(__on_port_opt)s\s+\[preauth\]\s*$
mdre-extra = ^Received <F-MLFFORGET>disconnect</F-MLFFORGET> from <HOST>%(__on_port_opt)s:\s*14: No(?: supported)? authentication methods available
^Unable to negotiate with <HOST>%(__on_port_opt)s: no matching <__alg_match> found.
^Unable to negotiate a <__alg_match>
^no matching <__alg_match> found:
# part of mdre-ddos-other, but user name is supplied (invalid/authenticating) on [preauth] phase only:
mdre-extra-other = ^<F-MLFFORGET>Disconnected</F-MLFFORGET>(?: from)?(?: (?:invalid|authenticating)) user <F-USER>\S+|.*?</F-USER> <HOST>%(__on_port_opt)s \[preauth\]\s*$
mdre-aggressive = %(mdre-ddos)s
%(mdre-extra)s
# mdre-extra-other is fully included within mdre-ddos-other:
mdre-aggressive-other = %(mdre-ddos-other)s
# Parameter "publickey": nofail (default), invalid, any, ignore
publickey = nofail
# consider failed publickey for invalid users only:
cmnfailre-failed-pub-invalid = ^Failed publickey for invalid user <F-USER>(?P<cond_user>\S+)|(?:(?! from ).)*?</F-USER> from <HOST>%(__on_port_opt)s(?: ssh\d*)?(?(cond_user): |(?:(?:(?! from ).)*)$)
# consider failed publickey for valid users too (don't need RE, see cmnfailed):
cmnfailre-failed-pub-any =
# same as invalid, but consider failed publickey for valid users too, just as no failure (helper to get IP and user-name only, see cmnfailed):
cmnfailre-failed-pub-nofail = <cmnfailre-failed-pub-invalid>
# don't consider failed publickey as failures (don't need RE, see cmnfailed):
cmnfailre-failed-pub-ignore =
cfooterre = ^<F-NOFAIL>Connection from</F-NOFAIL> <HOST>
failregex = %(cmnfailre)s
<mdre-<mode>>
%(cfooterre)s
# Parameter "mode": normal (default), ddos, extra or aggressive (combines all)
# Usage example (for jail.local):
# [sshd]
# mode = extra
# # or another jail (rewrite filter parameters of jail):
# [sshd-aggressive]
# filter = sshd[mode=aggressive]
#
mode = normal
#filter = sshd[mode=aggressive]
ignoreregex =
maxlines = 1
journalmatch = _SYSTEMD_UNIT=sshd.service + _COMM=sshd
# DEV Notes:
#
# "Failed \S+ for .*? from <HOST>..." failregex uses non-greedy catch-all because
# it is coming before use of <HOST> which is not hard-anchored at the end as well,
# and later catch-all's could contain user-provided input, which need to be greedily
# matched away first.
#
# Author: Cyril Jaquier, Yaroslav Halchenko, Petr Voralek, Daniel Black and Sergey Brester aka sebres
# Rewritten using prefregex (and introduced "mode" parameter) by Serg G. Brester.

View File

@@ -0,0 +1,9 @@
[sshd]
enabled = true
port = ssh
filter = sshmngr
logpath = /var/log/messages
maxretry = 3
findtime = 10
bantime = 120
ignoreip = 127.0.0.1

View File

@@ -101,3 +101,81 @@ CONFIG_SULU_PWA_KEYS_PATH="/somepath_with_pwa.{crt,key}"
```
>Note: Replacing/changing the keys might requires uninstall/install of PWA App and CTRL+Shift+R in browser to drop the cached site and load the new site with new keys.
# How to create a new Sulu user with Role Based Access Controller
Sulu has a predefined set of users, but if it is required to add user with more/less datamodel access rights, that can be done from a USP Controller(sulu etc) or by using the command line tool.
In the below example, I use command line tool, but same operations can be done from controller as well to configure it, so we need
- New user
- New user role
- Changes in UserInterface Instance to use the new user role
- A ControllerTrust role to define datamodel access aligned with user role
- Update the sulu controller to use the above role
Some global variables before proceeding further
```bash
export UNAME=testuser
export UPASS=testuser123
```
## Create an User Role
```bash
ROLE="$(obuspa -c add Device.Users.Role. |cut -d " " -f 2)"
obuspa -c set ${ROLE}.RoleName ${UNAME}
obuspa -c set ${ROLE}.Enable 1
```
## Create an User
```bash
USER="$(obuspa -c add Device.Users.User. |cut -d " " -f 2)"
obuspa -c set ${USER}.Username ${UNAME}
obuspa -c set ${USER}.Password ${UPASS}
obuspa -c set ${USER}.RoleParticipation ${ROLE}
obuspa -c set ${USER}.Enable 1
```
## Update UserInterface to use the new UserRole
Sulu has a reload hook to setup the necessary obuspa/mosquitto configuration, so no need to do LocalAgent Controller/MTP setup, this will reload obuspa service after uci update, so we have to wait for service to come up.
```bash
bbfdmd -c set Device.UserInterface.HTTPAccess.1.AllowedRoles "Device.Users.Role.1,${ROLE}"
sleep 30
```
## Create a ControllerTrust role aligned with user role
In this example, full access of 'Device.' added for the new user
```bash
CTROLE="$(obuspa -c add Device.LocalAgent.ControllerTrust.Role. | cut -d " " -f 2)"
PERM="$(obuspa -c add ${CTROLE}.Permission. |cut -d " " -f 2)"
obuspa -c set ${PERM}.Targets Device.
obuspa -c set ${PERM}.Param rw-n
obuspa -c set ${PERM}.Obj rw-n
obuspa -c set ${PERM}.InstantiatedObj rw-n
obuspa -c set ${PERM}.CommandEvent r-xn
obuspa -c set ${PERM}.Enable 1
obuspa -c set ${CTROLE}.Enable 1
```
## Set new role to Controller
```bash
obuspa -c set Device.LocalAgent.Controller.[EndpointID==self::sulu-${UNAME}].AssignedRole "${CTROLE}"
```
After these configuration reboot the device
```bash
reboot
```
After device boots sulu should be able to login with newly added user.

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=3.1.61
PKG_VERSION:=3.1.62
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View File

@@ -45,9 +45,7 @@ function _get_sulu_user_roles() {
roles=$(uci -q get userinterface._sulu_s.role)
for role in ${roles}; do
if [ -f "/etc/users/roles/$role.json" ]; then
sulu_user_roles="${sulu_user_roles} ${role}"
fi
sulu_user_roles="${sulu_user_roles} ${role}"
done
if [ -n "${sulu_user_roles}" ]; then
@@ -284,9 +282,9 @@ function update_obuspa_config() {
}
function configure_sulu() {
update_obuspa_config
_create_acl
generate_sulu_conn_config
_create_acl
update_obuspa_config
}
while getopts ":r" opt; do

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=swmodd
PKG_VERSION:=2.5.12
PKG_VERSION:=2.5.16
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/lcm/swmodd.git
PKG_SOURCE_VERSION:=088ac916a87b4faf1aaafadc6ee77ae56674fd1c
PKG_SOURCE_VERSION:=c36ff3594ed20d9bbc90d52adbdf7d6c186c4ce1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=timemngr
PKG_VERSION:=1.0.20
PKG_VERSION:=1.1.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/timemngr.git
PKG_SOURCE_VERSION:=f0b026bb5fffbd1c9a18b6814251b4c724aabad6
PKG_SOURCE_VERSION:=524495fc46987eab80eacdd5f2349b2fbd5efb23
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -29,7 +29,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Time manager daemon based on ntpd
DEPENDS:=+bbfdmd +ntpd +libuci +libubox +ubus
DEPENDS:=+bbfdmd +ntpd +libuci +libubox +ubus +libbbfdm-api +libbbfdm-ubus +@BUSYBOX_CONFIG_PGREP
MENU:=1
endef
@@ -59,11 +59,10 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/timemngr $(1)/usr/sbin/timemngr
ifeq ($(CONFIG_TIMEMNGR_LEGACY_DM),y)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/dm_time_legacy.so $(1) $(PKG_NAME)
else
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/dm_time.so $(1) $(PKG_NAME)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/timemngr $(1)/usr/sbin/timemngr
ifeq ($(CONFIG_TIMEMNGR_MIGRATE_SYSTEM),y)
$(INSTALL_BIN) ./files/etc/uci-defaults/96-system-ntp-migrate $(1)/etc/uci-defaults/
endif
@@ -81,5 +80,4 @@ ifeq ($(CONFIG_TIMEMNGR_VENDOR_EXTENSIONS),y)
endif
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -9,7 +9,7 @@ USE_PROCD=1
PROG_UBUS=/usr/sbin/timemngr
log() {
echo "${@}"|logger -t time.init -p info
echo "${@}"|logger -t timemngr.init -p info
}
validate_global_section() {
@@ -20,42 +20,38 @@ validate_global_section() {
}
start_service() {
local enable loglevel server_enable
local enable loglevel server_enable mdns
if uci -q get system.ntp >/dev/null 2>&1; then
log "Not starting timemngr, legacy ntp definition detected"
return 1
fi
validate_global_section || {
return 1
}
config_load time
if [ "$enable" != 1 ]; then
return 1
fi
validate_global_section
procd_open_instance timemngr_ubus
# Start timemngr_dm instance
procd_open_instance timemngr_dm
procd_set_param command $PROG_UBUS
procd_append_param command -l ${loglevel}
procd_set_param respawn
procd_close_instance
config_load time
config_get_bool server_enable server enable 0
if [ "${server_enable}" -eq 1 ]; then
[ "${mdns}" -ne 0 ] && procd_add_mdns "ntp" "udp" "123" "daemon=ntpd"
fi
procd_set_param respawn
procd_close_instance
# Generate Config & Start timemngr instance
generate_config
create_service
}
reload_service() {
log "Restarting timemngr"
stop
log "Reloading timemngr instance"
stop "timemngr"
start
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tr143
PKG_VERSION:=1.0.2
PKG_VERSION:=1.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/tr143d.git
PKG_SOURCE_VERSION:=6762d1efbb995be685af32af5f4b67cc4d737bcd
PKG_SOURCE_VERSION:=54302dec291726b0e765e56b4d72ac53655e0f29
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -25,7 +25,7 @@ include ../bbfdm/bbfdm.mk
define Package/tr143
CATEGORY:=Utilities
TITLE:=TR-143 Data Model Support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +netmngr
endef
define Package/tr143/description
@@ -35,7 +35,7 @@ endef
MAKE_PATH:=src
define Package/tr143/install
$(BBFDM_INSTALL_MS_DM) -u Diagnostics $(PKG_BUILD_DIR)/src/libtr143d.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libtr143d.so $(1) netmngr
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/download $(1)
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/traceroute $(1)
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/upload $(1)

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tr471
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/tr471d.git
PKG_SOURCE_VERSION:=036c87b237f266cf7f9fae170c37c863a5f4af2e
PKG_SOURCE_VERSION:=69b4d324f2b2c78d858b0446dcb90dba9d5f60c3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -25,7 +25,7 @@ include ../bbfdm/bbfdm.mk
define Package/tr471
CATEGORY:=Utilities
TITLE:=TR-471 Data Model Support
DEPENDS:=+obudpst +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
DEPENDS:=+obudpst +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +netmngr
endef
define Package/tr471/description
@@ -35,7 +35,7 @@ endef
MAKE_PATH:=src
define Package/tr471/install
$(BBFDM_INSTALL_MS_DM) -u IPLayerCapacity $(PKG_BUILD_DIR)/src/libtr471d.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libtr471d.so $(1) netmngr
$(BBFDM_INSTALL_SCRIPT) $(PKG_BUILD_DIR)/scripts/iplayercap $(1)
endef

View File

@@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=twamp
PKG_VERSION:=1.4.5
PKG_VERSION:=1.4.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -28,7 +28,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TWAMP Light Client(TR-390)
DEPENDS:=+libuci +ubox +libubus +libbbfdm-api
DEPENDS:=+libuci +ubox +libubus +libbbfdm-api +netmngr
endef
define Package/$(PKG_NAME)/description
@@ -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
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/libtwamp.so $(1)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/libtwamp.so $(1) netmngr
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=udpecho
PKG_VERSION:=2.2.2
PKG_VERSION:=2.2.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -35,7 +35,7 @@ define Package/$(PKG_NAME)-server
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF UDP Echo Server
DEPENDS:=+libuci +libbbfdm-api
DEPENDS:=+libuci +libbbfdm-api +netmngr
endef
define Package/$(PKG_NAME)-client
@@ -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
$(BBFDM_INSTALL_MS_DM) -u UDPEchoConfig $(PKG_BUILD_DIR)/src/libudpechoserver.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libudpechoserver.so $(1) netmngr
endef
define Package/$(PKG_NAME)-client/install

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/network/urlfilter.git
PKG_SOURCE_VERSION:=ebf8afb44ff808d3b99c45a7c636fb12a774f357
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,28 +13,30 @@ 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 --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
}
@@ -42,9 +44,9 @@ configure_firewall()
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
@@ -60,24 +62,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
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

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usbmngr
PKG_VERSION:=1.0.3
PKG_VERSION:=1.0.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/usbmngr.git
PKG_SOURCE_VERSION:=4f5f5dd701d40cdb134b98734db75446e5736a2e
PKG_SOURCE_VERSION:=8854939163cc60154a52834fa70677b3d1a53d46
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usermngr
PKG_VERSION:=1.2.17
PKG_VERSION:=1.2.18
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/usermngr.git
PKG_SOURCE_VERSION:=4ea2dfc2843b4cdf87e48deff512ee358c93298f
PKG_SOURCE_VERSION:=3756e698d6debe4b5038a942e7332dc733f6f816
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=voicemngr
PKG_RELEASE:=1
PKG_VERSION:=1.1.13
PKG_VERSION:=1.1.14
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:=14b34f42063004151aed8165fda81b094c9dbadc
PKG_SOURCE_VERSION:=1fd5bc3f19c534c82601b1e95fb0e8d3e3cc46a4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifidmd
PKG_VERSION:=1.0.5
PKG_VERSION:=1.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/wifidmd.git
PKG_SOURCE_VERSION:=2cb859d049b0777468e2f907a1929b07cff32597
PKG_SOURCE_VERSION:=6523c92cc2880ec5eebfc60d09bb5084ec504b6e
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:=wifimngr
PKG_VERSION:=17.3.1
PKG_VERSION:=17.3.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=cdfa8c3578e5bab09c1f65e2d50becf4760f6687
PKG_SOURCE_VERSION:=488957bdd5da67329b84e71c6852e9e5df9fbbdf
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

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

View File

@@ -11,12 +11,25 @@ stop_service() {
if [ "${xmpp_running}" = "true" ]; then
procd_send_signal xmppc '*' SIGKILL
fi
if [ -f "/var/state/xmppc" ]; then
uci -q -c /var/state delete xmppc.conn_status
uci -q -c /var/state commit xmppc
fi
}
start_service() {
local con_name=$(uci -q get xmpp.xmpp.conn_req_connection)
local con_enable=$(uci -q get xmpp."${con_name}".enable)
if [ ! -f "/var/state/xmppc" ]; then
touch "/var/state/xmppc"
fi
uci -q -c /var/state set xmppc.global='global'
uci -q -c /var/state set xmppc.global.last_change="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
uci -q -c /var/state commit xmppc
procd_open_instance
if [ "$con_enable" = "1" ]; then
procd_set_param command "$PROG"