Compare commits

...

470 Commits

Author SHA1 Message Date
Amin Ben Romdhane
d4a631f0cb sysmngr: Added support for DeviceInfo.MemoryStatus.MemoryMonitor. Object 2024-11-15 16:04:38 +01:00
Janusz Dziedzic
c0208dab2e libwifi: 7.7.8 2024-11-13 10:27:05 +00:00
Mohd Husaam Mehdi
8dca6b8e44 bridgemngr: fix vendor extension macro usage 2024-11-12 16:16:59 +05:30
Mohd Husaam Mehdi
4b1a7859aa bridgemngr: add VLANFiltering bbfdm vendor extension as json 2024-11-12 15:50:20 +05:30
Vivek Kumar Dutta
6f28d90916 wifidmd: Align BackhaulMediaType value for self node 2024-11-12 15:31:41 +05:30
Jakob Olsson
285e24455d hostmngr: 1.2.9 2024-11-11 09:38:27 +01:00
Amin Ben Romdhane
d0c26b4bb7 sysmngr: Update the handling of process Instances 2024-11-08 15:19:28 +01:00
Amin Ben Romdhane
a71d90d2c7 wifidmd: 1.0.12 2024-11-08 15:12:55 +01:00
Vivek Kumar Dutta
78e1468f51 obuspa: Fix instance update in cached dm 2024-11-07 17:42:59 +05:30
Vivek Kumar Dutta
9a1e1dbd1a icmwp: optimize notification handling 2024-11-07 17:00:36 +05:30
Vivek Kumar Dutta
3ef21188b1 sysmngr: 1.0.1 2024-11-07 15:09:06 +05:30
Vivek Kumar Dutta
65daa6c56a bulkdata: Fix segfault with sub-task 2024-11-07 10:04:42 +05:30
Janusz Dziedzic
eb63f5d74f libwifi: 7.7.7 2024-11-06 17:56:00 +00:00
Amin Ben Romdhane
7da09349ec icwmp: Align with sysmngr 2024-11-06 15:18:41 +01:00
Amin Ben Romdhane
b2a28a12f6 bbfdm: Align with sysmngr 2024-11-06 15:11:23 +01:00
Amin Ben Romdhane
0fe5d2a232 logmngr: Align with sysmngr 2024-11-06 15:10:15 +01:00
Amin Ben Romdhane
b50f9946bb sysmngr: new package to manage DeviceInfo Object 2024-11-06 15:08:28 +01:00
Filip Matusiak
bf28778432 map-controller: 6.1.2.7 2024-11-06 10:19:07 +01:00
Amin Ben Romdhane
d6dad64328 bbfdm: 1.12.20 2024-11-06 10:01:33 +01:00
Filip Matusiak
46003fddd5 map-controller: 6.1.2.6 2024-11-05 16:49:13 +01:00
Vivek Kumar Dutta
2e7fc5fa14 bbfdm: prepone microservice startup
- Prepone dm microservice startup to avoid usp schema registration race
  condition
2024-11-05 18:51:18 +05:30
Jakob Olsson
7fb9b397ef decollector: 6.1.0.3 2024-11-05 13:39:46 +01:00
Vivek Kumar Dutta
cbe66d6c96 wifidmd: Update deprecated MultiAPDevice parameters 2024-11-05 18:06:59 +05:30
Amin Ben Romdhane
57d477c1da bbfdm: 1.12.18 2024-11-04 15:20:24 +01:00
Vivek Kumar Dutta
8e774faa3e self-diagnostics: 1.0.11 2024-11-04 12:29:14 +00:00
Vivek Kumar Dutta
6129323ca3 icwmp: Fix rpc event list after reboot 2024-11-04 17:40:48 +05:30
Vivek Kumar Dutta
6d6ecdfe92 obuspa: Fix probable segfault 2024-11-04 10:27:20 +05:30
Jakob Olsson
b66ae8d605 map-agent: 6.2.1.11 2024-10-31 14:15:27 +01:00
Jakob Olsson
ed97af82b5 map-controller: 6.1.2.5 2024-10-31 14:14:49 +01:00
Marina Maslova
464f037768 map-agent: add fixed interface names for proprietary mediatek driver 2024-10-30 15:18:53 +00:00
Janusz Dziedzic
024442da10 libwifi: skip probe-req events by default 2024-10-30 14:57:29 +00:00
Vivek Kumar Dutta
b0049df366 self-diagnostics: 1.0.10
- Print report_dir along with report_file
- Stop verbose logging of exec_cmds to prevent syslog overflow
- Increased timeouts of wifi diagnotics scripts
- Added report_dir in error output, if failed to generate tar
2024-10-30 13:35:21 +00:00
Jakob Olsson
7115c1734e map-agent: 6.2.1.10 2024-10-30 13:08:44 +01:00
Anjan Chanda
9b93ffef76 ieee1905: 8.6.1 2024-10-30 09:26:29 +01:00
Janusz Dziedzic
225b89ab4f wifimngr: 17.4.4 2024-10-30 07:51:07 +00:00
Janusz Dziedzic
d4464bf430 libwifi: 7.7.6 2024-10-30 07:47:47 +00:00
Marina Maslova
50731e00ef libwifi: use mtk module for proprietary mediatek driver on an7581 2024-10-30 07:47:25 +00:00
Amin Ben Romdhane
f9d3d22c14 bbfdm: 1.12.17
- Improve bbf.config handler for external config change
- Removed deprecated DeviceInfo.Processor. object
2024-10-29 12:33:52 +00:00
Anjan Chanda
607f3c5334 ieee1905: 8.6.0 2024-10-29 09:48:36 +01:00
Janusz Dziedzic
925c58aeaa libwifi: 7.7.5 2024-10-29 07:57:52 +00:00
Suvendhu Hansa
447acf3b27 bulkdata: unified DM with bulkdata daemon 2024-10-29 04:58:01 +00:00
Rahul Thakur
5bff6c3854 mcastmngr: remove unnecessary log 2024-10-29 10:25:53 +05:30
Andreas Gnau
70f4086ecc iop: Remove license_report
A CycloneDX SBOM is generated by the OpenWrt build system. It the same
license information as the license report. Remove the license report
script.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-10-28 13:57:29 +00:00
Vivek Kumar Dutta
b3bafdbba9 bbfdm: 1.12.16
- Add support for DeviceInfo.MaxNumberOfActivateTimeWindows
- Add support for DeviceInfo.HostName
- Generate error if plugin failed to installed
2024-10-28 08:54:36 +05:30
Yalu Zhang
5788d7d284 dectmngr-3.7.1: Add a new RPC to release call(s) on an extension
voicemngr-1.2.1: Change the RPC to dectmngr for releasing call(s) on a DECT extension
2024-10-25 17:23:52 +02:00
Jakob Olsson
a0c226d6ea map-controller: 6.1.2.4 2024-10-25 13:54:44 +02:00
Jakob Olsson
921657f464 map-controller: 6.1.2.3 2024-10-25 11:52:02 +02:00
Anjan Chanda
217ee3fa77 wifimngr: 17.4.3 2024-10-24 16:42:19 +02:00
Anjan Chanda
0aef613006 libwifi: 7.7.4 2024-10-24 16:41:29 +02:00
Markus Gothe
63e2bb8f6d ieee1905: 8.5.9 2024-10-24 16:13:29 +02:00
Markus Gothe
ea0059a932 hostmngr: 1.2.8 2024-10-24 15:50:32 +02:00
Jakob Olsson
a95a6d804a map-controller: 6.1.2.2 2024-10-24 14:23:21 +02:00
Jakob Olsson
3fbdd08037 map-agent: 6.2.1.9 2024-10-24 12:49:42 +02:00
Vivek Kumar Dutta
e04040c4ea bbfdm: 1.12.15 2024-10-24 14:50:11 +05:30
Jakob Olsson
20a85cce5f map-agent: 6.2.1.8 2024-10-24 09:44:04 +02:00
Vivek Kumar Dutta
2be7a59ff0 obuspa: Switch to WakeUp event for re-connections 2024-10-24 13:06:28 +05:30
Yalu Zhang
3102c0f981 dectmngr: add voicemngr in the dependency of Makefile 2024-10-24 09:25:44 +02:00
Vivek Kumar Dutta
8693a8f2c9 icwmp: Align with DeviceInfo.Reboots. 2024-10-24 12:22:09 +05:30
Amin Ben Romdhane
9bc4656525 bbfdm: Added support for Device.DeviceInfo.Reboots. object 2024-10-24 12:03:47 +05:30
Suvendhu Hansa
544000177c icwmp: Option to backup RPC in persistent storage 2024-10-24 11:31:46 +05:30
Strhuan Blomquist
2b1dbf7e36 iopsys-analytics: core watcher to fix modelname 2024-10-23 14:20:11 +00:00
Mohd Husaam Mehdi
641ec8a9eb urlfilter: fix crash on cleanup of dns answer struct 2024-10-23 10:16:39 +00:00
Janusz Dziedzic
c18929dbae libwifi: 7.7.3 2024-10-23 07:34:05 +00:00
Yalu Zhang
a592f34216 dectmngr-3.7.0: Add a new RPC to stop ringing on all incoming calls on an extension
voicemngr-1.2.0: Change the RPC to dectmngr for stopping ringing on an extension
2024-10-22 14:35:36 +02:00
Markus Gothe
4e2adf77cb mcastmngr: Implement L2 stats over UBUS.
Implement support for L2 mcast stats over UBUS.
2024-10-22 05:06:52 +00:00
Vivek Kumar Dutta
9fba09f00a bbfdm: Optimize event handling 2024-10-22 10:09:02 +05:30
Markus Gothe
12d377b3bd mcastmngr: 1.2.7 2024-10-21 17:07:34 +02:00
Rahul Thakur
cd1f81c8d9 update package logmngr
* fix uci defaults
* 37f9eef make protocol writable
2024-10-21 09:58:06 +00:00
Amin Ben Romdhane
f6774fd554 ieee1905: 8.5.8 2024-10-21 10:45:32 +02:00
Amin Ben Romdhane
ea248061f3 mcastmngr: 1.2.6 2024-10-21 10:44:12 +02:00
Amin Ben Romdhane
1e2894dd46 netmngr: 1.0.5 2024-10-21 10:43:05 +02:00
Vivek Kumar Dutta
92b607bd0e obuspa: reduce IPC cost for get calls 2024-10-18 18:34:08 +05:30
Mohd Husaam Mehdi
b766ea958a urlfilter: show Deny in bbfdm when no access policy set for filter 2024-10-18 06:45:37 +00:00
Markus Gothe
a7074db9f8 mcastmngr: Support hybrid proxying/snooping.
Support running mcproxy and snooping simultanous.
2024-10-17 16:19:04 +02:00
Janusz Dziedzic
5c819b2018 libwifi: 7.7.2 2024-10-17 12:57:25 +00:00
Janusz Dziedzic
c526df5143 libwifi: 7.7.1 2024-10-17 09:27:57 +00:00
Rahul Thakur
31ed2ae746 update package logmngr
*5e7c684 Fix data model params
* d23dcdf logmngr: add README
2024-10-17 14:31:30 +05:30
Rahul Thakur
702065eb3d update package dnsmngr
* fb49088 fix DNS.SD.Advertise.{i}.TransportProtocol
* b7115a9 Device.DNS.SD.Advertise.{i}.Interface doesn't show a correct reference value
* 94964b4 Device.DNS.SD.Advertise.{i}.InstanceName value is always shown as empty value
* bf29f7b Device.DNS.SD.Advertise.{i}.Alias default value is empty and remains empty even after setting it
2024-10-17 14:29:11 +05:30
Janusz Dziedzic
c418266af6 wifimngr: 17.4.2 2024-10-16 09:24:22 +00:00
Janusz Dziedzic
9c8d80d763 libwifi: 7.7.0 2024-10-16 08:03:15 +00:00
Vivek Kumar Dutta
007a8cb8bf icwmp: Use async task for diagnostics 2024-10-16 12:23:39 +05:30
Vivek Kumar Dutta
2fc7d55d6c bbfdm: 1.12.12 2024-10-16 12:22:26 +05:30
Vivek Kumar Dutta
b3bdcea137 obuspa: Fix miss-configs caused by uci update 2024-10-15 17:40:58 +05:30
Vivek Kumar Dutta
4673347125 obuspa: workaround to skip false warning on Download operation 2024-10-15 16:05:10 +05:30
Vivek Kumar Dutta
f827f9f408 bbfdm: 1.12.11 2024-10-15 14:30:44 +05:30
Vivek Kumar Dutta
6a8aed5d3f bbfdm: Schedule reboots on firmware AutoActivate 2024-10-15 14:11:05 +05:30
Janusz Dziedzic
5e54477cd1 libwifi: 7.6.9 2024-10-15 05:40:20 +00:00
Amin Ben Romdhane
ba9fcda886 obuspa: delete dmcaching exclude objects 2024-10-14 18:20:10 +02:00
Amin Ben Romdhane
c848d93316 hostmngr: 1.2.7 2024-10-14 18:17:13 +02:00
Amin Ben Romdhane
d00c8f1ea0 bbfdm: 1.12.9 2024-10-14 18:16:20 +02:00
Mohd Mehdi
9788a135aa urlfilter: ParentalControl datamodel 2024-10-14 10:10:12 +00:00
Jakob Olsson
899e6b1417 map-agent: 6.2.1.7 2024-10-11 09:04:35 +02:00
Mohd Husaam Mehdi
6f7f14b241 urlfilter: transform into ParentalControl bbf extension
* config file has been renamed from urlfilter to parentalcontrol
* along with urlfiltering, shell scripts handle internet_access
  and bedtime blocking support, which have been added as
  separate sections for better mapping to the bbf data model
  extension
* uci-default script has been added to handle migration from
  previous to new format
2024-10-11 12:18:26 +05:30
Vivek Kumar Dutta
cc0d1b5910 firewallmngr: 1.0.6 2024-10-10 17:10:29 +05:30
Vivek Kumar Dutta
0b6cd8154b ddnsmngr: 1.0.9 2024-10-10 16:47:42 +05:30
Vivek Kumar Dutta
c4cae5d6b4 bridgemngr: 1.0.6 2024-10-10 16:45:16 +05:30
Vivek Kumar Dutta
f58959842b dhcpmngr: 1.0.4 2024-10-10 16:44:50 +05:30
Vivek Kumar Dutta
b813c155bc sshmngr: 1.0.5 2024-10-10 16:42:50 +05:30
Vivek Kumar Dutta
98e53ae941 logmngr: 1.0.3 2024-10-10 16:02:51 +05:30
Vivek Kumar Dutta
4d993266b3 bbfdm: move VendorLogFile to logmngr 2024-10-10 14:30:41 +05:30
Suvendhu Hansa
8da27926a1 icwmp: 9.8.16
- External script to handle '2 Vendor Log File'
- Align with VendorLogFile
2024-10-10 12:49:49 +05:30
Suvendhu Hansa
7fae7acc91 logmngr: 1.0.2
- Added prefix with rotated log filename to distinguish
  with actual log files
- Fix compression value
- Moved VendorLogFiles datamodel from bbfdm to logmngr
2024-10-10 04:10:22 +00:00
Suvendhu Hansa
47708d34df self-diagnostics: Align with VendorLogFiles update 2024-10-10 09:20:43 +05:30
Markus Gothe
ab322f1194 timemngr: commit time UCI config. 2024-10-09 16:08:32 +02:00
Amin Ben Romdhane
aab45b16b0 Added libbbfdm-ubus and dm-service as dependencies for all microservices 2024-10-09 09:54:16 +02:00
Jakob Olsson
586920d8a8 map-agent: 6.2.1.6 2024-10-08 12:58:33 +02:00
Rahul Thakur
ac8a1c69ae update package dnsmngr
* 055de29 add support for dns.sd.advertise
2024-10-08 14:01:57 +05:30
Vivek Kumar Dutta
604cd52a79 bbfdm: Support to set list of references with json plugins 2024-10-08 12:52:38 +05:30
Jakob Olsson
37109a8531 decollector: 6.1.0.2 2024-10-04 14:11:21 +02:00
Jakob Olsson
136db7b085 map-agent: 6.2.1.5 2024-10-04 12:32:33 +02:00
Jakob Olsson
c177d59b7b map-agent: 6.2.1.4 2024-10-03 14:03:58 +02:00
Vivek Kumar Dutta
fa9611f4f5 usbmngr: 1.0.5 2024-10-03 16:38:54 +05:30
Jakob Olsson
859e2958c0 map-agent: 6.2.1.3 2024-10-03 12:10:25 +02:00
Vivek Kumar Dutta
0dda22833d obuspa: skip db override 2024-10-02 20:43:48 +05:30
Yalu Zhang
ccb40910e2 libvoice-broadcom-1.0.15: Change the mechanism of DECT simulation by not calling Broadcom APIs 2024-10-02 16:51:21 +02:00
Janusz Dziedzic
eddaa9233c libwifi: 7.6.8 2024-10-02 13:00:08 +00:00
Piotr Kubik
a09f5a3ba6 iop: update_feed_branches: Remove script
It was used to update branches of feeds according to the commit hashes
in feeds.conf. Mostly used when doing release branches for the
first time. We do it manually now, so it is not needed anymore.
2024-10-02 13:44:30 +02:00
Jakob Olsson
ed78a58455 map-agent: 6.2.1.2 2024-10-02 11:01:20 +02:00
Amin Ben Romdhane
b130d50bb3 tr104: 1.0.34 2024-10-02 10:08:31 +02:00
Vivek Kumar Dutta
7ab286753d obuspa: 9.0.0.6
- Added back firewall hook to force re-connect mqtt client on firewall reload
- Added wait for apply handler
2024-10-01 16:29:14 +05:30
Vivek Kumar Dutta
bc6aadb0ed tr104: added missing required NumberOfEntires parameters 2024-10-01 16:21:45 +05:30
Vivek Kumar Dutta
fd9c8b0922 icwmp: Fix GPN fault with multi-instances 2024-10-01 16:17:15 +05:30
Vivek Kumar Dutta
2c9b9cadfe icwmp: 9.8.14 2024-09-30 19:18:41 +05:30
Vivek Kumar Dutta
fb1ac0994d obuspa: multiple fixes
- remove workaround to ForceReconnect over MQTT with firewall hook
- removed schema reloader from obuspa
2024-09-30 18:56:07 +05:30
Janusz Dziedzic
5ba8e293eb libwifi: 7.6.7 2024-09-30 07:45:45 +00:00
Janusz Dziedzic
801ed0eb9f libwifi: 7.6.6 2024-09-27 16:34:33 +00:00
Rahul Thakur
54503f98d4 urlfilter: fix connection flush on firewall reload 2024-09-27 11:54:45 +00:00
Janusz Dziedzic
903ff637e7 libwifi: 7.6.5 2024-09-27 08:41:26 +00:00
Vivek Kumar Dutta
82ef5f6b6e wifidmd: Align with dump2 output 2024-09-26 16:10:24 +05:30
Anjan Chanda
398f09a1ce decollector: 6.1.0.1 2024-09-26 11:42:45 +02:00
Jakob Olsson
f29de07d0d map-agent: 6.2.1.1 2024-09-26 10:50:54 +02:00
Janusz Dziedzic
8524f719c1 wifimngr: 17.4.1 2024-09-26 05:57:13 +00:00
Janusz Dziedzic
0a73e686f5 libwifi: 7.6.4 2024-09-26 05:56:06 +00:00
Vivek Kumar Dutta
615b3d0507 obuspa: Fix transaction commit/abort calls 2024-09-25 20:06:17 +05:30
Vivek Kumar Dutta
4df8574fb6 stunc: 1.4.5 2024-09-25 10:34:08 +00:00
Vivek Kumar Dutta
e39d51a37b obuspa: Fix disconnection after set 2024-09-25 10:34:08 +00:00
Vivek Kumar Dutta
598b5c8e4a timemngr: Updated loglevel 2024-09-25 10:34:08 +00:00
Janusz Dziedzic
135e31a3e2 wifimngr: 17.4.0 2024-09-25 10:24:42 +00:00
Janusz Dziedzic
8e4810baa1 libwifi: 7.6.3 2024-09-25 10:23:28 +00:00
Vivek Kumar Dutta
acd0a7ba24 bbfdm: 1.12.6 2024-09-24 18:58:26 +05:30
Vivek Kumar Dutta
032bb6bf2e usermngr: 1.2.19 2024-09-24 18:57:19 +05:30
Vivek Kumar Dutta
083bcd79f9 bulkdata: 2.1.12 2024-09-24 18:47:00 +05:30
Vivek Kumar Dutta
30a7c285b1 xmppc: 2.2.12 2024-09-24 18:41:25 +05:30
Vivek Kumar Dutta
5d03bbfd20 obuspa: updated default instance cache time to 10 mins 2024-09-24 18:28:41 +05:30
Vivek Kumar Dutta
1a167f8854 stunc: 1.4.4 2024-09-24 17:20:44 +05:30
Vivek Kumar Dutta
06b6b64d4c periodicstats: 1.5.13 2024-09-24 17:15:56 +05:30
Vivek Kumar Dutta
26999d2381 wifidmd: 1.0.9 2024-09-24 17:06:33 +05:30
Vivek Kumar Dutta
9fba0888eb packet-capture-diagnostics: 1.0.2 2024-09-24 17:05:37 +05:30
Vivek Kumar Dutta
1ce4ba836f udpecho: 2.2.4 2024-09-24 17:03:26 +05:30
Vivek Kumar Dutta
6493720c11 userinterface: 1.1.6 2024-09-24 16:58:49 +05:30
Piotr Kubik
dd0dec6ac4 iop: genconfig_wrap: Move script to main repo 2024-09-24 09:38:44 +02:00
Vivek Kumar Dutta
cbfc98d85e obuspa: Integrate v9.0.0 Ibis release 2024-09-23 19:35:36 +05:30
Jakob Olsson
086763919a map-agent: 6.2.1.0 2024-09-23 14:55:12 +02:00
Jakob Olsson
62cbccd274 map-controller: 6.1.2.1 2024-09-23 14:52:23 +02:00
Piotr Kubik
b0a8549453 iop: ssh_upgrade: Move script to main repo 2024-09-23 14:04:49 +02:00
Vivek Kumar Dutta
757ab29b57 twamp: 1.4.7 2024-09-23 10:52:36 +05:30
Vivek Kumar Dutta
82eb62a9e1 icwmp: Fix static analysis errors 2024-09-23 10:26:35 +05:30
Vivek Kumar Dutta
66bed5a044 netmngr: 1.0.4 2024-09-20 19:39:53 +05:30
Amin Ben Romdhane
12449bf471 tr471: 1.0.6 2024-09-20 15:51:24 +02:00
Amin Ben Romdhane
5c4f315083 tr143: 1.0.7 2024-09-20 15:50:22 +02:00
Amin Ben Romdhane
0a88793328 timemngr: 1.1.2 2024-09-20 15:48:51 +02:00
Amin Ben Romdhane
4ea26f9bec bbfdm: 1.12.5 2024-09-20 15:47:43 +02:00
Jakob Olsson
85542591d0 ieee1905: 8.5.7 2024-09-20 15:30:01 +02:00
Jakob Olsson
91ef8ff9a2 map-agent: 6.2.0.3 2024-09-20 15:00:50 +02:00
Yalu Zhang
13aa279c39 dectmngr-3.6.9: Send flash hook event before receiving the called number for the second outgoing call
libvoice-d2-1.1.14: Don't report DTMF events detected by DSP for DECT
2024-09-20 14:16:47 +02:00
Janusz Dziedzic
eadb87d369 libwifi: 7.6.2 2024-09-20 08:33:26 +00:00
Jakob Olsson
f250bc3c79 decollector: 6.1.0.0 2024-09-19 15:03:56 +02:00
Jakob Olsson
eaaf653b0f map-agent: 6.2.0.2 2024-09-18 17:20:06 +02:00
Jakob Olsson
4a30355aab decollector: 6.0.1.2 2024-09-18 16:30:59 +02:00
Vivek Kumar Dutta
2abd075e59 obuspa: Fix probable segfault 2024-09-18 18:57:43 +05:30
Jakob Olsson
aec10de11f map-agent: 6.2.0.1 2024-09-18 12:41:14 +02:00
Jakob Olsson
50e53a5b15 Revert "mapagent: qualcomm: disable hidden bh"
This reverts commit 5fd9145a27.
2024-09-18 11:14:00 +02:00
Janusz Dziedzic
6a89907ddb libwifi: 7.6.1 2024-09-18 05:29:55 +00:00
Vivek Kumar Dutta
3dae593802 swmodd: Fix DuStateChange timer 2024-09-17 19:42:25 +05:30
Amin Ben Romdhane
5b2d26a839 Revert "tr143: 1.0.7"
This reverts commit 3efb822b6e.
2024-09-17 15:27:29 +02:00
Andreas Gnau
3fa318c58f libvoice-broadcom: Add dependency to bcm963xx-voice
Voice-part of BCM SDK is required to build libvoice-broadcom.
2024-09-17 12:54:30 +00:00
Rahul Thakur
7dab64d1e0 update package libdsl
* 20875ec clean up dsl
* setup prepare section for local dev
* update git source url to new source for repo
2024-09-17 10:54:27 +00:00
Vivek Kumar Dutta
99d1900c79 xmppc: Support re-connection with max_keepalive_fails option 2024-09-17 14:31:44 +05:30
Janusz Dziedzic
16bffe35f7 libwifi: 7.6.0 2024-09-16 15:39:39 +00:00
Amin Ben Romdhane
3efb822b6e tr143: 1.0.7 2024-09-16 15:33:37 +02:00
Amin Ben Romdhane
a3463ec253 netmngr: 1.0.3 2024-09-16 15:01:04 +02:00
Amin Ben Romdhane
a76e7d641d bbfdm: 1.12.4 2024-09-16 15:00:04 +02:00
Vivek Kumar Dutta
ab75eaa19d dslmngr: 1.2.8 2024-09-16 17:30:57 +05:30
Mikhail Kshevetskiy
2d50afe767 voicemngr: add missed dependency for libopenssl
Building of voicemngr for airoha target results in failure due to missed deps on libcrypto.so.3
and libssl.so.3.
This patch fix the issue.

PS: other targets was NOT tested.
2024-09-16 08:25:29 +00:00
Suvendhu Hansa
916ea44e1d bbfdm: Added Device.Schedules. DM object 2024-09-16 04:50:39 +00:00
Vivek Kumar Dutta
59bbbd822e dslmngr: added missing required dm parameters 2024-09-16 10:10:37 +05:30
Vivek Kumar Dutta
8b67c32fd8 netmngr: Added missing required dm parameters 2024-09-16 10:07:38 +05:30
Vivek Kumar Dutta
0852b1c635 icwmp: 9.8.12 2024-09-16 10:05:24 +05:30
Janusz Dziedzic
38f0ec2180 libwifi: 7.5.9 2024-09-13 10:50:43 +00:00
Vivek Kumar Dutta
67567aeed5 userinterface: fix rpcd script 2024-09-12 14:30:03 +00:00
Vivek Kumar Dutta
5315408948 sshmngr: Fix rpcd scripts 2024-09-12 14:30:03 +00:00
Vivek Kumar Dutta
5f255090f5 self-diagnostics: Fix rpcd scripts 2024-09-12 14:30:03 +00:00
Vivek Kumar Dutta
2e8a62001e ddnsmngr: Fixed rpcd scripts 2024-09-12 14:30:03 +00:00
Vivek Kumar Dutta
52add3fc14 bbfdm: 1.12.2
- Fix rpcd bbf.secure script
- Fix validation for empty datamodel parameter reference
2024-09-12 14:30:03 +00:00
Vivek Kumar Dutta
964a1008fd mcastmngr: probable fix for rpcd crash 2024-09-12 18:06:36 +05:30
Janusz Dziedzic
5fd9145a27 mapagent: qualcomm: disable hidden bh
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2024-09-12 08:47:12 +00:00
Janusz Dziedzic
988717574c wifimngr: 17.3.9 2024-09-11 16:32:02 +00:00
Janusz Dziedzic
23ea6da091 libwifi: 7.5.8 2024-09-11 14:14:27 +00:00
Jakob Olsson
927442fb89 map-controller: 6.1.2.0 2024-09-11 15:27:12 +02:00
Jakob Olsson
4db0f00c26 map-agent: 6.2.0.0 2024-09-11 15:26:29 +02:00
Janusz Dziedzic
c710784038 libwifi: 7.5.7 2024-09-11 09:57:47 +00:00
Janusz Dziedzic
5072d9025a libwifi: 7.5.6 2024-09-10 17:00:26 +00:00
Andreas Gnau
b5a963c1bf iop: cfe_upgrade: Remove
CFE is no longer. Remove the script. In the future, we might integrate
U-Boot upgrade into iopupgrade.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-09-10 17:06:20 +02:00
Andreas Gnau
608b4a2b8a iop: taas: Remove
TAAS infrastructure no longer exists. Remove it.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-09-10 17:06:20 +02:00
Andreas Gnau
ae5a982dc4 iop: annexconfig: Remove
This script has been broken for several years and DSL as a techology is
not that common anymore. Remove it.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2024-09-10 17:06:20 +02:00
Vivek Kumar Dutta
3ec6b54d46 bbfdm: delay start datamodel services
datamodel services moved down in startup sequence to avoid race conditions
2024-09-10 18:54:55 +05:30
Vivek Kumar Dutta
6a34e2da97 timemngr: run cron job to apply dst 2024-09-10 16:14:52 +05:30
Vivek Kumar Dutta
627a4c4ad6 Revert "timemngr: uci option for day light saving time"
This reverts commit b74c2d2d17.
2024-09-10 16:04:30 +05:30
Lwithwma Brahma
abbab7118c mcastmngr: correct stats output
Corrected the read_mcast_stats function, to display
"ubus call mcast stats" correct output for multiple iptv bridges

Test:
"ubus call mcast stats" showing correct output for both single and multiple bridge.
2024-09-10 09:59:40 +00:00
Amin Ben Romdhane
31e6887d42 bbfdm: add dm-service daemon 2024-09-10 11:48:09 +02:00
Janusz Dziedzic
fc37507afb libwifi: 7.5.5 2024-09-10 07:06:33 +00:00
Vivek Kumar Dutta
e160b6795a tr143: Fix datatype of parameters 2024-09-09 18:36:24 +05:30
Markus Gothe
5ace2f5cc9 mcastmngr: 1.2.4 2024-09-09 11:20:58 +02:00
Mohd Husaam Mehdi
0e54c37963 mcastmngr: fix mcast stats shows 0.0.0.0 for group
Fixes mcast stats showing 0.0.0.0 for group address.
2024-09-08 12:32:36 +00:00
Vivek Kumar Dutta
e9e118fa12 icwmp: Fix memory leak 2024-09-06 22:00:39 +05:30
Vivek Kumar Dutta
9af1de3b43 bbfdm: Use usp proto for AddObj/DelObj events 2024-09-06 21:55:51 +05:30
Suvendhu Hansa
b74c2d2d17 timemngr: uci option for day light saving time 2024-09-06 21:49:23 +05:30
Janusz Dziedzic
ee779c0fd8 libwifi: assume mediatek = mac80211 2024-09-06 12:22:27 +00:00
Rahul Thakur
36fb5d5343 mcastmngr: handle multiple filters for mcproxy
the library script that converts uci to mcproxy config is generating
incorrect config for filtering ip addresses which leads to mcproxy
not even starting when multiple filters are defined.

this commit fixes the above described issue.
2024-09-06 10:30:00 +00:00
Janusz Dziedzic
0d2f443da0 wifimngr: 17.3.8 2024-09-05 19:39:50 +00:00
Vivek Kumar Dutta
5dc696f7e6 bbfdm: updated max registration objects 2024-09-04 19:55:55 +05:30
Vivek Kumar Dutta
6ae56f6737 obuspa: updated max instance depth 2024-09-04 19:54:54 +05:30
Janusz Dziedzic
76af31b457 wifimngr: 17.3.7 2024-09-04 12:30:03 +00:00
Vivek Kumar Dutta
7838b7b5c3 icwmp: datatype validation in set rpc 2024-09-04 11:51:05 +05:30
Vivek Kumar Dutta
f98664f398 bbfdm: datatype validation on set request 2024-09-04 11:40:20 +05:30
Vivek Kumar Dutta
89b1584816 fluent-bit: Switch to build from release 2024-09-03 17:50:41 +05:30
Vivek Kumar Dutta
da0234f66b decollector: fix assoc/disassoc event syntax 2024-09-02 19:13:29 +05:30
Vivek Kumar Dutta
45af6700f5 bbfdm: respawn microservices 2024-09-02 19:10:12 +05:30
Vivek Kumar Dutta
c60bc158a4 obuspa: fix probable segfault in event handling 2024-09-02 19:06:14 +05:30
Vivek Kumar Dutta
b2895d8908 obuspc: Fix compilation errors 2024-09-02 14:14:48 +05:30
Markus Gothe
eb10bd6b6b obuspa: add InterfaceSetting to dmcaching_exclude.json 2024-09-02 06:34:06 +00:00
Amin Ben Romdhane
af0a111b81 bbfdm: 1.11.1 2024-08-30 17:52:41 +02:00
Janusz Dziedzic
fc9e35c18f libwifi: 7.5.4 2024-08-30 08:30:25 +00:00
Vivek Kumar Dutta
7d619a85b3 netmngr: Fix instance navigation 2024-08-30 12:55:05 +05:30
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
Vivek Kumar Dutta
cc0e87a0cd tr104: Removed unsupported NumberOfEntries 2024-07-12 12:38:58 +05:30
Vivek Kumar Dutta
dd5bc10c72 wifidmd: Removed unsupported NumberOfEntries parameters 2024-07-12 12:35:08 +05:30
Vivek Kumar Dutta
092c7d139b obuspa: Exception handling for NumberOfEntries registration 2024-07-12 12:32:37 +05:30
Anjan Chanda
137114d62a wifimngr: 17.3.1 2024-07-11 16:14:25 +02:00
Vivek Kumar Dutta
01f88ce2a8 wifidmd: added missing EndPointProfileNumberOfEntries 2024-07-11 18:43:51 +05:30
Vivek Kumar Dutta
243aba8c51 obuspa: re-apply connack clienid persistency 2024-07-11 18:31:26 +05:30
Vivek Kumar Dutta
5211e526ec obuspa: Updated default InheritedRole to UntrustedRole 2024-07-11 11:41:04 +05:30
Vivek Kumar Dutta
c5483f81db obuspa: Integrate v8.0.5 2024-07-10 12:32:12 +00:00
Vivek Kumar Dutta
d8f4afdca5 bbfdm: dm scripts moved to utilities 2024-07-10 18:00:14 +05:30
Mohd Husaam Mehdi
6ef90dcd9d qosmngr: add ebtable handling for loopback (lo) interface
If interface is loopback then we add the rule to nat table's
output chain instead of broute tables BROUTING chain
2024-07-10 04:38:31 +00:00
Strhuan Blomquist
9eb14ac309 fixing #14792 collectd iterates on that queue and tries to write this data to the endpoint. If writing was successful, the data is removed from the queue otherwise data doesn't get removed and collectd will eat all of the memory-. *this fixes that by limiting how much we are allowed to store. 2024-07-09 13:00:00 +00:00
Marek Puzyniak
949b5db030 map-agent: 6.1.1.6 2024-07-09 10:35:33 +00:00
Vivek Kumar Dutta
f42c062c08 firewallmngr: move helper scripts from bbfdm 2024-07-09 06:26:04 +00:00
Vivek Kumar Dutta
42e23d0162 bbfdm: cleanup and update
- move firewall related scripts to firewallmngr
- removed old unused uci-default scripts
2024-07-09 11:47:11 +05:30
Amit Kumar
8794818492 ipt-trigger: updated commit hash
update code of ipt-trigger for correction of condition
for out_trigger function
2024-07-09 11:03:39 +05:30
Anjan Chanda
412c88fb33 wifimngr: 17.3.0 2024-07-05 16:09:37 +02:00
Anjan Chanda
855d29af0c libwifi: 7.5.0 2024-07-05 16:09:17 +02:00
Jakob Olsson
f9757c7f7a map-agent: 6.1.1.5 2024-07-05 15:13:20 +02:00
Jakob Olsson
74eea33f1d map-controller: 6.1.1.5 2024-07-05 15:12:10 +02:00
Vivek Kumar Dutta
0e9146a5c5 obuspa: fix segfault in reboot/reset 2024-07-04 17:47:07 +05:30
Janusz Dziedzic
895c05669b libwifi: 7.4.76 2024-07-01 14:34:22 +00:00
Markus Gothe
7cd7719f9b mcastmngr: Fix L2 snooping hotplug events. 2024-07-01 11:25:06 +00:00
Vivek Kumar Dutta
c76e6142c2 bbfdm: fix update notification with operate commands 2024-07-01 14:52:25 +05:30
Suvendhu Hansa
dc63e6da74 obuspa: persist client id from connack message 2024-07-01 09:09:17 +00:00
Vivek Kumar Dutta
affb07b513 icwmpd: improve error handling in firmware upgrade 2024-06-28 13:34:18 +05:30
Janusz Dziedzic
4ea324f493 libwifi: 7.4.75 2024-06-27 15:21:58 +00:00
Wenpeng Song
156acb308d libvoice-broadcom 1.0.14 :
Update incoming codec for DTMF payload type
2024-06-27 09:56:42 +00:00
Rahul Thakur
e9237858b1 update package qosmngr
* c4db530 qosmngr: Add documentation for VLAN and Pbit translation config
2024-06-20 15:11:01 +05:30
Rahul Thakur
42cf056d57 update package ethmngr
* 2d35e86 Data Model: Add MACVLAN document
2024-06-20 15:09:01 +05:30
Markus Gothe
a16bde6dae remove easy-qos: Deprecated and not used any longer. 2024-06-20 10:55:49 +02:00
Rohit Topno
8b24b648c7 qosmngr: update Makefile for tr-181 vendor extension VLAN ID translation 2024-06-20 11:51:07 +05:30
Vivek Kumar Dutta
df9f5f97af swmodd: Use mounted /container path 2024-06-19 11:36:22 +05:30
Rahul Thakur
8766ee44d6 update package ebtables-extensions
* d3de8b0 fix compilation
2024-06-18 15:13:32 +05:30
Rahul Thakur
1ab0c5b13d update package ebtables-extensions
* 14ceb14 Merge branch 'update-vlanxlate-header' into 'devel'
* afde550 dscp2pbit: fix matching on internally create VLAN headers.
* 5eea71f Merge branch 'update-vlantranslation' into 'devel'
* 1d6d9f5 vlantranslation: Add TPID and tagging support.
2024-06-18 09:15:11 +00:00
Vivek Kumar Dutta
90dfcd0ad3 swmodd: 2.5.11
Update default bundle root to '/container', swmodd only starts if
'/container' mounted and accessible.
Mounting of persistent storage to '/container' is out of scope of swmodd.
2024-06-17 18:27:55 +05:30
Erik Karlsson
72e4b4f0cb usp-js: depend on OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
This avoids the need for duplicating local MQTT broker setup.
2024-06-17 14:53:23 +05:30
Erik Karlsson
633519ac3a obuspa: split up OBUSPA_ENABLE_TEST_CONTROLLER configuration
A separate OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL configuration is added
which can be used by for example usp-js to accomplish local MQTT
broker setup but without compromising security by enabling remote
access. Appropriate dependencies are also added. In addition
unnecessary uci_load commands and misspelled and unnecessary
require_certificates mosquitto option are removed.
2024-06-17 14:41:59 +05:30
Filip Matusiak
7b4db3d325 decollector: 6.0.0.13 2024-06-13 14:43:42 +02:00
Jakob Olsson
305dd1d6a2 map-agent: 6.1.1.4 2024-06-13 13:24:23 +02:00
Jakob Olsson
5a4eb4d297 map-agent: map_genconfig: if mld is disabled clean mld_ids 2024-06-13 12:21:23 +02:00
Janusz Dziedzic
8f81c1c4c3 libwifi: 7.4.74 2024-06-13 09:24:05 +00:00
Suvendhu Hansa
5d6ae3fc2d obuspa: mqtt retry params runtime update 2024-06-13 14:09:52 +05:30
Vivek Kumar Dutta
faf133212e tr104: align with dm_data structure 2024-06-13 13:27:43 +05:30
Rahul Thakur
3c170edee3 update package qosmngr
* bcf8f36 qosmngr: Add documentation for dscp2pbit mapping configuration
2024-06-13 13:12:18 +05:30
Vivek Kumar Dutta
736885c999 bbfdm: 1.9.4 2024-06-12 20:52:36 +05:30
Vivek Kumar Dutta
b9d8faff99 tr104: 1.0.30 2024-06-12 20:46:24 +05:30
Jakob Olsson
74fec650f6 map-agent: 6.1.1.3 2024-06-12 15:30:09 +02:00
Jakob Olsson
c24ffb6b7c map-controller: 6.1.1.4 2024-06-12 15:25:39 +02:00
Filip Matusiak
280c4e2592 decollector: 6.0.0.12 2024-06-12 15:09:19 +02:00
nevadita.chatterjee
88b31df121 mapcontroller: 6.1.1.3 2024-06-12 17:58:51 +05:30
Mohd Husaam Mehdi
fdd67171bd bridgemngr: add support for ProviderBridge using bridge-vlan 2024-06-12 11:39:36 +00:00
Mohd Husaam Mehdi
826d023608 bridgemngr: add bridge-vlan backend
* add support for compile time flag BRIDGEMNGR_BRIDGE_VLAN
* if this flag is set data model code will use bridge-vlan
  sections to implement vlans on bridges
* if this flag is not set (default), then the data model code
  will use driver level vlans (8021q sections) as always
2024-06-12 11:39:36 +00:00
Vivek Kumar Dutta
925f6217ce usbmngr: 1.0.3 2024-06-12 16:06:54 +05:30
Vivek Kumar Dutta
7c12473940 bbfdm: removed deprecated APIs 2024-06-12 16:06:54 +05:30
Vivek Kumar Dutta
44315a3d75 userinterface: 1.1.4 2024-06-12 16:06:54 +05:30
Rahul Thakur
ebcbc1b2b5 update package libqos
* 6a72e35 libqos: fix log spam for bcm targets
2024-06-12 14:34:20 +05:30
Vivek Kumar Dutta
1fb471872f ddnsmngr: 1.0.7 2024-06-12 10:32:06 +05:30
Vivek Kumar Dutta
5a890b32dc firewallmngr: 1.0.3 2024-06-12 10:28:03 +05:30
Vivek Kumar Dutta
8cc10e6634 dslmngr: 1.2.5 2024-06-12 10:25:38 +05:30
Vivek Kumar Dutta
11f68bdac7 icwmp: 9.7.18 2024-06-12 10:16:30 +05:30
Vivek Kumar Dutta
6751b6667b xmppc: 2.2.9 2024-06-12 10:13:04 +05:30
Anjan Chanda
7b1786d7fe ieee1905: 8.4.6 2024-06-11 15:44:18 +02:00
Yalu Zhang
04fb442a7a libvoice-d2_1.1.12: Fix a bug that the RTCP packets are sent to the wrong port 2024-06-11 15:41:45 +02:00
Marek Puzyniak
0e4f81b7f4 decollector: 6.0.0.11 2024-06-11 08:06:44 +00:00
Vivek Kumar Dutta
b7e0196aa7 firewallmngr: align with bbfdm apis 2024-06-11 10:38:09 +05:30
Amit Kumar
2fdfb8900d mcastmngr: Handled max multicast snoop entry
* removed +2 logic as multicast snoop entry handled in mcproxy
 with logic to exclude count of reserve mcast ip address subnet
2024-06-11 04:57:27 +00:00
Vivek Kumar Dutta
251a9925d2 tr104: align with bbfdm api 2024-06-10 18:43:27 +05:30
Vivek Kumar Dutta
59e8c4d89f ieee1905: align with dm_data datamodel structure 2024-06-10 17:43:57 +05:30
Vivek Kumar Dutta
49930e3f6a icwmp: align with dm_data structure 2024-06-10 17:24:41 +05:30
Vivek Kumar Dutta
4021324465 twamp: align with datamodel api 2024-06-10 17:20:21 +05:30
Marina Maslova
b6930a2056 qosmngr: airoha: fix bw overwrite in case of reload and shaping 2024-06-10 11:07:45 +00:00
Vivek Kumar Dutta
1821af8963 sulu: added cyclonedx sbom 2024-06-10 12:55:30 +05:30
Vivek Kumar Dutta
f33d9e7d53 ethmngr: align with bbfdm datamodel APIs 2024-06-10 12:30:47 +05:30
Vivek Kumar Dutta
879e38773b qosmngr: align with dm_data structure 2024-06-10 12:27:20 +05:30
Vivek Kumar Dutta
c4d0b985e3 sshmngr: align with dm_data structure 2024-06-10 12:16:44 +05:30
Vivek Kumar Dutta
6a8c438907 bridgemngr: align with dm_data structure 2024-06-10 12:11:32 +05:30
Rohit Topno
0e38151087 qosmngr: Support for VLAN ID and p-bit translation 2024-06-10 08:45:29 +05:30
Vivek Kumar Dutta
3766d14b0c swmodd: 2.5.10 2024-06-08 22:56:34 +05:30
Vivek Kumar Dutta
9fcfe8f85d usbmngr: 1.0.2 2024-06-08 22:49:19 +05:30
Amin Ben Romdhane
6c7c2e456c bbfdm: 1.9.2 2024-06-08 12:03:39 +02:00
Amin Ben Romdhane
23fb6bc837 bbfdm: 1.9.1 2024-06-07 16:55:24 +02:00
Yalu Zhang
191bab4b36 libvoice-1.1.11: Play call waiting tone when type II caller ID generation is complete 2024-06-07 16:46:45 +02:00
Janusz Dziedzic
3f9665531b libwifi: 7.4.73 2024-06-07 12:59:13 +00:00
Janusz Dziedzic
3535170fa1 wifimngr: 17.2.8 2024-06-06 17:36:34 +00:00
Markus Gothe
2129df6d5f qosmngr: add support for l3 interfaces
* this commit adds support to use l3 interfaces
  in classification rules.
2024-06-06 04:14:38 +00:00
Janusz Dziedzic
f6fdaafe42 libwifi: 7.4.72 2024-06-05 10:09:08 +00:00
Suvendhu Hansa
b2d07e6e30 ssdpd: align with dm_data 2024-06-05 10:04:32 +00:00
Rohit Topno
1ae6eb33e9 R#14453 - Integrate DSCP2P-bit support in qosmngr and TR181 2024-06-05 10:01:00 +00:00
nevadita.chatterjee
f0d9a40f59 decollector: 6.0.0.10 2024-06-05 12:50:39 +05:30
Vivek Kumar Dutta
4ef5f5427d obuspa: Fix segfault with invalid UDS 2024-06-05 12:34:18 +05:30
Vivek Kumar Dutta
7ac03aa9d0 swmodd: fix compilation 2024-06-05 10:03:40 +05:30
Janusz Dziedzic
07c69b34ea libwifi: 7.4.71 2024-06-04 17:47:02 +00:00
Vivek Kumar Dutta
d2c3cda897 swmodd: config option to select swmodd-cgroups 2024-06-04 22:32:48 +05:30
Vivek Kumar Dutta
8456cf37e3 dhcpmngr: 1.0.2 2024-06-04 22:20:55 +05:30
Vivek Kumar Dutta
2f1d7d5f6c timemngr: 1.0.20 2024-06-04 22:10:02 +05:30
Vivek Kumar Dutta
6e87362a85 icwmp: 9.7.16 2024-06-04 19:21:49 +05:30
Amin Ben Romdhane
36de4ee5a2 bbfdm: bbf.config with C code 2024-06-04 19:05:29 +05:30
Vivek Kumar Dutta
63b6ff0f27 bbfdm: 1.8.27
- Optimized micro-service registrations
- Removed instance saving for ProcessStatus
2024-06-04 17:42:43 +05:30
Vivek Kumar Dutta
78e9f55363 xmppc: align with dm_data structure 2024-06-04 16:58:26 +05:30
Vivek Kumar Dutta
9845ba6d83 usermngr: align with bbfdm api 2024-06-04 16:53:16 +05:30
Vivek Kumar Dutta
d0c1e957f9 wifidmd: 1.0.3 2024-06-04 16:42:38 +05:30
Vivek Kumar Dutta
8c4a5584b9 ddnsmngr: use dm_data structure for multi-instance objects 2024-06-04 16:15:47 +05:30
Vivek Kumar Dutta
0100fa1c93 hostmngr: align with bbfdm api 2024-06-04 15:43:46 +05:30
Jakob Olsson
38118de339 map-agent: introduce config option that passes PERSIST_CONTROLLER CLFLAG 2024-06-04 11:57:25 +02:00
Jakob Olsson
95b9097a3e map-agent: 6.1.1.2 2024-06-04 11:57:25 +02:00
Jakob Olsson
8765ea2733 map-controller: 6.1.1.2 2024-06-04 11:57:25 +02:00
Jakob Olsson
b3f019ed98 map-agent: map_genconfig: don't modify mapcontroller enabled unconditionally 2024-06-04 11:57:25 +02:00
Vivek Kumar Dutta
bd92591b7b fluentbit: 1.0.0 2024-06-04 14:31:27 +05:30
Janusz Dziedzic
e6178dfa65 libwifi: 7.4.70 2024-06-04 05:19:44 +00:00
194 changed files with 5104 additions and 4636 deletions

View File

@@ -1,6 +1,4 @@
config BBF_VENDOR_LIST
string "Vendor List"
default "iopsys"
if PACKAGE_bbfdmd
config BBF_VENDOR_PREFIX
string "Vendor Prefix"
@@ -13,3 +11,4 @@ config BBF_OBFUSCATION_KEY
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255
endif

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.8.26
PKG_VERSION:=1.12.21
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=6df8fecbcc72e55f2ba06ae933dcddb6f725b204
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=062c13e83387e3ad37d6caaffd47cf57a1db7c7f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,32 +32,64 @@ define Package/libbbfdm-api
ABI_VERSION:=1.0
endef
define Package/libbbfdm
define Package/libbbfdm-ubus
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libopenssl
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/bbfdmd
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +libbbfdm +jq
TITLE:=Datamodel ubus backend to expose core tree
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libopenssl +libbbfdm-ubus +bbf_configmngr
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
define Package/dm-service
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend to expose micro-service tree
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libbbfdm-ubus +bbf_configmngr
endef
define Package/bbf_configmngr
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:= BBF Config Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
endef
define Package/bbfdmd/config
source "$(SOURCE)/Config_bbfdmd.in"
endef
define Package/bbf_configmngr/config
source "$(SOURCE)/bbf_configmngr.in"
endef
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
define Package/libbbfdm/description
Library contains the data model tree. It includes TR181, TR143 data models
define Package/libbbfdm-ubus/description
Library contains the APIs to expose data model over ubus
endef
define Package/bbfdmd/description
Daemon to expose Datamodel core tree
endef
define Package/dm-service/description
Daemon to expose Datamodel micro-service tree
endef
define Package/bbf_configmngr/description
Daemon for handling bbf reload services via ubus bbf.config
endef
ifeq ($(USE_LOCAL),1)
@@ -67,82 +99,97 @@ endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
ifeq ($(CONFIG_PACKAGE_bbfdmd),y)
CMAKE_OPTIONS += \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES) \
-DBBFDMD_MAX_MSG_LEN:Integer=10485760
endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/scripts/bbf.secure $(1)/usr/libexec/rpcd/bbf.secure
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/scripts/bbf.config $(1)/usr/libexec/rpcd/bbf.config
$(INSTALL_DIR) $(1)/etc/bbfdm
echo "$(CONFIG_BBF_OBFUSCATION_KEY)" > $(1)/etc/bbfdm/.secure_hash
$(INSTALL_DIR) $(1)/etc/bbfdm/certificates
endef
define Package/libbbfdm/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DIR) $(1)/usr/share/bbfdm/
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/usr/share/bbfdm/libbbfdm.so
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
$(INSTALL_BIN) ./files/etc/uci-defaults/99-link-core-plugins $(1)/etc/uci-defaults/99-link-core-plugins
$(INSTALL_BIN) ./files/etc/uci-defaults/90-remove-nonexisting-microservices $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/libbbfdm/dmtree/vendor/iopsys/libbbfdm_iopsys_ext.so $(1)
endif
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.secure $(1)/usr/libexec/rpcd/bbf.secure
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm/scripts/
$(LN) /usr/share/bbfdm/scripts/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_api $(1)/usr/share/bbfdm/scripts/
$(INSTALL_DIR) $(1)/etc/bbfdm/certificates
echo "$(CONFIG_BBF_OBFUSCATION_KEY)" > $(1)/etc/bbfdm/.secure_hash
endef
define Package/libbbfdm/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
define Package/libbbfdm-ubus/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-ubus/libbbfdm-ubus.so $(1)/lib/
endef
define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_CONF) ./files/etc/config/schedules $(1)/etc/config/schedules
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_BIN) ./files/etc/init.d/bbfdm.services $(1)/etc/init.d/
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
endef
define Package/dm-service/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/bbfdm.services $(1)/etc/init.d/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dm-service/dm-service $(1)/usr/sbin/
endef
define Package/bbf_configmngr/install
$(INSTALL_DIR) $(1)/etc/init.d
ifeq ($(CONFIG_BBF_CONFIGMNGR_C_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/bbf_configd $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_config_notify.sh $(1)/usr/share/bbfdm/scripts/
endif
ifeq ($(CONFIG_BBF_CONFIGMNGR_SCRIPT_BACKEND),y)
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.config $(1)/usr/libexec/rpcd/bbf.config
endif
endef
define Package/bbfdmd/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
endef
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))
$(eval $(call BuildPackage,libbbfdm-ubus))
$(eval $(call BuildPackage,bbfdmd))
$(eval $(call BuildPackage,dm-service))

19
bbfdm/bbf_configmngr.in Normal file
View File

@@ -0,0 +1,19 @@
if PACKAGE_bbf_configmngr
choice
prompt "Select backend daemon for bbf.config"
default BBF_CONFIGMNGR_C_BACKEND
help
Select which backend daemon should be used for ubus bbf.config
config BBF_CONFIGMNGR_SCRIPT_BACKEND
bool "Use shell script backend"
help
Enable this option to use shell script as the backend for bbf.config. This can be useful for quick and easy scripting of configuration tasks.
config BBF_CONFIGMNGR_C_BACKEND
bool "Use C code backend"
help
Enable this option to use a C code implementation as the backend for bbf.config. This option is generally preferred for performance-critical tasks and scenarios requiring more robust and efficient handling.
endchoice
endif

View File

@@ -1,28 +0,0 @@
{
"daemon": {
"config": {
},
"input": {
"type": "DotSo",
"name": "/usr/share/bbfdm/libbbfdm.so",
"plugin_dir": "/usr/share/bbfdm/plugins"
},
"output": {
"type": "UBUS",
"name": "bbfdm"
}
},
"cli": {
"config": {
"proto": "both",
"instance_mode": 0
},
"input": {
"type": "UBUS",
"name": "bbfdm"
},
"output": {
"type": "CLI"
}
}
}

View File

@@ -1,11 +1,8 @@
config bbfdmd 'bbfdmd'
option enable '1'
option loglevel '1'
option refresh_time '120'
option transaction_timeout '30'
option subprocess_level '2'
option debug '0'
option loglevel '3'
config micro_services 'micro_services'
option enable '1'
option enable_core '0'
option enable_respawn '1'

View File

@@ -0,0 +1,2 @@
config global 'global'
option enable '1'

View File

@@ -0,0 +1,36 @@
#!/bin/sh /etc/rc.common
START=80
STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbf_configd
log() {
echo "${@}"|logger -t bbf.config -p info
}
create_needed_directories()
{
mkdir -p /tmp/bbfdm/.cwmp
mkdir -p /tmp/bbfdm/.usp
mkdir -p /tmp/bbfdm/.bbfdm
}
start_service()
{
create_needed_directories
procd_open_instance "bbf_configd"
procd_set_param command ${PROG}
#procd_append_param command -ddd
procd_set_param respawn
procd_close_instance "bbf_configd"
}
service_triggers() {
for config_file in /etc/config/*; do
config_name=$(basename "$config_file")
procd_add_config_trigger "config.change" "$config_name" /usr/share/bbfdm/scripts/bbf_config_notify.sh
done
}

View File

@@ -1,10 +1,10 @@
#!/bin/sh /etc/rc.common
START=40
START=60
STOP=8
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
PROG=/usr/sbin/dm-service
BBFDM_MICROSERVICE_DIR="/etc/bbfdm/micro_services"
@@ -18,33 +18,38 @@ validate_bbfdm_micro_service_section()
{
uci_validate_section bbfdm micro_services "micro_services" \
'enable:bool:true' \
'enable_core:bool:false' \
'enable_respawn:bool:true'
'enable_core:bool:false'
}
_add_microservice()
{
local name path
local enable enable_core enable_respawn
local name path loglevel
local enable enable_core
# Check enable from micro-service
path="${1}"
enable_respawn="${2}"
enable_core="${3}"
enable_core="${2}"
name="$(basename ${path})"
name="${name//.json}"
enable="$(jq -r '.daemon.enable//1' ${path})"
json_load_file "${path}"
json_select daemon
json_get_var enable enable 1
if [ "${enable}" -eq "0" ]; then
log "datamodel micro-service ${name} not enabled"
return 0
fi
json_select config
json_get_var loglevel loglevel 3
procd_open_instance "${name}"
procd_set_param command ${PROG}
procd_append_param command -m "${name}"
procd_append_param command -l "${loglevel}"
if [ "${enable_core}" -eq "1" ]; then
procd_set_param limits core="unlimited"
@@ -52,15 +57,13 @@ _add_microservice()
procd_set_param stderr 1
fi
if [ "${enable_respawn}" -eq "1" ]; then
procd_set_param respawn "3600" "5" "5"
fi
procd_set_param respawn
procd_close_instance "${name}"
}
configure_bbfdm_micro_services()
{
local enable enable_core enable_respawn
local enable enable_core
config_load bbfdm
validate_bbfdm_micro_service_section || {
@@ -77,7 +80,7 @@ configure_bbfdm_micro_services()
do
[ -e "$file" ] || continue
_add_microservice $file "${enable_respawn}" "${enable_core}"
_add_microservice $file "${enable_core}"
done
fi
}
@@ -92,7 +95,7 @@ _start_single_service()
file="$(ls -1 ${BBFDM_MICROSERVICE_DIR}/${service}.json)"
[ -e "$file" ] || return
_add_microservice $file "0" "0"
_add_microservice $file "0"
fi
}

View File

@@ -1,14 +1,11 @@
#!/bin/sh /etc/rc.common
START=65
START=97
STOP=10
USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
BBFDM_TEMP_DIR="/tmp/bbfdm"
. /usr/share/libubox/jshn.sh
log() {
@@ -19,17 +16,13 @@ validate_bbfdm_bbfdmd_section()
{
uci_validate_section bbfdm bbfdmd "bbfdmd" \
'enable:bool:true' \
'sock:string' \
'debug:bool:false' \
'loglevel:uinteger:1' \
'refresh_time:uinteger:0' \
'transaction_timeout:uinteger:30' \
'subprocess_level:uinteger'
'loglevel:uinteger:3'
}
configure_bbfdmd()
{
local enable debug sock
local enable debug
local jlog jrefresh jtimeout jlevel
config_load bbfdm
@@ -40,25 +33,17 @@ 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"
fi
procd_set_param command ${PROG}
procd_append_param command -l "${loglevel}"
if [ "${debug}" -eq 1 ]; then
procd_set_param stdout 1
procd_set_param stderr 1
fi
if [ -f "${sock}" ]; then
procd_append_param command -s "${sock}"
fi
}
start_service()
{
mkdir -p ${BBFDM_TEMP_DIR}
procd_open_instance "bbfdm"
configure_bbfdmd
procd_set_param respawn

View File

@@ -1,18 +0,0 @@
#!/bin/sh
. /lib/functions.sh
remove_nonexisting_microservice() {
local input_json
config_get input_json "$1" input_json ""
if [ -z "${input_json}" ]; then
uci_remove bbfdm "${1}"
fi
}
config_load bbfdm
config_foreach remove_nonexisting_microservice "micro_service"
exit 0

View File

@@ -1,34 +0,0 @@
#!/bin/sh
UNIFIED_PATH="/usr/share/bbfdm/plugins/"
log() {
echo "$@" | logger -t bbfdm.uci-default -p info
}
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/json/*.json`; do
log "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /usr/lib/bbfdm/*.so`; do
log "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/plugins/*.json`; do
log "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /etc/bbfdm/plugins/*.so`; do
log "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
exit 0

View File

@@ -2,7 +2,7 @@
BBFDM_BASE_DM_PATH="usr/share/bbfdm"
BBFDM_INPUT_PATH="etc/bbfdm/micro_services"
INPUT_TEMPLATE='{"daemon":{"enable":"1","service_name":"template","config":{"loglevel":"1"}}}'
INPUT_TEMPLATE='{"daemon":{"enable":"1","service_name":"template","config":{"loglevel":"3"}}}'
OUT_NAME=""
MICRO_SERVICE=0
@@ -79,6 +79,11 @@ bbfdm_install_dm()
exit 1
fi
if [ ! -f "${src}" ]; then
echo "File $src does not exists..."
exit 1
fi
if [ "${src##*.}" = "json" ]; then
echo "Compacting BBFDM JSON file"
minfile=$(mktemp)

17
bridgemngr/Config.in Normal file
View File

@@ -0,0 +1,17 @@
if PACKAGE_bridgemngr
menu "Configuration"
config BRIDGEMNGR_BRIDGE_VLAN
bool "Use bridge-vlan backend"
help
Set this option to use bridge-vlan as backend for VLAN objects.
config BRIDGEMNGR_BRIDGE_VENDOR_EXT
bool "Use bridge BBF vendor extensions"
default y
help
Set this option to use bridge BBF vendor extensions.
endmenu
endif

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.2
PKG_VERSION:=1.0.7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
PKG_SOURCE_VERSION:=9cddf87b527ef1614a8a39db67e6578ff1810031
PKG_SOURCE_VERSION:=4f22b4a4270c8d9b94b9de6f5cbe2a1dd86a3027
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -26,21 +26,31 @@ include ../bbfdm/bbfdm.mk
define Package/bridgemngr
CATEGORY:=Utilities
TITLE:=Bridge Manager
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/bridgemngr/description
Package to add Device.Bridging. data model support.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
MAKE_PATH:=src
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VLAN),y)
TARGET_CFLAGS += -DBRIDGE_VLAN_BACKEND
endif
define Package/bridgemngr/install
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
endif
endef

View File

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

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.10
PKG_VERSION:=2.1.14
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:=93c9e87cb9f8f635cece1473cff6f67cff9ff7c0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -24,12 +24,17 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/$(PKG_NAME)
define Package/bulkdata
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
DEPENDS:=+ubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
DEPENDS+=+libbbfdm-api +libbbfdm-ubus
endef
define Package/bulkdata/description
BulkData daemon for TR069 with bbfdm backend.
endef
TARGET_CFLAGS += \
@@ -42,16 +47,13 @@ define Build/Prepare
endef
endif
define Package/$(PKG_NAME)/install
define Package/bulkdata/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
$(INSTALL_BIN) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/uci-defaults/95-bulkdata-translation-options $(1)/etc/uci-defaults/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
$(eval $(call BuildPackage,bulkdata))

View File

@@ -1,960 +0,0 @@
{
"json_plugin_version": 2,
"Device.BulkData.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"name": "bulkdata"
},
"option": {
"name": "enable"
}
}
}
]
},
"Status": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Enabled",
"Disabled",
"Error"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"name": "bulkdata"
},
"option": {
"name": "enable"
}
}
}
]
},
"MinReportingInterval": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "0",
"datatype": "unsignedInt",
"unit": "seconds"
},
"Protocols": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "HTTP",
"list": {
"datatype": "string",
"enumerations": [
"Streaming",
"File",
"HTTP",
"MQTT"
]
}
},
"EncodingTypes": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "JSON,CSV",
"list": {
"datatype": "string",
"enumerations": [
"XML",
"XDR",
"CSV",
"JSON"
]
}
},
"ParameterWildCardSupported": {
"type": "boolean",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "1",
"datatype": "boolean"
},
"MaxNumberOfProfiles": {
"type": "int",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "-1",
"datatype": "int",
"range": [
{
"min": -1
}
]
},
"MaxNumberOfParameterReferences": {
"type": "int",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "-1",
"datatype": "int",
"range": [
{
"min": -1
}
]
},
"ProfileNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.BulkData.Profile.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "enable"
}
]
},
"Alias": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "Alias",
"range": [
{
"max": 64
}
],
"flags": [
"Unique"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "alias"
}
]
},
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 255
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"NumberOfRetainedFailedReports": {
"type": "int",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "int",
"range": [
{
"min": -1
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "nbre_of_retained_failed_reports"
}
]
},
"Protocol": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Streaming",
"File",
"HTTP"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "protocol"
}
]
},
"EncodingType": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"XML",
"XDR",
"CSV",
"JSON"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "encoding_type"
}
]
},
"ReportingInterval": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1
}
],
"unit": "seconds",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reporting_interval"
}
]
},
"TimeReference": {
"type": "dateTime",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "dateTime",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "time_reference"
}
]
},
"ParameterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_parameter"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.BulkData.Profile.{i}.Parameter.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_parameter"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 64
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"Reference": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reference"
}
]
}
},
"Device.BulkData.Profile.{i}.CSVEncoding.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"FieldSeparator": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_field_separator"
}
]
},
"RowSeparator": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_row_separator"
}
]
},
"EscapeCharacter": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_escape_character"
}
]
},
"ReportFormat": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"ParameterPerRow",
"ParameterPerColumn"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_report_format"
}
]
},
"RowTimestamp": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Unix-Epoch",
"ISO-8601",
"None"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "csv_encoding_row_time_stamp"
}
]
}
},
"Device.BulkData.Profile.{i}.JSONEncoding.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"ReportFormat": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"ObjectHierarchy",
"NameValuePair"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "json_encoding_report_format"
}
]
},
"ReportTimestamp": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"Unix-Epoch",
"ISO-8601",
"None"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "json_encoding_report_time_stamp"
}
]
}
},
"Device.BulkData.Profile.{i}.HTTP.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"URL": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "URL",
"range": [
{
"max": 2048
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_url"
}
]
},
"Username": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_username"
}
]
},
"Password": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"flags": [
"Secure"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_password"
}
]
},
"CompressionsSupported": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "GZIP",
"list": {
"datatype": "string",
"enumerations": [
"GZIP",
"Compress",
"Deflate"
]
}
},
"Compression": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"GZIP",
"Compress",
"Deflate"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_compression"
}
]
},
"MethodsSupported": {
"type": "string",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"default": "POST,PUT",
"list": {
"datatype": "string",
"enumerations": [
"POST",
"PUT"
]
}
},
"Method": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"enumerations": [
"POST",
"PUT"
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_method"
}
]
},
"UseDateHeader": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_use_date_header"
}
]
},
"RetryEnable": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_enable"
}
]
},
"RetryMinimumWaitInterval": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1,
"max": 65535
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_minimum_wait_interval"
}
]
},
"RetryIntervalMultiplier": {
"type": "unsignedInt",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"range": [
{
"min": 1000,
"max": 65535
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_retry_interval_multiplier"
}
]
},
"RequestURIParameterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"protocols": [
"cwmp",
"usp"
],
"datatype": "unsignedInt",
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_http_request_uri_parameter"
},
"option": {
"name": "@Count"
}
}
}
]
},
"PersistAcrossReboot": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "boolean",
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "http_persist_across_reboot"
}
]
},
"Device.BulkData.Profile.{i}.HTTP.RequestURIParameter.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "bulkdata",
"section": {
"type": "profile_http_request_uri_parameter"
},
"dmmapfile": "dmmap_bulkdata"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 64
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "name"
}
]
},
"Reference": {
"type": "string",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
],
"mapping": [
{
"data": "@Parent",
"type": "uci_sec",
"key": "reference"
}
]
}
}
}
}
}
}

View File

@@ -7,25 +7,24 @@ USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local enable
config_load bulkdata
config_get_bool enable bulkdata enable 1
[ "$enable" -eq "1" ] && {
procd_open_instance "bulkdata"
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance "bulkdata"
}
procd_open_instance "bulkdata"
procd_set_param command "$PROG"
procd_set_param respawn
procd_close_instance "bulkdata"
}
reload_service() {
stop
start
ret=$(ubus call service list '{"name":"bulkdatad"}' | jsonfilter -qe '@.bulkdatad.instances.bulkdata.running')
if [ "$ret" != "true" ]; then
stop
start
else
ubus send bulkdata.reload
fi
return 0
}
service_triggers()
{
service_triggers() {
procd_add_reload_trigger bulkdata
}

View File

@@ -1,75 +0,0 @@
#!/bin/sh
. /lib/functions.sh
PROFILE_COUNT=1
get_next_count()
{
local config="$1"
local default_name="${2}"
local count=${3}
local found=0
if [ -z "$count" ]; then
count=1
fi
while [ "${found}" -ne 1 ]; do
uci -q get "${config}"."${default_name}"_${count} >/dev/null
if [ "$?" -eq 0 ]; then
count=$((count + 1))
else
found=1;
fi
done
echo "${default_name}_${count}"
}
translate_profile_id_to_profile_name() {
local section="${1}"
local profile_id="${2}"
local profile_name="${3}"
local curr_profile_id
config_get curr_profile_id "${section}" profile_id
[ -n "${curr_profile_id}" ] || return
[ "${curr_profile_id}" != "${profile_id}" ] && return
uci -q set bulkdata."${section}".profile_name="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
}
update_profile_sections() {
local section="${1}"
local default="${2}"
local profile_name
config_get profile_id "${section}" profile_id
[ -n "${profile_id}" ] || return
case "${section}" in
"cfg"*)
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
uci_rename bulkdata "${section}" "${profile_name}"
;;
esac
PROFILE_COUNT=$((PROFILE_COUNT + 1))
[ -n "$profile_name" ] && section="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"
}
config_load bulkdata
config_foreach update_profile_sections profile profile
uci commit bulkdata
exit 0

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ddnsmngr
PKG_VERSION:=1.0.5
PKG_VERSION:=1.0.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
PKG_SOURCE_VERSION:=f3c818322747922035a9eafe5de05d148ce15b4b
PKG_SOURCE_VERSION:=5144e73fad92d23ae706894a4357436c3fe89355
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,8 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Dynamic DNS manager
DEPENDS:=+libbbfdm-api +DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
DEPENDS:=+DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
MENU:=1
endef

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.0.0.9
PKG_VERSION:=6.1.0.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=08cd179438b8085c19e7d7523c9b26adfcb93129
PKG_SOURCE_VERSION:=005a48c7a40c3fcf89d031fda0e109a25431b20e
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.7.1
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:=daf66f6f2098a343fefb304e7ce9440f55ea1cd1
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools +voicemngr
endef
define Package/$(PKG_NAME)/description

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=d15d21766c1a1e5054b2391de1cfc4708be7a14c
PKG_SOURCE_VERSION:=2a517188211849bcc324a9f9727eeb34d076c032
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,10 @@ 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 +odhcpd
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS+=+DNSMNGR_DNS_SD:umdns
DEPENDS+=+DNSMNGR_BACKEND_DNSMASQ:dnsmasq
endef
define Package/dhcpmngr/description
@@ -44,6 +47,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.12
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:=fb49088ddb498980e2c91f03aea10bd502caeca1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -27,23 +27,48 @@ 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 +odhcpd
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
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.4
PKG_VERSION:=1.2.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE_VERSION:=d71bef278b8222dee1c278723f8264aa8faf5e40
PKG_SOURCE_VERSION:=5340cb31f759301f5aca3fd848fc3a63b0b4663f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip
@@ -40,7 +40,8 @@ define Package/dslmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=XDSL status and configration utility
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/dslmngr/description

View File

@@ -1,47 +0,0 @@
#
# Copyright (C) 2019 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-qos
PKG_VERSION:=1.1
PKG_RELEASE:=0
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=none
include $(INCLUDE_DIR)/package.mk
define Package/easy-qos
SECTION:=net
CATEGORY:=Network
TITLE:=Easy QoS
DEPENDS:=@(TARGET_brcmbca||TARGET_airoha)
endef
define Package/easy-qos/description
This package contains Easy QoS utility
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./files/* $(PKG_BUILD_DIR)/
endef
define Build/Compile
endef
define Package/easy-qos/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(CP) ./files/etc/config/easy_qos $(1)/etc/config/
$(CP) ./files/etc/init.d/easy_qos.iptables $(1)/etc/init.d/easy_qos
$(CP) ./files/etc/uci-defaults/* $(1)/etc/uci-defaults/
$(CP) ./files/etc/firewall.easyqos $(1)/etc/firewall.easyqos
endef
$(eval $(call BuildPackage,easy-qos))

View File

@@ -1 +0,0 @@
/etc/init.d/easy_qos reload

View File

@@ -1,140 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
USE_PROCD=1
log() {
echo "${@}"|logger -t easy_qos.ebtable -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(ebtables --concurrent -t broute -L BROUTING|grep -m 1 mark)
while [ -n "${rule}" ]; do
exec_log ebtables --concurrent -t broute -D BROUTING ${rule}
rule=$(ebtables --concurrent -t broute -L BROUTING|grep -m 1 mark)
done
}
create_rule() {
local protocol=$1; shift
local mac=$1; shift
local mark="0x$1"; shift
local forward_port=$1;
local cmd="";
local protocol_number
cmd="-j mark --mark-or ${mark}";
if [ -n "${forward_port}" ]; then
cmd="--ip-destination-port ${forward_port} ${cmd}";
fi
case "${protocol}" in
"tcp")
protocol_number=6;;
"udp")
protocol_number=17;;
"dccp")
protocol_number=33;;
"sctp")
protocol_number=132;;
*)
log "Protocol ${protocol} not supported in ebtables"
return;;
esac
cmd="--ip-proto ${protocol_number} $cmd"
cmd="-p ip $cmd"
cmd="-s ${mac} $cmd"
exec_log ebtables --concurrent -t broute -A BROUTING ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num protocol
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
protocol=$(echo ${proto}|tr 'A-Z' 'a-z')
prio_num=$(get_priority ${priority})
if [ -n "${macaddr}" -a -n "${prio_num}" ]; then
for p in ${port}; do
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num} ${p}
create_rule udp ${macaddr} ${prio_num} ${p}
else
create_rule ${protocol} ${macaddr} ${prio_num} ${p}
fi
done
# Create rule for all ports if port is not mentioned in uci
if [ -z "${port}" ]; then
if [ "${protocol}" == "none" -o "${protocol}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num}
create_rule udp ${macaddr} ${prio_num}
else
create_rule ${protocol} ${macaddr} ${prio_num}
fi
fi
fi
}
reload_service() {
# Do not apply rules if ebtables is not present in system
[ -x /usr/sbin/ebtables ] || return;
clear_existing_rules
config_load easy_qos
config_foreach manage_rule rule
}
start_service() {
reload_service
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,186 +0,0 @@
#!/bin/sh /etc/rc.common
. /usr/share/libubox/jshn.sh
START=99
USE_PROCD=1
CLIENT_LIST="/tmp/easy_qos_client.list"
log() {
echo "${@}"|logger -t easy_qos -p debug
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
get_priority() {
local prio=$(echo $1|tr 'A-Z' 'a-z');
case "${prio}" in
"lowest")
echo 0;;
"low")
echo 1;;
"besteffort")
echo 2;;
"normal")
echo 3;;
"video")
echo 4;;
"medium")
echo 5;;
"high")
echo 6;;
"highest")
echo 7;;
esac
}
clean_client_entries() {
[ -f ${CLIENT_LIST} ] && rm ${CLIENT_LIST}
}
map_client_entries() {
local clients ip mac host
json_load "$(ubus call router.network 'clients')"
json_get_keys keys
for key in ${keys};
do
json_select ${key}
json_get_vars ipaddr macaddr hostname
clients="${macaddr} ${ipaddr} ${hostname};${clients}"
json_select ..
done
json_init
# json_add_array "clients"
IFS=";"
for client in ${clients};
do
macaddr=$(echo ${client} | cut -d" " -f1)
json_add_object "${macaddr//:/_}"
json_add_string "ip" "$(echo ${client} | cut -d" " -f2)"
json_add_string "macaddr" "$(echo ${client} | cut -d" " -f1)"
json_add_string "host" "$(echo ${client} | cut -d" " -f3)"
json_close_object
done
IFS=' '
echo `json_dump` > ${CLIENT_LIST}
json_cleanup
}
# Find the IP of a corresponding mac from arp table
get_ipaddress() {
local clients ip mac host
json_load "$(cat ${CLIENT_LIST})"
json_get_keys keys
# jshn seems a bit iffy on having : in key, replace by _
json_select "${1//:/_}" 2 > /dev/null
json_get_var ip ip
echo "$ip"
}
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger)' \
'comment:string:none'
}
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
done
}
check_and_create() {
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi
}
create_rule() {
local proto=$1; shift
local src_ip=$1; shift
local mark="0x$1/0x$1"; shift
local ports=$1;
local cmd="";
cmd="-j MARK --set-xmark ${mark}";
if [ -n "${ports}" ]; then
cmd="--match multiport --dports ${ports} ${cmd}";
fi
if [ "${proto}" == "icmp" ]; then
cmd="-p icmp -m icmp --icmp-type 8 $cmd"
elif [ "${proto}" == "all" ]; then
cmd="-p all $cmd"
else
cmd="-p ${proto} -m ${proto} $cmd"
fi
cmd="-s ${src_ip} $cmd"
check_and_create ${cmd}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num ip port_list
validate_rule_section "${1}" || {
log "Validation of section failed"
return 1;
}
prio_num=$(get_priority ${priority})
ip=$(get_ipaddress ${macaddr})
port_list=$(echo ${port}|sed 's/ /,/g')
if [ -n "${ip}" -a -n "${prio_num}" ]; then
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
create_rule tcp ${ip} ${prio_num} ${port_list}
create_rule udp ${ip} ${prio_num} ${port_list}
else
create_rule ${proto} ${ip} ${prio_num} ${port_list}
fi
fi
}
reload_service() {
clear_existing_rules
map_client_entries
config_load easy_qos
config_foreach manage_rule rule
clean_client_entries
}
start_service() {
reload_service
echo "Easy QoS installed">/dev/console;
}
service_triggers() {
procd_add_reload_trigger "easy_qos"
}

View File

@@ -1,8 +0,0 @@
# Add firewall include
uci -q batch <<-EOT
delete firewall.easyqos
set firewall.easyqos=include
set firewall.easyqos.path=/etc/firewall.easyqos
set firewall.easyqos.reload=1
commit firewall
EOT

View File

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ebtables-extensions
PKG_VERSION:=1.0.2
PKG_VERSION:=1.0.4
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a23a70f5518a42d663156a156c1e3356f695b5ad
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:=ethmngr
PKG_VERSION:=2.1.7
PKG_VERSION:=2.1.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=d029ce86fe99b7896f096f68eda3f6caa000ee5f
PKG_SOURCE_VERSION:=2d35e86cc8dfd7ef4e0d8579f5d314e90faadc90
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -27,7 +27,8 @@ define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/ethmngr/description

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=f5c3e2c93a8a992ab24291eb2c67adf77de7f896
PKG_SOURCE_VERSION:=2cac05871f7a8d93c144157c5f3f129deecf1a29
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,9 +28,10 @@ define Package/firewallmngr
SECTION:=net
CATEGORY:=Network
TITLE:=Package to add Device.Firewall and Device.NAT. data model support.
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +firewall
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +firewall
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:kmod-ipt-trigger +FIREWALLMNGR_PORT_TRIGGER:kmod-ip6t-trigger
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:iptables-mod-nfqueue
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/firewallmngr/description
@@ -53,15 +54,21 @@ endif
define Package/firewallmngr/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
ifeq ($(CONFIG_FIREWALLMNGR_PORT_TRIGGER),y)
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/lib/port-trigger
$(INSTALL_BIN) ./files/port-trigger/etc/init.d/port-trigger $(1)/etc/init.d/
$(INSTALL_DATA) ./files/port-trigger/etc/config/port-trigger $(1)/etc/config/
$(INSTALL_DATA) ./files/port-trigger/lib/port-trigger/port_trigger.sh $(1)/lib/port-trigger/
endif
$(INSTALL_BIN) ./files/firewall.portmap $(1)/etc/
$(INSTALL_DATA) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/firewall.service $(1)/etc/
$(INSTALL_DATA) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libfirewallmngr.so $(1) $(PKG_NAME)
endef

175
fluent-bit/Makefile Normal file
View File

@@ -0,0 +1,175 @@
#
# Copyright (C) 2024 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fluent-bit
PKG_VERSION:=3.1.0
PKG_RELEASE:=$(AUTORELEASE)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit/archive/v$(PKG_VERSION)
PKG_HASH:=7a49e110cf3050b6c29c911063494b8081f3c743274d1d95e52562d0476ba1eb
endif
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/fluent-bit
CATEGORY:=Utilities
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
TITLE:=Fluent-Bit
URL:=https://fluentbit.io/
endef
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
CMAKE_OPTIONS+= \
-DFLB_RELEASE=Yes \
-DFLB_SMALL=No \
-DEXCLUDE_FROM_ALL=true \
-DFLB_SHARED_LIBS=Yes \
-DFLB_DEBUG=Yes \
-DFLB_ALL=No \
-DFLB_JEMALLOC=No \
-DFLB_EXAMPLES=No \
-DFLB_CHUNK_TRACE=No \
-DFLB_BACKTRACE=No \
-DFLB_WASM=No \
-DFLB_LUAJIT=No
# In plugins
CMAKE_OPTIONS += \
-DFLB_IN_SYSLOG=Yes \
-DFLB_IN_CPU=Yes \
-DFLB_IN_MEM=Yes \
-DFLB_IN_DISK=Yes \
-DFLB_IN_EXEC=Yes \
-DFLB_IN_HEAD=Yes \
-DFLB_IN_FORWARD=No \
-DFLB_IN_KMSG=No \
-DFLB_IN_PROC=No \
-DFLB_IN_RANDOM=No \
-DFLB_IN_SERIAL=No \
-DFLB_IN_MQTT=No \
-DFLB_IN_STDIN=No \
-DFLB_IN_SYSTEMD=No \
-DFLB_IN_TAIL=No \
-DFLB_IN_TCP=No \
-DFLB_IN_THERMAL=No \
-DFLB_IN_UDP=No \
-DFLB_IN_DOCKER=No \
-DFLB_IN_EXEC_WASI=No \
-DFLB_IN_EVENT_TYPE=No \
-DFLB_IN_FLUENTBIT_METRICS=No \
-DFLB_IN_KUBERNETES_EVENTS=No \
-DFLB_IN_KAFKA=No \
-DFLB_IN_LIB=No \
-DFLB_IN_SYSTEMD=No \
-DFLB_IN_DUMMY=No \
-DFLB_IN_NETIF=No \
-DFLB_IN_COLLECTD=No \
-DFLB_IN_PROMETHEUS_SCRAPE=No \
-DFLB_IN_STATSD=No \
-DFLB_IN_STORAGE_BACKLOG=No \
-DFLB_IN_PODMAN_METRICS=No \
-DFLB_IN_OPENTELEMETRY=No \
-DFLB_IN_ELASTICSEARCH=No \
-DFLB_IN_CALYPTIA_FLEET=No \
-DFLB_IN_SPLUNK=No
-DFLB_IN_HEALTH=No \
-DFLB_IN_WINLOG=No \
-DFLB_IN_WINEVTLOG=No
# Filter options
CMAKE_OPTIONS +=
-DFLB_FILTER_AWS=No \
-DFLB_FILTER_ECS=No \
-DFLB_FILTER_KUBERNETES=No \
-DFLB_FILTER_LUA=No \
-DFLB_FILTER_NEST=No \
-DFLB_FILTER_RECORD_MODIFIER=No \
-DFLB_FILTER_THROTTLE=No \
-DFLB_FILTER_TYPE_CONVERTER=No \
-DFLB_FILTER_WASM=No \
-DFLB_FILTER_TENSORFLOW=No \
-DFLB_FILTER_GEOIP2=No \
-DFLB_FILTER_NIGHTFALL=No
# out plugins
CMAKE_OPTIONS += \
-DFLB_OUT_EXIT=Yes \
-DFLB_OUT_FORWARD=Yes \
-DFLB_OUT_HTTP=Yes \
-DFLB_OUT_NATS=Yes \
-DFLB_OUT_TCP=Yes \
-DFLB_OUT_UDP=Yes \
-DFLB_OUT_FILE=Yes \
-DFLB_OUT_STDOUT=Yes \
-DFLB_OUT_SYSLOG=Yes \
-DFLB_OUT_NULL=Yes \
-DFLB_OUT_PLOT=No \
-DFLB_OUT_AZURE=No \
-DFLB_OUT_AZURE_BLOB=No \
-DFLB_OUT_AZURE_LOGS_INGESTION=No \
-DFLB_OUT_AZURE_KUSTO=No \
-DFLB_OUT_BIGQUERY=No \
-DFLB_OUT_CALYPTIA=No \
-DFLB_OUT_COUNTER=No \
-DFLB_OUT_DATADOG=No \
-DFLB_OUT_ES=No \
-DFLB_OUT_GELF=No \
-DFLB_OUT_INFLUXDB=No \
-DFLB_OUT_NRLOGS=No \
-DFLB_OUT_OPENSEARCH=No \
-DFLB_OUT_TD=No \
-DFLB_OUT_SKYWALKING=No \
-DFLB_OUT_SLACK=No \
-DFLB_OUT_SPLUNK=No \
-DFLB_OUT_STACKDRIVER=No \
-DFLB_OUT_LIB=No \
-DFLB_OUT_FLOWCOUNTER=No \
-DFLB_OUT_LOGDNA=No \
-DFLB_OUT_LOKI=No \
-DFLB_OUT_KAFKA=No \
-DFLB_OUT_KAFKA_REST=No \
-DFLB_OUT_CLOUDWATCH_LOGS=No \
-DFLB_OUT_KINESIS_FIREHOSE=No \
-DFLB_OUT_KINESIS_STREAMS=No \
-DFLB_OUT_OPENTELEMETRY=No \
-DFLB_OUT_PROMETHEUS_EXPORTER=No \
-DFLB_OUT_PROMETHEUS_REMOTE_WRITE=No \
-DFLB_OUT_S3=No \
-DFLB_OUT_VIVO_EXPORTER=No \
-DFLB_OUT_WEBSOCKET=No \
-DFLB_OUT_ORACLE_LOG_ANALYTICS=No \
-DFLB_OUT_CHRONICLE=No \
-DFLB_OUT_PGSQL=No
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,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;
}

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.2.5
PKG_VERSION:=1.2.9
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=20402c9fb60afa0678d844b0401e1b89699ff8b3
PKG_SOURCE_VERSION:=27b2d7c3ef0ccb4e2c30f790f2b51881b6884d9c
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -31,9 +31,8 @@ define Package/hostmngr
DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +libnfnetlink +libmnl \
+libnetfilter-conntrack \
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api \
+libwifiutils
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libwifiutils
DEPENDS+= +libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/hostmngr/config

10
icwmp/Config.in Normal file
View File

@@ -0,0 +1,10 @@
menu "Configuration"
config ICWMP_MGMT_FROM_USP
bool "Support configuration of ManagementServer from USP"
default y
config ICWMP_BACKUP_EVENTS
bool "Create backup of session events to persistent storage after each successful session"
default y
endmenu

View File

@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.7.15
PKG_VERSION:=9.8.22
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=fb3c8833f3fce7fe3659395cab48e7078f2007d5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=2eeb0990616df846da55a154d2fed05c828d168f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -31,9 +31,27 @@ define Package/icwmp
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbfdm-api +libopenssl
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libopenssl
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
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 ($(CONFIG_ICWMP_BACKUP_EVENTS),y)
EXTRA_CFLAGS += -DPERSIST_BACKUP_SESSION_EVENTS
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
@@ -50,11 +68,13 @@ define Package/icwmp/install
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(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/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/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
$(INSTALL_BIN) ./files/etc/icwmpd/critical_services.json $(1)/etc/icwmpd/critical_services.json
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user

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

@@ -6,7 +6,7 @@ log() {
}
get_firewall_zone() {
zone="$(uci show firewall|grep network|grep ${1}|cut -d. -f 2)"
zone="$(uci show firewall|grep network|grep -w ${1}|cut -d. -f 2)"
zone="${zone:-wan}" # defaults to wan zone
echo "$zone"
}

View File

@@ -0,0 +1,29 @@
#!/bin/sh
# This script handles '2 Vendor Log File' of Download RPC
# Vendors can replace this file if they need to collect more logs
VENDOR_LOG_FILE="/tmp/icwmp/2_vendor_log"
ret=""
if [ -n "$(which logread)" ]; then
mkdir -p /tmp/icwmp
logread > "${VENDOR_LOG_FILE}"
arch_file="${VENDOR_LOG_FILE}.tar"
if [ -f "${arch_file}" ]; then
rm -f ${arch_file}
fi
if [ -f "${VENDOR_LOG_FILE}" ]; then
tar -cf "${arch_file}" "${VENDOR_LOG_FILE}" 2> /dev/null
if [ -f "${arch_file}" ]; then
ret="${arch_file}"
fi
rm -rf "${VENDOR_LOG_FILE}"
fi
fi
echo "${ret}"

View File

@@ -3,7 +3,7 @@
uci -q batch <<-EOT
delete firewall.cwmp
set firewall.cwmp=include
set firewall.cwmp.path=/etc/firewall.cwmp
set firewall.cwmp.path=/etc/icwmpd/firewall.cwmp
set firewall.cwmp.reload=1
commit firewall
EOT

View File

@@ -21,6 +21,9 @@ config IEEE1905_WIFI_EASYMESH
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
config IEEE1905_BUILD_TR181_PLUGIN
bool "Build TR-181 mapping module (responsible for Device.IEEE1905.)"
endmenu
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.4.2
PKG_VERSION:=8.6.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4d60d4a9b55940fffa39b7799abf2a7962ae2113
PKG_SOURCE_VERSION:=5f7e6e30cbda36e431ecb7150d7494bce0c26f6f
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
@@ -48,7 +48,8 @@ define Package/ieee1905
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ubus +libpthread \
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi \
+libwifiutils +libbbfdm-api
+libwifiutils
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
include $(wildcard plugins/*.mk)
@@ -96,6 +97,7 @@ TARGET_CFLAGS += -DEXTENSION_ALLOWED
endif
TARGET_CFLAGS += -DHAS_UBUS
TARGET_CFLAGS += -DBUILD_TR181_PLUGIN
MAKE_FLAGS += \
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"

View File

@@ -36,7 +36,7 @@ _iop()
feeds_update genconfig \
generate_tarballs install_key \
scp_changes setup_host ssh_install_key status \
update_feed_branches ssh_upgrade smoketest"
ssh_upgrade smoketest"
if [ $COMP_CWORD -eq 1 ] ; then

View File

@@ -1,72 +0,0 @@
#!/bin/bash
function disable_add_config () {
local COPTION="$1"
HAVE_OPTION=`grep $COPTION .config | wc -l`
HAVE_OPTION_DISABLED=`grep "# $COPTION" .config | wc -l`
if [ "$HAVE_OPTION" = "1" ]
then
if [ "$HAVE_OPTION_DISABLED" = "0" ]
then
sed -i -e "s,$COPTION=y,# $COPTION is not set,g" .config
fi
else
echo "# $COPTION is not set" >> .config
fi
}
function enable_option () {
local COPTION="$1"
# cat .config| grep DSL
sed -i -e "s,# $COPTION is not set,$COPTION=y,g" .config
# cat .config| grep DSL
}
function annexconfig {
v() {
[ "$VERBOSE" -ge 1 ] && echo "$@"
}
local ANNEX="$1"
disable_add_config CONFIG_TARGET_NO_DSL
disable_add_config CONFIG_TARGET_DSL_ANNEX_A
disable_add_config CONFIG_TARGET_DSL_ANNEX_B
disable_add_config CONFIG_TARGET_DSL_ANNEX_C
disable_add_config CONFIG_TARGET_DSL_SADSL
disable_add_config CONFIG_TARGET_DSL_GFAST
if [ "$ANNEX" = "no" ]
then
echo "No DSL"
enable_option CONFIG_TARGET_NO_DSL
elif [ "$ANNEX" = "a" ]
then
echo "Annex A"
enable_option CONFIG_TARGET_DSL_ANNEX_A
elif [ "$ANNEX" = "b" ]
then
echo "Annex B"
enable_option CONFIG_TARGET_DSL_ANNEX_B
elif [ "$ANNEX" = "c" ]
then
echo "Annex C"
enable_option CONFIG_TARGET_DSL_ANNEX_C
elif [ "$ANNEX" = "sadsl" ]
then
echo "sadsl"
enable_option CONFIG_TARGET_DSL_SADSL
elif [ "$ANNEX" = "gfast" ]
then
echo "G.fast"
enable_option CONFIG_TARGET_DSL_GFAST
else
echo "Only option no,a,b,c,sadsl,gfast supported"
fi
}
register_command "annexconfig" "Select configuration annex"

View File

@@ -1,42 +0,0 @@
# this is a developer helper script to install firmware on a remote host running in CFE mode
function usage {
echo "usage: $0 cfe_upgrade <host> <file>"
}
function cfe_upgrade {
if [ -z "$1" ] ; then
usage
echo "Error: host required"
exit 1
fi
if [ -z "$2" ] ; then
usage
echo "Error: firmware filename required"
exit 1
fi
if [ ! -e $2 ] ; then
usage
echo "Error: firmware file does not exist"
exit 1
fi
IMAGE=`basename $2`
echo "CFE upgrade host: $1 with file $IMAGE"
[ "$2" ] && [ -e "$2" ] && curl -i -F filedata=@$2 http://$1/upload.cgi && echo "upgrade done!"
}
register_command "cfe_upgrade" "<host> <file> Install firmware on remote host in CFE mode"
function cfe_upgrade_latest {
if [ -z "$1" ] ; then
echo "usage: $0 cfe_upgrade_latest <host>"
echo "Error: host required"
exit 1
fi
{ cd `dirname $0`
IMAGE=`ls -Art bin/*/*.w | tail -n1`
[ "$IMAGE" ] && [ -e "$IMAGE" ] && ./iop cfe_upgrade $1 $IMAGE
}
}
register_command "cfe_upgrade_latest" "<host> Install latest firmware on remote host in CFE mode"

View File

@@ -1,29 +0,0 @@
#!/bin/bash
# Function to convert parameters to lowercase
function to_lowercase {
local params=()
for param in "$@"; do
params+=("$(tr '[:upper:]' '[:lower:]' <<< "$param")")
done
echo "${params[@]}"
}
function genconfig {
target_script="./scripts/gen_config.py"
# First convert all to lowercase
args=$(to_lowercase "$@")
# Check if an option is provided
if [[ ${args[0]} == -* ]]; then
# Convert options for target script
if [[ ${args[0]} == "-b" || ${args[0]} == "--boards" ]]; then
args=("--list")
fi
fi
${target_script} ${args[@]}
}
register_command "genconfig" "Generate configuration for board and customer"

View File

@@ -1,283 +0,0 @@
# this is a developer helper script to install firmware on a remote host with SSH
function upd_usage {
echo "usage: $0 ssh_upgrade [-t <host>] [-f <file>] [opts] "
echo ""
echo " Default host is 192.168.1.1"
echo " Default firmware file is the latest one (last.{itb,pkgtb})"
echo " Default is to not keep configuration"
echo "opts:"
echo ""
echo " -i Interactive use, allows to select firmware file"
echo " -n Do not do the final reboot of the target board"
echo " -c Keep configuration"
echo " -x Force install even if firmware is not for this board"
echo " -b Force install of bootloader regardless of version installed"
}
function set_config_string {
eval $(grep $1 .config)
}
function upd_ask_ok {
echo "Will continue with the following settings:"
echo "-----------------------------------------"
printf "%20s: %s\n" "Firmware file" "$upd_fw_base"
printf "%20s: %s\n" "Host IP" "$upd_host"
printf "%20s: " "Reboot"
if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Keep config"
if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Force bootloader"
if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
printf "%20s: " "Force image upgrade"
if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi
echo "-----------------------------------------"
echo -n "Continue? [Y/n/q]:"
read answer
case $answer in
n | N)
return 1
;;
q | Q)
exit 1
;;
y | Y | *)
return 0
;;
esac
}
function upd_select_file {
dialog --keep-tite --title "To select a file, use TAB/ARROW to highlight then press SPACEBAR -> RETURN" \
--fselect "${upd_fw:-bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/}" \
$((lines - 10)) $((cols - 5)) \
2>$tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]; then
upd_fw="$new_file"
upd_fw_base=$(basename $upd_fw)
fi
}
function upd_select_target {
dialog --keep-tite --title "Input the hostname/IP of the target board" \
--inputbox "Name/IP" \
$((lines - 10)) $((cols - 5)) \
"$upd_host" \
2>$tempfile
new_file=$(cat $tempfile)
if [ -n "$new_file" ]; then
upd_host="$new_file"
fi
}
function upd_select_reboot {
dialog --keep-tite --radiolist "Should the board reboot after download finished" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Reboot" "Restart board after done" $(if [ "$upd_noreboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
"No reboot" "Continue running old system" $(if [ "$upd_noreboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
res=$(cat $tempfile)
case $res in
"No reboot")
upd_noreboot=1
;;
"Reboot")
upd_noreboot=0
;;
esac
}
function upd_select_config {
dialog --keep-tite --radiolist "Should the configuration be kept" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Keep" "Keep the config from old system" $(if [ "$upd_keepconf" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Default" "Use default config for new system" $(if [ "$upd_keepconf" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
res=$(cat $tempfile)
case $res in
"Keep")
upd_keepconf=1
;;
"Default")
upd_keepconf=0
;;
esac
}
function upd_select_forceboot {
dialog --keep-tite --radiolist "Should the boot loader be updated regardless of the version installed" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Force" "Always update boot loader" $(if [ "$upd_forceboot" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Version check" "Only upgrade if version is newer" $(if [ "$upd_forceboot" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
res=$(cat $tempfile)
case $res in
"Force")
upd_forceboot=1
;;
"Version check")
upd_forceboot=0
;;
esac
}
function upd_select_forceimage {
dialog --keep-tite --radiolist "Should the image be stored in flash even if sanity checks would reject it" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Force" "Disable sanity check and force use of image (dangerous)" $(if [ "$upd_forceimage" == "1" ]; then echo "ON"; else echo "OFF"; fi) \
"Only compatible" "Normal checks apply" $(if [ "$upd_forceimage" == "0" ]; then echo "ON"; else echo "OFF"; fi) \
2>$tempfile
res=$(cat $tempfile)
case $res in
"Force")
upd_forceimage=1
;;
"Only compatible")
upd_forceimage=0
;;
esac
}
function upd_select {
dialog --keep-tite --ok-label "Select" --cancel-label "Done" --menu "Select item to change" \
$((lines - 5)) $((cols - 5)) $((lines - 5 - 5)) \
"Firmware file" "$upd_fw_base" \
"Host IP" "$upd_host" \
"Reboot" $(if [ "$upd_noreboot" == "0" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Keep config" $(if [ "$upd_keepconf" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Force bootloader" $(if [ "$upd_forceboot" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
"Force image upgrade" $(if [ "$upd_forceimage" == "1" ]; then printf "Yes\n"; else printf "No\n"; fi) \
2>$tempfile
case $(cat $tempfile) in
"Firmware file")
upd_select_file
;;
"Host IP")
upd_select_target
;;
"Reboot")
upd_select_reboot
;;
"Keep config")
upd_select_config
;;
"Force bootloader")
upd_select_forceboot
;;
"Force image upgrade")
upd_select_forceimage
;;
*)
return
;;
esac
upd_select
}
function upd_select_start {
lines=$(tput lines)
cols=$(tput cols)
tempfile="$(mktemp)"
trap "rm -f $tempfile" 0 1 2 5 15
upd_select
}
function ssh_upgrade {
upd_noreboot=0
upd_forceboot=0
upd_keepconf=0
upd_forceimage=0
upd_fw_base=""
upd_fw=""
upd_host="192.168.1.1"
do_dialog=0
while getopts "f:hnxt:icb" opt; do
case $opt in
n)
upd_noreboot=1
;;
x)
upd_forceimage=1
;;
b)
upd_forceboot=1
;;
c)
upd_keepconf=1
;;
v)
verbose=$OPTARG
;;
f)
upd_fw=$OPTARG
;;
t)
upd_host=$OPTARG
;;
i)
do_dialog=1
;;
h)
upd_usage
exit 1
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [ -z "$upd_fw" ]; then
set_config_string CONFIG_TARGET_BOARD
set_config_string CONFIG_TARGET_SUBTARGET
upd_fw="$(realpath -q --canonicalize-existing --relative-to=. "bin/targets/$CONFIG_TARGET_BOARD/$CONFIG_TARGET_SUBTARGET/"last.{pkgtb,itb})"
if [ -z "$upd_fw" ] && [ $do_dialog -eq 0 ]; then
echo "Could not find image. Check that last.{itb,pkgtb} exists or specify an image using -f <image> or -i (interactive)." >&2
return 1
fi
fi
upd_fw_base="$(basename "$upd_fw")"
[ $do_dialog -eq 1 ] && upd_select_start
if ! upd_ask_ok; then
upd_select_start
if ! upd_ask_ok; then
exit 1
fi
fi
if [ ! -f $upd_fw ]; then
echo "Firmware file $firmware does not exist."
exit 1
fi
extra_args=""
[ $upd_noreboot -eq 1 ] && extra_args="$extra_args --no-reboot"
[ $upd_forceimage -eq 1 ] && extra_args="$extra_args --force"
[ $upd_keepconf -eq 0 ] && extra_args="$extra_args -n"
[ $upd_forceboot -eq 1 ] && extra_args="$extra_args --force-loader-upgrade"
pv "$upd_fw" |
ssh \
-o ConnectTimeout=60 \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@"$upd_host" \
sh -c "cat > '/tmp/$upd_fw_base' && (set -x && sysupgrade -v $extra_args /tmp/$upd_fw_base)" ||
echo "Sysupgrade failed" >&2 && return 1
}
register_command "ssh_upgrade" "-t <host> -f <file> [opts] Install firmware on remote host with SSH"

View File

@@ -1,35 +0,0 @@
#!/bin/sh
function license_report {
LICDIR="/tmp/licenses-generator/"
LICBIN="${LICDIR}/bin"
dpkg -s python3 python3-requests python3-yaml python3-mako python3-six &> /dev/null
if [ $? -ne 0 ]
then
echo "Missing dependencies"
sudo apt-get update
sudo apt-get install python3 python3-requests python3-yaml python3-mako python3-six
else
echo "Dependecy check passed"
fi
if [ -d "$LICDIR" ]; then
### Take action if $DIR exists ###
echo "Creating json licences file and html formated report"
else
### Control will jump here if $DIR does NOT exists ###
echo "Error: licenses-generator not found. getting from iopsys repo"
git clone git@dev.iopsys.eu:iopsys/licenses-generator.git $LICDIR
fi
LICGET=`${LICBIN}/licenses-generator gen-License bin/`
echo $LICGET
${LICBIN}/licenses-generator gen-licrprt $LICGET
exit 0
}
register_command "license_report" "Generate a Licence report on latest build in json format and html under reports"

View File

@@ -1,89 +0,0 @@
# Shorthand command for doing a HIL runtime smoketest on the
# latest built image. Does the image boot up correctly?
# More info here:
# https://dev.iopsys.eu/iopsys/iopsys-taas
#--------------------------------------------------------------
function taas-init() {
local f
# Path to TaaS binarys. Try some likely ones.
if ! which taas-smoketest >/dev/null; then
PATH="${PATH}:${PWD}/../iopsys-taas/bin"
PATH="${PATH}:${PWD}/../taas/bin"
PATH="${PATH}:${HOME}/iopsys-taas/bin"
PATH="${PATH}:${HOME}/taas/bin"
PATH="${PATH}:${HOME}/bin"
PATH="${PATH}:/opt/iopsys-taas/bin"
PATH="${PATH}:/opt/taas/bin"
fi
if ! which taas-smoketest >/dev/null; then
echo "Error; TaaS is missing! Install it with:"
echo "git clone git@dev.iopsys.eu:iopsys/iopsys-taas.git ../iopsys-taas"
exit 1
fi
# Create a list of all images which might be of use.
for f in ${PWD}/bin/targets/iopsys-*/generic/last.*; do
[[ -s "$f" ]] && images+=("$f")
done
# Convert Iopsys target name to the TaaS product name format
# according to what is available in the remote lab for HIL.
# Also find a suitable image.
product=$(grep CONFIG_TARGET_PROFILE .config | \
tr -s "=\"" " " | cut -d " " -f 2) || exit
case "$product" in
smarthub3)
export product="SmartHub3a"
;;
dg400prime|eg400|ex600)
export product=$(echo -n "$product" | tr [[:lower:]] [[:upper:]])
;;
*)
echo "Unsupported target; skipping!"
exit 0
;;
esac
if [[ ${#images[@]} -eq 0 ]]; then
echo "No image found"
exit 1
fi
}
#--------------------------------------------------------------
function taas-smoketest {
declare -a images
taas-init || return
echo "Testing a $product with ${images[@]}..."
command taas-smoketest "${images[@]}" "$product" "$@"
}
#--------------------------------------------------------------
function taas-bootstrap {
declare -a images
if [[ -n "$1" ]]; then
taas-init || return
echo "Flashing $1..."
command taas-bootstrap "${images[@]}" "$@"
else
echo "Usage: ./iop taas-bootstrap dutX"
exit 1
fi
}
register_command "taas-bootstrap" "Write image to a remote lab device."
register_command "taas-smoketest" "Write image to a remote lab device and test it."

View File

@@ -1,61 +0,0 @@
#!/bin/sh
# Exported interface
function update_feed_branches {
local release="$1"
local ipath="$(pwd)"
local branch="$2"
local curbranch
[ -n "$release" ] || {
echo "Usage: ./update_feeds <RELEASE> <BRANCH>"
echo ""
echo "If you do not give a branch as argument,"
echo "<RELEASE> branch will be updated to commit"
echo "hash given in feeds.conf for each feed repo"
exit 1
}
if [ -n "$branch" ]; then
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo at branch $branch"
if git diff-index --quiet HEAD; then
curbranch=`git symbolic-ref HEAD 2>/dev/null`
curbranch=${curbranch##refs/heads/}
if [ -z $curbranch ]; then
curbranch=`git log -1 --pretty=format:"%H"`
fi
git checkout $branch || {
echo "couldn't checkout branch $branch"
exit 99
}
else
echo "You have unsaved changes."
exit 99
fi
else
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo"
fi
ifeeds="$(grep -r 'dev.iopsys.eu' feeds.conf | awk '{print$2}' | tr '\n' ' ')"
for f in $ifeeds; do
commith=$(grep $f feeds.conf | cut -d'^' -f2)
cd $ipath/feeds/$f
git branch -D $release 2>/dev/null
echo "$f: updating release branch $release to commit $commith"
git checkout $commith
git push origin :$release
git checkout -b $release
git push --set-upstream origin $release
cd $ipath
done
if [ -n "$branch" ]; then
echo "Release branch $release is updated to specific commit hash given in feeds.conf in in branch $branch for each feed repo"
git checkout $curbranch
else
echo "Release branch $release is updated to specific commit hash given in feeds.conf for each feed repo"
fi
}
register_command "update_feed_branches" "<release> [branch] Update branches in feeds from the current top level commit or specified top level branch"

View File

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

@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ipt-trigger
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.2
PKG_LICENSE:=GPL-2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8d4b4520a2935a5717a27f486a3fc78357b2a0cd
PKG_SOURCE_VERSION:=4f3d4427403e0a9be7653c1b92907ae8ae5f21ae
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ipt-trigger.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
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,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libdsl
PKG_VERSION:=7.2.99
PKG_VERSION:=7.2.100
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f9f3fcd0f4140540db5bd41059bcca7ded083024
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libdsl.git
PKG_SOURCE_VERSION:=20875ec79fcc7c546c2f1253c867d6afbc8bff75
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/libdsl.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -27,6 +27,8 @@ ifeq ($(CONFIG_TARGET_brcmbca),y)
CONFIG_ID=$(SUBTARGET:bcm%=BCM%)
CHIP_ID=$(CONFIG_ID:BCM9%=%)
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_$(CONFIG_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/broadcom/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
@@ -55,12 +57,19 @@ define Package/libdsl
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= xDSL library (libdsl)
DEPENDS+=TARGET_brcmbca:bcm963xx-bsp
endef
define Package/libdsl/description
Library provides xDSL/GFAST HAL APIs
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./libdsl/* $(PKG_BUILD_DIR)/
endef
endif
define Package/libdsl/config
if PACKAGE_libdsl
config LIBDSL_DEBUG

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

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

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-broadcom
PKG_RELEASE:=1
PKG_VERSION:=1.0.13
PKG_VERSION:=1.0.15
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:=f1509651217d027376b5b7fc3f64ca86662e9b2d
PKG_SOURCE_VERSION:=baf5ebfb45404714bbfcc3068080f93265934d8a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -38,7 +38,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for Broadcom
URL:=
DEPENDS:=
DEPENDS:=+bcm963xx-voice
endef
define Package/$(PKG_NAME)/description
@@ -56,4 +56,3 @@ define Package/$(PKG_NAME)/install
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_RELEASE:=1
PKG_VERSION:=1.1.11
PKG_VERSION:=1.1.14
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:=95fb29a31f7665abbe87af4a74cf52b7e5f22a29
PKG_SOURCE_VERSION:=0b2bef862fb5aea0b285e339459f46779224e2d0
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.4.69
PKG_VERSION:=7.7.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8a5d8b5defb7cedc5876bb5fbee5c1ad185de889
PKG_SOURCE_VERSION:=b12d933e1cdd3b84eefbb45b0ecf2d1927f5d5dc
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
@@ -43,6 +43,9 @@ else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_CFLAGS +=-DIOPSYS_ECONET
ifeq ($(CONFIG_TARGET_airoha_an7581),y)
TARGET_CFLAGS +=-DCONFIG_MTK
endif
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=QUALCOMM MAC80211
@@ -51,10 +54,6 @@ else ifeq ($(CONFIG_TARGET_ipq53xx),y)
TARGET_PLATFORM=IPQ53XX
TARGET_WIFI_TYPE=QUALCOMM MAC80211
TARGET_CFLAGS +=-DIPQ53XX
else ifeq ($(CONFIG_TARGET_mediatek),y)
TARGET_PLATFORM=LINUX
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_CFLAGS +=-DIOPSYS_LINUX
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
@@ -76,6 +75,10 @@ ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
endif
ifeq ($(CONFIG_LIBWIFI_SKIP_PROBES),y)
TARGET_CFLAGS +=-DLIBWIFI_BRCM_SKIP_PROBES
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
@@ -144,6 +147,11 @@ define Package/libwifi/config
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default y
config LIBWIFI_SKIP_PROBES
bool "Don't create probe-req events"
default y
endif
endef

34
logmngr/Config.in Normal file
View File

@@ -0,0 +1,34 @@
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.
config LOGMNGR_VENDOR_LOG_FILE
bool "Enable Device.DeviceInfo.VendorLogFile. Object"
depends on PACKAGE_logmngr
default y
help
It adds support for Device.DeviceInfo.VendorLogFile. Object.
endif

78
logmngr/Makefile Normal file
View File

@@ -0,0 +1,78 @@
#
# Copyright (C) 2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=logmngr
PKG_VERSION:=1.0.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=37f9eef6ad92ab4835893c6c8ee65338917071b6
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:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
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_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/
$(INSTALL_BIN) ./files/logread $(1)/usr/sbin
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_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1) sysmngr
endif
ifeq ($(CONFIG_LOGMNGR_VENDOR_LOG_FILE),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr
endif
endef
$(eval $(call BuildPackage,logmngr))

View File

@@ -0,0 +1,28 @@
#!/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 set logmngr.lr1=log_remote
uci set logmngr.lr1.enable=0
uci set logmngr.lr1.action="ac1"
uci set logmngr.lr1.port="514"
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,98 @@
#!/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
cmd=$(echo "$compression" | awk '{print tolower($0)}')
echo -e "\tcompress" >> ${LOGROTATE_TMP_FILE}
echo -e "\tcompresscmd $cmd" >> ${LOGROTATE_TMP_FILE}
fi
echo -e "\taddextension _logrotate" >> ${LOGROTATE_TMP_FILE}
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

@@ -59,5 +59,8 @@ config AGENT_CHECK_PARTIAL_WIFI_RELOAD
bool "Option that allow SSID/PSK simple reload"
default y
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.1.1.1
PKG_VERSION:=6.2.1.11
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=9701d5b50dfa194bd24eefdec025b76996fb1309
PKG_SOURCE_VERSION:=8f7f2d4c873ef9da9c8403a9900621ff2bb0bfb3
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -109,6 +109,10 @@ ifeq ($(CONFIG_AGENT_CHECK_PARTIAL_WIFI_RELOAD),y)
TARGET_CFLAGS += -DCHECK_PARTIAL_WIFI_RELOAD
endif
ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif
MAKE_PATH:=src
define Package/map-agent/install

View File

@@ -65,10 +65,40 @@ generate_multiap_config() {
device="$dev"
ifprefix_radio=""
if is_airoha; then
ifprefix="wlan%_%"
ifname="wlan${devidx}_0"
ifname_bh="wlan${devidx}_1"
if [ -d "/sys/module/mt76" ]; then
ifprefix="wlan%_%"
ifname="wlan${devidx}_0"
ifname_bh="wlan${devidx}_1"
else
ifname_sta=""
case "$band" in
2g)
ifprefix="ra%"
ifname="ra0"
ifname_bh="ra1"
ifname_sta="apcli0"
;;
5g)
ifprefix="rai%"
ifname="rai0"
ifname_bh="rai1"
ifname_sta="apclii0"
;;
6g)
ifprefix="rax%"
ifname="rax0"
ifname_bh="rax1"
ifname_sta="apclix0"
;;
esac
ifprefix_radio="${ifprefix}"
if [ "${network_mode}" == "extender" ]; then
ifname="${ifname_sta}"
fi
fi
uci set wireless.$dev.channels="$channels"
uci commit wireless
elif is_broadcom; then
@@ -99,12 +129,17 @@ generate_multiap_config() {
fi
if [ $generate_mapagent_config -eq 1 ]; then
uci set mapagent.agent.ifprefix="$ifprefix"
if [ -z "${ifprefix_radio}" ]; then
uci set mapagent.agent.ifprefix="$ifprefix"
fi
uci set mapagent.agent.brcm_setup="$brcm_setup"
uci set mapagent.agent.ap_follow_sta_dfs="$ap_follow_sta_dfs"
uci add mapagent radio
uci set mapagent.@radio[-1].device="$device"
uci set mapagent.@radio[-1].band="$mode_band"
if [ -n "${ifprefix_radio}" ]; then
uci set mapagent.@radio[-1].ifprefix="${ifprefix}"
fi
if [ "$network_mode" == "extender" ]; then
uci add mapagent bsta
@@ -193,19 +228,24 @@ map_genconf () {
uci -q set mapagent.@controller_select[0].local=1
fi
uci -q commit mapagent
fi
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
[ "$disable_mlo" == "1" ] && {
mapcontroller_disable_mld() {
uci set mapcontroller.$1.enabled='0'
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
[ "$disable_mlo" == "1" ] && {
mapcontroller_remove_mld() {
uci delete mapcontroller.$1
}
mapcontroller_remove_mld_id() {
uci delete mapcontroller.$1.mld_id
}
config_load mapcontroller
config_foreach mapcontroller_remove_mld mld
config_foreach mapcontroller_remove_mld_id ap
}
config_load mapcontroller
config_foreach mapcontroller_disable_mld mld
}
fi
uci -q commit mapcontroller
fi
uci -q commit mapcontroller
}

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.1.1.1
PKG_VERSION:=6.1.2.7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=b6b7343fee124ab42bfccbe9c46523e0b01c3c10
PKG_SOURCE_VERSION:=3c9e5ff1dec3aa5c82e39069cd4c9da806877726
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

View File

@@ -6,14 +6,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.2.3
PKG_VERSION:=1.2.7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/mcastmngr.git
PKG_SOURCE_VERSION:=117acf7a29e3a343756aab9b0ae330022892c15b
PKG_SOURCE_VERSION:=275d7e5448333e53f8bc980344b39f7f577d4664
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -29,7 +29,8 @@ MAKE_PATH:=bbf_plugin
define Package/mcastmngr
CATEGORY:=Utilities
TITLE:=Multicast Proxy/Snooping Manager
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/mcastmngr/description

View File

@@ -39,7 +39,6 @@ config_snooping_upstream_interface() {
local snooping_upstream_intf=""
json_load "$(devstatus $1)"
logger -t "mcastconf" "$(devstatus $1)"
itr=1
json_select bridge-members
@@ -128,14 +127,14 @@ configure_mcpd_snooping() {
config_snooping_common_params $protocol $igmp_s_version $igmp_s_robustness $igmp_s_mode
config_mcast_querier_params $protocol $igmp_s_query_interval $igmp_s_q_resp_interval $igmp_s_last_mem_q_int
config_snooping_upstream_interface "$igmp_s_iface"
config_snooping_on_bridge $protocol $igmp_s_iface $igmp_s_mode
config_snooping_on_bridge $protocol "$igmp_s_iface" $igmp_s_mode
exceptions=$igmp_s_exceptions
fast_leave=$igmp_s_fast_leave
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_s_version $mld_s_robustness $mld_s_mode
config_mcast_querier_params $protocol $mld_s_query_interval $mld_s_q_resp_interval $mld_s_last_mem_q_int
config_snooping_upstream_interface "$mld_s_iface"
config_snooping_on_bridge $protocol $mld_s_iface $mld_s_mode
config_snooping_on_bridge $protocol "$mld_s_iface" $mld_s_mode
exceptions=$mld_s_exceptions
fast_leave=$mld_s_fast_leave
fi
@@ -171,14 +170,14 @@ configure_mcpd_proxy() {
config_snooping_common_params $protocol $igmp_p_version $igmp_p_robustness $igmp_p_mode
config_mcast_querier_params $protocol $igmp_query_interval $igmp_q_resp_interval $igmp_last_mem_q_int
config_mcast_proxy_interface $protocol "$igmp_p_up_interfaces"
config_snooping_on_bridge $protocol $igmp_p_down_interfaces $igmp_p_mode
config_snooping_on_bridge $protocol "$igmp_p_down_interfaces" $igmp_p_mode
fast_leave=$igmp_fast_leave
exceptions=$igmp_p_exceptions
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_p_version $mld_p_robustness $mld_p_mode
config_mcast_querier_params $protocol $mld_query_interval $mld_q_resp_interval $mld_last_mem_q_int
config_mcast_proxy_interface $protocol "$mld_p_up_interfaces"
config_snooping_on_bridge $protocol $mld_p_down_interfaces $mld_p_mode
config_snooping_on_bridge $protocol "$mld_p_down_interfaces" $mld_p_mode
fast_leave=$mld_fast_leave
exceptions=$mld_p_exceptions
fi

View File

@@ -3,8 +3,42 @@
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
read_mcast_stats() {
cat /proc/net/igmp_snooping > /tmp/igmp_stats
readonly TEMPFILE="/tmp/snooping_stats_"$$
splitup_ipv6addr() {
local inaddr="$1"
local lowaddr=""
local hiaddr=""
local subaddr=""
local outaddr=""
OIFS=$IFS
IFS=":"
for subaddr in $inaddr; do
loaddr="$(printf "%x\n" 0x$(echo -n "$subaddr" | cut -b5-8))"
hiaddr="$(printf "%x\n" 0x$(echo -n "$subaddr" | cut -b1-4))"
if [ -z "$outaddr" ]; then
outaddr="${hiaddr}:${loaddr}"
else
outaddr="${outaddr}:${hiaddr}:${loaddr}"
fi
done
IFS=$OIFS
echo "$outaddr" | sed -e 's/0000/0/g' -e 's/00/0/g' -e 's/000/0/g'
}
meld_files() {
local type="$1"
if [ "$type" = "mld" ]; then
cat "/proc/net/${type}_snooping" | awk -F' ' '{ print $1 " " $2 " " $3 " " $4 " " $5 " " $6 " " $7 " " $8 " NULL " $9 " " $10 " " $11 " " $12 " " $13 " " $12 }' >> "$TEMPFILE"
else
cat "/proc/net/${type}_snooping" >> "$TEMPFILE"
fi
}
read_snooping_file() {
local mcast_addrs=""
local ifaces=""
@@ -33,7 +67,7 @@ read_mcast_stats() {
fi
;;
esac
done < /tmp/igmp_stats
done < "$TEMPFILE"
while read line; do
# reading each line
@@ -41,6 +75,7 @@ read_mcast_stats() {
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
@@ -60,27 +95,13 @@ read_mcast_stats() {
fi
;;
esac
done < /tmp/igmp_stats
done < "$TEMPFILE"
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < /tmp/igmp_stats
json_add_object ""
json_add_string "interface" "$intf"
json_add_array "groups"
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
@@ -98,7 +119,12 @@ read_mcast_stats() {
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
if [ -n "$(echo $gip_addr | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
else
gip_addr=$(splitup_ipv6addr "$gip_addr")
gip="$(echo $gip_addr | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
fi
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
@@ -106,7 +132,12 @@ read_mcast_stats() {
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $14 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
if [ -n "$(echo $host_ip | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
else
host_ip=$(splitup_ipv6addr "$host_ip")
h_ip="$(echo $host_ip | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
fi
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
json_add_string "device" "$src_port"
@@ -115,17 +146,29 @@ read_mcast_stats() {
json_close_object #close the associated device object
;;
esac
done < /tmp/igmp_stats
json_close_array #close the associated devices array
json_close_object # close the groups object
done < "$TEMPFILE"
if [ $grp_obj_added -eq 1 ]; then
json_close_array #close the associated devices array
json_close_object # close the groups object
fi
done # close the loop for group addresses
json_close_array #close the groups array
json_close_object # close the snooping object
done # close the loop for interfaces
json_close_object # close the snooping object
}
read_mcast_stats() {
echo -n > "$TEMPFILE"
json_init
json_add_array "snooping"
meld_files "igmp"
meld_files "mld"
read_snooping_file
json_close_array # close the snooping array
json_dump
rm -f /tmp/igmp_stats
rm -f "$TEMPFILE"
}
case "$1" in
@@ -135,7 +178,12 @@ case "$1" in
call)
case "$2" in
stats)
read_mcast_stats
out="$(read_mcast_stats)"
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
esac
;;

View File

@@ -0,0 +1,24 @@
#!/bin/sh
[ "$LINK" = "up" -a -n "$PORT" ] || exit 0
compare_mcast_snooping_interface() {
local interface dev running
config_get interface "$1" interface
for dev in $interface; do
if [ "$PORT" = "$dev" ]; then
running=$(ubus call service list '{"name": "mcast"}' | jsonfilter -e '@.mcast.instances')
if [ -z "${running}" ]; then
/etc/init.d/mcast start
else
ubus call uci commit '{"config":"mcast"}'
fi
exit
fi
done
}
config_load mcast
config_foreach compare_mcast_snooping_interface "snooping"

View File

@@ -1,27 +1,22 @@
#!/bin/sh
[ "$ACTION" = ifup ] || exit 0
[ "$ACTION" = "ifup" -a -n "$INTERFACE" ] || exit 0
. /lib/functions/network.sh
network_get_device l3device $INTERFACE
network_get_device l3device "$INTERFACE"
[ -n "$l3device" ] || exit 0
compare_mcast_proxy_upstream() {
local upstream
local mode="$2"
local upstream dev running
if [ "$mode" == "proxy" ]; then
config_get upstream $1 upstream_interface
else
config_get upstream $1 interface
fi
config_get upstream "$1" upstream_interface
for dev in $upstream; do
if [ "$l3device" == "$dev" ]; then
if [ "$l3device" = "$dev" ]; then
running=$(ubus call service list '{"name": "mcast"}' | jsonfilter -e '@.mcast.instances')
if [ -z "${running}" ];then
if [ -z "${running}" ]; then
/etc/init.d/mcast start
else
ubus call uci commit '{"config":"mcast"}'
@@ -32,5 +27,4 @@ compare_mcast_proxy_upstream() {
}
config_load mcast
config_foreach compare_mcast_proxy_upstream "proxy" "proxy"
config_foreach compare_mcast_proxy_upstream "snooping" "snooping"
config_foreach compare_mcast_proxy_upstream "proxy"

View File

@@ -85,9 +85,8 @@ config_mcproxy_interfaces() {
echo -e "pinstance main:$str_up ==>$str_down;\n" >> $CONFFILE
local filter=""
for excp in $exceptions; do
local filter=""
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
@@ -98,16 +97,16 @@ config_mcproxy_interfaces() {
filter="$filter ($excp | *)"
;;
esac
done
for upstream in $str_up; do
echo "pinstance main upstream $upstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream $upstream out blacklist table{$filter };" >> $CONFFILE
done
for upstream in $str_up; do
echo "pinstance main upstream $upstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream $upstream out blacklist table{$filter };" >> $CONFFILE
done
for downstream in $str_down; do
echo "pinstance main downstream $downstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main downstream $downstream out blacklist table{$filter };" >> $CONFFILE
done
for downstream in $str_down; do
echo "pinstance main downstream $downstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main downstream $downstream out blacklist table{$filter };" >> $CONFFILE
done
}
@@ -262,10 +261,6 @@ config_mcproxy_instance() {
downstreams=$igmp_p_down_interfaces
mcast_mode=$igmp_p_mode
# mcproxy reserves two multicast subscriptions for igmp router service groups
local mg=$(cat /proc/sys/net/ipv4/igmp_max_memberships)
mg=$((mg+2))
echo $mg > /proc/sys/net/ipv4/igmp_max_memberships
elif [ "$protocol" == "mld" ]; then
case "$version" in
[1-2])
@@ -399,13 +394,15 @@ config_mcproxy() {
disable_snooping
if [ "$igmp_p_enable" == "1" ]; then
config_mcproxy_instance igmp "$igmp_p_version"
elif [ "$igmp_s_enable" == "1" ]; then
fi
if [ "$igmp_s_enable" == "1" ]; then
config_snooping igmp "$igmp_s_version"
fi
if [ "$mld_p_enable" == "1" ]; then
config_mcproxy_instance mld "$mld_p_version"
elif [ "$mld_s_enable" == "1" ]; then
fi
if [ "$mld_s_enable" == "1" ]; then
config_snooping mld "$mld_s_version"
fi
}

View File

@@ -3,12 +3,46 @@
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
read_mcast_stats() {
local temp_igmp_file='/tmp/igmp_stats_'$$
local snooping_stats='/tmp/igmp_snooping_stats'
readonly TEMPFILE="/tmp/snooping_stats_"$$
mcast_snooping_interface() {
local interface intf gip vid port
config_get interface "$1" interface
for intf in $interface; do
[ -z "$(bridge mdb show dev "$intf" 2> /dev/null | grep -v -F "port ${intf} " | xargs)" ] && continue
json_add_object ""
json_add_string "interface" "$intf"
json_add_array "groups"
for gip in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | cut -f6 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "groupaddr" "$gip"
json_add_array "clients"
for port in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | grep -F "grp ${gip} " | cut -f4 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "device" "$port"
for vid in $(bridge mdb show dev "$intf" | grep -F "port ${port} grp ${gip} " | grep -F ' vid ' | cut -f9 -d' ' | sort -u | xargs); do
json_add_object ""
json_add_string "vid" "$vid"
json_close_object #close the associated vid object
done
json_close_object #close the associated device object
done
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
json_close_object # close the snooping object
done # close the loop for interfaces
}
meld_files() {
local type="$1"
local snooping_stats="/tmp/${type}_snooping_stats"
local old_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
# Sending signal to mcproxy to dump multicast data in /tmp/igmp_snooping_stats
# Sending signal to mcproxy to dump multicast data in /tmp/${type}_snooping_stats
local mcast_pids=$(pidof mcproxy)
for pid in $mcast_pids
do
@@ -24,8 +58,11 @@ read_mcast_stats() {
done
fi
cat "$snooping_stats" > "$temp_igmp_file"
[ ! -e "$snooping_stats" ] && return 0
cat "$snooping_stats" >> "$TEMPFILE"
}
read_snooping_file() {
local mcast_addrs=""
local ifaces=""
@@ -54,7 +91,7 @@ read_mcast_stats() {
fi
;;
esac
done < "$temp_igmp_file"
done < "$TEMPFILE"
while read line; do
# reading each line
@@ -81,27 +118,13 @@ read_mcast_stats() {
fi
;;
esac
done < "$temp_igmp_file"
done < "$TEMPFILE"
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < "$temp_igmp_file"
json_add_object ""
json_add_string "interface" "$intf"
json_add_array "groups"
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
@@ -119,7 +142,11 @@ read_mcast_stats() {
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
if [ -n "$(echo $gip_addr | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
else
gip="$(echo $gip_addr | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
fi
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
@@ -127,7 +154,11 @@ read_mcast_stats() {
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $3 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
if [ -n "$(echo $host_ip | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
else
h_ip="$(echo $host_ip | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
fi
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $4 }')"
json_add_string "device" "$src_port"
@@ -136,17 +167,32 @@ read_mcast_stats() {
json_close_object #close the associated device object
;;
esac
done < "$temp_igmp_file"
json_close_array #close the associated devices array
json_close_object # close the groups object
done < "$TEMPFILE"
if [ $grp_obj_added -eq 1 ]; then
json_close_array #close the associated devices array
json_close_object # close the groups object
fi
done # close the loop for group addresses
json_close_array #close the groups array
json_close_object # close the snooping object
done # close the loop for interfaces
json_close_object # close the snooping object
}
read_mcast_stats() {
echo -n > "$TEMPFILE"
json_init
json_add_array "snooping"
meld_files "igmp"
meld_files "mld"
read_snooping_file
# L2 Snooping goes here
config_load mcast
config_foreach mcast_snooping_interface "snooping"
json_close_array # close the snooping array
json_dump
rm -f "$temp_igmp_file"
rm -f "$TEMPFILE"
}
case "$1" in
@@ -156,7 +202,12 @@ case "$1" in
call)
case "$2" in
stats)
read_mcast_stats
out="$(read_mcast_stats)"
if [ -z "${out}" ]; then
echo '{}'
else
echo "${out}"
fi
;;
esac
;;

51
netmngr/Makefile Normal file
View File

@@ -0,0 +1,51 @@
#
# Copyright (C) 2020-2024 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.0.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=4d778a577c761e5839cd6b6ade35bcc5c4588b10
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
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/netmngr/description
Package to add Network data model support.
endef
MAKE_PATH:=src
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
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

@@ -1,4 +1,3 @@
if PACKAGE_obuspa
config OBUSPA_MTP_ENABLE_MQTT
bool "Enable MQTT as mtp protocol"
default y
@@ -22,6 +21,11 @@ config OBUSPA_CONTROLLER_MTP_VERIFY
config OBUSPA_ENABLE_TEST_CONTROLLER
bool "Adds a test controller by default"
default n
select OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
config OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
bool "Adds a test controller by default (local access only)"
default n
config OBUSPA_MAX_CONTROLLERS_NUM
int "The maximum number of controllers to be supported"
@@ -51,4 +55,3 @@ config OBUSPA_SESSION_EXTENSION
Adds Device.LocalAgent.X_IOPSYS_EU_Session. object to simulate
a CWMP like session
endif

View File

@@ -5,15 +5,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=8.0.1.6
PKG_VERSION:=9.0.0.14
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=0997eebe269d766eb738b80e4d5ccd40baf79090
PKG_SOURCE_VERSION:=00a9001bff19e074d4896b59e8839aab9f6f961e
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,7 +32,10 @@ define Package/obuspa
SUBMENU:=TRx69
TITLE:=USP agent
MENU:=1
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl
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 +libjson-c
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
endef
define Package/obuspa/description
@@ -112,21 +115,23 @@ define Package/obuspa/install
$(INSTALL_DIR) $(1)/etc/users/roles
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
$(INSTALL_DATA) ./files/etc/users/roles/*.json $(1)/etc/users/roles/
$(INSTALL_DATA) ./files/etc/obuspa/usp_utils.sh $(1)/etc/obuspa/
echo "$(CONFIG_BBF_VENDOR_PREFIX)" > $(1)/etc/obuspa/vendor_prefix
$(INSTALL_DATA) ./files/etc/obuspa/dmcaching_exclude.json $(1)/etc/obuspa/dmcaching_exclude.json
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/60-generate-ctrust-defaults $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/obuspa-set-dhcp-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/92-obuspa_firewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/firewall.usp $(1)/etc/
$(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
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL),y)
$(INSTALL_BIN) ./files/etc/init.d/usptest $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/uci-defaults/55-test-usp-controller $(1)/etc/uci-defaults/
endif

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,9 @@ config obuspa 'global'
option log_level '2'
option prototrace '0'
option db_file '/etc/obuspa/usp.db'
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
#option max_group_sep '2'
#option ipc_timeout '30'
#option max_cache_time '600'
#option trust_cert '/etc/obuspa/ca.pem'
#option client_cert '/etc/obuspa/client.pem'
#option log_dest '/tmp/obuspa.log'

View File

@@ -0,0 +1,16 @@
#!/bin/sh
log() {
echo "$*"|logger -t obuspa.firewall -p debug
}
config_load obuspa
config_get_bool enable_obuspa global enabled 1
if [ "$enable_obuspa" = "0" ]; then
return 0;
fi
sleep 1
log "Sending WakeUp! event to re-connect after firewall restart"
obuspa -c event "Device.LocalAgent.WakeUp!"

View File

@@ -40,7 +40,7 @@ db_set_reset_file()
shift
value="$*"
if [ -n "${param}" ] && [ -n "${value}" ]; then
if [ -n "${param}" ]; then
echo "${param} \"${value}\"">>${RESET_FILE}
else
echo >>${RESET_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}")
@@ -368,9 +368,21 @@ configure_controller()
db_set "${BASEPATH}.MTP.1.Protocol" "${Protocol}"
# only support configuration of one mtp path per controller using uci
if [ "${Protocol}" = "MQTT" ]; then
# Cleanup
db_set "${BASEPATH}.MTP.1.WebSocket.Host" ""
db_set "${BASEPATH}.MTP.1.WebSocket.Path" ""
db_set "${BASEPATH}.MTP.1.STOMP.Reference" ""
db_set "${BASEPATH}.MTP.1.STOMP.Destination" ""
db_set "${BASEPATH}.MTP.1.MQTT.Reference" "${dm_ref}"
db_set "${BASEPATH}.MTP.1.MQTT.Topic" "${Topic}"
elif [ "${Protocol}" = "STOMP" ]; then
# Cleanup
db_set "${BASEPATH}.MTP.1.WebSocket.Host" ""
db_set "${BASEPATH}.MTP.1.WebSocket.Path" ""
db_set "${BASEPATH}.MTP.1.MQTT.Reference" ""
db_set "${BASEPATH}.MTP.1.MQTT.Topic" ""
db_set "${BASEPATH}.MTP.1.STOMP.Reference" "${dm_ref}"
db_set "${BASEPATH}.MTP.1.STOMP.Destination" "${Destination}"
elif [ "${Protocol}" = "CoAP" ]; then
@@ -379,6 +391,12 @@ configure_controller()
db_set "${BASEPATH}.MTP.1.CoAP.Port" "${Port}"
db_set "${BASEPATH}.MTP.1.CoAP.EnableEncryption" "${EnableEncryption}"
elif [ "${Protocol}" = "WebSocket" ]; then
# Cleanup
db_set "${BASEPATH}.MTP.1.STOMP.Reference" ""
db_set "${BASEPATH}.MTP.1.STOMP.Destination" ""
db_set "${BASEPATH}.MTP.1.MQTT.Reference" ""
db_set "${BASEPATH}.MTP.1.MQTT.Topic" ""
db_set "${BASEPATH}.MTP.1.WebSocket.Host" "${Host}"
db_set "${BASEPATH}.MTP.1.WebSocket.Port" "${Port}"
db_set "${BASEPATH}.MTP.1.WebSocket.Path" "${Path}"
@@ -509,18 +527,34 @@ configure_mtp() {
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.Protocol" "${Protocol}"
if [ "${Protocol}" = "MQTT" ]; then
# cleanup
db_set "${BASEPATH}.WebSocket.Path" ""
db_set "${BASEPATH}.STOMP.Reference" ""
db_set "${BASEPATH}.STOMP.Destination" ""
db_set "${BASEPATH}.MQTT.Reference" "${dm_ref}"
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" "${ResponseTopicConfigured}"
if [ -n "${PublishQoS}" ]; then
db_set "${BASEPATH}.MQTT.PublishQoS" "${PublishQoS}"
fi
elif [ "${Protocol}" = "STOMP" ]; then
# cleanup
db_set "${BASEPATH}.WebSocket.Path" ""
db_set "${BASEPATH}.MQTT.Reference" ""
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" ""
db_set "${BASEPATH}.STOMP.Reference" "${dm_ref}"
db_set "${BASEPATH}.STOMP.Destination" "${Destination}"
elif [ "${Protocol}" = "CoAP" ]; then
db_set "${BASEPATH}.CoAP.Path" "${Path}"
db_set "${BASEPATH}.CoAP.Port" "${Port}"
elif [ "${Protocol}" = "WebSocket" ]; then
# cleanup
db_set "${BASEPATH}.MQTT.Reference" ""
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" ""
db_set "${BASEPATH}.STOMP.Reference" ""
db_set "${BASEPATH}.STOMP.Destination" ""
db_set "${BASEPATH}.WebSocket.Path" "${Path}"
db_set "${BASEPATH}.WebSocket.Port" "${Port}"
db_set "${BASEPATH}.WebSocket.EnableEncryption" "${EnableEncryption}"
@@ -879,6 +913,18 @@ check_n_delete_db()
delete_sql_db_entry_with_pattern "${path}"
}
workaround_remove_download_pattern()
{
local inst
inst="$(cat ${DB_DUMP} |grep -E "Device.DeviceInfo.FirmwareImage.\d.Download()"|grep -oE "Device.LocalAgent.Request.\d.")"
if [ -n "${inst}" ]; then
log "Workaround to remove the old download Request [$inst]"
delete_sql_db_entry_with_pattern "${inst}"
fi
}
reverse_update_db_with_uci()
{
if [ ! -f "${DB_DUMP}" ]; then
@@ -965,6 +1011,7 @@ db_init()
cp /etc/config/obuspa /tmp/obuspa/
if [ -f "${DB_DUMP}" ]; then
workaround_remove_download_pattern
mv ${DB_DUMP} ${RESET_FILE}
fi

Some files were not shown because too many files have changed in this diff Show More