Compare commits

...

336 Commits

Author SHA1 Message Date
Mohd Husaam Mehdi
16c919b1ee for build 2025-05-24 15:25:38 +05:30
Erik Karlsson
c68b1c01eb libwifi: 7.12.10 2025-05-23 15:45:55 +02:00
George Yang
a053e7752f dectmngr: Support DCX81 firmware upgrade via init script 2025-05-23 14:58:44 +02:00
Amin Ben Romdhane
558bd40b9f wifidmd: Fix compilation error when WIFIDMD_DISABLE_LEGACY_WIFI is selected 2025-05-23 09:21:47 +02:00
Amin Ben Romdhane
432969f0bf wifidmd: 1.1.18 2025-05-22 18:02:19 +02:00
Sukru Senli
a7dfecba54 wifi-services: add LICENSE file 2025-05-22 16:41:57 +02:00
Jakob Olsson
0ba1417643 decollector: 6.2.1.3 2025-05-22 14:05:10 +02:00
Jakob Olsson
29d6ad2fbd map-controller: 6.3.0.18 2025-05-22 14:04:37 +02:00
Jakob Olsson
f7ef772ebf map-agent: 6.3.5.4 2025-05-22 14:04:02 +02:00
Amin Ben Romdhane
d0c9d595c8 wifidmd: 1.1.17 2025-05-22 11:14:15 +02:00
Amin Ben Romdhane
912d98f496 bbfdm: 1.15.29 2025-05-22 11:12:41 +02:00
George Yang
8fb1b55e57 libvoice-airoha: update uci-defaults to apply DECT RFPI from prodution data
Set the hw.board.dect_rfpi with value of USP 'DectRfpi'.
2025-05-22 10:37:45 +02:00
Vivek Kumar Dutta
c5e79244c7 wifidmd: 1.1.16 2025-05-22 14:04:21 +05:30
Amin Ben Romdhane
499f77d498 bbfdm: 1.15.28 2025-05-21 17:51:12 +02:00
Amin Ben Romdhane
480c954677 wifidmd: 1.1.15 2025-05-21 17:32:34 +02:00
Jakob Olsson
9a5564bca4 map-agent: hotplug: map-dynamic-backhaul: remove tracking of port connections prior to dynbh start 2025-05-21 15:50:17 +02:00
Jakob Olsson
67ee062946 map-agent: 6.3.5.3 2025-05-21 15:49:05 +02:00
Vivek Kumar Dutta
7ecdc3ccb4 timemngr: 1.1.9 2025-05-21 17:50:43 +05:30
Vivek Kumar Dutta
36490a7cda netmode: Add support for SupportedArguments 2025-05-21 16:22:27 +05:30
Anjan Chanda
1d31c5f795 wifimngr: 17.7.1 - update init.d script 2025-05-21 10:25:03 +02:00
Anjan Chanda
9a934269ae wifi-services: add libwifi dependency 2025-05-21 10:25:03 +02:00
Janusz Dziedzic
82e8c63c88 libwifi: 7.12.9 2025-05-20 16:15:23 +00:00
Erik Karlsson
4fe71d66d3 fluent-bit: use PKG_SOURCE_URL_FILE
This avoids having a very generic file name in the dl directory.
2025-05-20 15:21:00 +02:00
Jakob Olsson
74eac091ff decollector: 6.2.1.2 2025-05-20 15:15:37 +02:00
Janusz Dziedzic
94cf651a6c map-agent: 6.3.5.2 2025-05-20 12:56:20 +00:00
Janusz Dziedzic
08f909388c libwifi: 7.12.8 2025-05-20 12:51:47 +00:00
Amin Ben Romdhane
148d25caf0 bbfdm: 1.15.27 2025-05-20 14:45:36 +02:00
Amin Ben Romdhane
8d8cc94cdf wifidmd: 1.1.14 2025-05-20 14:41:39 +02:00
Anjan Chanda
0d6c7b2f70 wifimngr: 17.7.1 2025-05-20 14:24:52 +02:00
Anjan Chanda
0623e7017f libeasy: 7.4.6 2025-05-20 11:51:43 +02:00
Vivek Kumar Dutta
013f820b12 periodicstats: align with bbfdm 2025-05-20 15:18:17 +05:30
Vivek Kumar Dutta
9fd4584cdb bbfdm: Prevent repeated async calls to unstable micro-services 2025-05-20 15:18:17 +05:30
Anjan Chanda
3b3035441e wifimngr: 17.7.0 2025-05-20 11:45:46 +02:00
Anjan Chanda
38f36f3bdf libwifi: 7.12.7 2025-05-20 11:40:21 +02:00
Anjan Chanda
b27646211b wifi-services: 0.0.2 2025-05-20 11:36:17 +02:00
Vivek Kumar Dutta
70b5c78d22 icwmp: 9.9.6 2025-05-20 13:41:27 +05:30
Husaam Mehdi
2356ed6075 fluent-bit: bump version to 4.0.2 2025-05-20 13:34:35 +05:30
Suvendhu Hansa
39d484817e icwmp: Option to select SMM feature 2025-05-20 10:09:05 +05:30
Janusz Dziedzic
a73c089c2a libwifi: 7.12.6 2025-05-19 13:50:00 +00:00
Vivek Kumar Dutta
22d9f90528 netmode: fix extender configuration 2025-05-19 17:43:17 +05:30
Janusz Dziedzic
ac93499202 wifimngr: 17.6.6 2025-05-19 08:18:04 +00:00
Janusz Dziedzic
4dfc3455fb libwifi: 7.12.5 2025-05-19 08:18:04 +00:00
Anjan Chanda
5bc00d53fd decollector: 6.2.1.1 2025-05-19 09:22:49 +02:00
Suvendhu Hansa
6ec25f158c wifidmd: added vendor extension 2025-05-17 19:27:38 +00:00
Amin Ben Romdhane
9817ca11b5 wifidmd: 1.1.13 2025-05-16 15:38:11 +02:00
Vivek Kumar Dutta
ca49dfac97 netmode: support to define supported modes 2025-05-16 18:23:43 +05:30
Jakob Olsson
44238e2033 map-agent: 6.3.5.1 2025-05-16 09:04:55 +02:00
Jakob Olsson
e1d4bddbcf map-controller: 6.3.0.17 2025-05-16 09:03:18 +02:00
Anjan Chanda
c6a739ddc0 decollector: 6.2.1.0 2025-05-15 16:06:03 +02:00
Jakob Olsson
38f657fa84 map-controller: 6.3.0.16 2025-05-15 14:45:41 +02:00
Reidar Cederqvist
f5488143cd Sulu: improve mapping for device picture 2025-05-15 09:51:43 +02:00
Amin Ben Romdhane
cebbf0f860 wifidmd: 1.1.12 2025-05-14 22:47:25 +02:00
Amin Ben Romdhane
dcac2bd261 bbfdm: 1.15.25 2025-05-14 21:49:06 +02:00
Janusz Dziedzic
82c6cca440 libwifi: 7.12.4 2025-05-14 18:02:37 +00:00
Vivek Kumar Dutta
2a952644c5 parental-control: 1.1.6 2025-05-14 22:12:30 +05:30
Janusz Dziedzic
fac25dc016 libwifi: 7.12.3 2025-05-14 16:29:09 +00:00
arbala
623e1dc34e map-controller: 6.3.0.15 2025-05-14 15:59:39 +02:00
Erik Karlsson
ed30787ca4 map-controller: fix potential shell injection in 99-mapcntlr
Expand variables which may contain "user input" in the second pass
(production data is not likely to contain anything unsafe but it is
better to be on the safe side). In addition use "$@" instead of
hardcoded parameters and handle json_select failure. Use OpenWrt
get_mac_label instead of legacy methods to obtain MAC address.
2025-05-14 14:07:31 +02:00
Amin Ben Romdhane
d68e0847c4 dnsmngr: 1.0.17 2025-05-14 12:05:14 +02:00
Amin Ben Romdhane
08cb598de4 parental-control: 1.1.5 2025-05-14 12:03:53 +02:00
Amin Ben Romdhane
2763ba7656 periodicstats: 1.5.17 2025-05-14 11:57:51 +02:00
Amin Ben Romdhane
2591116be3 usermngr: 1.3.10 2025-05-14 11:56:23 +02:00
Amin Ben Romdhane
06876807c1 timemngr: 1.1.8 2025-05-14 11:55:20 +02:00
Amin Ben Romdhane
65344ebdc5 bulkdata: 2.1.20 2025-05-14 11:54:22 +02:00
Amin Ben Romdhane
7dc743630c tr143: 1.1.1 2025-05-14 11:53:09 +02:00
Amin Ben Romdhane
a8d7adbd1f wifidmd: 1.1.11 2025-05-14 11:52:19 +02:00
Amin Ben Romdhane
ba215d1d6f bbfdm: 1.15.24 2025-05-14 11:51:18 +02:00
Jakob Olsson
fdfa1526b8 map-controller: 6.3.0.14 2025-05-13 17:33:03 +02:00
Jakob Olsson
a93bde6fb5 map-agent: 6.3.5.0 2025-05-13 17:31:54 +02:00
Janusz Dziedzic
4135fbe369 wifimngr: 17.6.5 2025-05-12 09:36:56 +00:00
Erik Karlsson
e4e63ba991 wifimngr: remove LED handling 2025-05-09 11:48:40 +02:00
Janusz Dziedzic
832947703c wifimngr: 17.6.4 2025-05-09 07:59:21 +00:00
George Yang
14e5601aed dectmngr: remove the default PIN from dect config 2025-05-08 16:37:33 +02:00
George Yang
d3b2d4d9bf Revert "dectmngr: add rules in ruleng to handle DECT LED"
This reverts commit 5f36441b11.

As the solution caused conflict to WPS led.
2025-05-08 16:35:14 +02:00
George Yang
8741d7d82e dectmngr-3.7.7 2025-05-08 14:42:43 +02:00
Jakob Olsson
910538aad7 map-agent: 6.3.4.14 2025-05-08 14:24:51 +02:00
George Yang
5f36441b11 dectmngr: add rules in ruleng to handle DECT LED
Also remove the default DECT PIN '1234'.
2025-05-08 11:59:08 +00:00
Anjan Chanda
075728ce3e wifimngr: 17.6.3 2025-05-08 11:31:58 +02:00
Anjan Chanda
21687b6dc9 wifi-services: 0.0.1 2025-05-08 11:08:11 +02:00
Vivek Kumar Dutta
b5c2667d68 obuspa: Fix faults for operate commands 2025-05-07 21:47:51 +05:30
Amin Ben Romdhane
589c856cb7 ieee1905: 8.7.8 2025-05-07 15:04:12 +02:00
Amin Ben Romdhane
e819a32cd7 wifidmd: 1.1.10 2025-05-07 14:08:32 +02:00
George Yang
bc8c70f7d0 dectmngr-3.7.6 2025-05-06 18:04:22 +02:00
Elena Vengerova
fb17c3f51b libwifi, wifimngr: add eml_mode 2025-05-06 16:23:51 +04:00
Reidar Cederqvist
0dfd361033 sulu: fix WAN linktype 2025-05-06 13:09:42 +02:00
George Yang
6d31feaa00 dectmngr-3.7.5: DECT support for E755 2025-05-06 10:48:30 +02:00
Vivek Kumar Dutta
9df2d4b15e obuspa: Use legecy expanded paths for subscriptions 2025-05-05 18:51:47 +05:30
Suvendhu Hansa
b91ae7f7f0 tr143: use fastpath for download diagnostics in an7581 2025-05-02 19:03:01 +05:30
Vivek Kumar Dutta
6df1768244 netmode: datamodel vendor extension 2025-05-02 18:00:07 +05:30
Vivek Kumar Dutta
0a7245d2f9 obuspa: Optimize set requests to reduce reloads 2025-05-02 15:29:38 +05:30
Vivek Kumar Dutta
6166ba0041 obuspa: 10.0.0.5 2025-05-02 13:48:40 +05:30
George Yang
02577401c7 Config dect: Fix a typo 2025-05-02 10:14:58 +02:00
Vivek Kumar Dutta
eccfd8970a wifidmd: In SetSSID wait for changes to apply 2025-05-01 19:42:17 +05:30
Vivek Kumar Dutta
7097827eb8 obuspa: 10.0.0.4 2025-05-01 19:36:50 +05:30
Vivek Kumar Dutta
29e9ba389a obuspa: Updated SecuredRole only for bbfdm 2025-05-01 19:18:43 +05:30
George Yang
4c6f70342a dectmngr: Enable DECT base in default config
And also set the default PIN to '1234'.
2025-05-01 12:12:32 +02:00
Vivek Kumar Dutta
4708da4734 icwmp: 9.9.4 2025-05-01 10:21:15 +05:30
George Yang
55aba515ff libvoice-airoha: 1.1.3
DECT support on E755
2025-04-30 17:42:57 +02:00
George Yang
b1c9ce0d25 dectmngr-init: add few arguments for dectmngr
Add few arguments for dectmngr, which is based on the UCI config for
asterisk and dect:

    -sync $pcm_fsync (UCI dect.global.pcm_fsync)

    -slotsShift $pcm_slot_start (UCI dect.global.pcm_slot_star)

    -extensionShift N (starting index of UCI asterisk.extensionN for DECT)
2025-04-30 16:52:10 +02:00
Vivek Kumar Dutta
d3ae8b5020 obuspa: fix syslog format 2025-04-30 19:52:40 +05:30
Vivek Kumar Dutta
ca962744b8 obuspa: Integrated v10.0.0 2025-04-30 19:52:40 +05:30
George Yang
31c7500042 libvoice-airoha/uci-defaults: add DECT default settings for E755
Following default settings added to dect config:
  - dect.global.pcm_fsync='SHORT_LF'
  - dect.global.pcm_slot_start='8'
  - dect.global.dect_channel_start='3'
2025-04-30 16:16:16 +02:00
Jakob Olsson
e71ee20840 map-agent: 6.3.4.13 2025-04-30 12:27:20 +02:00
Mohd Mehdi
38763bfc0d logmngr: set fluent-bit coro_stack_size option to prevent segfault 2025-04-29 21:37:47 +05:30
Vivek Kumar Dutta
a43e3530c9 obuspa: align role definitions 2025-04-29 21:12:38 +05:30
Vivek Kumar Dutta
86ede4ab6b usermngr: Added admin,user users in default config 2025-04-29 20:09:52 +05:30
Jakob Olsson
d234e7adcc map-agent: 6.3.4.12 2025-04-29 15:34:41 +02:00
Erik Karlsson
e7e5ede6b9 ieee1905: populate device information based on OpenWrt properties
This follows how Device.DeviceInfo. is populated.
2025-04-29 15:15:33 +02:00
Janusz Dziedzic
476aee97a6 wifimngr: 17.6.1 2025-04-29 13:02:49 +00:00
Janusz Dziedzic
784c6553d8 libwifi: 7.12.1 2025-04-29 13:02:49 +00:00
Vivek Kumar Dutta
e2883f0f45 obuspa: use syslog for logging 2025-04-29 14:41:43 +05:30
Janusz Dziedzic
30d01926a8 map-agent: 6.3.4.11 2025-04-28 14:21:26 +00:00
Vivek Kumar Dutta
f6510849d6 usermngr: Remove deprecated RemoteAccessCapable 2025-04-28 19:22:33 +05:30
Vivek Kumar Dutta
d49e72be07 obuspa: mark roles as static 2025-04-28 19:08:13 +05:30
Janusz Dziedzic
35e9ed9b1b libwifi: 7.12.0 2025-04-28 13:00:03 +00:00
Sukru Senli
e66516242a lt-nand: remove unused package 2025-04-28 13:15:24 +02:00
Jakob Olsson
4affd50d2c map-agent: 6.3.4.10 2025-04-28 11:13:36 +02:00
Vivek Kumar Dutta
06dec89452 wifidmd: Fix mapping for Associated and Disassociated events 2025-04-28 13:42:12 +05:30
Vivek Kumar Dutta
130dbeacd5 bbfdm: Fix datamodel references generation 2025-04-25 19:54:19 +05:30
Vivek Kumar Dutta
d576d81b1f usermngr: Fix static user implementation 2025-04-25 19:52:28 +05:30
Reidar Cederqvist
ee6edfa5a9 sulu: remove SoftwareModules and topology widgets 2025-04-25 15:39:37 +02:00
Janusz Dziedzic
2f8c5e3f53 libwifi: 7.11.9 2025-04-25 08:10:37 +00:00
Erik Karlsson
5c0010edf8 ieee1905: 8.7.6 2025-04-24 13:17:37 +02:00
Jakob Olsson
001eb7e0a3 map-agent: 6.3.4.9 2025-04-24 11:53:59 +02:00
Janusz Dziedzic
a2209f555b map-agent: 6.3.4.8 2025-04-24 07:35:34 +00:00
Janusz Dziedzic
8c09e8658e wifimngr: 17.6.0 2025-04-24 06:50:21 +00:00
Reidar Cederqvist
1d85f324a4 sulu: update to latest sulu-core 2025-04-23 21:25:59 +02:00
Jakob Olsson
65926415ad map-agent: 6.3.4.7 2025-04-23 15:44:50 +02:00
Amin Ben Romdhane
50e865df53 wifidmd: 1.1.7 2025-04-23 15:00:52 +02:00
Amin Ben Romdhane
cf352e9990 bbfdm: 1.15.22 2025-04-23 14:59:09 +02:00
Jakob Olsson
ecec95ca57 map-agent: 6.3.4.6 2025-04-23 13:24:00 +02:00
Vivek Kumar Dutta
9a051abbf1 bbfdm: 1.15.21 2025-04-23 09:44:59 +05:30
Vivek Kumar Dutta
d3b5d8d598 bbfdm: bump RootDataModelVersion to 2.19 2025-04-22 19:10:14 +05:30
Vivek Kumar Dutta
3c4bbfb6d6 port-trigger: functionality merged in firewallmngr 2025-04-22 16:45:07 +05:30
Vivek Kumar Dutta
0122493c01 sysmngr: add support for KeepConfig in Activate 2025-04-22 16:36:29 +05:30
Anjan Chanda
6098c3ab56 decollector: 6.2.0.4 2025-04-22 09:53:12 +02:00
Anjan Chanda
252c98c4ef map-controller: 6.3.0.13 2025-04-22 09:25:38 +02:00
Vivek Kumar Dutta
5ea17980c8 wifidmd: Added BTMAbridged in ClientSteer command 2025-04-21 15:06:23 +05:30
Vivek Kumar Dutta
3ba06fa10f wifidmd: 1.1.5 2025-04-17 17:27:51 +05:30
Jakob Olsson
013086f558 decollector: 6.2.0.3 2025-04-17 13:00:26 +02:00
Jakob Olsson
3a8f8d604f map-agent: 6.3.4.5 2025-04-17 12:26:18 +02:00
Janusz Dziedzic
8612f5d4f6 map-agent: 6.3.4.4 2025-04-16 19:08:34 +00:00
Janusz Dziedzic
6aef37d406 libwifi: 7.11.8 2025-04-16 16:39:55 +00:00
Amin Ben Romdhane
753dc05320 wifidmd: 1.1.4 2025-04-16 15:27:17 +02:00
Amin Ben Romdhane
74878254b7 hostmngr: 1.2.20 2025-04-16 15:26:08 +02:00
Janusz Dziedzic
4f2697217a libwifi: 7.11.7 2025-04-16 10:28:11 +00:00
Amin Ben Romdhane
e36a9bc381 wifidmd: 1.1.3 2025-04-15 17:23:23 +02:00
Amin Ben Romdhane
a52d654c4f bbfdm: 1.15.19 2025-04-15 17:22:28 +02:00
Vivek Kumar Dutta
6cf5641ea7 cwmp: Use cpe specific acs password 2025-04-15 18:10:35 +05:30
Janusz Dziedzic
bce378a665 libwifi: 7.11.6 2025-04-15 12:32:27 +00:00
Jakob Olsson
9952f6e580 map-controller: 6.3.0.12 2025-04-15 14:06:28 +02:00
Vivek Kumar Dutta
7d0b38b9a7 wifidmd: replace BTMRequest() with ClientSteer() 2025-04-15 17:33:38 +05:30
Janusz Dziedzic
3a503ea955 libwifi: 7.11.5 2025-04-15 11:28:14 +00:00
Vivek Kumar Dutta
13cac21c60 bbfdm: removed stunc and xmpp from cwmp critical services list 2025-04-15 16:47:02 +05:30
Amin Ben Romdhane
f251701534 qosmngr: Updated log level 2025-04-15 11:16:46 +00:00
Vivek Kumar Dutta
5b882870c9 icwmp: register xmpp as cwmp only 2025-04-15 11:09:53 +00:00
Vivek Kumar Dutta
25f3acf2fd wifidmd: Fix AssociatedDevice for MLD supported DUTs 2025-04-15 11:09:53 +00:00
Suvendhu Hansa
c1fe6b05a6 xmpp: optimize xmpp uci map 2025-04-15 11:09:53 +00:00
Jakob Olsson
4ee9169771 hostmngr: 1.2.19 2025-04-15 13:03:11 +02:00
Amin Ben Romdhane
7172201515 bbfdm: install ruleng scripts 2025-04-15 11:32:55 +02:00
Erik Karlsson
c366451def logmngr: fix creation of logrotate configuration 2025-04-15 09:28:39 +02:00
Erik Karlsson
5874a005c6 logmngr: install logread to /sbin
It was being installed to /usr/sbin as workaround for conflict with
logd package. The correct solution is to not select logd package.
2025-04-15 09:22:16 +02:00
Vivek Dutta
ffab63b86f bbfdm: ruleng script to refresh reference_db 2025-04-15 06:41:24 +00:00
Janusz Dziedzic
929dd55d21 libwifi: 7.11.4 2025-04-14 17:23:56 +00:00
Reidar Cederqvist
3636e217a6 sulu-builder: add qrencode dependency for generating wifi qr code 2025-04-14 15:39:50 +02:00
Vivek Kumar Dutta
b99d4413dc obuspa: remove usages of stdout/stderr from init 2025-04-14 14:21:42 +05:30
Andreas Gnau
f2f6f6b787 map-controller: Allow setting Wi-Fi SSID from board.json
OpenWrt enables setting default Wi-Fi settings in board.json using
board.d scripts. Read from board.json for each band or all bands,
otherwise fall back to the old method of generating the SSID and key.

The following can be specified:

* WiFI SSID
* encryption mode
* key
* number of MAC addresses (not implemented in this commit)

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-04-14 06:59:21 +00:00
Suvendhu Hansa
f2ea1049e0 firewallmngr: fix duplicate rule entries 2025-04-12 08:24:33 +00:00
Mohd Mehdi
ba837ff98a qosmngr: unified service and datamodel daemon 2025-04-11 14:47:43 +00:00
Amin Ben Romdhane
324244d26b wifidmd: Refactor 'wifidmd' into a unified daemon 2025-04-11 14:35:11 +00:00
Amin Ben Romdhane
0cded2b974 bbfdm: 1.15.16 2025-04-11 16:34:26 +02:00
Amin Ben Romdhane
27f0f7454f decollector: 6.2.0.2 2025-04-11 16:10:32 +02:00
Marina Maslova
3ff559907b libwifi: 7.11.3 2025-04-11 18:01:50 +04:00
Marina Maslova
d73f8975cf hostmngr: 1.2.18 2025-04-11 17:58:43 +04:00
Jakob Olsson
3ddf258a74 map-agent: 6.3.4.3 2025-04-11 11:50:44 +02:00
Jakob Olsson
cd2c817223 map-controller: 6.3.0.11: add option to provision bridge 2025-04-11 11:43:53 +02:00
Jakob Olsson
370c5938aa map-agent: 6.3.4.2 2025-04-11 09:12:28 +02:00
Filip Matusiak
ddd88a894c map-agent: 6.3.4.1 2025-04-10 14:27:13 +02:00
Vivek Kumar Dutta
459f2571ec wifidmd: 1.0.35 2025-04-10 16:25:53 +05:30
Vivek Kumar Dutta
c555b48d16 tr143: support https url in download diagnostics 2025-04-10 15:38:25 +05:30
Vivek Kumar Dutta
6a0f353c93 hostmngr: removed remote ref in AssociatedDevice 2025-04-10 12:58:37 +05:30
Amin Ben Romdhane
21e742d9f7 sysmngr: Show Processes by 'PID', 'Memory' or 'CPU_Time' 2025-04-10 03:59:07 +00:00
Janusz Dziedzic
f4654e78c5 libwifi: 7.11.2 2025-04-09 13:55:49 +00:00
Reidar Cederqvist
72c3e3c8ce sulu: add device picture on the dashboard 2025-04-09 15:46:42 +02:00
Janusz Dziedzic
1adf7b669f libwifi: 7.11.1 2025-04-09 07:00:29 +00:00
Amin Ben Romdhane
39ec8635c3 ieee1905: 8.7.5 2025-04-08 15:02:03 +02:00
Amin Ben Romdhane
5a3fbb7902 wifidmd: 1.0.34 2025-04-08 14:21:02 +02:00
Amin Ben Romdhane
5ecc3945f9 netmngr: 1.1.6 2025-04-08 14:20:52 +02:00
Amin Ben Romdhane
8a52715ad1 dhcpmngr: 1.0.6 2025-04-08 14:20:36 +02:00
Amin Ben Romdhane
8333a499d0 bbfdm: 1.15.15 2025-04-08 09:30:20 +02:00
Vivek Kumar Dutta
941a46dae6 icwmp: Fix firewall rule on reload 2025-04-07 19:17:49 +05:30
Amin Ben Romdhane
86d7bf8c67 sysmngr: show only top N process 2025-04-05 15:40:21 +05:30
Reidar Cederqvist
4ef5d86feb Sulu version 4.1.0 - dark mode 2025-04-04 16:52:14 +02:00
Vivek Kumar Dutta
c97637fd5f wifidmd: Fix SSID management for wifi7 duts 2025-04-04 18:58:18 +05:30
Suvendhu Hansa
033613f999 icwmp: Support to whitelist Connection Request IPs 2025-04-04 12:30:55 +00:00
Reidar Cederqvist
b18f6dc39c update sulu to latest devel 2025-04-03 10:40:48 +02:00
Janusz Dziedzic
5f5b171d5a map-agent: 6.3.4.0 2025-04-03 07:18:22 +00:00
Janusz Dziedzic
469e9d1196 libwifi: 7.11.0 2025-04-02 09:28:52 +00:00
Sukru Senli
53b824d2e0 ethmngr: filter out wireless interfaces from ethernet hotplug event generation 2025-03-31 09:56:38 +00:00
Reidar Cederqvist
4df9b5ab94 update sulu-core to latest devel and align sulu-builder and sulu-core versions 2025-03-31 10:57:53 +02:00
Sukru Senli
130cf8fd53 ethmngr: add ruleng ethport recipe 2025-03-30 14:47:05 +02:00
Markus Gothe
bfd327ca02 Revert "ethmngr: add ruleng ethport recipe and generate deprecated ubus event"
This reverts commit 1d24d5c4f7.
2025-03-30 14:47:00 +02:00
Rahul Thakur
bcea816742 ethmngr: add ruleng recipe for ethport hotplug event
hotplug event generated now from ruleng recipe based on the
network.device event
2025-03-30 14:46:54 +02:00
Markus Gothe
ee6a27dc76 Revert "ethmngr: removed deprecated ethport hotplug handler"
This reverts commit dcfa48d1f7.
2025-03-30 14:46:46 +02:00
Markus Gothe
78eb76e913 Revert "ethmngr: generate ethport event using ruleng"
This reverts commit 56d352fc83.
2025-03-30 14:46:28 +02:00
Erik Karlsson
21c3354b31 sysmngr: remove deprecated hw.board.hasWifi use 2025-03-28 11:36:46 +01:00
Vivek Kumar Dutta
dcfa48d1f7 ethmngr: removed deprecated ethport hotplug handler 2025-03-28 09:39:34 +05:30
Vivek Kumar Dutta
56d352fc83 ethmngr: generate ethport event using ruleng 2025-03-27 17:48:22 +05:30
Vivek Kumar Dutta
56093ef532 icwmp: Fix duplicate events in Inform 2025-03-27 11:26:29 +05:30
Jakob Olsson
60f1d0edbf map-agent: 6.3.3.9 2025-03-25 14:18:40 +01:00
Jakob Olsson
c2021e765a map-controller: 6.3.0.10 2025-03-25 13:44:26 +01:00
Anjan Chanda
83c31acbc7 map-controller: 6.3.0.9 2025-03-25 10:57:45 +01:00
Vivek Kumar Dutta
9380411fa6 qosmngr: Fix regression in generating default classify rules 2025-03-24 13:39:08 +00:00
Vivek Kumar Dutta
2a47619b32 logmngr: multiple fixes
- Fix regression in generating log-rotate policy
- Fix logread output in case of file rotation
2025-03-24 18:37:58 +05:30
Vivek Kumar Dutta
f2c665a0cf logmngr: Fix remote logging 2025-03-24 16:45:38 +05:30
Erik Karlsson
1dca89c130 logmngr: use busybox klogd alongside fluent-bit 2025-03-21 22:24:29 +01:00
Erik Karlsson
63d3ca365b logmngr: remove fluent-bit kmsg support
Also remove apply_config_file which is dead code.
2025-03-21 17:48:39 +01:00
Erik Karlsson
fa4f08aa29 Revert "fluent-bit: enable kmsg plugin"
This reverts commit 01d320300e.
2025-03-21 17:48:39 +01:00
Jakob Olsson
858dd78ff7 map-controller: 6.3.0.4 2025-03-21 16:58:47 +01:00
Reidar Cederqvist
eb0e19355d sulu: performance optimizations 2025-03-21 15:38:20 +01:00
Suvendhu Hansa
4015982a87 gateway-info: Added enable option 2025-03-20 13:20:58 +00:00
Jakob Olsson
0b6e35e36b map-controller: 6.3.0.3 2025-03-20 13:57:07 +01:00
Vivek Kumar Dutta
cca03dc995 bbfdm: optimize get calls 2025-03-20 18:19:19 +05:30
Vivek Kumar Dutta
3d69811bf4 bbfdm: Fix instances in Security object 2025-03-20 18:15:56 +05:30
Vivek Kumar Dutta
5a7e44cd04 logmngr: include kernel logs 2025-03-20 18:11:36 +05:30
Anjan Chanda
b883f2b310 mapcontroller: uci-defaults: adapt 'sta_steering' config 2025-03-20 12:25:15 +01:00
Vivek Kumar Dutta
97a845fda2 self-diagnostics: compile logs in case of failure 2025-03-20 14:48:54 +05:30
Vivek Kumar Dutta
21cdf07e54 sysmngr: removed refresh handler for ProcessStatus 2025-03-20 10:13:53 +05:30
Vivek Kumar Dutta
13094c3a1b obuspa: Fix duplicate SecuredRole entry 2025-03-20 10:11:39 +05:30
Vivek Kumar Dutta
d3cb6a70da icwmp: added migration script for gateway-info options 2025-03-20 10:10:54 +05:30
Vivek Kumar Dutta
19570e553d icwmp: disable cpe GetRPCMethods 2025-03-19 22:05:30 +05:30
Vivek Kumar Dutta
50e2add3ab swmodd: updated root path to /apps 2025-03-19 16:20:51 +00:00
Vivek Kumar Dutta
e33340ea8d sysmngr: prepone init 2025-03-19 21:46:29 +05:30
Vivek Kumar Dutta
6b882610c2 ieee1905: updated default dm fallback values 2025-03-19 18:53:00 +05:30
Gouri Natarajan
383dedb443 self-diagnostics: add backhaul info 2025-03-19 12:28:08 +00:00
Vivek Kumar Dutta
a8a2066675 usermngr: 1.3.6 2025-03-19 17:18:14 +05:30
Erik Karlsson
73dfc49647 qosmngr: avoid potential race condition
Wait for background task to finish before reloading in the foreground.
2025-03-19 09:51:29 +01:00
Vivek Kumar Dutta
083cbd7b56 ddnsmngr: Fix duplicate update 2025-03-19 09:26:12 +05:30
Amin Ben Romdhane
e87bcbb819 map-agent: hotplug: map-dynamic-backhaul: Refactor port filtering and bridge detection logic 2025-03-18 14:45:14 +00:00
Reidar Cederqvist
f8561996ab sulu: update usp-js to version 0.4.11 2025-03-18 15:26:07 +01:00
Vivek Kumar Dutta
01d320300e fluent-bit: enable kmsg plugin 2025-03-18 19:34:59 +05:30
Amin Ben Romdhane
3faecd3979 bbfdm: 1.15.12 2025-03-18 13:03:08 +01:00
Amin Ben Romdhane
984962e34e bulkdata: Update JSON service 2025-03-18 12:48:25 +01:00
Filip Matusiak
6140bfa09c map-agent: 6.3.3.8 - add AGENT_UNASSOC_STA_CONT_MONITOR 2025-03-18 10:59:34 +00:00
Mohd Mehdi
2cbb433cbd qosmngr: use procd task for qos initialization 2025-03-18 07:53:44 +00:00
Janusz Dziedzic
c676cde1fb libwifi: 7.10.9 2025-03-17 18:17:22 +00:00
Markus Gothe
363c2ff155 ponmngr: Add support for PLOAM password. 2025-03-17 15:30:07 +01:00
Reidar Cederqvist
2a2650b43e sulu: use latest version of usp-js 2025-03-17 11:03:53 +01:00
Vivek Kumar Dutta
a5c13c4ae7 bbfdm: updated log level 2025-03-17 12:16:59 +05:30
Janusz Dziedzic
bf40d37745 libwifi: 7.10.8 2025-03-14 13:18:21 +00:00
George Yang
8889d06568 dectmngr: Do not install DCX81 firmware for Airoha platform
- Update the makefile
- Remove the .bin file for Airoha
2025-03-13 15:33:35 +00:00
Marina Maslova
e7d2f54bda libwifi: 7.10.7 2025-03-13 18:39:39 +04:00
Vivek Kumar Dutta
1e31d2accd bbfdm: 1.15.10 2025-03-13 19:10:09 +05:30
Sukru Senli
1e08854dce sulu-builder: update user 'user' ACL 2025-03-13 12:49:01 +00:00
Amin Ben Romdhane
cb27d96fe6 bbfdm: Increase ubus timeout 2025-03-13 13:36:34 +01:00
Vivek Kumar Dutta
943667adc6 bbfdm: 1.15.8
- Added a config option to force recompile of datamodel microservices
- Use service_name from service json for registration
2025-03-13 16:10:08 +05:30
Vivek Kumar Dutta
89b2c6ab19 udpecho: assign priority to dm plugin 2025-03-13 12:21:24 +05:30
Vivek Kumar Dutta
760cd38113 twamp: assign priority to dm plugin 2025-03-13 12:20:44 +05:30
Vivek Kumar Dutta
1abc312d2c tr471: assign priority to dm plugin 2025-03-13 12:20:14 +05:30
Vivek Kumar Dutta
09abf6d6b1 tr143: assign priority to dm plugin 2025-03-13 12:19:30 +05:30
Vivek Kumar Dutta
fa203d73e0 stunc: assign priority to dm plugin 2025-03-13 12:17:30 +05:30
Vivek Kumar Dutta
880741d8c3 self-diagnostics: assign priority to dm plugin 2025-03-13 12:16:55 +05:30
Vivek Kumar Dutta
42bd6390b5 qosmngr: assign priority to dm plugin 2025-03-13 12:16:02 +05:30
Vivek Kumar Dutta
c9856f2a5b port-trigger: assign priority to dm plugin 2025-03-13 12:15:14 +05:30
Vivek Kumar Dutta
c086f72400 packet-capture-diagnostics: assign priority to dm plugin 2025-03-13 12:11:57 +05:30
Vivek Kumar Dutta
a50c380722 logmngr: assign priority to dm plugin 2025-03-13 12:11:12 +05:30
Vivek Kumar Dutta
2755d6be1c icwmp: assign priority to dm plugin 2025-03-13 12:07:24 +05:30
Vivek Kumar Dutta
359db9ddc3 hostmngr: assign priority to dm plugin 2025-03-13 12:06:49 +05:30
Vivek Kumar Dutta
e4f3daf1ed dnsmngr: assign priority to dm plugin 2025-03-13 12:05:59 +05:30
Vivek Kumar Dutta
557ea195ba bridgemngr: assign priority to plugins 2025-03-13 12:05:14 +05:30
Vivek Kumar Dutta
1c14d9f652 bbfdm: option to assign priority between plugins 2025-03-13 12:03:06 +05:30
Mohd Husaam Mehdi
b8ebda638c parentalcontrol: do not add rule for web traffic directed to self
* this is not necessary for the functioning of urlfilter, only DNS
  traffic directed towards the device should be intercepted
* secondly, this is causing problems sometimes where DNS and HTTP
  traffic cannot flow if a large file (9MB tested) is downloaded
  from the device (for example, a urlbundle file), the reason for
  this is not known yet, but the fix is to not intercept web
  traffic directed to the DUT
2025-03-13 11:27:16 +05:30
Mohd Husaam Mehdi
db089a3920 parentalcontrol: only check urlbundle enable to download bundle 2025-03-12 23:53:38 +05:30
Jakob Olsson
4110c22f64 map-agent: 6.3.3.7 2025-03-12 16:51:10 +01:00
Vivek Kumar Dutta
5b07fcce33 swmodd: 2.5.25 2025-03-12 16:55:34 +05:30
Vivek Kumar Dutta
2219f2efba sulu: Enable SecureRole for admin ACL 2025-03-12 11:33:27 +05:30
Meng
ba3b00c784 obuspa: Support ControllerTrust.SecuredRoles
Patch for the obuspa:
- Add DM_SECURE flag in usp_api.h.
- Register Device.LocalAgent.ControllerTrust.SecuredRoles with Validate_SecuredRoles().
- Implement DEVICE_CTRUST_IsControllerSecured() to check controller trust.
- Update DATA_MODEL_GetParameterValue() and group_get_vector functions to return
  an empty string for secure parameters when the controller is not secured.

Updated usp_utils.sh to to add SecuredRole from role ACL files
2025-03-12 11:33:27 +05:30
Vivek Kumar Dutta
9598258993 usermngr: Remove ash from SupportedShell 2025-03-12 11:24:18 +05:30
Amin Ben Romdhane
32ab2eb2cc self-diagnostics: 1.0.14 2025-03-12 04:56:22 +00:00
Vivek Kumar Dutta
63c27601e5 gateway-info: documentation and CI pipeline 2025-03-12 09:11:12 +05:30
Suvendhu Hansa
f2d4b6ff7d obuspa: Support to DHCP on-boarding via Option 125 2025-03-12 03:35:28 +00:00
Marina Maslova
e945226956 libwifi: 7.10.6 2025-03-11 20:22:24 +04:00
Jakob Olsson
9a7ff0bbf2 map-agent: 6.3.3.6 2025-03-11 15:27:25 +01:00
Janusz Dziedzic
97830621a6 wifimngr: 17.5.9 2025-03-11 13:51:51 +00:00
Janusz Dziedzic
1c77fb2e76 libwifi: 7.10.5 2025-03-11 12:47:05 +00:00
Jakob Olsson
67c4a3c317 map-agent: 6.3.3.5 2025-03-11 10:37:38 +01:00
Vivek Dutta
7f17359913 libvoice-airoha: Updated uci-default script
Uci default script should not commit the uci, as its committed by its
handler/runner latter on, this is required to avoid race conditions.
2025-03-11 08:59:28 +00:00
Vivek Kumar Dutta
b6212b90d8 owsd: Updated uci-default script 2025-03-11 08:00:40 +00:00
Suvendhu Hansa
74cbe1062a gateway-info: Added support for USP events 2025-03-11 07:42:11 +00:00
Vivek Kumar Dutta
2be4eeebb7 linux-pam: 1.7.0 2025-03-11 11:23:45 +05:30
Vivek Kumar Dutta
a49407ad79 passwdqc: 2.0.3 2025-03-11 11:23:02 +05:30
Reidar Cederqvist
24737321b0 sulu: update sulu to latest version 2025-03-10 16:09:07 +01:00
Janusz Dziedzic
3a72a7ee61 libwifi: 7.10.4 2025-03-10 15:04:34 +00:00
Vivek Kumar Dutta
d9b6136916 swmodd: 2.5.24 2025-03-10 17:58:48 +05:30
Vivek Dutta
537e1758c3 ieee1905: remove uci commit from uci-default 2025-03-10 08:28:51 +00:00
Vivek Kumar Dutta
c6bbe14c6f icwmp: Fix operate syntax for diagnostics 2025-03-10 08:39:18 +05:30
Vivek Kumar Dutta
8af265a689 bridgemngr: Fix wifi ubus usages 2025-03-10 08:32:34 +05:30
Vivek Kumar Dutta
193a6cf502 icwmp: support for mutual authentication 2025-03-09 15:02:54 +05:30
Markus Gothe
d6c148f7e3 dectmngr: Support DECT FW per target
Add support for installing default DECT FW per target. This solves the need
to be able to have different default FW for different hardware architectures.

For Airoha we will update the DECT FW to DSPG 4.13 build 21 RC1.
2025-03-07 15:28:41 +00:00
Amin Ben Romdhane
afdc0006b5 icwmp: 9.8.36 2025-03-07 14:53:33 +01:00
Suvendhu Hansa
2cb0f6e159 obuspa,gateway-info: Support GatewayInfo USP params 2025-03-07 13:42:51 +00:00
Suvendhu Hansa
db72ee376e obuspa: Fix raise condition in dhcp Controller setup 2025-03-07 11:36:43 +00:00
Jakob Olsson
2bbeb83eb2 map-agent: 6.3.3.4 2025-03-07 10:27:18 +01:00
Jakob Olsson
f718adf692 map-controller: 6.3.0.2 2025-03-07 10:27:18 +01:00
Vivek Kumar Dutta
2aaf56ac6d swmodd: added datamodel dependency on swmod ubus 2025-03-06 19:17:03 +05:30
Suvendhu Hansa
426cc077e0 obuspa: controller provisioning via dhcp 2025-03-06 13:42:18 +00:00
Janusz Dziedzic
879e549581 libwifi: 7.10.3 2025-03-06 13:38:52 +00:00
Amin Ben Romdhane
78f6198d0a sysmngr: reduce log verbosity
- Change log level from 4 to 3 to show only error logs
2025-03-06 11:44:29 +01:00
Janusz Dziedzic
6ddaa150b4 wifimngr: 17.5.8 2025-03-06 10:33:22 +00:00
Janusz Dziedzic
9188a99c99 libwifi: 7.10.2 2025-03-06 10:33:22 +00:00
Amin Ben Romdhane
352a56448e userinterface: Fix misplaced closing quote 2025-03-06 10:15:36 +01:00
Jakob Olsson
5c7fea694f map-controller: 6.3.0.1 2025-03-05 16:37:16 +01:00
Vivek Kumar Dutta
5474007dcf swmodd: 2.5.22 2025-03-05 19:23:26 +05:30
Vivek Kumar Dutta
320d155a96 sysmngr: extend keep_config from Download to Activate 2025-03-05 19:13:19 +05:30
Meng
73f91e09db obuspa: add patches/0006-contains-expression.patch 2025-03-05 13:09:57 +00:00
Amin Ben Romdhane
36d2b24bae icwmp: Fix 'M Reboot' event is not sent on firmware upgrade 2025-03-05 11:45:57 +00:00
Janusz Dziedzic
f9010d9ef1 libwifi: 7.10.1 2025-03-05 11:08:01 +00:00
Vivek Kumar Dutta
aeda3280b3 bbfdm: avoid uci commit in uci-defaults 2025-03-05 09:10:42 +00:00
Jakob Olsson
5e3b30daa8 map-agent: 6.3.3.3 2025-03-05 10:05:09 +01:00
Mohd Mehdi
ee2165b184 qosmngr: update rate processing for queue 2025-03-05 06:02:13 +00:00
Vivek Kumar Dutta
1b7fa8ba15 qosmngr: updated uci-default scripts 2025-03-05 10:28:33 +05:30
Vivek Kumar Dutta
052dc52801 parental-control: updated uci-default script 2025-03-05 10:25:42 +05:30
Vivek Kumar Dutta
4373ec21aa obuspc: avoid uci commit in uci-defaults 2025-03-05 10:24:13 +05:30
Vivek Kumar Dutta
892e0f3599 obuspa: avoid uci commit in uci-defaults 2025-03-05 10:22:23 +05:30
Vivek Kumar Dutta
d9a742b734 mcastmngr: avoid uci commit in uci-defaults 2025-03-05 10:20:06 +05:30
Vivek Kumar Dutta
9e1a8de1bd logmngr: avoid uci commit in uci-defaults 2025-03-05 10:18:22 +05:30
Vivek Kumar Dutta
73c8e7eb75 gateway-info: avoid uci commit in uci-defaults 2025-03-05 10:13:15 +05:30
Vivek Kumar Dutta
41ba4fcedc dhcpmngr: avoid uci commit in uci-defaults 2025-03-05 10:10:41 +05:30
Erik Karlsson
b673daf265 swmodd: avoid uci-defaults script failure
Keep uci-defaults script from failing if there are no containers.
2025-03-04 16:09:40 +01:00
Vivek Kumar Dutta
06b9f7eb00 parental-control: 1.1.4 2025-03-04 19:10:00 +05:30
Vivek Kumar Dutta
092026794e netmngr: 1.1.5 2025-03-04 19:07:44 +05:30
Vivek Kumar Dutta
0bc9dd365f bridgemngr: 1.0.12 2025-03-04 19:05:57 +05:30
Vivek Kumar Dutta
f4eb3ec090 icwmp: 9.8.34 2025-03-04 19:04:57 +05:30
Vivek Kumar Dutta
7596b3b4f4 bbfdm: Fix Max instance log and uci list buffer size 2025-03-04 19:01:01 +05:30
Erik Karlsson
d546e1699f sshmngr: enable SFTP by default
Note that the openssh-sftp-server package works together with both
OpenSSH and dropbear
2025-03-04 12:39:23 +00:00
Amin Ben Romdhane
fe4a859af6 bbfdm: 1.15.5 2025-03-04 10:36:37 +01:00
209 changed files with 4773 additions and 1329 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.15.4
PKG_VERSION:=1.15.29
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=1c417534a8a72d5370414f74b693e226ce96af0f
PKG_SOURCE_VERSION:=08cf6a9725b34c0421f2ee8f762aa1878b8cca1f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -70,6 +70,15 @@ define Package/bbfdmd/config
source "$(SOURCE)/Config_bbfdmd.in"
endef
# Below config is a hack to force-recompile dependent micro-services
define Package/libbbfdm-api/config
if PACKAGE_bbfdmd
config BBF_LIBBBFDM_VERSION
string "Internal config variable to force recompile"
default "v${PKG_VERSION}"
endif
endef
define Package/libbbfdm-api/description
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
endef
@@ -146,6 +155,10 @@ define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/ruleng.bbfdm $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/ruleng
$(INSTALL_BIN) ./files/etc/ruleng/bbfdm.json $(1)/etc/ruleng
endef
define Package/dm-service/install

View File

@@ -6,6 +6,7 @@ BBFDM_BASE_DM_PATH=/usr/share/bbfdm
BBFDM_INPUT_PATH=/etc/bbfdm/micro_services
BBFDM_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
PKG_CONFIG_DEPENDS += CONFIG_BBF_LIBBBFDM_VERSION
#BBFDM_VERSION:=$(shell grep -oP '(?<=^PKG_VERSION:=).*' ${BBFDM_DIR}/Makefile)
#BBFDM_TOOLS:=$(BUILD_DIR)/bbfdm-$(BBFDM_VERSION)/tools

View File

@@ -14,8 +14,6 @@
"firewall",
"network",
"dhcp",
"stunc",
"xmpp",
"wireless",
"time"
]

View File

@@ -1,7 +1,7 @@
config bbfdmd 'bbfdmd'
option enable '1'
option debug '0'
option loglevel '4'
option loglevel '3'
config micro_services 'micro_services'
option enable '1'

View File

@@ -0,0 +1,62 @@
{
"hosts_refresh": {
"if" : [
{
"event": "host"
}
],
"then" : [
{
"object": "bbfdm.hostmngr",
"method":"refresh_references_db",
"args" : {},
"timeout": 1
}
]
},
"dhcp_refresh": {
"if" : [
{
"event": "host"
}
],
"then" : [
{
"object": "bbfdm.dhcpmngr",
"method":"refresh_references_db",
"args" : {},
"timeout": 1
}
]
},
"ieee1905_refresh_add": {
"if" : [
{
"event": "ieee1905.neighbor.add"
}
],
"then" : [
{
"object": "bbfdm.ieee1905",
"method":"refresh_references_db",
"args" : {},
"timeout": 1
}
]
},
"ieee1905_refresh_del": {
"if" : [
{
"event": "ieee1905.neighbor.del"
}
],
"then" : [
{
"object": "bbfdm.ieee1905",
"method":"refresh_references_db",
"args" : {},
"timeout": 1
}
]
}
}

View File

@@ -51,10 +51,6 @@ parse_bbfdm_sysctl_conf_file() {
# Replace the original file with the modified content
mv "$tmpfile" "${bbfdm_sysctl_conf}"
# Apply the changes
uci commit network
sysctl -e -p "${bbfdm_sysctl_conf}" >&-
}
parse_bbfdm_sysctl_conf_file

View File

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

View File

@@ -12,6 +12,7 @@ DEST=""
VENDOR_EXTN=""
TOOLS="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
SRC=""
EXTRA_DATA=""
while getopts ":mpsdtv:" opt; do
case ${opt} in
@@ -46,6 +47,9 @@ shift
DEST="${1}"
shift
DATA="${1}"
shift
EXTRA_DATA="${1}"
install_bin() {
if ! install -m0755 ${1} ${2}; then
@@ -144,8 +148,9 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
exit 1
fi
if [ -z "${DATA}" ]; then
echo "# Package name not provided ...."
service_name="$(cat ${SRC}|jq -r '.daemon.service_name')"
if [ -z "${service_name}" ]; then
echo "# service_name not defined in service json ...."
exit 1
fi
@@ -156,7 +161,7 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
fi
install_dir ${DEST}/etc/bbfdm/services
install_data ${tempfile} ${DEST}/etc/bbfdm/services/${DATA}.json
install_data ${tempfile} ${DEST}/etc/bbfdm/services/${service_name}.json
if [ -f "${tempfile}" ]; then
rm ${tempfile}
@@ -176,7 +181,7 @@ if [ "${MICRO_SERVICE}" -eq "1" ]; then
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}.${extn##*.}
else
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(basename ${SRC})
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(printf "%02d" ${EXTRA_DATA})$(basename ${SRC})
fi
else
if [ "${PLUGIN}" -eq "1" ]; then

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.11
PKG_VERSION:=1.0.14
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:=18c2921a1cf5bfa027c11c5e6ca605ef69fd1168
PKG_SOURCE_VERSION:=99bc3a3a0a2571917eda7085c21952f779fdb471
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -59,8 +59,8 @@ define Package/bridgemngr/install
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME) 10
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME) 11
endif
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.19
PKG_VERSION:=2.1.20
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=628525b02ae9ccd39f4bc85cf616ed4a102bca48
PKG_SOURCE_VERSION:=a5e57962938ca143ede65d92be90b6e9fce66e15
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -3,11 +3,11 @@
"enable": "1",
"service_name": "bulkdata",
"unified_daemon": true,
"proto": "cwmp",
"services": [
{
"parent_dm": "Device.",
"object": "BulkData",
"proto": "cwmp"
"object": "BulkData"
}
],
"config": {

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ddnsmngr
PKG_VERSION:=1.0.10
PKG_VERSION:=1.0.11
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
PKG_SOURCE_VERSION:=5144e73fad92d23ae706894a4357436c3fe89355
PKG_SOURCE_VERSION:=9f2f4dabc71c4f405b1c5df576d20d793d299e94
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,22 +1,23 @@
#
# Copyright (C) 2021-2023 IOPSYS Software Solutions AB
# Copyright (C) 2021-2024 IOPSYS Software Solutions AB
# Copyright (C) 2025 Genexis AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.2.0.1
PKG_VERSION:=6.2.1.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=575ecfff3779aadcea83d890ba975109c0f7d6a3
PKG_SOURCE_VERSION:=40b6d6183a282bb8f48b3cf554691f54b5928ecf
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@genexis.eu>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.7.3
PKG_VERSION:=3.7.7
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=393dfd7637fdeccc24ef286c3daec9a232896b98
PKG_SOURCE_VERSION:=289a91b3e7f221f16c976efd147bd4b203420b41
PKG_MIRROR_HASH:=skip
endif
@@ -56,11 +56,14 @@ endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/etc/dspg
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/dectmngr
ifeq ($(CONFIG_TARGET_airoha),)
$(CP) ./firmware/common/* $(1)/etc/dspg/
endif
$(CP) ./files/etc/* $(1)/etc/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/dect $(1)/lib/upgrade/keep.d/dect
endef

View File

@@ -1,3 +1,6 @@
config dect 'global'
option log_dect_cmbs 'syslog'
option log_level 'realtime,warning,error'
option log_dect_cmbs 'syslog'
option log_level 'realtime,warning,error'
config dect 'base'
option enable '1'

View File

@@ -11,6 +11,25 @@ LOG_PATH=/var/log/dectmngr
DB_PATH=/etc/dect
DCX81_UART_DT_ALIAS=/proc/device-tree/aliases/dcx81-uart
get_extension_shift() {
local dect_exts
get_dect_extension() {
local ext=$1
local type
config_get type $ext type
[ "$type" == "dect" ] && echo $ext
}
config_load "asterisk"
dect_exts=$(config_foreach get_dect_extension "extension" |sort |head -n1)
echo "${dect_exts#extension}"
}
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
stop_and_wait_dectmngr() {
dect_pid=$(pidof $PROG)
@@ -38,13 +57,53 @@ get_dcx81_device() {
device_name_line="$(grep '^DEVNAME=' "$uevent_file")" || return 1
readonly device="/dev/${device_name_line##DEVNAME=}"
[ -c "$device" ] || return 1
printf "%s" "$device"
printf "%s" "$(basename $device)"
return 0
fi
done
return 1
}
check_dcx81_firmware() {
local dcx81_uart=$1
local fw_link="/lib/firmware/dcx81_firmware"
local fw_file
[ -L "$fw_link" ] || return
fw_file=$(readlink -f $fw_link)
[ -f "$fw_file" ] || return
# the symbolic link is not needed
rm -f $fw_link
eval $(/sbin/cmbs_tcx -comname "$dcx81_uart" -fw_version |grep DCX81_FW_Version)
[ -n "$DCX81_FW_Version" ] || return
if echo $(basename $fw_file) | grep -qi "$DCX81_FW_Version" ; then
logger -t "$PROG" "DCX81 running expected $DCX81_FW_Version"
return;
fi
logger -t "$PROG" "DCX81 firmware upgrading to $fw_file"
/sbin/cmbs_tcx -comname "$dcx81_uart" -fwu "$fw_file" 2>&1 >/dev/null &
echo -n "Updrading DCX81 firmware.." >/dev/console
local wait_time=0
while pidof cmbs_tcx >/dev/null && [ "$wait_time" -lt "200" ] ; do
sleep 5
wait_time=$(($wait_time + 5))
echo -n "." >/dev/console
done
if pidof cmbs_tcx >/dev/null ; then
killall -9 cmbs_tcx
logger -t "$PROG" "DCX81 firmware upgrade timeout"
else
logger -t "$PROG" "DCX81 firmware upgrade done"
fi
}
start_service() {
local opt_ext=
local rfpi=
@@ -59,9 +118,13 @@ start_service() {
local dcx81_uart_device
if ! dcx81_uart_device="$(get_dcx81_device)"; then
logger -t "$PROG" -p daemon.warning "Could not determine DCX81 UART device. Falling back to default ttyH0."
dcx81_uart_device=/dev/ttyH0
dcx81_uart_device="ttyH0"
fi
check_dcx81_firmware $dcx81_uart_device
opt_ext="-extensionShift $(get_extension_shift)"
rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
@@ -77,24 +140,27 @@ start_service() {
config_load dect
config_get log_dect_cmbs global log_dect_cmbs syslog
config_get pcm_slot_start global pcm_slot_start
config_get pcm_fsync global pcm_fsync
[ -n "$pcm_fsync" ] && opt_ext="$opt_ext -sync $pcm_fsync"
[ -n "$pcm_slot_start" ] && opt_ext="$opt_ext -slotsShift $pcm_slot_start"
procd_open_instance
# dectmngr takes expects device without /dev
readonly dcx81_uart_device_wo_dev="${dcx81_uart_device##/dev/}"
case "$log_dect_cmbs" in
none)
echo "Starting dectmngr with cmbs logging disabled"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" $opt_ext
procd_set_param command "$PROG" -comname "$dcx81_uart_device" $opt_ext
rm -f $LOG_PATH/*
;;
file)
echo "Starting dectmngr with cmbs logging enabled to file"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -log $LOG_PATH/dect-cmbs.log $opt_ext
procd_set_param command "$PROG" -comname "$dcx81_uart_device" -log $LOG_PATH/dect-cmbs.log $opt_ext
;;
*)
echo "Starting dectmngr with cmbs logging enabled to syslog"
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -syslog $opt_ext
procd_set_param command "$PROG" -comname "$dcx81_uart_device" -syslog $opt_ext
rm -f $LOG_PATH/*
;;
esac

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.5
PKG_VERSION:=1.0.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=2a517188211849bcc324a9f9727eeb34d076c032
PKG_SOURCE_VERSION:=986f66608959f4f589009d580b046e250d8c620d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -10,7 +10,6 @@ uci -q get dhcp.odhcpd >/dev/null 2>&1 && {
[ -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
}
}
}

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.15
PKG_VERSION:=1.0.17
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=32bd2501fca8a4f45ba13ee0e4762756c60fe721
PKG_SOURCE_VERSION:=2ceb76e98cf23a8d52ab3f464d38d62385311a87
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -72,7 +72,7 @@ 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)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libdns_sd.so $(1) $(PKG_NAME) 10
endif
endef

View File

@@ -5,14 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=3.0.5
PKG_VERSION:=3.0.7
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=01e1c5f6642a8fa79fc445c71558ad02bda40eb5
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_SOURCE_VERSION:=171cf63d972c6fa81b97281531e457a0967c16c7
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif

View File

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

View File

@@ -0,0 +1,23 @@
{
"ethport_update": {
"if" : [
{
"event": "network.device",
"match": {
"wireless": false
}
}
],
"then" : [
{
"cli": "/sbin/hotplug-call ethernet",
"envs": {
"PORT": "&network.device->ifname",
"LINK": "&network.device->link"
},
"timeout": 1
}
]
}
}

View File

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

View File

@@ -7,7 +7,11 @@ USE_PROCD=1
. /lib/port-trigger/port_trigger.sh
start_service() {
port_trigger_handling
port_trigger_add
}
stop_service() {
port_trigger_clean
}
service_triggers()
@@ -17,5 +21,6 @@ service_triggers()
}
reload_service() {
stop
start
}

View File

@@ -119,18 +119,12 @@ process_port_trigger() {
fi
}
port_trigger_handling() {
port_trigger_add() {
rm /tmp/port_trigger_iptables 2> /dev/null
rm /tmp/port_trigger_ip6tables 2> /dev/null
touch /tmp/port_trigger_iptables
touch /tmp/port_trigger_ip6tables
echo "iptables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t nat -F prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "ip6tables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
echo "ip6tables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
echo "iptables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
ret=$?
[ $ret -eq 0 ] && echo "iptables -w -t nat -I PREROUTING -j prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
@@ -139,7 +133,7 @@ port_trigger_handling() {
[ $ret -eq 0 ] && echo "iptables -w -t filter -I forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "iptables -w -t nat -N prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
ret=$?
[ $ret -eq 0 ] && echo "iptables -w -t nat -I prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
[ $ret -eq 0 ] && echo "iptables -w -t nat -A prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
echo "ip6tables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
ret=$?
@@ -155,3 +149,21 @@ port_trigger_handling() {
sh /tmp/port_trigger_iptables
sh /tmp/port_trigger_ip6tables
}
port_trigger_clean() {
iptables -w -t nat -D PREROUTING -j prerouting_porttrigger 2> /dev/null
iptables -w -t nat -F prerouting_porttrigger 2> /dev/null
iptables -w -t nat -X prerouting_porttrigger 2> /dev/null
iptables -w -t nat -D prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null
iptables -w -t nat -F prerouting_wan_porttrigger 2> /dev/null
iptables -w -t nat -X prerouting_wan_porttrigger 2> /dev/null
iptables -w -t filter -D forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null
iptables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null
iptables -w -t filter -X forwarding_wan_porttrigger 2> /dev/null
ip6tables -w -t nat -D PREROUTING -j prerouting_porttrigger 2> /dev/null
ip6tables -w -t nat -F prerouting_porttrigger 2> /dev/null
ip6tables -w -t nat -X prerouting_porttrigger 2> /dev/null
ip6tables -w -t filter -D forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null
ip6tables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null
ip6tables -w -t filter -X forwarding_wan_porttrigger 2> /dev/null
}

5
fluent-bit/Config.in Normal file
View File

@@ -0,0 +1,5 @@
config FLUENT_BIT_SYSLOG_PREPEND_LENGTH
bool "Enable syslog length prefix (RFC5424)"
default y
help
If enabled, prepends the byte-length of the syslog message to the message output.

View File

@@ -1,18 +1,19 @@
#
# Copyright (C) 2024 IOPSYS
# Copyright (C) 2024-2025 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=fluent-bit
PKG_VERSION:=3.1.0
PKG_VERSION:=4.0.2
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
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit/archive/refs/tags/
PKG_HASH:=aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08
endif
PKG_LICENSE:=Apache-2.0
@@ -23,7 +24,7 @@ include $(INCLUDE_DIR)/cmake.mk
define Package/fluent-bit
CATEGORY:=Utilities
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison +libstdcpp +@OPENSSL_WITH_NPN
TITLE:=Fluent-Bit
URL:=https://fluentbit.io/
endef
@@ -32,6 +33,10 @@ define Package/fluent-bit/description
Fluent Bit is a super fast, lightweight, and highly scalable logging and metrics processor and forwarder.
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./fluent-bit/* $(PKG_BUILD_DIR)/
@@ -45,16 +50,23 @@ CMAKE_OPTIONS+= \
-DFLB_RELEASE=Yes \
-DFLB_SMALL=No \
-DEXCLUDE_FROM_ALL=true \
-DFLB_SHARED_LIBS=Yes \
-DFLB_SHARED_LIB=Yes \
-DFLB_DEBUG=Yes \
-DFLB_ALL=No \
-DFLB_JEMALLOC=No \
-DFLB_EXAMPLES=No \
-DFLB_CHUNK_TRACE=No \
-DFLB_BACKTRACE=No \
-DFLB_KAFKA=No \
-DFLB_WASM=No \
-DFLB_LUAJIT=No
ifeq ($(CONFIG_FLUENT_BIT_SYSLOG_PREPEND_LENGTH),y)
CMAKE_OPTIONS += -DFLUENT_BIT_SYSLOG_PREPEND_LENGTH=Yes
else
CMAKE_OPTIONS += -DFLUENT_BIT_SYSLOG_PREPEND_LENGTH=No
endif
# In plugins
CMAKE_OPTIONS += \
-DFLB_IN_SYSLOG=Yes \
@@ -100,7 +112,7 @@ CMAKE_OPTIONS += \
# Filter options
CMAKE_OPTIONS +=
CMAKE_OPTIONS += \
-DFLB_FILTER_AWS=No \
-DFLB_FILTER_ECS=No \
-DFLB_FILTER_KUBERNETES=No \
@@ -138,6 +150,7 @@ CMAKE_OPTIONS += \
-DFLB_OUT_ES=No \
-DFLB_OUT_GELF=No \
-DFLB_OUT_INFLUXDB=No \
-DFLB_OUT_KAFKA=No \
-DFLB_OUT_NRLOGS=No \
-DFLB_OUT_OPENSEARCH=No \
-DFLB_OUT_TD=No \
@@ -167,6 +180,7 @@ CMAKE_OPTIONS += \
define Package/fluent-bit/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/fluent-bit
$(INSTALL_DIR) $(1)/etc/fluent-bit/conf.d
$(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

View File

@@ -0,0 +1,71 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72b950e7b..58e76b349 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -205,6 +205,9 @@ option(FLB_CUSTOM_CALYPTIA "Enable Calyptia Support" Yes)
# Config formats
option(FLB_CONFIG_YAML "Enable YAML config format" Yes)
+# out syslog message format
+option(FLUENT_BIT_SYSLOG_PREPEND_LENGTH "Enable prepending of length to syslog message" Yes)
+
# List of plugins available and defaults for each option
include(cmake/plugins_options.cmake)
diff --git a/plugins/out_syslog/CMakeLists.txt b/plugins/out_syslog/CMakeLists.txt
index 556d8e1a4..a848020e9 100644
--- a/plugins/out_syslog/CMakeLists.txt
+++ b/plugins/out_syslog/CMakeLists.txt
@@ -1,3 +1,7 @@
+if(FLUENT_BIT_SYSLOG_PREPEND_LENGTH)
+ add_definitions(-DFLUENT_BIT_SYSLOG_PREPEND_LENGTH)
+endif()
+
set(src
syslog.c
syslog_conf.c)
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
index 4ecc7c4ac..f85c38b51 100644
--- a/plugins/out_syslog/syslog.c
+++ b/plugins/out_syslog/syslog.c
@@ -156,7 +156,7 @@ static flb_sds_t syslog_rfc5424(flb_sds_t *s, struct flb_time *tms,
return NULL;
}
*s = tmp;
- return *s;
+ goto finalize;
}
prival = (msg->facility << 3) + msg->severity;
@@ -291,6 +291,31 @@ static flb_sds_t syslog_rfc5424(flb_sds_t *s, struct flb_time *tms,
*s = tmp;
}
+finalize:
+#ifdef FLUENT_BIT_SYSLOG_PREPEND_LENGTH
+ // Create new SDS with length prefix
+ // Allocate enough space for "%u "
+ flb_sds_t prefix = flb_sds_create_size(32);
+ if (!prefix) {
+ return NULL;
+ }
+
+ unsigned int msg_len = flb_sds_len(*s);
+ prefix = flb_sds_printf(&prefix, "%u ", msg_len);
+ if (!prefix) {
+ return NULL;
+ }
+
+ flb_sds_t new_s = flb_sds_cat(prefix, *s, msg_len);
+ if (!new_s) {
+ flb_sds_destroy(prefix);
+ return NULL;
+ }
+
+ flb_sds_destroy(*s);
+ *s = new_s;
+#endif
+
return *s;
}

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=gateway-info
PKG_VERSION:=1.0.0
PKG_VERSION:=1.0.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/gateway-info.git
PKG_SOURCE_VERSION:=26e407a25b156da75e3941d54ddd74294cd9eae8
PKG_SOURCE_VERSION:=dd15893a8291e556a8c49ff9e143c763db0379b5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,8 +28,8 @@ include ../bbfdm/bbfdm.mk
define Package/gateway-info
CATEGORY:=Utilities
TITLE:=GatewayInfo Data Model Support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +umdns
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +iputils-arping
endef
define Package/gateway-info/description

View File

@@ -1,3 +1,4 @@
config global 'global'
option enable '1'
option wan_interface 'wan'
option lan_interface 'lan'

View File

@@ -210,7 +210,6 @@ enable_dhcp_option125() {
local newsendopts=""
local req125_present=0
local send125_present=0
local network_uci_update=0
local opt125="125:"
for ropt in $reqopts; do
@@ -231,18 +230,12 @@ enable_dhcp_option125() {
if [ ${req125_present} -eq 0 ]; then
newreqopts="$reqopts 125"
uci -q set network."${wan}".reqopts="$newreqopts"
network_uci_update=1
fi
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "${sendopts}" "${wan}" "network"
network_uci_update=1
fi
fi
if [ ${network_uci_update} -eq 1 ]; then
uci commit network
fi
}
enable_dnsmasq_option125() {
@@ -266,7 +259,6 @@ enable_dnsmasq_option125() {
if [ ${send125_present} -eq 0 ]; then
uci -q del_list dhcp."${lan}".dhcp_option="${base_opt}"
configure_send_op125 "${base_opt}" "${lan}" "dhcp"
uci commit dhcp
fi
fi
}
@@ -276,9 +268,14 @@ configure_gateway_device_info() {
lan_intf=""
config_load gateway
config_get_bool enable global enable '1'
config_get wan_intf global wan_interface "wan"
config_get lan_intf global lan_interface "lan"
if [ "${enable}" -eq 0 ]; then
return 0
fi
# Set dhcp_option 125 for device info if not already configured
enable_dhcp_option125 "${wan_intf}"

View File

@@ -1,10 +1,13 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
CLASS=""
OUI=""
SERIAL=""
GW_DISCOVERED=0
_json_no_warning=1
get_vivsoi() {
# opt125 environment variable has data in below format
@@ -86,11 +89,17 @@ get_vivsoi() {
# assign the value found in sub option
case "${sub_opt_id}" in
"4") OUI=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"4")
OUI=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
"5") SERIAL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"5")
SERIAL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
"6") CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"6")
CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
esac
@@ -110,15 +119,192 @@ get_vivsoi() {
done
}
send_host_query() {
intf="${1}"
resp=1
loop=3
usp_serv_found=0
sent_host=" "
ubus call umdns update
while [ "${loop}" -ne 0 ]; do
sleep 5
json_load "$(ubus call umdns browse)"
json_select discovered_services
if [ "${?}" -ne 0 ]; then
json_cleanup
loop=$(( loop - 1 ))
continue
fi
json_select _usp-agt-mqtt._tcp
if [ "${?}" -ne 0 ]; then
json_cleanup
loop=$(( loop - 1 ))
continue
fi
usp_serv_found=1
break
done
if [ "${usp_serv_found}" -eq 0 ]; then
echo "${resp}"
return 0
fi
json_get_keys keys
for key in $keys; do
json_select $key
json_get_var _host host ""
if [ -z "${_host}" ] || [[ "${sent_host}" =~ " ${_host}" ]]; then
json_select ..
continue
fi
sent_host="${sent_host} ${_host}"
cmd="ubus call umdns query '{\"question\":\"$_host\",\"interface\":\"$intf\"}'"
eval $cmd
resp=0
json_select ..
done
json_cleanup
echo "${resp}"
}
get_usp_agent_id() {
dhcp_ip="${1}"
family="ipv4"
ID=""
if [[ "${dhcp_ip}" =~ ":" ]]; then
family="ipv6"
fi
json_load "$(ubus call umdns browse)"
json_select discovered_services
if [ "${?}" -ne 0 ]; then
json_cleanup
echo ${ID}
return 0
fi
json_select _usp-agt-mqtt._tcp
if [ "${?}" -ne 0 ]; then
json_cleanup
echo ${ID}
return 0
fi
json_get_keys keys
for key in $keys; do
json_select $key
json_select $family
if [ "${?}" -ne 0 ]; then
json_select ..
continue
fi
json_get_keys ips
for ip in $ips; do
json_get_var ip_val $ip
if [ "${ip_val}" != "${dhcp_ip}" ]; then
continue
fi
json_select ..
json_select txt
json_get_keys txts
for _txt in $txts; do
json_get_var text_val $_txt
if [[ "${text_val:0:3}" == "ID=" ]]; then
ID="${text_val:3}"
break
fi
done
break
done
json_select ..
json_select ..
if [ -n "${ID}" ]; then
break
fi
done
json_cleanup
echo ${ID}
}
get_mac_address() {
ip="${1}"
device="${2}"
mac="$(cat /proc/net/arp | grep $ip | awk '{print $4}')"
if [ -z "${mac}" ]; then
arp_resp="$(arping -b -f -c 5 -I $device $ip | grep 'Unicast reply from' | awk '{print $5}')"
if [ -n "${arp_resp}" ]; then
mac=${arp_resp:1:-1}
fi
fi
echo "${mac}"
}
send_unknown_gw_event() {
mac="${1}"
cmd="ubus -t 5 send gateway-info.gateway.unknown '{\"hwaddr\":\"$mac\"}'"
eval $cmd
}
send_cwmp_gw_event() {
oui="${1}"
class="${2}"
serial="${3}"
cmd="ubus -t 5 send gateway-info.gateway.cwmp '{\"oui\":\"$oui\",\"class\":\"$class\",\"serial\":\"$serial\"}'"
eval $cmd
}
send_usp_gw_event() {
endpoint="${1}"
cmd="ubus -t 5 send gateway-info.gateway.usp '{\"endpoint\":\"$endpoint\"}'"
eval $cmd
}
config_load gateway
config_get_bool enable global enable '1'
config_get wan_intf global wan_interface "wan"
if [ "${enable}" -eq 0 ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt125" ]; then
len=$(printf "$opt125"|wc -c)
get_vivsoi "$opt125" "$len"
if [ "${1}" == "deconfig" ]; then
rm -rf /var/state/gwinfo
return 0
fi
json_load "$(ifstatus ${INTERFACE})"
json_get_var dev_name device ""
json_select data
json_get_var dhcp_ip dhcpserver ""
json_cleanup
if [ -z "${dhcp_ip}" ] || [ -z "${dev_name}" ]; then
return 0
fi
MAC="$(get_mac_address $dhcp_ip $dev_name)"
mkdir -p /var/state
touch /var/state/gwinfo
sec=$(uci -q -c /var/state get gwinfo.gatewayinfo)
@@ -127,8 +313,55 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
uci -q -c /var/state rename gwinfo."${sec}"="gatewayinfo"
fi
uci -q -c /var/state set gwinfo.gatewayinfo.hwaddr="$MAC"
uci -q -c /var/state set gwinfo.gatewayinfo.endpoint=""
uci -q -c /var/state set gwinfo.gatewayinfo.class=""
uci -q -c /var/state set gwinfo.gatewayinfo.oui=""
uci -q -c /var/state set gwinfo.gatewayinfo.serial=""
uci -q -c /var/state set gwinfo.gatewayinfo.proto=""
uci -q -c /var/state commit gwinfo
if [ -z "$opt125" ]; then
send_unknown_gw_event "${MAC}"
return 0
fi
len=$(printf "$opt125"|wc -c)
get_vivsoi "$opt125" "$len"
if [ "${GW_DISCOVERED}" -eq 0 ]; then
send_unknown_gw_event "${MAC}"
return 0
fi
uci -q -c /var/state set gwinfo.gatewayinfo.class="$CLASS"
uci -q -c /var/state set gwinfo.gatewayinfo.oui="$OUI"
uci -q -c /var/state set gwinfo.gatewayinfo.serial="$SERIAL"
uci -q -c /var/state set gwinfo.gatewayinfo.proto="CWMP"
uci -q -c /var/state commit gwinfo
# Check for USP parameters
ubus -t 15 wait_for umdns
if [ "${?}" -ne 0 ]; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0
fi
resp=$(send_host_query $dev_name)
if [ "${resp}" -ne 0 ]; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0
fi
ID="$(get_usp_agent_id $dhcp_ip)"
if [ -z "${ID}" ]; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0
fi
uci -q -c /var/state set gwinfo.gatewayinfo.endpoint="$ID"
uci -q -c /var/state set gwinfo.gatewayinfo.proto="USP"
uci -q -c /var/state commit gwinfo
send_usp_gw_event "${ID}"
fi

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.2.15
PKG_VERSION:=1.2.20
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3b50823da3f2904191332634c1e45d46090def1d
PKG_SOURCE_VERSION:=3948618fa8fa23a0ddc51632b0036dbd08e27696
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
@@ -77,7 +77,7 @@ define Package/hostmngr/install
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1) $(PKG_NAME)
ifeq ($(CONFIG_HOSTMNGR_DATAMODEL_EXT),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostext.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostext.so $(1) $(PKG_NAME) 10
endif
endef

View File

@@ -7,4 +7,16 @@ config ICWMP_MGMT_FROM_USP
config ICWMP_BACKUP_EVENTS
bool "Create backup of session events to persistent storage after each successful session"
default y
config ICWMP_ENABLE_VENDOR_EXTN
bool "Enable datamodel vendor extension"
default y
config ICWMP_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
config ICWMP_ENABLE_SMM_SUPPORT
bool "Enable software module management support"
default n
endmenu

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.8.33
PKG_VERSION:=9.9.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=6e80cefd0056f2d13122ad22b73895ea7fb5e438
PKG_SOURCE_VERSION:=5dba542b280495730176da468bc45ed5dcc8c94e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -52,6 +52,21 @@ ifeq ($(CONFIG_ICWMP_BACKUP_EVENTS),y)
EXTRA_CFLAGS += -DPERSIST_BACKUP_SESSION_EVENTS
endif
ifeq ($(CONFIG_ICWMP_ENABLE_VENDOR_EXTN),y)
EXTRA_CFLAGS += -DICWMP_ENABLE_VENDOR_EXTN
endif
ifeq ($(CONFIG_ICWMP_ENABLE_SMM_SUPPORT),y)
EXTRA_CFLAGS += -DICWMP_ENABLE_SMM_SUPPORT
endif
ifeq ($(CONFIG_ICWMP_VENDOR_PREFIX),"")
CMAKE_OPTIONS += -DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)"
else
CMAKE_OPTIONS += -DBBF_VENDOR_PREFIX:String="$(CONFIG_ICWMP_VENDOR_PREFIX)"
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
@@ -72,13 +87,14 @@ define Package/icwmp/install
$(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/uci-defaults/85-migrate-gw-info $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libcwmpdm.so $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME) 20
endef
$(eval $(call BuildPackage,icwmp))

View File

@@ -15,7 +15,8 @@
},
{
"parent_dm": "Device.",
"object": "XMPP"
"object": "XMPP",
"proto": "cwmp"
}
],
"config": {

View File

@@ -1,6 +1,6 @@
config acs 'acs'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option passwd ''
option periodic_inform_enable 'true'
option periodic_inform_interval '1800'
option periodic_inform_time '0001-01-01T00:00:00Z'
@@ -14,11 +14,14 @@ config acs 'acs'
option retry_interval_multiplier '2000'
option skip_dhcp_boot_options '0'
option insecure_enable '0'
option get_rpc_methods '0'
config cpe 'cpe'
option enable '1'
option default_wan_interface 'wan'
option default_lan_interface 'lan'
#option client_cert_path '/etc/icwmpd/client.pem'
#option client_key_path '/etc/icwmpd/client.key'
option log_to_console 'disable'
option log_to_file 'disable'
# log_severity possible configs: EMERG, ALERT, CRITIC ,ERROR, WARNING, NOTICE, INFO, DEBUG
@@ -26,7 +29,7 @@ config cpe 'cpe'
option log_file_name '/var/log/icwmpd.log'
option log_max_size '102400'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option passwd ''
option port '7547'
option provisioning_code ''
option amd_version '5'
@@ -39,10 +42,10 @@ config cpe 'cpe'
option periodic_notify_interval '10'
option incoming_rule 'Port_Only'
option active_notif_throttle '0'
option disable_gatewayinfo '0'
option fw_upgrade_keep_settings '1'
option clock_sync_timeout '128'
option disable_datatype_check '0'
#list allowed_cr_ip '10.5.1.0/24'
config lwn 'lwn'
option enable '0'

View File

@@ -6,19 +6,24 @@ log() {
}
get_firewall_zone() {
zone="$(uci show firewall|grep network|grep -w ${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"
}
cleanup_exiting_rules() {
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
cleanup_upstream_rules() {
if [ -z "${1}" ]; then
log "Rule can not be cleaned without zone name"
return
fi
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
rule_num="$(iptables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Open_ACS_port" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
iptables -w 1 -D zone_"${1}"_input "${rule_num}";
fi
done
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
rule_num="$(ip6tables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Open_ACS_port" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
ip6tables -w 1 -D zone_"${1}"_input "${rule_num}";
@@ -26,76 +31,142 @@ cleanup_exiting_rules() {
done
}
enable="$(uci -q get cwmp.cpe.enable)"
enable="${enable:-1}"
if [ "$enable" -eq 0 ]; then
log "CWMP not enabled"
exit 0;
fi
wan="$(uci -q get cwmp.cpe.default_wan_interface)"
wan="${wan:-wan}"
zone_name="$(get_firewall_zone $wan)"
port=$(uci -q get cwmp.cpe.port)
port="${port:-7547}"
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|awk '{print tolower($0)}')
incoming_rule="${incoming_rule:-port_only}"
ipaddr=$(uci -c /var/state -q get icwmp.acs.ip)
ip6addr=$(uci -c /var/state -q get icwmp.acs.ip6)
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp"
cmd6="ip6tables -w 1 -I zone_${zone_name}_input -p tcp"
# default incoming rule is Port only
if [ "${incoming_rule}" = "ip_only" ]; then
if [ -n "${ipaddr}" ]; then
cmd="${cmd} -s ${ipaddr}"
fi
if [ -n "${ip6addr}" ]; then
cmd6="${cmd6} -s ${ip6addr}"
fi
elif [ "${incoming_rule}" = "port_only" ]; then
if [ -n "${port}" ]; then
cmd="${cmd} --dport ${port}"
cmd6="${cmd6} --dport ${port}"
fi
else
if [ -n "${ipaddr}" ]; then
cmd="${cmd} -s ${ipaddr}"
cleanup_downstream_rules() {
if [ -z "${1}" ]; then
log "Rule can not be cleaned without zone name"
return
fi
if [ -n "${ip6addr}" ]; then
cmd6="${cmd6} -s ${ip6addr}"
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Close_ACS_port"; do
rule_num="$(iptables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Close_ACS_port" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
iptables -w 1 -D zone_"${1}"_input "${rule_num}";
fi
done
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Close_ACS_port"; do
rule_num="$(ip6tables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Close_ACS_port" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
ip6tables -w 1 -D zone_"${1}"_input "${rule_num}";
fi
done
}
close_downstream_acs_port() {
lan="${1}"
port="${2}"
zone_name="$(get_firewall_zone $lan)"
if [ -z "${zone_name}" ]; then
log "Rule can not be added without zone name"
return
fi
if [ -n "${port}" ]; then
cmd="${cmd} --dport ${port}"
cmd6="${cmd6} --dport ${port}"
fi
fi
cleanup_exiting_rules "${zone_name}"
echo "${cmd}"|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp --dport ${port} -j DROP -m comment --comment=Close_ACS_port"
${cmd}
log "Applied [${cmd}]"
fi
echo "${cmd6}"|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd6}
log "Applied [${cmd6}]"
fi
cmd="ip6tables -w 1 -I zone_${zone_name}_input -p tcp --dport ${port} -j DROP -m comment --comment=Close_ACS_port"
${cmd}
log "Applied [${cmd}]"
}
if [ -f "/var/state/icwmp" ]; then
uci -c /var/state -q set icwmp.cpe.firewall_restart="init"
uci -c /var/state -q commit icwmp
fi
add_firewall_rule() {
version="${1}"
ipaddr="${2}"
port="${3}"
zone_name="${4}"
cmd=""
if [ -z "${zone_name}" ]; then
log "Rule can not be added without zone name"
return
fi
if [ "${version}" = "ipv6" ]; then
cmd="ip6tables -w 1 -I zone_${zone_name}_input -p tcp"
else
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp"
fi
if [ -n "${ipaddr}" ]; then
cmd="${cmd} -s ${ipaddr}"
fi
if [ -n "${port}" ]; then
cmd="${cmd} --dport ${port}"
fi
if echo "${cmd}"|grep -q "\-\-dport \|\-s "; then
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd}
log "Applied [${cmd}]"
fi
}
configure_connection_req_rules() {
app="${1}"
wan="$(uci -q get cwmp.cpe.default_wan_interface)"
wan="${wan:-wan}"
wan_zone_name="$(get_firewall_zone $wan)"
cleanup_upstream_rules "${wan_zone_name}"
lan="$(uci -q get cwmp.cpe.default_lan_interface)"
lan="${lan:-lan}"
if [ "${lan}" != "${wan}" ]; then
lan_zone_name="$(get_firewall_zone $lan)"
cleanup_downstream_rules "${lan_zone_name}"
fi
enable="$(uci -q get cwmp.cpe.enable)"
enable="${enable:-1}"
if [ "$enable" -eq 0 ]; then
exit 0
fi
url="$(uci -q get cwmp.acs.url)"
if [ -z "${url}" ]; then
url="$(uci -q get cwmp.acs.dhcp_url)"
fi
# no need to apply firewall rule, acs url not configured
if [ -z "${url}" ]; then
exit 0
fi
if [ -z "${app}" ]; then
if ! ubus -t 1 list tr069 2>/dev/null; then
log "cwmp client not running"
exit 0
fi
fi
port=$(uci -q get cwmp.cpe.port)
port="${port:-7547}"
ipaddr=$(uci -q get cwmp.cpe.allowed_cr_ip)
if [ -n "${ipaddr}" ]; then
for ip in $ipaddr; do
if echo "${ip}" | grep -q ":"; then
add_firewall_rule "ipv6" "${ip}" "${port}" "${wan_zone_name}"
else
add_firewall_rule "ipv4" "${ip}" "${port}" "${wan_zone_name}"
fi
done
else
# Port-only
add_firewall_rule "ipv6" "" "${port}" "${wan_zone_name}"
add_firewall_rule "ipv4" "" "${port}" "${wan_zone_name}"
fi
if [ "${lan}" != "${wan}" ]; then
# Close the ACS port at Lan side
close_downstream_acs_port "${lan}" "${port}"
fi
}
configure_connection_req_rules "$@"

View File

@@ -263,7 +263,14 @@ start_service() {
stop_service()
{
local switch_bank
copy_cwmp_varstate_files_to_etc
switch_bank=$(uci -q -c /var/state/ get icwmp.cpe.switch_bank)
if [ -n "$switch_bank" ] && [ "$switch_bank" = "1" ]; then
[ -x /etc/sysmngr/fwbank ] && /etc/sysmngr/fwbank call copy_config
fi
}
reload_service() {

View File

@@ -4,6 +4,10 @@
# Copy defaults by the factory to the cwmp UCI user section.
config_load cwmp
if [ -f "/lib/functions/iopsys-environment.sh" ]; then
. /lib/functions/iopsys-environment.sh
fi
# Get Manufacturer OUI.
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
@@ -38,4 +42,14 @@ if [ -z "${enable_cwmp}" ]; then
uci -q set cwmp.cpe.enable="1"
fi
default_password="$(get_acs_password)"
config_get pass cpe passwd ""
if [ -z "${pass}" ]; then
uci -q set cwmp.cpe.passwd="${default_password:-iopsys}"
fi
config_get pass acs passwd ""
if [ -z "${pass}" ]; then
uci -q set cwmp.acs.passwd="${default_password:-iopsys}"
fi
# No need for commit here, it is done by uci_apply_defaults().

View File

@@ -0,0 +1,14 @@
#!/bin/sh
# Script to migrate gateway-info options to gateway uci
if [ ! -f "/etc/config/cwmp" ] && [ ! -f "/etc/config/gateway" ]; then
exit 0
fi
val="$(uci -q get cwmp.cpe.disable_gatewayinfo)"
if [ -n "$val" ] && [ "$val" -eq 1 ]; then
uci -q set gateway.global.enable=0
fi
uci -q set cwmp.cpe.disable_gatewayinfo=""

View File

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

View File

@@ -18,5 +18,3 @@ mac=$(uci -q get ieee1905.ieee1905.macaddress)
[ "$mac" != "" ] && exit 0
uci set ieee1905.ieee1905.macaddress="$LMAC"
uci commit ieee1905

View File

@@ -0,0 +1,13 @@
#!/bin/sh
. /etc/os-release
set_val() {
uci -q get "$1" > /dev/null || uci set "${1}=${2:-${3}}"
}
set_val ieee1905.ieee1905.manufacturer "$OPENWRT_DEVICE_MANUFACTURER" IOPSYS
set_val ieee1905.ieee1905.model_name "$(cat /tmp/sysinfo/model)" 1905-SampleDev
set_val ieee1905.ieee1905.device_name "$NAME" 1905Device
exit 0

View File

@@ -31,7 +31,7 @@ define Package/$(PKG_NAME)
+@PACKAGE_COLLECTD_ENCRYPTED_NETWORK \
# remote syslog
DEPENDS+= \
+syslog-ng \
+@FLUENT_BIT_SYSLOG_PREPEND_LENGTH \
+@SYSLOGNG_LOGROTATE \
endef
@@ -44,7 +44,12 @@ endef
Build/Compile=
define Package/$(PKG_NAME)/install
$(CP) -r $(PKG_BUILD_DIR)/files/* $(1)/
$(CP) -r ./files/common/* $(1)/
ifneq ($(CONFIG_PACKAGE_fluent-bit),)
$(CP) -r ./files/fluent-bit/* $(1)/
else
$(CP) -r ./files/syslog-ng/* $(1)/
endif
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -0,0 +1,19 @@
-----BEGIN CERTIFICATE-----
MIIDJTCCAg0CAQEwDQYJKoZIhvcNAQELBQAwRTELMAkGA1UEBhMCU0UxEzARBgNV
BAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0IFdpZGdpdHMgUHR5IEx0
ZDAeFw0yMjExMjIxMjM1MDNaFw0zMjExMTkxMjM1MDNaMGwxCzAJBgNVBAYTAlVT
MREwDwYDVQQIDAhJbnRlcm5ldDEMMAoGA1UEBwwDRFVUMQwwCgYDVQQKDAMuLi4x
DDAKBgNVBAsMAy4uLjEMMAoGA1UEAwwDLi4uMRIwEAYJKoZIhvcNAQkBFgMuLi4w
ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDleMMuJ8AO1DeRmOyE2k2D
DWUKB4yiRQhKxnRyRcF1s+mHcySS1NRlLwyZUuOFvBYHUhE3AfNMN5ywKazl4FwG
MNtx0iUfHmHc0MQ04KZk1ifkS5WPUMksEJDQyM06ZH3gcIhGDlSkprnMsp9q5HlG
umopBlihLTI+WM+8kliFbT7iOICDi9qRHPS+WTT/RClX12ISAejVFMFdpf8aQOGn
klu7mcGyOBij0axcfd2QlHybvkSSksvny19I1/Be7MdtO3fxJODuUy8sHd9HqaOJ
TbjcwWNWFJIR4+Gsz2DeqIPxpaqUjEZgJfUD5FSTOL3ZgtjMmzjYZj8IEf5BD7st
AgMBAAEwDQYJKoZIhvcNAQELBQADggEBAK+WvRYkkM+11ljo1pKwyTtcyz9fiQ9Z
zGAed6UViEPhJNIchFEFukMMqNaWL3Pi0MkvkAiJvyJbGW0YiPm7r0sf2sOD4PPI
UqDskApA9P1aL1uF/CBvP7kViVVVcNDSHq+Hc+6Jrg+Ufycq2kE9KrU/zI2Z0kEd
70k+YNLWTZNjekXfrxlniw7ycmALJuYkw1GXSZ4pph+VXYPJ7c/sm4J3MKDXonTQ
tEI4wTTkfOHUBDppNX/b9gw0A4jL5nAga/6Q2PPNoaTrgLZS0o03GO3HES24iHlG
TBrIW9q2HRcDOfj5oNaoSasOyARFT0owJdcBFlzp7Pe1lMN+bRLz5h0=
-----END CERTIFICATE-----

View File

@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDleMMuJ8AO1DeR
mOyE2k2DDWUKB4yiRQhKxnRyRcF1s+mHcySS1NRlLwyZUuOFvBYHUhE3AfNMN5yw
Kazl4FwGMNtx0iUfHmHc0MQ04KZk1ifkS5WPUMksEJDQyM06ZH3gcIhGDlSkprnM
sp9q5HlGumopBlihLTI+WM+8kliFbT7iOICDi9qRHPS+WTT/RClX12ISAejVFMFd
pf8aQOGnklu7mcGyOBij0axcfd2QlHybvkSSksvny19I1/Be7MdtO3fxJODuUy8s
Hd9HqaOJTbjcwWNWFJIR4+Gsz2DeqIPxpaqUjEZgJfUD5FSTOL3ZgtjMmzjYZj8I
Ef5BD7stAgMBAAECggEATmdMiOCcBnUL53tQlLPh9/0DoMGjk23yv1m/P6wFxamL
CPSWcnS1fTzuGRTxGCiDfkzUBO9tqYT2zFnw8ToPNy5KTEF43YEL/t51q3t2Xs2t
I5uPpj/7/EpMsIlrVaAwQhcw+H68/OTaZs5BGcymgzv+ObYpYiiHGjZOBCgchrl+
/FyUyrS1M11VcamJ8H6GqNDEy5zvwOX3VjIwHvbONrN6zjNvMRIMzCQC59hEeBDG
j6AYMw2/UJ4sPLpmqObnPvYO4D6qsEuKxQDGFwaPGSulOs5+OHMqTcTLRtktR5qJ
Mjq5C2axy3TvxpbZ5Ou2jRB/zaXWNkK26UP5Iv2MAQKBgQD/4J5lcFBkrZArR5XL
FiAfN4yfBAPcveRP7Zgqb7nlLzzouqz7vyH8Hhnk+XbA9CiKVOMc2Fbe82/exuft
DvsoW5+Ds31SU52q5vWjtnPXeuK0kT6lm+qBbtmsFSAnfCRZUQcF8PhERLfzOEA6
Uln0xr2EFR3D/UaBjsN3aTKMzQKBgQDllOe+QAf4CZGgCyAF1DDakuZF+iAfsCNz
83dlb6N2ggJinOLs3ExfT0oJSUp4KPAIOQ+QgY01Itk0py2HEfYCgvXim7RrZ1P7
5Sx++fi48ar3aqgLqg0hur0Yd1kFPjVRWj2/jM6qvLC8nEehNQH1VOh847FcwTrY
UWWMKOnn4QKBgFnApE7Ykpp99u/3cCeIX0QT7BNrCR/Iy+jtYk6gWgh2BVts/3he
lsEkndifWHReMEo1dGSNzgruQPNXucqBUr/ZQ56iuvbBtbBYyxjdysxuok7ME7lr
c1prU5b04g53kRhzP49p8uufXxbFSGIsuLkPbTKDZal1keGn/hBIqh6RAoGAT9pS
HMdSvkA9yaf09HIQqAXOWGqef8cZHbyCO+LvvUmNINWmzHH3knMWslIut8qtan7G
XiHhhqjfWcQIPuHNaqQ4eCBmSbE/8e6NYoD5tQJB0Brl5mC4fpHgMcFZUkyH6Qr1
TUnhnFtTMdc9xuGUE8v7rWzZBQUkvZbaNj0I1qECgYAesALh2u0r/ayEYjWAcqu8
XXhQWRhg7fXm0cCODNeK5rhkaqxlw64hSY29tgEKPg/F66jXMDXcsvsBwnPoGN35
lD6CQlWKR3g2LtRCAHLICQ5aODNL9B321syoIHF1Cdlw78V3uMsQ7av/IWaIX4BL
EEWtDICxzN37PaGuYVSRSQ==
-----END PRIVATE KEY-----

View File

@@ -0,0 +1,93 @@
BaseDir "/var/lib/collectd"
PIDFile "/var/run/collectd.pid"
Interval 60
ReadThreads 2
WriteQueueLimitHigh 10000
WriteQueueLimitLow 8000
LoadPlugin "load"
LoadPlugin "network"
LoadPlugin "memory"
LoadPlugin "processes"
LoadPlugin "cpu"
LoadPlugin "exec"
<Plugin "network">
<Server "analytics.iopsys.eu" "25827">
SecurityLevel "encrypt"
Username "iopsys"
Password "kffJDv3CMVO9WHO4CIP8CGM3ZXN4EQv"
</Server>
</Plugin>
<Plugin "network">
<Server "analytics.iopsys.eu" "25825">
SecurityLevel "encrypt"
Username "iopsys"
Password "6rgVOHWq9BPCbZFlLVB854jD8WCv4EvK"
</Server>
</Plugin>
<Plugin "memory">
ValuesPercentage true
</Plugin>
<Plugin "processes">
CollectFileDescriptor true
CollectContextSwitch true
CollectMemoryMaps true
ProcessMatch "mapagent_instances" "mapagent"
ProcessMatch "wifimngr_instances" "wifimngr"
ProcessMatch "ieee1905d_instances" "ieee1905d"
ProcessMatch "topologyd_topologyd" "topologyd"
ProcessMatch "uspd_instances" "uspd"
ProcessMatch "mapcontroller_instances" "mapcontroller"
ProcessMatch "obuspa_instances" "(.*)obuspa"
ProcessMatch "hostapd_instances" "hostapd"
ProcessMatch "swmodd_instances" "swmodd"
ProcessMatch "ruleng_instances" "rulengd"
ProcessMatch "wpa_supplicant_instances" "wpa_supplicant"
ProcessMatch "dm_bulkdata" "bbfdmd -m bulkdata"
ProcessMatch "dm_ddnsmngr" "bbfdmd -m ddnsmngr"
ProcessMatch "dm_dnsmngr" "bbfdmd -m dnsmngr"
ProcessMatch "dm_ethmngr" "bbfdmd -m ethmngr"
ProcessMatch "dm_hostmngr" "bbfdmd -m hostmngr"
ProcessMatch "dm_icwmp" "bbfdmd -m icwmp"
ProcessMatch "dm_mcastmngr" "bbfdmd -m mcastmngr"
ProcessMatch "dm_periodicstat" "bbfdmd -m periodicstats"
ProcessMatch "dm_portmapping" "bbfdmd -m portmapping"
ProcessMatch "dm_qosmngr" "bbfdmd -m qosmngr"
ProcessMatch "dm_sshmngr" "bbfdmd -m sshmngr"
ProcessMatch "dm_swmodd" "bbfdmd -m swmodd"
ProcessMatch "dm_timemngr" "bbfdmd -m timemngr"
ProcessMatch "dm_tr104" "bbfdmd -m tr104"
ProcessMatch "dm_urlfilter" "bbfdmd -m urlfilter"
ProcessMatch "dm_userinterfac" "bbfdmd -m userinterface"
ProcessMatch "dm_usermngr" "bbfdmd -m usermngr"
ProcessMatch "bbfdmd" "bbfdmd"
ProcessMatch "decollector" "decollector"
ProcessMatch "collectd" "collectd"
ProcessMatch "uwsgi" "uwsgi"
ProcessMatch "syslog-ng" "syslog-ng"
ProcessMatch "mosquitto" "mosquitto"
ProcessMatch "nginx" "nginx"
ProcessMatch "hostmngr" "hostmngr"
ProcessMatch "asterisk" "asterisk"
ProcessMatch "voicemngr" "voicemngr"
</Plugin>
<Plugin "cpu">
ReportByState true
ReportByCpu true
ValuesPercentage true
</Plugin>
<Plugin "exec">
Exec "nobody" "/sbin/get-sn"
</Plugin>
<Plugin "load">
</Plugin>

View File

@@ -0,0 +1,3 @@
config core-watcher 'globals'
option api_key '1JH7ZKGDtJXKeLt4CfeJt4y'
option url 'https://analytics.iopsys.eu:1337/crash_upload_file'

View File

@@ -0,0 +1,6 @@
{
"forced_inform": [
"Device.DeviceInfo.ModelName"
]
}

View File

@@ -0,0 +1,38 @@
#!/bin/sh /etc/rc.common
export USE_PROCD=1
export START=95
export STOP=01
LOG="logger -t core-watcher[$$] -p"
start_service() {
[ -f /etc/config/core-watcher ] || {
$LOG error "UCI config not found"
return 1
}
firmware_version=$(db get device.deviceinfo.SoftwareVersion || echo "unknown")
product_class=$(db get device.deviceinfo.ProductClass | awk '{print tolower($0)}')
serial=$(db get device.deviceinfo.SerialNumber || echo "unknown")
config_load core-watcher
url=""
config_get url "globals" "url"
api_key=""
config_get api_key "globals" "api_key"
if [ -z "$url" ] || [ -z "$api_key" ]; then
$LOG error "URL or API Key not found in config"
return 2
fi
procd_open_instance
procd_set_param env API_KEY="$api_key" SERIAL="$serial" FIRMWARE_VERSION="$firmware_version" PRODUCT_CLASS="$product_class"
procd_set_param command /usr/bin/core-watcher -u "$url"
procd_set_param limits core="unlimited"
procd_close_instance
}

View File

@@ -0,0 +1,26 @@
#!/bin/sh /etc/rc.common
START=15
STOP=20
USE_PROCD=1
start_service() {
procd_open_instance
echo "Starting ubus monitor..."
procd_set_param respawn # Enable automatic restart on failure
procd_set_param stdout 1 # Redirect stdout to procd
procd_set_param stderr 1 # Redirect stderr to procd
procd_set_param command /bin/sh "/usr/sbin/ubus-monitor"
procd_close_instance
}
reload_service(){
echo "Explicitly restarting service, are you sure you need this?"
stop
start
}

View File

@@ -0,0 +1,3 @@
#!/bin/sh
uci set cwmp.cpe.forced_inform_json='/etc/icwmpd/force_inform.json'
uci commit cwmp

View File

@@ -0,0 +1,5 @@
set_core_unlimited() {
prlimit --core=unlimited: -p 1
}
boot_hook_add preinit_main set_core_unlimited

View File

@@ -0,0 +1,11 @@
#!/bin/sh
INTERVAL="${COLLECTD_INTERVAL:-60}"
while sleep "$INTERVAL"; do
SN=$(db get device.deviceinfo.SerialNumber)
HOSTNAME=$(uname -n)
FORMATTED_RESULT=$(echo "1337")
echo "PUTVAL \"$HOSTNAME/exec-$SN/gauge-INFO\" interval=$INTERVAL N:\"$FORMATTED_RESULT\""
done

View File

@@ -0,0 +1,150 @@
#!/bin/sh
# shellcheck shell=busybox
# This shell script watches for *.core files created in
# /tmp and uploads them
CORE_DIR="/tmp"
LOG="logger -t core-watcher[$$] -p"
POLL_INTERVAL="5"
upload_file() {
FILEPATH=$1
$LOG info "Uploading $UPLOAD_TYPE $FILEPATH"
curl -s --fail -X "POST" \
"$API_URL" \
-H "accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "api_key=$API_KEY" \
-F "dump_md5=$COREDUMP_MD5" \
-F "device_serial=$SERIAL" \
-F "upload_type=$UPLOAD_TYPE" \
-F "incoming_file=@$FILEPATH;type=text/plain"
status=$?
if [ "$status" != "0" ]; then
$LOG error "$UPLOAD_TYPE upload failed. curl returned status $status"
else
$LOG info "$UPLOAD_TYPE upload success"
if [ $UPLOAD_TYPE = "core" ]; then
$LOG info "Renaming core $ORIGINAL_CORE_FILEPATH"
mv "$ORIGINAL_CORE_FILEPATH" "$ORIGINAL_CORE_FILEPATH"_UPLOADED
fi
fi
}
usage() {
cat <<EOM
Usage:
$0 [OPTIONS]
Options:
-h help
-u <URL> API Gateway URL (required)
EOM
exit 1
}
main() {
if [ -z "$API_KEY" ]; then
$LOG error "API_KEY env variable not set"
exit 1
fi
if [ -z "$SERIAL" ]; then
$LOG error "SERIAL env variable not set"
exit 1
fi
if [ -z "$FIRMWARE_VERSION" ]; then
$LOG error "FIRMWARE_VERSION env variable not set"
exit 1
fi
while getopts "u:" opt; do
case $opt in
u)
API_URL=${OPTARG}
;;
*)
usage
;;
esac
done
if [ -z "$API_URL" ]; then
usage
fi
# Source system information from /etc/os-release
. /etc/os-release
# Convert OPENWRT_DEVICE_PRODUCT to uppercase and use it as the board name
BOARD_NAME=$(echo "$OPENWRT_DEVICE_PRODUCT" | tr 'a-z' 'A-Z')
BASE_MAC="$(db get device.deviceinfo.BaseMACAddress)"
while true; do
if ping -c1 -4 analytics.iopsys.eu; then
CORES=$(find "$CORE_DIR" -type f -name "*.core")
for core in $CORES; do
$LOG error "Core found: $core"
COREDUMP_MD5="$(md5sum "$core" | cut -f1 -d' ')"
UPLOAD_TYPE="file"
if [ -e /tmp/ctfw.meta ]; then
. /tmp/ctfw.meta
fi
echo "$CTFW_TEST_CASE" > /tmp/ctfw-test-case.txt
upload_file "/tmp/ctfw-test-case.txt"
echo "$CTFW_TAG" > /tmp/ctfw-job-tag.txt
upload_file "/tmp/ctfw-job-tag.txt"
echo "$CTFW_LOCK_USERNAME" > /tmp/ctfw-lock-username.txt
upload_file "/tmp/ctfw-lock-username.txt"
opkg list > /tmp/opkg-list.txt
upload_file "/tmp/opkg-list.txt"
free > /tmp/free-mem.txt
upload_file "/tmp/free-mem.txt"
cat /proc/slabinfo > /tmp/slabinfo.txt
upload_file "/tmp/slabinfo.txt"
echo "$BOARD_NAME" > /tmp/board-name.txt
upload_file "/tmp/board-name.txt"
echo "$BASE_MAC" > /tmp/base-mac.txt
upload_file "/tmp/base-mac.txt"
uname -n > /tmp/hostname.txt
upload_file "/tmp/hostname.txt"
echo "$FIRMWARE_VERSION" > /tmp/fw-version.txt
upload_file "/tmp/fw-version.txt"
cp "$(strings "$core" | grep ^/ | head -1 | cut -d' ' -f1)" /tmp/binary
upload_file /tmp/binary
UPLOAD_TYPE="core"
ORIGINAL_CORE_FILEPATH="$core"
cp "$core" /tmp/core
upload_file /tmp/core
rm /tmp/core
done
fi
sleep $POLL_INTERVAL
done
}
main "$@"

View File

@@ -0,0 +1,231 @@
#!/bin/sh
# shellcheck shell=dash
# Location of system report temporary directory
SRDIR="/tmp/system-report"
configure() {
local preconf_path
preconf_path="$(realpath "$0")"
if ! cmp -s /usr/sbin/system-report "${preconf_path}" >/dev/null; then
echo "iopsys-test system-report differs from included with firmware, symlinking"
ln -sf "${preconf_path}" /usr/sbin/system-report
fi
if ! cmp -s /rom/usr/sbin/system-report /usr/sbin/system-report >/dev/null && ! grep -Fq "/usr/sbin/system-report" /etc/sysupgrade.conf; then
echo "iopsys-test system-report differs from included with firmware, adding to sysupgrade.conf"
echo "/usr/sbin/system-report" >>/etc/sysupgrade.conf
fi
}
run() {
set -x
# Alias ubus to have a smaller 5-second timeout on all subsequent calls
ubus() { command ubus -t 5 "$@"; }
mkdir -p "$SRDIR"
SRCF="$SRDIR/config"
SRSY="$SRDIR/system"
SRNT="$SRDIR/network"
SRTR="$SRDIR/tr069"
SRMD="$SRDIR/mem_dump"
# Config
echo "Gathering configuration data"
{
cat /etc/banner
echo "Installed Packages"
opkg list-installed
echo "Database"
db show
echo "Configuration"
uci show
} > "$SRCF"
# System
echo "Gathering system information"
{
echo "System Info"
ubus call system info
echo "Board Info"
ubus call system board
echo "Running Processes"
top -b -n 1
echo "Kernel Parameters"
sysctl -A 2>/dev/null
echo "System Log"
timeout 5 logread -l 1000
echo "Driver Message"
timeout 5 dmesg
echo "PCI Devices"
lspci -k
echo "Installed Modules"
lsmod
echo "CPU Info"
cat /proc/cpuinfo
echo "Memory Info"
cat /proc/meminfo
echo "Slab Info"
cat /proc/slabinfo
echo "Firmware banks"
ubus call fwbank dump
} > "$SRSY"
# Network
echo "Gathering network state"
{
echo "Device Status"
ubus call network.device status
echo "Hosts Status"
ubus call hosts show
echo "Topology"
ubus call ieee1905.topology dump
echo "Network Status"
ubus call network.interface dump
if [ -d /sys/class/ieee80211 ]; then
echo "Wireless Status"
ubus call network.wireless status
echo "Wireless Radio Status"
ubus call wifi status
echo "Get radio scan"
for radio_if in $(ubus list 'wifi.radio.*'); do
ubus call "${radio_if}" scan
sleep 2
ubus call "${radio_if}" scanresults
done
echo "Get Assoc List"
interfaces=$(uci show wireless | grep "ifname=" | awk -F'[.,=]' '{print$2}')
for int in $interfaces; do
mode=$(uci get "wireless.${int}.mode")
if [ "$mode" = "ap" ] ; then
ap_int=$(uci get "wireless.${int}.ifname")
echo "Get assoc list"
ubus call "wifi.ap.${ap_int}" assoclist
echo "Get station info"
ubus call "wifi.ap.${ap_int}" stations
fi
done
fi
if [ "$(db get hw.board.hasVoice)" = 1 ]; then
echo "voice status"
ubus call voice.asterisk status
fi
echo "IPv4 Routes"
ip -d r
echo "IPv6 Routes"
ip -d -6 r
echo "Neighbor Table"
ip n
echo "ARP Table"
cat /proc/net/arp
echo "IGMP Snooping Table"
ubus call mcast stats
echo "Conntrack Table"
cat /proc/net/nf_conntrack
echo "Network Interface Status"
ip -d a
echo "IPv4 Firewall Status"
iptables -xvnL
echo "IPv6 Firewall Status"
ip6tables -xvnL
echo "Bridge Info"
brctl show
if [ -f /tmp/multiap.backhaul ]; then
echo "Multi-AP Backhaul status"
cat /tmp/multiap.backhaul
fi
echo "TCP/UDP listened ports"
netstat -tlnp
netstat -ulnp
echo "MAC layer firewall status"
ebtables -t broute -L
echo "MAC layer firewall status list"
ebtables -L
echo "IEEE1905 info"
ubus call ieee1905 info
if [ -f /usr/bin/iwinfo ]; then
echo "iwinfo interface details"
/usr/bin/iwinfo
fi
} > "$SRNT"
# TR-069
echo "Gathering TR-069 state"
{
echo "TR-069 status"
ubus call tr069 status
echo "get all TR-181 Parameters"
ubus call bbfdm get '{"path":"Device."}'
echo "TR-069 Option 43 URL"
uci -P /var/state -q get cwmp.acs.url
echo "TR-069 Logs"
[ -f /var/log/icwmp ] && cat /var/log/icwmp
} > "$SRTR"
# Firmware RAM dump (IOP-8118)
if [ -f /tmp/mem_dump ]; then
mv /tmp/mem_dump "$SRMD"
fi
REPORT_PATH="$(dirname "${SRDIR}")"
REPORT_DIRNAME="$(basename "${SRDIR}")"
FILENAME="${REPORT_PATH}/system-report-$(date +%Y-%m-%d).tar.gz"
tar -cz -C "${REPORT_PATH}" -f "${FILENAME}" "${REPORT_DIRNAME}"
echo "Report is located at ${FILENAME}"
#ubus send "system-report" "{ \"filename\" : \"$FILENAME\" }"
rm -r "$SRDIR"
}
case "${1:-}" in
configure) configure ;;
*) run ;;
esac

View File

@@ -0,0 +1,7 @@
#!/bin/ash
rm -f /tmp/ubus-calls-pipe
mkfifo /tmp/ubus-calls-pipe || echo "Pipe wasn't created" >&2
logger -t ubus-logging "Pipe created sucessfully"
/bin/ubus listen > /tmp/ubus-calls-pipe

View File

@@ -0,0 +1,42 @@
[INPUT]
name syslog
tag logs
path /dev/log
parser syslog-rfc3164-local
[INPUT]
Name head
Tag ubus_listen
file /tmp/ubus-calls-pipe
Interval_Sec 1
[OUTPUT]
name syslog
match logs
host analytics.iopsys.eu
port 6514
mode tcp
tls on
tls.verify off
tls.key_file /etc/analytics-cert/clientkey.pem
tls.crt_file /etc/analytics-cert/clientcert.pem
syslog_format rfc5424
syslog_appname_preset dummy
syslog_message_key message
syslog_hostname_key hostname
syslog_hostname_preset dummy
[OUTPUT]
name syslog
match ubus_listen
host analytics.iopsys.eu
port 6515
mode tcp
tls on
tls.verify off
tls.key_file /etc/analytics-cert/clientkey.pem
tls.crt_file /etc/analytics-cert/clientcert.pem
syslog_format rfc5424
syslog_appname_preset dummy
syslog_message_key head
syslog_hostname_preset dummy

View File

@@ -0,0 +1,25 @@
#!/bin/sh
# Check if fluent-bit is installed
if command -v fluent-bit >/dev/null 2>&1; then
conf_file="/etc/fluent-bit/conf.d/analytics.conf"
# Check if the configuration file exists
if [ -f "$conf_file" ]; then
# Get hostname and serial number
hostname="$(db -q get device.deviceinfo.ModelName)"
serialnum="$(db -q get device.deviceinfo.SerialNumber)"
# Replace syslog_hostname_preset line
sed -i "s/^.*syslog_hostname_preset.*/ syslog_hostname_preset ${hostname}/" "$conf_file"
# Replace syslog_appname_preset line
sed -i "s/^.*syslog_appname_preset.*/ syslog_appname_preset ${serialnum}/" "$conf_file"
fi
fi
# Clear logs periodically
grep -q 'logrotate' /etc/crontabs/root || echo '*/15 * * * * /usr/sbin/logrotate /etc/logrotate.conf' >> /etc/crontabs/root
# Exit successfully
exit 0

View File

@@ -0,0 +1,9 @@
/var/log/messages {
    missingok
    rotate 1
    size 1M
    postrotate
        /usr/sbin/syslog-ng-ctl reopen
    endscript
}

View File

@@ -0,0 +1,46 @@
source s_file {
file("/var/log/messages" program_override("`ENV_VAR_SYSLOG_NG_DUT_SERIAL_NUMBER`"));
};
source ubus_calls {
pipe("/tmp/ubus-calls-pipe"
flags(no-parse)
);
};
destination d_tls_syslog {
syslog(
"analytics.iopsys.eu"
transport("tls")
port(6514)
tls(
key-file("/etc/analytics-cert/clientkey.pem")
cert-file("/etc/analytics-cert/clientcert.pem")
peer-verify(no)
)
);
};
destination d_tls_ubus {
syslog(
"analytics.iopsys.eu"
transport("tls")
port(6515)
tls(
key-file("/etc/analytics-cert/clientkey.pem")
cert-file("/etc/analytics-cert/clientcert.pem")
peer-verify(no)
)
);
};
log {
source(s_file);
destination(d_tls_syslog);
};
log {
source(ubus_calls);
destination(d_tls_ubus);
};

View File

@@ -0,0 +1,4 @@
sed -i '/procd_open_instance.*/a \\tprocd_set_param env ENV_VAR_SYSLOG_NG_DUT_SERIAL_NUMBER="$(db get hw.board.serial_number)"' /etc/init.d/syslog-ng
# Clear logs periodically
grep -q 'logrotate' /etc/crontabs/root || echo '*/15 * * * * /usr/sbin/logrotate /etc/logrotate.conf' >> /etc/crontabs/root

View File

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

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.1.2
PKG_VERSION:=1.1.3
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:=1ded9a4bb0f2f8a5f3989799b5500e328e086c99
PKG_SOURCE_VERSION:=f4ffa38b77e20f9e2a6b6ffd5b2bf83cddb6bffc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,17 +1,30 @@
#!/bin/sh
hasVoice=$(db -q get hw.board.hasVoice)
[ "$hasVoice" = "1" ] || exit 0
SLIC=`cat /proc/device-tree/airoha-voice/slic-type`
[ "${SLIC#pef}" != "${SLIC}" ] || exit 0
SLIC=$(cat /proc/device-tree/airoha-voice/slic-type)
[ "${SLIC#pef}" != "${SLIC}" ] && {
echo Configure TxGain and RxGain for MXL SLIC $SLIC
echo Configure TxGain and RxGain for MXL SLIC $SLIC
ports=$(db -q get hw.board.VoicePorts)
for p in $(seq 0 $((ports-1))); do
uci set asterisk.extension${p}.txgain='10'
uci set asterisk.extension${p}.rxgain='-15'
done
}
ports=$(db -q get hw.board.VoicePorts)
for p in $(seq 0 $((ports-1))); do
uci set asterisk.extension${p}.txgain='10'
uci set asterisk.extension${p}.rxgain='-15'
done
uci commit asterisk
hasDect=$(db -q get hw.board.hasDect)
[ "$hasDect" = "1" ] || exit 0
# Set the DECT RFPI
. /lib/functions/iopsys-environment.sh
db set hw.board.dect_rfpi=$(get_dect_rfpi)
db commit
# configure the PCM for DECT/DCX81
[ -f "/proc/device-tree/aliases/dcx81-uart" ] && {
uci set dect.global.pcm_fsync='SHORT_LF'
uci set dect.global.pcm_slot_start='8'
uci set dect.global.dect_channel_start='3'
}

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.10.0
PKG_VERSION:=7.12.10
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1339c8a04ace73086832534a0f06835df67b8bca
PKG_SOURCE_VERSION:=2bd3a37cc5c14af93d0af1643610285d8d382fba
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

38
linux-pam/Makefile Normal file
View File

@@ -0,0 +1,38 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=linux-pam
PKG_VERSION:=1.7.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/linux-pam/linux-pam.git
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/meson.mk
define Package/linux-pam
SECTION:=libs
CATEGORY:=Libraries
TITLE:=Linux PAM Module
DEPENDS:=+libpam
endef
MESON_ARGS += \
-Dprefix=/usr \
-Ddefault_library=shared \
-Ddocs=disabled \
-Deconf=disabled \
-Dselinux=disabled \
-Dnis=disabled \
-Dexamples=false \
-Dxtests=false
define Package/linux-pam/install
$(INSTALL_DIR) $(1)/usr/lib/security
$(INSTALL_DIR) $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/pam_faillock.uci_default $(1)/etc/uci-defaults/99-add_pam_faillock
endef
$(eval $(call BuildPackage,linux-pam))

View File

@@ -0,0 +1,43 @@
#!/bin/sh
create_faillock_files()
{
# also create files needed by pam_faillock
touch /var/log/faillock
chmod 700 /var/log/faillock
touch /var/log/btmp
chmod 700 /var/log/btmp
}
update_pam_common_auth()
{
local file="/etc/pam.d/common-auth"
local deny=6
local unlock_time=300
# update pam_unix.so line
sed -i -E 's|^.*pam_unix\.so.*|auth\t sufficient\tpam_unix.so nullok_secure|' "$file"
# Insert pam_faillock lines before and after pam_unix.so
sed -i -E "/pam_unix.so nullok_secure/i auth required pam_faillock.so preauth deny=$deny even_deny_root unlock_time=$unlock_time" "$file"
sed -i -E "/pam_unix.so nullok_secure/a auth [default=die] pam_faillock.so authfail audit deny=$deny even_deny_root unlock_time=$unlock_time" "$file"
}
update_pam_common_account()
{
# update account file
sed -i "/pam_unix.so/ i account required pam_faillock.so" /etc/pam.d/common-account
}
if [ -f "/usr/lib/security/pam_faillock.so" ]; then
update_pam_common_auth
update_pam_common_account
create_faillock_files
fi
if [ -f /etc/config/sshd ]; then
uci -q set sshd.@sshd[0].UsePAM=1
uci commit sshd
fi
exit 0

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=logmngr
PKG_VERSION:=1.0.9
PKG_VERSION:=1.0.15
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=e2ffe2b9e7722ce19dff7db6e47e62a305dc568b
PKG_SOURCE_VERSION:=1561b71a2225af737db9f091204247ab4e141abb
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,9 +28,12 @@ define Package/logmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Logging Manager
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit
DEPENDS+=+@LOGMNGR_BACKEND_FLUENTBIT:BUSYBOX_CONFIG_KLOGD
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
DEPENDS+=+LOGMNGR_LOGROTATE:logrotate
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
CONFLICTS:=logd
endef
define Package/logmngr/description
@@ -52,27 +55,28 @@ 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
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) ./files/logmngr-klogd $(1)/usr/libexec/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) ./files/logread $(1)/sbin/
endif
ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/
endif
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1) core
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1) core 10
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
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1) sysmngr 11
endif
ifeq ($(CONFIG_LOGMNGR_VENDOR_LOG_FILE),y)
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr 12
endif
endef

View File

@@ -1,13 +1,12 @@
#!/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
if uci -q get logmngr.@globals[0] >/dev/null; then
# return if there is any valid content
exit 0
else
rm -f /etc/config/logmngr
fi
touch /etc/config/logmngr
uci set logmngr.globals=globals
@@ -25,4 +24,3 @@ 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

@@ -1,14 +1,13 @@
#!/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
# Adds a default log rotate policy if none exists
if uci -q get logmngr.@log_rotate[0] >/dev/null; then
# return if there is any valid content
exit 0
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

View File

@@ -5,11 +5,24 @@
CONF_FILE=/etc/fluent-bit/fluent-bit.conf
TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf
CONF_DIR=/etc/fluent-bit/conf.d
append_conf() {
echo "$*" >> ${TMP_CONF_FILE}
}
create_config_file() {
mkdir -p /tmp/fluent-bit
rm -f ${TMP_CONF_FILE}
touch ${TMP_CONF_FILE}
# include all files placed in analytics directory
# fluent-bit does not support using directory in include directive
# also, if no file is found then fluent-bit aborts
# so only add include if any file is present in the CONF_DIR
if [ -d "$CONF_DIR" ] && [ "$(ls -A "$CONF_DIR")" ]; then
echo "@INCLUDE ${CONF_DIR}/*" >> ${TMP_CONF_FILE}
fi
echo "" >> ${TMP_CONF_FILE}
}
create_service_section() {
@@ -19,11 +32,14 @@ create_service_section() {
echo " flush 1" >> ${TMP_CONF_FILE}
echo " daemon off" >> ${TMP_CONF_FILE}
echo " log_level info" >> ${TMP_CONF_FILE}
echo " coro_stack_size 24576" >> ${TMP_CONF_FILE}
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${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
@@ -31,6 +47,7 @@ create_input_section() {
echo " name syslog" >> ${TMP_CONF_FILE}
echo " tag $tag" >> ${TMP_CONF_FILE}
echo " path /dev/log" >> ${TMP_CONF_FILE}
echo "" >> ${TMP_CONF_FILE}
}
generate_facility_regex() {
@@ -55,7 +72,6 @@ generate_facility_regex() {
echo " regex pri $pri" >> ${TMP_CONF_FILE}
done
done
}
generate_severity_regex() {
@@ -205,7 +221,6 @@ handle_log_remote() {
return
fi
local address
config_get address $section log_ip
if [ -z "$address" ]; then
@@ -216,9 +231,17 @@ handle_log_remote() {
echo " name syslog" >> ${TMP_CONF_FILE}
echo " match $match" >> ${TMP_CONF_FILE}
echo " host $address" >> ${TMP_CONF_FILE}
append_conf " syslog_appname_key ident"
append_conf " syslog_procid_key pid"
append_conf " syslog_message_key message"
local hostname="$(uci -q get 'system.@system[0].hostname')"
if [ -n "${hostname}" ]; then
append_conf " syslog_hostname_preset ${hostname}"
fi
local proto # holds value tcp or udp
config_get proto $section proto
config_get proto ${section} proto
if [ -n "$proto" ]; then
if [ "$proto" == "tls" ]; then
echo " mode tcp" >> ${TMP_CONF_FILE}
@@ -281,41 +304,44 @@ handle_action() {
# 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
local enabled
config_load logmngr
local enabled
config_get enabled globals enable
if [ "$enabled" == "0" ]; then
return
fi
config_get_bool enabled globals enable "1"
create_config_file
create_service_section
handle_action_section
apply_config_file
if [ -f /lib/logmngr/logrotate.sh ]; then
logrotate_init
fi
if [ "$enabled" == "0" ]; then
return
fi
procd_open_instance logmngr
procd_set_param command $PROG -c $CONF_FILE
procd_set_param file $CONF_FILE
if [ -s "${TMP_CONF_FILE}" ]; then
procd_set_param command $PROG -c ${TMP_CONF_FILE}
procd_set_param file ${TMP_CONF_FILE}
elif [ -s "${CONF_FILE}" ]; then
procd_set_param command $PROG -c ${CONF_FILE}
procd_set_param file ${CONF_FILE}
fi
procd_set_param respawn
procd_close_instance
procd_open_instance klogd
procd_set_param command /usr/libexec/logmngr-klogd
procd_set_param respawn
procd_close_instance
}

View File

@@ -8,10 +8,9 @@ LOGROTATE_TMP_FILE=/tmp/logrotate/logrotate.conf
create_logrotate_file() {
mkdir -p /tmp/logrotate
rm -f ${LOGROTATE_TMP_FILE}
touch ${LOGROTATE_FILE}
touch ${LOGROTATE_TMP_FILE}
}
handle_logrotate() {
local section="$1"

View File

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

View File

@@ -89,13 +89,13 @@ else
exit 0
;;
-f)
tail -f "${logfile}"
tail -F "${logfile}"
exit 0
;;
-fe)
shift
pattern="${1}"
tail -f "${logfile}" | grep -E "${pattern}"
tail -F "${logfile}" | grep -E "${pattern}"
exit 0
;;
-h|*)

View File

@@ -1,36 +0,0 @@
#
# Copyright (C) 2008-2016 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ltq-nand
PKG_VERSION:=1.0
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand/archive/
#PKG_SOURCE_PROTO:=git
#PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand/releases/download/v$(PKG_VERSION)/
#PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand.git
#PKG_SOURCE_VERSION:=07b5b0331af6de4174dab2c02bf260ee9625452a
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/host-build.mk
define Host/Compile
$(MAKE) -C $(HOST_BUILD_DIR)
endef
define Host/Install
$(CP) \
$(HOST_BUILD_DIR)/ltq-nand \
$(STAGING_DIR_HOST)/bin/
endef
$(eval $(call HostBuild))

View File

@@ -62,5 +62,9 @@ config AGENT_CHECK_PARTIAL_WIFI_RELOAD
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
config AGENT_UNASSOC_STA_CONT_MONITOR
bool "Enable continuos monitoring of unassociated clients"
default n
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.3.3.2
PKG_VERSION:=6.3.5.4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=43779ec4dac50780a6807aad7da22bc255694331
PKG_SOURCE_VERSION:=2ed08bae7f22d08dc868d03c28777a44fc637093
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -115,6 +115,10 @@ ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif
ifeq ($(CONFIG_AGENT_UNASSOC_STA_CONT_MONITOR),y)
TARGET_CFLAGS += -DUNASSOC_STA_CONT_MONITOR
endif
MAKE_PATH:=src
define Package/map-agent/install

View File

@@ -1,15 +1,26 @@
#!/bin/sh
conn_ports_file="/var/run/multiap/map.connected.ports"
map_bh_file="/var/run/multiap/multiap.backhaul"
# Exit if AL Bridge is not configured to be a bridge device
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
[ "${al_bridge:0:3}" = "br-" ] || exit 0
# Get all sections where the port appears in 'ports' list
port_bridge_sec_list="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
# Find the first section with type='bridge' and get its name
for port_bridge_sec in $port_bridge_sec_list; do
if [ "$(uci -q get network.$port_bridge_sec.type)" = "bridge" ]; then
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
break
fi
done
# Exit if the PORT Bridge Name is empty
[ -z "$port_bridge_name" ] && exit 0
# Exit if the PORT is not member of the AL Bridge
port_bridge_sec="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
# Exit if the device is not operating in extender/repeater mode
@@ -18,30 +29,6 @@ al_brnet="${al_bridge:3}"
############## Dynamic Backhaul Daemon ##############
if [ -n "$(which dynbhd)" ]; then
pidof dynbhd >/dev/null && exit 0 # dynbhd is managing the links
if [ ! -f $conn_ports_file ]; then
mkdir -p /var/run/multiap
touch $conn_ports_file
if [ "$LINK" = "up" ]; then
touch $conn_ports_file
echo "$PORT" > $conn_ports_file
brctl delif $al_bridge $PORT
#ubus call network.interface.lan remove_device "{\"name\":\"$PORT\"}"
fi
else
if [ "$LINK" = "up" ]; then
brctl delif $al_bridge $PORT
echo "$PORT" >> $conn_ports_file
#ubus call network.interface.lan remove_device "{\"name\":\"$PORT\"}"
else
sed -i -E "/(^|:)${PORT}(:|$)/d" $conn_ports_file
#ubus call network.interface.lan add_device "{\"name\":\"$PORT\"}"
brctl addif $al_bridge $PORT
[ "$(cat $conn_ports_file | wc -c)" = "0" ] && rm -f $conn_ports_file
fi
fi
exit 0
fi
########################################################

View File

@@ -15,6 +15,11 @@ config CONTROLLER_PROVISION_DISABLED_AP
bool "Enable vendor extension that provisions disabled APs to agents"
default n
config CONTROLLER_PROVISION_BRIDGE
depends on CONTROLLER_EASYMESH_VENDOR_EXT
bool "Enable vendor extension that provisions custom bridge for APs to agents, if configured"
default n
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
hex "Vendor OUI default"
default 0xB456FA

View File

@@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.3.0.0
PKG_VERSION:=6.3.0.18
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=db9966487d40b8eef75fcf5fa3277d2e2907a46e
PKG_SOURCE_VERSION:=b76714a5254756a66f2a8663b70d07dbe7818aaa
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
LOCAL_DEV=0
@@ -65,6 +65,9 @@ TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
ifeq ($(CONFIG_CONTROLLER_PROVISION_DISABLED_AP),y)
TARGET_CFLAGS += -DPROVISION_DISABLED_AP
endif
ifeq ($(CONFIG_CONTROLLER_PROVISION_BRIDGE),y)
TARGET_CFLAGS += -DPROVISION_BRIDGE
endif
endif
ifeq ($(CONFIG_CONTROLLER_PROPAGATE_PROBE_REQ),y)

View File

@@ -33,27 +33,27 @@ config sta_steering
config ap
option band '2'
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
option encryption 'sae-mixed'
option key '$WIFI_FH_KEY'
option ssid '$WIFI_FH_2G_SSID'
option encryption '$WIFI_FH_2G_ENCRYPTION'
option key '$WIFI_FH_2G_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
config ap
option band '5'
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
option encryption 'sae-mixed'
option key '$WIFI_FH_KEY'
option ssid '$WIFI_FH_5G_SSID'
option encryption '$WIFI_FH_5G_ENCRYPTION'
option key '$WIFI_FH_5G_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
config ap
option band '6'
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
option encryption 'sae'
option key '$WIFI_FH_KEY'
option ssid '$WIFI_FH_6G_SSID'
option encryption '$WIFI_FH_6G_ENCRYPTION'
option key '$WIFI_FH_6G_KEY'
option vid '1'
option type 'fronthaul'
option mld_id '1'
@@ -87,8 +87,8 @@ config ap
config mld
option id '1'
option ssid '$DEVICE_MANUFACTURER-$BASEMAC_ADDR'
option key '$WIFI_FH_KEY'
option ssid '$WIFI_FH_ALL_SSID'
option key '$WIFI_FH_ALL_KEY'
# option vid '1'
option type 'fronthaul'

View File

@@ -1,18 +1,95 @@
#!/bin/sh
. /lib/functions/system.sh
. /usr/share/libubox/jshn.sh
CFG=/etc/board.json
. /etc/device_info
WIFI_BH_KEY=$(openssl rand -rand /dev/urandom -hex 64 2>/dev/null | openssl dgst -hex -sha256 | cut -d " " -f 2)
WIFI_BH_KEY=${WIFI_BH_KEY::-1}
BASEMAC_ADDR="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
[ ${#BASEMAC_ADDR} -eq 12 ] || BASEMAC_ADDR="$(db -q get device.deviceinfo.BaseMACAddress | tr -d ':')"
BASEMAC_ADDR="$(get_mac_label | tr -d ':' | tr 'a-z' 'A-Z')"
WIFI_FH_KEY="$(db get hw.board.wpa_key)"
WIFI_FH_KEY="${WIFI_FH_KEY:-1234567890}"
FALLBACK_SSID="$DEVICE_MANUFACTURER-$BASEMAC_ADDR"
FALLBACK_KEY="1234567890"
FALLBACK_2G_ENCRYPTION="sae-mixed"
FALLBACK_5G_ENCRYPTION="sae-mixed"
FALLBACK_6G_ENCRYPTION="sae"
FALLBACK_ALL_ENCRYPTION="sae-mixed"
set_per_band_callback() {
local band="$2"
json_select "$band" || return
local ssid encryption key
json_get_vars ssid encryption key
case "$band" in
all|2g|5g|6g)
local band_upper="$(printf "%s" "$band" | tr 'a-z' 'A-Z')"
eval "WIFI_FH_${band_upper}_SSID=\$ssid"
eval "WIFI_FH_${band_upper}_ENCRYPTION=\$encryption"
eval "WIFI_FH_${band_upper}_KEY=\$key"
;;
esac
json_select ..
}
set_vars_from_board_json() {
json_init
json_load_file "$CFG"
if json_select wlan && json_select defaults && json_is_a ssids object; then
json_for_each_item set_per_band_callback ssids
fi
json_cleanup
}
set_in_priority() {
local destination="$1"
local alternative value
shift
for alternative in "$@"; do
eval "value=\${${alternative}}"
if [ -n "$value" ]; then
echo "Setting $destination to '$value' from \$$alternative"
eval "${destination}=\$value"
break
fi
done
}
set_missing_vars_from_fallback() {
local band what
for band in ALL 2G 5G 6G; do
for what in SSID KEY; do
set_in_priority \
WIFI_FH_${band}_${what} \
WIFI_FH_${band}_${what} \
WIFI_FH_ALL_${what} \
FALLBACK_${what}
done
# Per band fallback variables for encryption because SAE is mandatory on 6 GHz
set_in_priority \
WIFI_FH_${band}_ENCRYPTION \
WIFI_FH_${band}_ENCRYPTION \
FALLBACK_${band}_ENCRYPTION
done
}
set_vars_from_board_json
set_missing_vars_from_fallback
sed -i -e "s/\$BASEMAC_ADDR/$BASEMAC_ADDR/g" \
-e "s/\$WIFI_FH_KEY/$WIFI_FH_KEY/g" \
-e "s/\$WIFI_FH_2G_KEY/$WIFI_FH_2G_KEY/g" \
-e "s/\$WIFI_FH_5G_KEY/$WIFI_FH_5G_KEY/g" \
-e "s/\$WIFI_FH_6G_KEY/$WIFI_FH_6G_KEY/g" \
-e "s/\$WIFI_FH_ALL_KEY/$WIFI_FH_ALL_KEY/g" \
-e "s/\$WIFI_FH_2G_SSID/$WIFI_FH_2G_SSID/g" \
-e "s/\$WIFI_FH_5G_SSID/$WIFI_FH_5G_SSID/g" \
-e "s/\$WIFI_FH_6G_SSID/$WIFI_FH_6G_SSID/g" \
-e "s/\$WIFI_FH_ALL_SSID/$WIFI_FH_ALL_SSID/g" \
-e "s/\$WIFI_FH_2G_ENCRYPTION/$WIFI_FH_2G_ENCRYPTION/g" \
-e "s/\$WIFI_FH_5G_ENCRYPTION/$WIFI_FH_5G_ENCRYPTION/g" \
-e "s/\$WIFI_FH_6G_ENCRYPTION/$WIFI_FH_6G_ENCRYPTION/g" \
-e "s/\$WIFI_FH_ALL_ENCRYPTION/$WIFI_FH_ALL_ENCRYPTION/g" \
-e "s/\$WIFI_BH_KEY/$WIFI_BH_KEY/g" \
-e "s/\$DEVICE_MANUFACTURER/$DEVICE_MANUFACTURER/g" \
/etc/config/mapcontroller 2>/dev/null

View File

@@ -0,0 +1,46 @@
#!/bin/sh
. /lib/functions.sh
cfg=mapcontroller
config_load $cfg
adapt_sta_steering() {
steer_module=$(uci -q get $cfg.@sta_steering[0].steer_module)
bandsteer=$(uci -q get $cfg.@sta_steering[0].bandsteer)
enabled=$(uci -q get $cfg.@sta_steering[0].enabled)
diffsnr=$(uci -q get $cfg.@sta_steering[0].diffsnr)
stri=$(uci -q get $cfg.@sta_steering[0].steer_retry_int)
sti=$(uci -q get $cfg.@sta_steering[0].steer_int)
stdi=$(uci -q get $cfg.@sta_steering[0].steer_disable_int)
uci -q del $cfg.@sta_steering[0].enabled
uci -q del $cfg.@sta_steering[0].steer_module
uci -q del $cfg.@sta_steering[0].use_bcn_metrics
uci -q del $cfg.@sta_steering[0].use_usta_metrics
uci -q del $cfg.@sta_steering[0].bandsteer
uci -q del $cfg.@sta_steering[0].diffsnr
uci del_list $cfg.@sta_steering[0].plugins="rcpi"
uci add_list $cfg.@sta_steering[0].plugins="rcpi"
uci -q set $cfg.@sta_steering[0].plugins_enabled="1"
uci -q set $cfg.@sta_steering[0].plugins_policy="any"
# re-apply any custom legacy value(s) in 'sta-steer' section
if [ -n "${enabled}" -o -n "${bandsteer}" -o -n "${diffsnr}" -o -n "${sti}" -o -n "${stri}" -o -n "${stdi}" ]; then
# create 'rcpi' named 'sta-steer' section if there is none
[ $(uci -q get mapcontroller.rcpi) ] || uci set $cfg.rcpi=sta-steer
# set custom value(s)
[ -z "${enabled}" ] || uci -q set $cfg.rcpi.enabled="${enabled}"
[ -z "${bandsteer}" ] || uci -q set $cfg.rcpi.bandsteer="${bandsteer}"
[ -z "${diffsnr}" ] || uci -q set $cfg.rcpi.diffsnr="${diffsnr}"
[ -z "${sti}" ] || uci -q set $cfg.rcpi.steer_int="${sti}"
[ -z "${stri}" ] || uci -q set $cfg.rcpi.steer_retry_int="${stri}"
[ -z "${stdi}" ] || uci -q set $cfg.rcpi.steer_disable_int="${stdi}"
uci reorder $cfg.rcpi=2
fi
}
adapt_sta_steering

View File

@@ -16,8 +16,6 @@ generate_igmp_global_params(){
uci set mcast.@mld[-1].mldv2_unsolicited_report_interval="1"
uci set mcast.@mld[-1].qrv="2"
uci set mcast.@mld[-1].force_version="0"
uci commit mcast
}
generate_mld_proxy_config(){
@@ -73,8 +71,6 @@ generate_mcast_config(){
generate_igmp_proxy_config "$up_itf"
generate_mld_proxy_config "$up_itf"
uci commit mcast
}
interfaces_ok(){

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.1.4
PKG_VERSION:=1.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=34b7163a759038edbbc0304be36abad05b9bc9b4
PKG_SOURCE_VERSION:=f1422e4de76990f7037ca265431d5f1031621c93
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,11 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=1.0.1
PKG_VERSION:=1.1.2
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/netmode
CATEGORY:=Utilities
@@ -23,11 +24,29 @@ define Package/netmode/description
Network Modes and Utils
endef
define Package/$(PKG_NAME)/config
config NETMODE_VENDOR_PREFIX
depends on PACKAGE_netmode
string "Vendor Extension used for netmode datamodel"
default ""
endef
ifeq ($(CONFIG_NETMODE_VENDOR_PREFIX),"")
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
else
VENDOR_PREFIX = $(CONFIG_NETMODE_VENDOR_PREFIX)
endif
define Build/Compile
endef
define Package/netmode/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/lib
$(CP) ./files/etc/* $(1)/etc/
$(CP) ./files/lib/* $(1)/lib/
$(BBFDM_REGISTER_SERVICES) -v ${VENDOR_PREFIX} ./bbfdm_service.json $(1) $(PKG_NAME)
$(BBFDM_INSTALL_MS_DM) -v ${VENDOR_PREFIX} ./files/datamodel.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,netmode))

View File

@@ -0,0 +1,16 @@
{
"daemon": {
"enable": "1",
"service_name": "netmode",
"unified_daemon": false,
"services": [
{
"parent_dm": "Device.",
"object": "{BBF_VENDOR_PREFIX}NetMode"
}
],
"config": {
"loglevel": "3"
}
}
}

View File

@@ -0,0 +1,267 @@
{
"json_plugin_version": 2,
"Device.{BBF_VENDOR_PREFIX}NetMode.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"description": "Datamodel vendor extension to support easy switching between wan types, a reboot is required in some cases after switching the mode",
"access": false,
"array": false,
"dependency": "file:/etc/config/netmode",
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"description": "Enable/Disable WAN switching using netmode",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"name": "global"
},
"option": {
"name": "enabled"
}
}
}
]
},
"Mode": {
"type": "string",
"read": true,
"write": true,
"description": "Current configured netmode value",
"protocols": [
"cwmp",
"usp"
],
"flags": [
"Reference"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"name": "global"
},
"option": {
"name": "mode"
}
},
"linker_obj": "Device.{BBF_VENDOR_PREFIX}NetMode.SupportedModes.[Name==@key]."
}
]
},
"SupportedModesNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"description": "SupportedModes Number of entries in the current config",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"type": "supported_modes"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.{BBF_VENDOR_PREFIX}NetMode.SupportedModes.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": true,
"description": "Object to list supported wan modes",
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"type": "supported_modes"
},
"dmmapfile": "dmmap_netmode"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": false,
"description": "Name of the wan mode, it has to be unique and in sync with /etc/netmodes/",
"protocols": [
"cwmp",
"usp"
],
"flags": [
"Linker",
"Unique"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "name"
}
]
},
"Description": {
"type": "string",
"read": true,
"write": false,
"description": "Human readable description for this mode",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "description"
}
]
},
"SupportedArgumentsNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"description": "SupportedModes Number of entries in the current config",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"type": "supported_args"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.{BBF_VENDOR_PREFIX}NetMode.SupportedModes.{i}.SupportedArguments.{i}.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": true,
"description": "Extra arguments for this Mode",
"mapping": [
{
"type": "uci",
"uci": {
"file": "netmode",
"section": {
"type": "supported_args"
},
"dmmapfile": "dmmap_netmode"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": false,
"description": "Name of the argument",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "name"
}
]
},
"Description": {
"type": "string",
"read": true,
"write": false,
"description": "Human readable description for this Argument",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "description"
}
]
},
"Required": {
"type": "boolean",
"read": true,
"write": false,
"description": "If Required is true, then Name and Value is mandatory for mode to apply",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "required"
}
]
},
"Value": {
"type": "string",
"read": true,
"write": true,
"description": "Value for this SupportedArguments Name, get on this parameter result into empty output",
"protocols": [
"cwmp",
"usp"
],
"flags": [
"Secure"
],
"mapping": [
{
"type": "uci_sec",
"data": "@Parent",
"key": "value"
}
]
}
}
}
}
}

View File

@@ -1,3 +1,2 @@
config netmode global
option enabled 0
# option mode 'router'

View File

@@ -6,28 +6,119 @@ USE_PROCD=1
. /lib/functions.sh
MODEDIR="/etc/netmodes"
SUPP_MODES_SEC=""
_log() {
logger -s -p user.info -t "netmode" "$*"
}
libnetmode_exec() {
when="$1"
# Execute /lib/netmode scripts
if [ -d /lib/netmode/$when ]; then
logger -s -p user.info -t "netmode" "Executing /lib/netmode/$when scripts"
_log "Executing /lib/netmode/$when scripts"
for script in $(ls /lib/netmode/$when/); do
sh /lib/netmode/$when/$script
done
fi
}
_get_modes_sec_name() {
local sec mode name
sec="${1}"
mode="${2}"
config_get name ${1} name ""
if [ "${name}" = "${mode}" ]; then
SUPP_MODES_SEC="${sec}"
break;
fi
}
_set_env_args() {
local sec name value required dm_parent
sec="${1}"
config_get_bool required ${sec} required "0"
config_get name ${sec} name ""
config_get value ${sec} value ""
config_get dm_parent ${sec} dm_parent ""
if [ -z "${dm_parent}" ]; then
continue;
fi
if [ "${dm_parent}" != "${SUPP_MODES_SEC}" ]; then
continue;
fi
if [ "${required}" -eq "1" ]; then
if [ -z "${name}" -o -z "${value}" ]; then
_log "Can't apply mode, name[${name}] or value[${value}] is missing"
exit 0
fi
fi
if [ -n "${name}" -a -n "${value}" ]; then
export NETMODE_${name}="${value}"
fi
}
configure_env_vars() {
local mode
mode="${1}"
if [ -z "${mode}" ]; then
_log "mode info missing"
exit 0
fi
SUPP_MODES_SEC=""
config_load "netmode"
config_foreach _get_modes_sec_name supported_modes "${mode}"
if [ -z "${SUPP_MODES_SEC}" ]; then
_log "mode ${mode} not found in uci"
exit 0
fi
config_foreach _set_env_args supported_args
}
cleanup_arg_values() {
local dm_parent
config_get dm_parent ${1} dm_parent ""
if [ "${dm_parent}" = "${SUPP_MODES_SEC}" ]; then
uci -q set netmode.${1}.value=""
fi
}
cleanup_env_vars() {
for e in $(env); do
if echo ${e} |grep -q "^NETMODE_"; then
unset ${e}
fi
done
if [ -n "${SUPP_MODES_SEC}" ]; then
config_load "netmode"
config_foreach cleanup_arg_values supported_args
uci commit netmode
fi
}
start_service() {
[ -f /etc/config/netmode ] || return
config_load netmode
config_get_bool enabled global enabled '0'
[ $enabled -eq 0 ] && return
# Get the desired netmode from config
config_get mode global mode
config_get mode global mode ""
# Check if netmode is set as boot environment parameter
[ -n "$mode" ] || mode="$(fw_printenv -n netmode 2>/dev/null)"
# Return if mode is not set
@@ -38,18 +129,16 @@ start_service() {
# Return if desired mode is same as last saved mode
[ "$mode" == "$lastmode" ] && return
# Save mode as last mode
[ -d $MODEDIR ] || mkdir -p $MODEDIR
echo "$mode" > $MODEDIR/.last_mode
logger -s -p user.info -t "netmode" "Switching to $mode Mode" >/dev/console
_log "Switching to [${mode}] Mode" >/dev/console
# Configure env variables
configure_env_vars ${mode}
# Execute netmode generic pre-mode-switch scripts
libnetmode_exec "pre"
# Copy netmode UCI config files
if [ -d $MODEDIR/$mode/uci ]; then
logger -s -p user.info -t "netmode" "Copying $MODEDIR/$mode/uci/* to /etc/config/"
_log "Copying $MODEDIR/$mode/uci/* to /etc/config/"
cp $MODEDIR/$mode/uci/* /etc/config/ 2>/dev/null
fi
@@ -58,7 +147,7 @@ start_service() {
# Execute mode specific scripts
if [ -d $MODEDIR/$mode/scripts ]; then
logger -s -p user.info -t "netmode" "Executing $MODEDIR/$mode/scripts/* scripts"
_log "Executing $MODEDIR/$mode/scripts/* scripts"
for script in $(ls $MODEDIR/$mode/scripts/); do
sh $MODEDIR/$mode/scripts/$script
done
@@ -66,6 +155,12 @@ start_service() {
# Execute netmode generic post-mode-switch scripts
libnetmode_exec "post"
cleanup_env_vars "${mode}"
# Save mode as last mode
[ -d $MODEDIR ] || mkdir -p $MODEDIR
echo "$mode" > $MODEDIR/.last_mode
_log "Switching to Mode [${mode}] done, last mode updated" >/dev/console
}
service_triggers()

View File

View File

@@ -0,0 +1,31 @@
{
"#mode": "routed-pppoe",
"supported_modes": [
{
"name": "routed-dhcp",
"description": "WAN with DHCP proto (Layer 3)"
},
{
"name": "routed-pppoe",
"description": "WAN with PPPoE (Layer 3)",
"supported_args": [
{
"name": "username",
"description": "PPoE username",
"required": true,
"#value": "TestUser"
},
{
"name": "password",
"description": "PPoE password",
"required": true,
"#value": "TestPassword"
}
]
},
{
"name": "bridged",
"description": "Bridged mode (Layer 2)"
}
]
}

View File

@@ -0,0 +1,104 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
COUNT=1
SUPP_ARGS=1
SUPPORTED_MODE="/etc/netmodes/supported_modes.json"
if [ ! -f "/etc/config/netmode" ]; then
exit 0
fi
if [ ! -f "${SUPPORTED_MODE}" ]; then
exit 0
fi
configure_supp_modes_args()
{
local obj inst name description required value parent
obj="${1}"
inst="${2}"
parent="${3}"
if [ -z "${inst}" ]; then
return 0
fi
json_select ${inst}
json_get_var name name
json_get_var description description
json_get_var value value
json_get_var required required
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}=supported_args
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.name="${name}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.description="${description}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.required="${required}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.value="${value}"
uci -q set netmode.${parent}_supprted_args_${SUPP_ARGS}.dm_parent="${parent}"
json_select ..
SUPP_ARGS="$((SUPP_ARGS + 1))"
}
configure_supp_modes()
{
local obj inst name description args
obj="${1}"
inst="${2}"
if [ -z "${inst}" ]; then
return 0
fi
json_select ${inst}
json_get_var name name
json_get_var description description
if [ -d "/etc/netmodes/${name}" ]; then
uci -q set netmode.mode_${COUNT}=supported_modes
uci -q set netmode.mode_${COUNT}.name="${name}"
uci -q set netmode.mode_${COUNT}.description="${description}"
fi
SUPP_ARGS=1
json_for_each_item configure_supp_modes_args supported_args mode_${COUNT}
json_select ..
COUNT="$((COUNT + 1))"
}
remove_mode()
{
uci -q delete netmode.${1}
}
cleanup_modes()
{
config_load "netmode"
config_foreach remove_mode supported_modes
}
update_modes()
{
local mode
json_init
json_load_file "${SUPPORTED_MODE}"
json_get_var mode mode ""
if [ -n "${mode}" ]; then
uci -q set netmode.global.mode="${mode}"
fi
json_for_each_item configure_supp_modes supported_modes
}
cleanup_modes
update_modes

2
netmode/files/etc/uci-defaults/62-netmode.l2mode Normal file → Executable file
View File

@@ -109,7 +109,7 @@ l2_network_config() {
}
network_mode="$(fw_printenv -n netmode 2>/dev/null)"
case "$network_mode" in
layer2|extender)
l2_network_config

View File

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