Compare commits

...

587 Commits

Author SHA1 Message Date
Grzegorz Sluja
08dbacb62a voicemngr: Add missing libblobmsg-json dependency 2023-03-15 16:17:05 +01:00
Amin Ben Romdhane
71ea7517a7 uspd: reload sysctl config every time network is reloaded 2023-03-15 15:31:15 +01:00
Amin Ben Romdhane
306aabe4ea bbf: 6.8.49 2023-03-15 15:30:42 +01:00
Grzegorz Sluja
21b15495da Update package libvoice-broadcom
401a392 Implement callback for getting platform specific codec capabilities
2023-03-15 11:13:25 +01:00
Grzegorz Sluja
96c2a4885a Update package libvoice-airoha
2a6ef14 Add an empty callback for getting platform specific codec capabilities
2023-03-15 11:13:25 +01:00
Grzegorz Sluja
6e992b3a8b Update package libvoice-d2
8a67b66 Support configuration of echo cancellation and silence suppression
3c2eb5b Add an empty callback for getting platform specific codec capabilities
2023-03-15 11:13:25 +01:00
Grzegorz Sluja
4d17441d44 voicemngr: Update voicemngr with recent changes of endptmngr 2023-03-15 11:13:25 +01:00
Anjan Chanda
41f83bb782 easy-soc-lib: 7.2.26 2023-03-15 11:11:43 +01:00
Vivek Kumar Dutta
80fbdf2afe bbf: Remove use of bbf context flag
- uspd: Remove use of bbf context flag
- icwmpd: Remove use of bbf context flag
2023-03-14 16:51:05 +00:00
Erik Karlsson
a0477ff19d obuspa: move obuspa MQTT listener from sulu to obuspa package
This makes it possible for obuspa in its default configuration to
connect to local MQTT broker even if sulu package is deselected.
2023-03-14 16:36:44 +00:00
Erik Karlsson
73e6a19070 obuspa: remove usptest MQTT listener
This listener interferes with non-test use of port 9001 for a non-test
MQTT over WS listener and it may be a source of vulnerability.

Change-Id: I6c2236bf9a381fa87d1adfc0ba866527adfe7f2d
2023-03-14 16:36:44 +00:00
Erik Karlsson
1811f4e42f bbf: remove uci-defaults script for mosquitto
This script is moved to the mosquitto package.
2023-03-14 16:36:44 +00:00
Janusz Dziedzic
177d4b43b2 map-agent: 4.2.0.7 2023-03-14 10:39:40 +00:00
Janusz Dziedzic
c86a387a17 easy-soc-libs: 7.2.20 2023-03-14 10:34:46 +00:00
vdutta
c8c1bb2a47 sulu: 2.0.8 2023-03-14 15:38:05 +05:30
Amin Ben Romdhane
45f4468736 bbf: 6.8.47 2023-03-13 17:11:15 +01:00
Anjan Chanda
43fe6e522b ieee1905: 8.0.12 2023-03-13 16:54:43 +01:00
Vitaliy Gaponov
b731667227 Ponmngr: set vendorId when XPON init in sh script 2023-03-13 14:09:09 +00:00
Amin Ben Romdhane
302a93121a bbf: 6.8.46 2023-03-13 12:29:01 +01:00
vdutta
212872b353 sulu: 2.0.7 2023-03-13 13:00:56 +05:30
Janusz Dziedzic
1d894d390b easy-soc-libs: 7.2.19 2023-03-13 06:33:30 +00:00
vdutta
9b3611b287 bbf: 6.8.45 2023-03-11 10:36:14 +05:30
vdutta
de8c4dbc02 icwmp: 9.1.18 2023-03-11 10:35:02 +05:30
Lukasz Kotasa
e8c3370f35 voicemngnr,libpicoevent-bcm: include bcm-toolchain.mk 2023-03-10 15:32:20 +00:00
Lukasz Kotasa
c37809e629 libvoice-broadcom: remove BCM_VOICEMNGR_WORKAROUND 2023-03-10 15:32:20 +00:00
Lukasz Kotasa
376b69eef1 voicemngr: changes related to bcm toolchain used 2023-03-10 15:32:20 +00:00
Lukasz Kotasa
92cde1ab5f libpicoevent-bcm: changes related to bcm toolchain used 2023-03-10 15:32:20 +00:00
Lukasz Kotasa
f722c70859 copy libpicoevent to libpicoevent-bcm (no changes) 2023-03-10 15:32:20 +00:00
Janusz Dziedzic
ed1194be9d easy-soc-libs: 7.2.18 2023-03-10 15:05:08 +00:00
nevadita.chatterjee
ef0c49d853 map-topology:2.5.1.18 2023-03-10 19:56:02 +05:30
vdutta
44ad141311 icwmp: 9.1.17 2023-03-10 19:43:09 +05:30
suvendhu
28e8fda73b obuspa: Add bulkdata csv report format support 2023-03-10 18:23:34 +05:30
suvendhu
44c6d5e7e6 obuspa: Add support of bulkdata json obj-hierarchy report 2023-03-10 12:45:04 +00:00
Filip Matusiak
6a8734ad4f map-agent: 4.2.0.6
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-03-10 12:20:20 +01:00
Filip Matusiak
91cd49c655 map-controller 4.2.0.3
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-03-10 12:19:59 +01:00
Anatoly Mirin
cb7256eba9 mcastmngr: fix ubus call in uci default script 2023-03-10 01:52:27 +00:00
Amin Ben Romdhane
82fe2012eb bbf: 6.8.44 2023-03-09 18:53:48 +01:00
Amin Ben Romdhane
26d9c43c7a bbf: 6.8.43 2023-03-09 15:27:39 +01:00
Yalu Zhang
a88061f8bf dectmngr-3.5.7: solve building issues on Qualcomm platform 2023-03-09 12:03:50 +01:00
Rahul Thakur
a92372c236 mcastmngr: update uci default script 2023-03-09 10:20:38 +00:00
Janusz Dziedzic
f4a33e75bd wifimngr: 15.0.7 2023-03-09 09:47:07 +00:00
Janusz Dziedzic
7c8b92e588 easy-soc-libs: 7.2.17 2023-03-09 09:46:02 +00:00
vdutta
cd29e81357 sulu: 2.0.6 2023-03-08 21:53:48 +05:30
vdutta
da85372764 icwmp: 9.1.16 2023-03-08 21:50:09 +05:30
vdutta
5b7a4d13ca swmodd: 2.1.23 2023-03-08 21:49:00 +05:30
Yalu Zhang
86a553c697 Update package vicemngr and libvoice-d2
Correct the package dependencies
2023-03-08 14:05:44 +01:00
Yalu Zhang
769d814a6a libvoice-d2: add d2-voice to the package dependency 2023-03-08 12:06:13 +01:00
Yalu Zhang
51b076831a Update package libvoice-d2
Update Makefile due to d2-voice upgrading
2023-03-08 11:55:29 +01:00
Yalu Zhang
316a861269 Update package libvoice-d2
Update Makefile to fix the compilation error due to d2-voice upgrading
2023-03-08 11:44:26 +01:00
Yalu Zhang
d88eb8054b Update package libvoice-d2
Keep the default country setting if the configured country is not supported
2023-03-07 17:13:26 +01:00
Yalu Zhang
7d3387b095 Update package libvoice-d2
- Add tones unobtainble and stutter dial for supported countries
- Support playing back DTMF tones
- Configure country specific ring signal
2023-03-07 14:06:16 +01:00
Omar Kallel
f3059ca516 icwmp: Add ActiveNotificationThrottle feature 2023-03-07 11:07:57 +01:00
Jakob Olsson
ae94f3390f wfadatad: 4.0.1.7 2023-03-07 09:41:22 +01:00
Jakob Olsson
5b3ad47604 ieee1905: 8.0.11 2023-03-07 09:41:22 +01:00
Jakob Olsson
e5bda20934 map-agent: 4.2.0.5 2023-03-07 09:41:10 +01:00
vdutta
a6bde81c24 uspd: 2.2.26 2023-03-07 10:53:05 +05:30
vdutta
d1f74be5d5 sulu:2.0.5 2023-03-05 12:55:56 +05:30
Vitaliy Gaponov
8f3a5ca899 Ponmngr: move Transceiver section under ANI 2023-03-03 09:26:56 +00:00
Jakob Olsson
e5826116c1 Revert "map-agent: 4.2.0.5"
This reverts commit c3cdc2e859.
2023-03-02 14:58:15 +01:00
Jakob Olsson
a3bbe22c4d Revert "ieee1905: 8.0.11"
This reverts commit ecf1e6780f.
2023-03-02 14:58:15 +01:00
Jakob Olsson
d850fa30bc Revert "wfadatad: 4.0.1.7"
This reverts commit ac99059cd1.
2023-03-02 14:58:15 +01:00
subramanianc
ae9aa435db libqos: Enable qos stats for nvg578 and nvg678 2023-03-02 19:12:28 +05:30
Grzegorz Sluja
5ab73e5ff8 Update package voicemngr
Fix for congestion tone not played
2023-03-02 14:10:31 +01:00
Grzegorz Sluja
663afa1332 Update package libvoice-airoha
Move the definition of RTP_HEADER_SIZE from airoha-priv.h to libvoice-priv.h
2023-03-02 14:08:45 +01:00
vdutta
d343d53c36 bbf: Support for SSH object 2023-03-02 18:15:03 +05:30
vdutta
c22193831e bbf: 6.8.41 2023-03-02 16:54:39 +05:30
Jakob Olsson
ac99059cd1 wfadatad: 4.0.1.7 2023-03-02 12:15:11 +01:00
Jakob Olsson
ecf1e6780f ieee1905: 8.0.11 2023-03-02 12:09:45 +01:00
Jakob Olsson
c3cdc2e859 map-agent: 4.2.0.5 2023-03-02 12:04:08 +01:00
vdutta
b5e675774e icwmp: 9.1.14 2023-03-02 13:37:29 +05:30
vdutta
5f116f84a2 sulu: 2.0.4 2023-03-02 13:30:43 +05:30
vdutta
e16f723dd0 sulu: 2.0.3 2023-03-01 15:35:00 +05:30
vdutta
c392ca42b9 iop: replace miniupnpd with ssdpd 2023-03-01 09:45:55 +05:30
Amin Ben Romdhane
3b5f77d70d bbf: 6.8.40 2023-02-28 23:41:48 +01:00
Jakob Olsson
5a44065b48 map-controller: 4.2.0.2 2023-02-28 17:24:00 +01:00
Jakob Olsson
3c030ea40d map-agent: 4.2.0.4 2023-02-28 17:23:19 +01:00
Janusz Dziedzic
00d9c04d22 wifimngr: 15.0.6 2023-02-28 11:00:29 +00:00
vdutta
7502a9418d Reverted: bbf: config flag to select packages based on selected datamodels 2023-02-28 12:47:48 +05:30
Amin Ben Romdhane
ecbf78e517 bbf: 6.8.38 2023-02-27 18:29:58 +01:00
vdutta
024e9d6291 bbf: 6.8.37 2023-02-27 18:31:10 +05:30
suvendhu
d7f607aaa4 bbf: Added config flag to select packages based on selected datamodels 2023-02-24 19:54:22 +05:30
Omar Kallel
bd5b448d38 Move ParameterKey handling in icwmp client 2023-02-24 10:29:35 +01:00
vdutta
10ee5827b9 obuspa: 7.0.0.7 2023-02-24 10:58:53 +05:30
Janusz Dziedzic
bc0e86f2de map-agent: 4.2.0.3 2023-02-23 16:10:25 +00:00
Yalu Zhang
6584bcb6d5 Update packages libvoice-d2 and voicemngr
- libvoice-d2: Change the default RTP payload time for G.711 to 20s from 10s
- voicemngr: Move the definition of RTP_HEADER_SIZE from airoha-priv.h to libvoice-priv.h
- voicemngr: Fix truncation errors for %d representation of int
2023-02-23 12:17:09 +01:00
vdutta
adc3dee346 bbf: 6.8.34 2023-02-23 10:55:24 +05:30
vdutta
8f3027c10a obuspa: 7.0.0.6 2023-02-23 09:08:58 +05:30
Grzegorz Sluja
7f542aef0c libvoice-airoha: Fix for playing unobtainable tone 2023-02-22 14:08:06 +01:00
Amin Ben Romdhane
bb213672f7 bbf: 6.8.33 2023-02-22 10:58:40 +01:00
Grzegorz Sluja
c0bdd69f42 libvoice-airoha: Add flash hook timings to country specifications 2023-02-21 16:26:35 +01:00
Yalu Zhang
05d96f2adf Update package libvoice-d2
Support writing ingress RTP and RTCP packets to vTSP
2023-02-21 13:42:41 +01:00
Anjan Chanda
702f18b133 easy-soc-libs: move LIBWIFI_USE_CTRL_IFACE to wifi.mk 2023-02-21 13:01:01 +01:00
Jakob Olsson
ffb2ca218f map-agent: 2.4.0.2 2023-02-21 10:00:07 +01:00
Markus Gothe
cdcc69a881 gryphon-led-module: Improve error handling.
For errors to propagte correctly we cannot set
the pointer to NULL.

Change-Id: Ie220f3dbe75b7eeefe2e0080279826c6b99144ef
2023-02-20 15:46:49 +00:00
Arne Jonsson
cdcafdb724 voicemngr: fix procd env variables in startup script 2023-02-20 15:22:19 +00:00
nevadita.chatterjee
ec7175267e map-topology: 2.5.1.17 2023-02-20 14:17:54 +05:30
Grzegorz Sluja
64d58681ea libvoice-airoha: Enable VAD together with CNG based on comfort_noise config 2023-02-17 12:11:41 +01:00
Yalu Zhang
7355dcb205 Update packages voicemngr and libvoice-d2
- Support connection operations
- Call voice_connection_deinit() to free resources on exit
2023-02-17 11:06:57 +01:00
Grzegorz Sluja
82afbb191c libvoice-airoha: Code refactoring, cleanup and handle ringing signals properly 2023-02-17 10:11:22 +01:00
Grzegorz Sluja
62d586fc60 libvoice-airoha: Implementation for ingress DTMF tone generation 2023-02-16 13:42:25 +01:00
Padmalochan Mohapatra
227a65b4c3 easy-soc-libs : Commit hash update in Makefile 2023-02-16 17:21:09 +05:30
Padmalochan Mohapatra
9e28ed1733 ethmngr : Makefile changes enabling dependancies for Mediatek(linux) 2023-02-16 11:12:36 +00:00
Anatoly Mirin
95471502d7 mcastmngr: integrate mcproxy
linux/lib/mcast/linux.sh converts mcastmngr UCI params to the
mcproxy native conf file.
2023-02-16 08:34:26 +00:00
suvendhu
b00207e894 obuspa: fix shellcheck errors 2023-02-16 06:26:52 +00:00
suvendhu
e508592575 swmodd: fix shell check errors 2023-02-16 06:26:27 +00:00
suvendhu
d911030e19 xmppc: fix shellcheck error 2023-02-16 06:25:11 +00:00
suvendhu
b69a074909 bulkdata: fix shellcheck error 2023-02-16 06:24:43 +00:00
suvendhu
5639e84185 udpecho: fix shellcheck error 2023-02-16 06:24:13 +00:00
suvendhu
406de53d91 uspd: fix shellcheck error 2023-02-16 06:23:43 +00:00
suvendhu
6c6abcd25a icwmp: fix shellcheck errors 2023-02-16 06:23:11 +00:00
Amin Ben Romdhane
32ea5ee333 bbf: 6.8.32 2023-02-15 16:11:35 +01:00
vdutta
4f8e7d9899 obuspa: 7.0.0.4 2023-02-15 19:42:54 +05:30
vdutta
331441e450 icwmp: 9.1.11 2023-02-15 19:33:06 +05:30
suvendhu
1ab88ddc70 twamp: fixed shellcheck errors 2023-02-15 19:04:26 +05:30
vdutta
57733d7f69 sulu: 2.0.2 2023-02-15 18:57:38 +05:30
suvendhu
f99105089a usermngr: Removed shellcheck error 2023-02-15 17:03:55 +05:30
suvendhu
649d57c9d3 bbf: removed shellcheck errors 2023-02-15 16:52:07 +05:30
Janusz Dziedzic
2e61d61460 easy-soc-libs: 7.2.15 2023-02-14 18:01:36 +00:00
Anjan Chanda
f92d060e06 wfadatad: 4.0.1.6 2023-02-14 18:42:21 +01:00
Anjan Chanda
242948948b easy-soc-libs: 7.2.14 2023-02-14 18:38:18 +01:00
Anjan Chanda
ddd2f3a7da ieee1905: 8.0.10 2023-02-14 18:34:28 +01:00
Jakob Olsson
aa7ac703b4 map-controller: 4.2.0.1 2023-02-14 17:52:16 +01:00
Jakob Olsson
f91fdd322e map-agent: 4.2.0.1 2023-02-14 17:42:50 +01:00
Grzegorz Sluja
e39818e9d1 fixup! libvoice-airoha: code refinement 2023-02-14 14:17:00 +01:00
Grzegorz Sluja
e62f24cc8e libvoice-airoha: code refinement 2023-02-14 11:33:45 +01:00
vdutta
dc20f7f5f0 icwmp: Support IPLayerCapacity diagnostics 2023-02-14 14:06:59 +05:30
vdutta
f6fa3f1a0b obudpst: support host package 2023-02-14 14:05:07 +05:30
vdutta
60ae096737 bbf: Support for TR-471 2023-02-14 14:03:03 +05:30
Amin Ben Romdhane
fc0ad5ba69 bbf: 6.8.29 2023-02-10 18:49:44 +01:00
Yalu Zhang
8ae1aa6d8c Update package libvoice-d2
Revert a tempory workaround
2023-02-10 16:17:52 +01:00
Yalu Zhang
0e774b253c Update packages voicemngr and libvoice-d2
Update dependencies for Qualcomm platform
2023-02-10 14:41:00 +01:00
vdutta
a853005c4d sulu: 2.0.1 2023-02-10 19:00:55 +05:30
subramanian c
19b0491590 qosmngr: Handle classify section name as per uci 2023-02-09 14:26:46 +00:00
Jakob Olsson
dd153fb261 map-agent: 4.2.0.0 2023-02-09 14:54:22 +01:00
Jakob Olsson
87ef9d3f67 map-controller: 4.2.0.0 2023-02-09 14:53:20 +01:00
Jakob Olsson
fb24ea7fef ieee1905: 8.0.0 2023-02-09 14:52:03 +01:00
Janusz Dziedzic
fd5b6a249b map-agent: 4.1.2.3 2023-02-09 13:27:57 +00:00
Janusz Dziedzic
287db84d6d easy-soc-libs: 7.2.13 2023-02-09 11:03:42 +00:00
vdutta
6c59af0c91 easy-soc-libs: fix compilation 2023-02-09 10:48:47 +05:30
vdutta
8072d96785 icwmp: 9.1.9 2023-02-09 09:48:27 +05:30
vdutta
7a552e7faf bbf: 6.8.28 2023-02-09 09:03:47 +05:30
Sukru Senli
21bef13eff iop: genconfig: remove support for iopsys-ramips 2023-02-08 14:16:41 +01:00
Sukru Senli
379d09248d easy-soc-libs: remove reference to iopsys-ramips target 2023-02-08 14:09:35 +01:00
Andreas Gnau
31e356de22 uboot: Remove package
This package delivers our own U-Boot port to MT7621. Remove it, because
we drop support for the ramips target. In the meantime, U-Boot upstream
also has full support for MT7621, but given that support for the ramips
target with the MT7621 subtarget and EX400 device is dropped anyways,
there is no point in migrating to that.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-02-06 19:43:07 +01:00
Amin Ben Romdhane
58afb75fd5 icwmp: 9.1.8 2023-02-06 17:48:59 +01:00
Amin Ben Romdhane
f6cf333457 bbf: 6.8.27 2023-02-06 17:46:34 +01:00
vdutta
5e71c0b886 icwmp: 9.1.7 2023-02-06 15:45:55 +05:30
Jakob Olsson
7fb146dea4 map-agent: 4.1.2.2 2023-02-06 11:02:55 +01:00
Rahul Thakur
669c87149f ponmngr: xpon ubus object minor fixes 2023-02-05 21:52:44 +05:30
Subramanian C
9c2a82ea90 qosmngr: Map DSCPCheck to option dscp_filter for uci qos 2023-02-03 12:33:53 +00:00
Markus Gothe
1e74f24e1c xmpcc: Fix hotplug-script so it is executed.
Use of 'local' outside of a function makes the script
halt and never get to the point where it reloads xmppc.
2023-02-03 11:53:15 +01:00
Markus Gothe
e82b011f20 ethmngr: Fix number of ports for Broadcom runner platforms. 2023-02-03 04:37:39 +00:00
Markus Gothe
09211031ac qosmngr: Update BDMF shell usage 2023-02-03 04:35:01 +00:00
nevadita.chatterjee
7a877b0c45 map-agent:4.1.2.1 2023-02-02 13:55:24 +00:00
Anjan Chanda
814e17842f ieee1905: 7.0.16 2023-02-02 14:47:58 +01:00
Grzegorz Sluja
5340619a96 libvoice-airoha: Support the basic call scenarios 2023-02-02 13:07:24 +01:00
Vivek Kumar Dutta
9e65220253 sulu: Separate packages for plugins
- Check Readme.md for details
2023-02-02 11:02:13 +00:00
Grzegorz Sluja
3cd58f18cc Add a new package libvoice-airoha 2023-02-02 10:40:20 +00:00
Padmalochan Mohapatra
36a51d0a77 easy-soc-libs : Makefile update 2023-02-02 14:36:42 +05:30
vdutta
52ae39fa32 bbf: 6.8.26 2023-02-02 12:08:59 +05:30
arne.jonsson
139c5a7d6e easy-soc-libs: 7.2.11 Support new BCM WL22D1GA driver
commit 4569d6a5e4cda440003ee7f0cb1e60cba82aa988
Author: Andreas Gnau <andreas.gnau@iopsys.eu>
Date:   Wed Feb 1 17:05:42 2023 +0100

    libwifi: Temporarily comment WLC_E_PROBE_STA_IND

    Temporarily comment WLC_E_PROBE_STA_IND until we have updated the
    BCM WiFi patches to the new impl91 driver. This commit is to be
    reverted once that is done.

    Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>

commit c0a1ff8ac5a9c06e6d9b56c32d27711146fab149
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date:   Fri Nov 11 20:38:02 2022 +0100

    libwifi: Update for BCM WL22D1GA impl91/impl93

    Add new include and adapt field name for new Broadcom WiFi driver
    22.1-17.10.251.3202 (impl91/impl93) that we switch to as part of
    moving  to SDK 5.04L.04p1.
2023-02-01 18:28:03 +01:00
Sukru Senli
28fa1ed6f9 Mcast platform 2023-02-01 11:46:10 +00:00
Janusz Dziedzic
116b9c4e70 map-agent: 4.1.2.0 2023-02-01 09:53:19 +00:00
Janusz Dziedzic
e728729917 wifimngr: 15.0.5 2023-02-01 09:31:28 +00:00
Maxim Menshikov
ed1c6c4cbb easy-soc-libs: 7.2.10
libqos/econet: inverse queue number by default
2023-02-01 10:18:24 +01:00
vdutta
84f10fa947 swmodd: 2.1.21 2023-02-01 10:46:47 +05:30
Marina Maslova
6c2439841d easy-soc-libs: 7.2.9
libqos: fix build issue for airoha caused by stats type change to u64
2023-01-31 18:06:40 +01:00
Anjan Chanda
428071241f wfadatad: 4.0.1.0 2023-01-31 16:56:29 +01:00
Omar Kallel
8c651abc6d icwmp: Update dhcp option 60 handling 2023-01-31 16:17:27 +01:00
suvendhu
5a1a0af706 icwmpd: remove DHCP option 125 deletion 2023-01-31 13:52:39 +00:00
Amin Ben Romdhane
a79b121895 bbf: 6.8.25 2023-01-31 14:48:51 +01:00
nevadita.chatterjee
f859973f32 map-topology:2.5.1.16 2023-01-31 19:13:48 +05:30
arne.jonsson
a9706e0d73 Remove use of BRCM_SDK_VER 2023-01-31 10:22:22 +01:00
Jakob Olsson
9953e9ee9b map-controller: 4.1.2.0 2023-01-31 10:11:02 +01:00
Jakob Olsson
0b680a8f67 map-agent: 4.1.1.0 2023-01-31 10:09:29 +01:00
Jakob Olsson
ef3e1681f9 ieee1905: 7.0.3 2023-01-31 10:08:39 +01:00
Maxim Menshikov
e28995fa4e qosmngr/airoha: enable eight queue PQ/WRR 2023-01-31 08:29:44 +00:00
vdutta
aee1acab41 sulu: 1.3.30 2023-01-30 17:46:37 +05:30
Padmalochan Mohapatra
0c7aa209b5 iopsys : Update packages [easy-soc-libs] [qosmngr] 2023-01-30 11:25:41 +00:00
Amin Ben Romdhane
827d2768d6 bbf: 6.8.24 2023-01-30 11:39:56 +01:00
Padmalochan Mohapatra
60e4467f88 easy-soc-libs : Makefile changes to support linux in libqos. 2023-01-30 06:48:25 +00:00
Yalu Zhang
81950e5334 Update packages voicemngr and libvoice-broadcom
Remove some unused events.
2023-01-27 15:20:55 +01:00
vdutta
d8c7ebb2d6 sulu: 1.3.29 2023-01-27 15:36:12 +05:30
Amin Ben Romdhane
5de90c7a9c bbf: 6.8.23 2023-01-26 15:01:30 +01:00
vdutta
5d7e5772a8 obudpst: 7.5.1 2023-01-26 17:15:42 +05:30
Amin Ben Romdhane
0f886bbdf1 bbf: 6.8.22 2023-01-26 12:02:58 +01:00
vdutta
2275c00b9f sulu: 1.3.28 2023-01-26 12:18:09 +05:30
Markus Gothe
00c6f60f2e twamp: Don't try to resolve IP-adresses in firewall. 2023-01-26 04:24:49 +00:00
Erik Karlsson
6fd65dddc8 urlfilter: use iptables/ip6tables -nL 2023-01-25 18:54:53 +01:00
Erik Karlsson
4c7577bf1c udpecho: use iptables/ip6tables -nL 2023-01-25 18:54:29 +01:00
Erik Karlsson
d162e82d20 bbf: use iptables -nL 2023-01-25 18:53:53 +01:00
Jakob Olsson
49f95c3d05 map-agent: 4.1.0.4: add unauthorized sta option 2023-01-25 12:08:11 +01:00
Amit Kumar
f361dbd5e7 ponmngr: updated xpon json for onuactivation param 2023-01-25 12:13:35 +05:30
Amin Ben Romdhane
bce4779702 bbf: 6.8.21 2023-01-24 14:21:41 +01:00
Amin Ben Romdhane
a715e0a659 ssdpd: 1.0.5 2023-01-24 14:12:42 +01:00
vdutta
f288578904 sulu: 1.3.27 2023-01-20 11:52:54 +05:30
Amit Kumar
1231fc226c ponmngr: bbf json updated for xpon data model
Updated for Transceiver connector type
2023-01-19 13:05:08 +05:30
Jakob Olsson
1d189552b2 map-agent: 4.1.0.3 2023-01-18 17:14:42 +01:00
Jakob Olsson
ce4d398492 map-controller: 4.1.1.1 2023-01-18 16:55:09 +01:00
Jakob Olsson
b553bc34bf map-agent: 4.1.0.2 2023-01-18 16:15:35 +01:00
vdutta
ddb3e69af8 usp-js: 1.1.0 2023-01-18 20:25:29 +05:30
vdutta
fc6a687322 obuspa: 7.0.0.3 2023-01-18 20:13:46 +05:30
Amin Ben Romdhane
d7c553457c bbf: 6.8.20 2023-01-18 15:05:40 +01:00
Jakob Olsson
2a82271322 map-controller: correctly bump package to 4.1.1.0 2023-01-18 13:18:43 +01:00
Jakob Olsson
a2b454ccb6 map-controller: 4.1.1.0 2023-01-18 13:07:43 +01:00
Janusz Dziedzic
cb17e5b375 map-controller: 4.1.0.4 2023-01-18 10:22:46 +00:00
Sukru Senli
c54cb80862 qosmngr: do not limit number of queues to 4 for BCM68880
also remove unused check of /proc/socinfo
2023-01-18 06:26:11 +00:00
subramanian c
bf1d366ce7 qosmngr: generate ip rules from classify section 2023-01-18 06:16:29 +00:00
Rahul
346319892c qosmngr: add order to default classification rules 2023-01-18 05:50:40 +00:00
Omar Kallel
060a1ccfbb extract ManagementServer datamodel to cwmp package as dynamic aobject 2023-01-18 06:04:48 +01:00
Jakob Olsson
74a8169050 map-controller: 4.1.0.3 2023-01-17 17:23:01 +01:00
vdutta
15bb04abd1 obuspa: 7.0.0.2 2023-01-17 19:27:03 +05:30
Janusz Dziedzic
51b2ffd607 easy-soc-libs: 7.2.7 2023-01-17 12:34:50 +00:00
vdutta
091c4b81f9 bbf: 6.8.19 2023-01-17 17:44:46 +05:30
nevadita.chatterjee
c68554a42c map-controller: Fixing pidof in reload 2023-01-17 16:48:26 +05:30
Jakob Olsson
10de78cd1a map-topology: 2.5.1.15 2023-01-17 11:40:17 +01:00
Filip Matusiak
6bd995e445 map-controller: 4.1.0.2
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-01-17 09:41:52 +01:00
suvendhu
087e0e3750 icwmp: Added dslforum.org in dhcp option 60 2023-01-16 16:58:40 +05:30
Sukru Senli
c3f5c269aa iop: genconfig: in customerconfigs use the same branch as in iowrt repo 2023-01-16 11:57:04 +01:00
vdutta
4ef1ac4703 udpecho: 2.0.3 2023-01-16 15:20:05 +05:30
vdutta
b9c58a99a5 twamp: 1.2.4 2023-01-16 14:48:48 +05:30
vdutta
4bec432070 swmodd: 2.1.20 2023-01-16 14:45:27 +05:30
vdutta
e2556a0f3d stunc: 1.1.15 2023-01-16 14:44:02 +05:30
vdutta
f265b9fe7b usermngr: 1.0.6 2023-01-16 14:41:59 +05:30
Anjan Chanda
c2bf977fb6 iop: add libwifiutils package in default config 2023-01-16 09:52:51 +01:00
Anjan Chanda
44030e710a wfadatad: add libwifiutils.so as package dependency 2023-01-16 09:52:51 +01:00
Anjan Chanda
e0028e8079 map-controller: add libwifiutils.so as package dependency 2023-01-16 09:52:51 +01:00
Anjan Chanda
9c14d21609 easy-soc-libs: 7.2.6: fix build on platforms having no WiFi 2023-01-16 09:52:51 +01:00
Amit Kumar
d690e1a7a5 ponmngr: Updated XPON bbf json for Transceiver 2023-01-16 07:50:30 +00:00
vdutta
bfacccba18 obuspa: Integrate obuspa-7.0.0 2023-01-16 12:47:36 +05:30
Marek Puzyniak
8b93d6ce3a wifimngr: 15.0.4 2023-01-13 16:35:16 +00:00
Marek Puzyniak
69d12b567d easy-soc-libs: 7.2.5 2023-01-13 16:33:28 +00:00
Jakob Olsson
4fbede4cb2 map-controller: 4.1.0.1 2023-01-13 16:55:53 +01:00
Jakob Olsson
e758208a17 map-agent: 4.1.0.1 2023-01-13 16:42:26 +01:00
Amin Ben Romdhane
a5f04ddb5f bbf: 6.8.18 2023-01-13 11:18:25 +01:00
vdutta
48913ed4bf sulu: 1.3.26 2023-01-13 12:20:48 +05:30
Amin Ben Romdhane
a8e8d4b109 ssdpd: 1.0.4 2023-01-12 13:33:40 +00:00
Amit Kumar
3a968d1914 map-topology: Updated Makefile commit version 2023-01-12 17:56:20 +05:30
Amit Kumar
58f4ad8e5a map-topology: cherry-pick from 6.5 2023-01-12 09:47:28 +05:30
Amit Kumar
549d681fab ponmngr: updated bbf json file for transceiver 2023-01-11 08:54:02 +00:00
Amin Ben Romdhane
5313770972 usermngr: 1.0.5 2023-01-10 17:39:46 +01:00
Amin Ben Romdhane
9046c71d00 bbf: 6.8.17 2023-01-10 17:38:27 +01:00
Filip Matusiak
87a71c7389 map-controller: validate thresholds in sta_steering section of config
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-01-10 11:38:46 +00:00
Janusz Dziedzic
834bab34ab easy-soc-libs: 7.2.4
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-01-10 09:30:51 +00:00
Anjan Chanda
a04593f02d wfadatad-decollector-4.0.0.1: deprecate wfadatad (deagent) package 2023-01-05 13:14:16 +01:00
Anjan Chanda
f7456c22f9 wfa-capi: 2.0.1 2023-01-05 10:07:03 +01:00
Anjan Chanda
34e5487f75 map-agent: 4.1.0.0 2023-01-04 17:01:55 +01:00
Anjan Chanda
a49e91f18e map-controller: 4.1.0.0 2023-01-04 17:01:55 +01:00
Anjan Chanda
ff55ae40f9 ieee1905: 7.0.2 2023-01-04 17:01:55 +01:00
Anjan Chanda
3bdc11c5c4 wifimngr: 15.0.3 2023-01-04 17:01:55 +01:00
Anjan Chanda
2cd976f5b9 easy-soc-libs: 7.2.3 2023-01-04 17:01:55 +01:00
Sukru Senli
cc306932e8 iop: do not select ethmngr by default
this causes problem building for airoha due to libethernet's dependency to xpon_bsp which is selected as =m
2023-01-04 16:55:49 +01:00
Anjan Chanda
d3927168b2 wifimngr: 15.0.2 2023-01-04 16:03:14 +01:00
Anjan Chanda
96ede99d63 easy-soc-libs: 7.2.1 2023-01-04 16:02:35 +01:00
Sukru Senli
86e90969e3 dslmngr: allow compiling for non broadcom targets
to be able to use test stub libdsl
2023-01-04 14:46:56 +01:00
Sukru Senli
99024c3111 dslmngr: move dsl scripts from target feeds to dslmngr package 2023-01-04 13:57:16 +01:00
Anjan Chanda
93777c899c wifimngr: 15.0.1 2023-01-04 13:14:30 +01:00
Anjan Chanda
d4bf893482 ieee1905: 7.0.1 2023-01-04 12:52:05 +01:00
Anjan Chanda
9da34a4fff easy-soc-libs: 7.2.0 2023-01-04 12:52:05 +01:00
Padmalochan Mohapatra
f7e6238928 qos Improvements on mtk qos tc+iptable classification 2023-01-03 15:26:20 +00:00
Sukru Senli
9192b863ea ethmngr: update port config generation and get correct max speed 2023-01-03 16:14:18 +01:00
Sukru Senli
0ef4d4e6b1 ethmngr: make scripts available for all targets even though ethmngr/libethernet pair is not available 2023-01-03 15:40:31 +01:00
Sukru Senli
af22e1abc3 iop: let easy-soc libraries be selected by the managers 2023-01-03 15:37:40 +01:00
Sukru Senli
b9e6f56110 iop: select ethmngr and qosmngr 2023-01-03 15:14:10 +01:00
Sukru Senli
d8454fab29 ethmngr: merge port-management into ethmngr 2023-01-03 15:06:39 +01:00
Wenpeng Song
8abeee9d23 Update packages endptmngr and dectmngr
dectmngr-3.5.6: Send CALL_REJECT only for an unanswered incoming call 
endptmngr: Fix CALL_REJECT and ON-HOOK handling

(cherry picked from commit 8605c1e455)
2023-01-03 13:35:30 +00:00
Sukru Senli
1164e33371 qosmngr: simplify Makefile 2023-01-03 13:01:34 +01:00
Janusz Dziedzic
15a65a071e wifimngr: 14.3.3
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-01-02 15:29:19 +00:00
Janusz Dziedzic
ecddbb5992 easy-soc-libs: 6.9.0
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-01-02 15:29:19 +00:00
Sukru Senli
4dbf7ac1da qosmngr: add intall section for ipq95xx target 2023-01-02 16:21:51 +01:00
Sukru Senli
f071d28911 qosmngr: allow selecting for ipq95xx target 2023-01-02 13:07:22 +01:00
Suresh Krishna
16e834d0f6 ipq95xx: add support for building target ipq95xx based on mac80211
Signed-off-by: Suresh Krishna <quic_sureshkr@quicinc.com>
2023-01-02 11:34:58 +00:00
Suvendhu Hansa
881711bb11 dhcp option 43 handling 2022-12-30 08:30:19 +00:00
Padmalochan Mohapatra
6961bbb4a7 qos : tc-Classification dead code cleanup 2022-12-30 03:16:49 +00:00
Padmalochan Mohapatra
591f9d9dde qos : Classification with tc+iptables for QoS on MTK_PANTHER 2022-12-29 12:09:38 +00:00
subramanian c
d942f2c606 qos: Deprecate firewall.qos and handle through qos config 2022-12-27 04:32:07 +00:00
Marina Maslova
01819a7f72 qos: enable should be 1 by default 2022-12-26 13:11:44 +03:00
Yalu Zhang
c8969996c7 Update package voicemngr and libvoice-broadcom
Get voice port configuration from the board database
2022-12-23 16:11:48 +01:00
nevadita.chatterjee
0bb0ade1ec map-topology:2.5.1.14 2022-12-22 10:40:59 +05:30
Amin Ben Romdhane
52c338366b ssdpd: 1.0.4 2022-12-21 23:25:36 +01:00
Marina Maslova
0dae8c3786 qos: default uplink limit should be 0 (unlimited) 2022-12-21 23:31:02 +03:00
vdutta
cbbe02096f ssdpd: 1.0.3 2022-12-21 22:22:11 +05:30
vdutta
fae6a213ac ssdpd: 1.0.2 2022-12-21 22:10:49 +05:30
vdutta
5e57b31c45 uspd: 2.2.23 2022-12-21 22:00:55 +05:30
vdutta
eb5437892d bbf: 6.8.16 2022-12-21 21:57:58 +05:30
vdutta
12e2a84ad1 ssdpd: 1.0.1 2022-12-21 21:46:20 +05:30
vdutta
0b11d79816 bbf: host access_control dm support 2022-12-21 19:09:40 +05:30
subramanian c
56fffd6b9c Firewall: Handle access control through /etc/config/hosts 2022-12-21 13:13:37 +00:00
sverma
0c28e45434 add psk mode on i1905, agent and controller 2022-12-21 13:06:06 +01:00
Jakob Olsson
72f48f9230 map-agent: 2.10.4.17 2022-12-21 13:04:29 +01:00
Jakob Olsson
787810e8ab ieee1905: 6.0.21 2022-12-21 12:57:30 +01:00
Jakob Olsson
15f2cd62e6 map-agent: 2.10.4.16 2022-12-21 12:49:16 +01:00
Jakob Olsson
6153f47f95 map-controller: 2.11.0.24 2022-12-21 12:19:42 +01:00
Jakob Olsson
1ec4f0f0da map-controller: 2.11.0.23 2022-12-21 11:43:43 +01:00
Jakob Olsson
c0e5dfae7f map-agent: 2.10.4.15 2022-12-21 11:42:10 +01:00
Jakob Olsson
d3766ede6c ieee1905: uci-defaults: convert old 'option ifname' to 'list ifname' entries 2022-12-21 11:35:02 +01:00
Sukru Senli
f03743634f iop: config: select ip6tables-zz-legacy 2022-12-21 11:30:41 +01:00
vdutta
5419eb07d2 sulu: use mosquitto uci for services 2022-12-21 14:27:38 +05:30
vdutta
34c0b3bb9e obuspa: 6.0.0.14 2022-12-21 14:23:49 +05:30
vdutta
d664b70bf6 bbf: 6.8.14 2022-12-21 14:22:36 +05:30
Jakob Olsson
dd674c2d93 map-controller: 2.11.0.22 2022-12-20 16:41:41 +01:00
Jakob Olsson
19ff43afe2 map-agent: 2.10.4.14 2022-12-20 16:41:34 +01:00
Saurabh Verma
2f80620644 map-controller: init.d: add support for other enc methods 2022-12-20 16:14:44 +01:00
vdutta
67555eed9f obuspa: 6.0.0.13 2022-12-20 18:32:41 +05:30
vdutta
8e7738a153 bbf: 6.8.13 2022-12-20 18:27:10 +05:30
suvendhu
5ca4dabf49 bbf: added uci-default script mqtt dm 2022-12-20 12:54:29 +00:00
vdutta
e6042743cb icwmp: 9.1.4 2022-12-20 18:23:47 +05:30
suvendhu
7353a6bfe7 Fix GW info overwrite on boot 2022-12-20 10:55:38 +00:00
Padmalochan Mohapatra
deef704d42 Revert "Revert "qosmngr : standard Linux support via tc+iptables"" 2022-12-20 09:30:24 +00:00
Jakob Olsson
a1e93540c5 map-agent: 2.10.4.13 2022-12-19 14:34:10 +01:00
vdutta
d37e6944f5 usermngr: 1.0.4 2022-12-19 18:53:21 +05:30
Amin Ben Romdhane
794c6f09b4 bbf: 6.8.12 2022-12-19 10:10:32 +01:00
Amin Ben Romdhane
39f2dab3f2 Add ssdpd package 2022-12-18 13:36:59 +00:00
Sukru Senli
a53706b95b Revert "qos: Deprecate firewall.qos and handle through qos config"
This reverts commit cf16fa7a6f.
2022-12-16 21:50:06 +01:00
Sukru Senli
53e13bc58c Revert "qosmngr : standard Linux support via tc+iptables"
This reverts commit 60d606e0fb.
2022-12-16 21:49:58 +01:00
Sukru Senli
9ed7feed87 sulu: 1.3.24 2022-12-16 17:52:27 +01:00
vdutta
4b05713ae7 obuspa: 6.0.0.12 2022-12-16 20:27:30 +05:30
vdutta
08a31cccad sulu: 1.3.23 2022-12-16 20:26:52 +05:30
suvendhu
5ed51849bb ponmngr: Added Device.XPON. json plugin 2022-12-16 12:51:46 +00:00
vdutta
677c712117 sulu: 1.3.22 2022-12-16 18:12:14 +05:30
Anjan Chanda
04fb03e1f4 ieee1905: 6.0.20 2022-12-16 13:19:18 +01:00
Jakob Olsson
d6cddef202 map-agent: 2.10.4.12 2022-12-16 12:08:22 +01:00
Jakob Olsson
c4a417a4b0 map-controller: 2.11.0.21 2022-12-16 12:01:03 +01:00
vdutta
8e6d97453d sulu: 1.3.21 2022-12-16 13:46:21 +05:30
Padmalochan Mohapatra
60d606e0fb qosmngr : standard Linux support via tc+iptables 2022-12-16 06:06:21 +00:00
vdutta
5c1afe5b78 bbf: 6.8.11 2022-12-16 09:29:20 +05:30
vdutta
aefcd070d6 sulu: Append sulu version info 2022-12-15 16:26:18 +05:30
vdutta
2a8316d7a1 sulu: 1.3.19 2022-12-15 12:53:48 +05:30
subramanian c
cf16fa7a6f qos: Deprecate firewall.qos and handle through qos config 2022-12-15 06:32:24 +00:00
vdutta
ee58c5e429 icwmp: 9.1.3 2022-12-14 20:37:00 +05:30
vdutta
a17b91452c bbf: 6.8.10 2022-12-14 20:22:28 +05:30
Vivek Kumar Dutta
185fd76b46 sulu: Add https support 2022-12-14 14:34:37 +00:00
suvendhu
07eb27b1dd icwmp: parsing of DHCP option 125 2022-12-14 06:55:40 +00:00
Amit Kumar
548ae9605b icwmp: dhcp handling for option 125 2022-12-14 06:55:40 +00:00
Anjan Chanda
a4f4add21b wfadatad: 2.11.0.4 2022-12-13 22:05:26 +01:00
Anjan Chanda
fe8f39cd5a ieee1905: 6.0.16 2022-12-13 22:03:41 +01:00
Jakob Olsson
77626b51b0 map-controller: 2.11.0.20 2022-12-13 17:53:56 +01:00
Jakob Olsson
d10ca5330e map-agent: 2.10.4.11 2022-12-13 17:50:40 +01:00
Jakob Olsson
c2e77a5fbe map-agent: 2.10.4.10 2022-12-12 16:20:38 +01:00
Jakob Olsson
93b9aa8312 map-controller: 2.11.0.19 2022-12-12 16:19:44 +01:00
Anjan Chanda
937ad7c0fc wfadatad: 2.11.0.2 2022-12-12 15:16:48 +01:00
Anjan Chanda
cb6d5bdc36 map-controller: 2.11.0.18 2022-12-12 15:15:17 +01:00
Anjan Chanda
df3d450671 map-agent: 2.10.4.9 2022-12-12 15:14:16 +01:00
Anjan Chanda
16951b9c31 wfadatad: 2.11.0.1 2022-12-12 13:18:43 +01:00
Anjan Chanda
cd9149efad map-topology: 2.5.1.13 2022-12-12 11:51:51 +01:00
Jakob Olsson
c4965c9c05 map-agent: 2.10.4.8 2022-12-09 16:46:23 +01:00
vdutta
d439066686 sulu: 1.3.16 2022-12-09 10:06:36 +05:30
vdutta
826aeb477e usermngr: CheckCredentialsDiagnostic Operate 2022-12-08 12:07:06 +05:30
Yalu Zhang
63b776f97d Update packages voicemngr, libvoice-broadcom and libvoice-d2 2022-12-07 18:18:38 +01:00
Jakob Olsson
a7383806cd map-agent: 2.10.4.7 2022-12-07 15:49:31 +01:00
vdutta
81d15db29c sulu: 1.3.15 2022-12-07 19:29:48 +05:30
vdutta
07bf2de658 uspd: 2.2.22 2022-12-07 19:24:59 +05:30
Jakob Olsson
5c94394a6b map-agent: 2.10.4.6 2022-12-07 10:47:24 +01:00
Suvendhu Hansa
224a40f7b4 usermngr: added uci-defaults to sync shells 2022-12-07 09:26:32 +00:00
Janusz Dziedzic
f7bc58530b map-controller: 2.11.0.17 2022-12-07 09:14:26 +00:00
Janusz Dziedzic
c11bf82271 easy-soc-libs: 6.8.0
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-12-07 08:48:48 +00:00
Janusz Dziedzic
4bf446929a easy-soc-libs: 6.7.9
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-12-07 06:46:01 +00:00
Jakob Olsson
85c916aa6d map-topology: 2.5.1.11 2022-12-06 16:28:06 +01:00
Janusz Dziedzic
a142950c90 map-agent: 2.10.4.5 2022-12-06 14:08:28 +00:00
Janusz Dziedzic
0f28109363 ieee1905: 6.0.9 2022-12-06 14:02:54 +00:00
Anjan Chanda
e2c593662d ieee1905: 6.0.8 2022-12-06 14:31:00 +01:00
Amin Ben Romdhane
749713615c bbf: 6.8.9 2022-12-06 14:21:34 +01:00
vdutta
e6ff986010 sulu: 1.3.14 2022-12-06 10:59:43 +05:30
Jakob Olsson
7f8869cdae map-agent: 2.10.4.4 2022-12-05 17:17:08 +01:00
Jakob Olsson
9a5658fa23 map-agent: 2.10.4.3 2022-12-05 16:19:33 +01:00
Anjan Chanda
9874a26de2 ieee1905: 6.0.7 2022-12-05 09:47:03 +01:00
vdutta
ee54c28426 sulu: 1.3.13 2022-12-05 11:57:46 +05:30
Jakob Olsson
71d8a2ac30 map-controller: 2.11.0.16 2022-12-02 15:09:06 +01:00
Jakob Olsson
b35cc044b4 map-controller: 2.11.0.15 2022-12-02 14:35:12 +01:00
Amin Ben Romdhane
8d80e4d38f bbf: 6.8.8 2022-12-02 14:23:02 +01:00
Jakob Olsson
55afb62ba0 map-agent: 2.10.4.2 2022-12-02 14:21:44 +01:00
Sukru Senli
07a8753149 iop: config: select usermngr 2022-12-02 14:08:45 +01:00
Andreas Gnau
5d3027c777 iop: genconfig: Use lowercase version name throughout
OpenWrt normalises the version number in the image name to lowercase.
For consistency set the version already in lowercase in the config so
that there is not inconsistency between the version stored in
/etc/os-release and the image name.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2022-12-02 14:05:12 +01:00
Filip Matusiak
8c2421018a map-agent: add On Boot Only scan config option
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-12-02 12:57:30 +00:00
vdutta
a4f7d4650b usermngr: 1.0.1 2022-12-02 17:36:39 +05:30
vdutta
ab92e503bc uspd: 2.2.21 2022-12-02 17:08:20 +05:30
vdutta
f0f3560789 sulu: 1.3.12 2022-12-02 17:07:11 +05:30
vdutta
a7577d8975 bbf: 6.8.7 2022-12-02 17:02:16 +05:30
Sukru Senli
243e034156 questd: 5.2.5 2022-12-02 11:58:21 +01:00
vdutta
ea242d4e4d swmodd: 2.1.19 2022-12-02 15:40:17 +05:30
suvendhu
2c154d09e6 usermngr: added new package for user management 2022-12-02 15:15:37 +05:30
Jakob Olsson
62166c5465 map-agent: 2.10.4.1 2022-12-01 14:46:28 +01:00
Andreas Gnau
89264fa175 iop: genconfig: Use new version format
Use a new version format:

* More strict regex for filtering tags for determining version which
  prevents OpenWrt and hopefully other tags from becoming the IOWRT
  version
* version follows standard git-describe format with -dirty
* customerconfigs are appended to the version

Example-versions:
 * 7.1.0BETA1
 * 7.1.0BETA1-29-g1292f9102e-dirty
 * 7.1.0BETA1-29-g1292f9102e-secureboot
 * 7.1.0BETA1-29-g1292f9102e-securebooteval
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2022-11-30 19:53:44 +01:00
Anjan Chanda
6091b22937 map-topology: 2.5.1.10 2022-11-30 17:36:10 +01:00
Jakob Olsson
e0f2f11174 map-agent: 2.10.4.0 2022-11-30 16:53:43 +01:00
Janusz Dziedzic
1df0c1472f easy-soc-libs: 6.7.8
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-11-30 15:23:50 +00:00
Yalu Zhang
cc5348a282 voicemngr: Divide libvoice to common code and platform specific one
Also add a new packages libvoice-broadcom.
2022-11-30 14:19:40 +01:00
vdutta
d18a1b6788 uspd: 2.2.20 2022-11-30 15:28:47 +05:30
vdutta
8553a5c00f obuspa: 6.0.0.11 2022-11-30 15:26:12 +05:30
Anjan Chanda
67d2e0fe01 ieee1905: 6.0.2 2022-11-29 19:23:06 +01:00
Marek Puzyniak
423c7e7f7a easy-soc-libs: 6.7.7 2022-11-29 14:05:11 +00:00
vdutta
ff6a0e67da bbf: 6.8.6 2022-11-29 18:35:24 +05:30
vdutta
65f8a28962 uspd: 2.2.19 2022-11-28 18:19:06 +05:30
Janusz Dziedzic
ccd154cfa5 wifimngr: 14.3.2
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-11-28 11:28:18 +00:00
vdutta
7b987fa396 uspd: 2.2.18 2022-11-28 16:48:32 +05:30
vdutta
3f4a439de4 icwmp: 9.1.2 2022-11-28 16:29:54 +05:30
vdutta
a1cc37d3a6 sulu: 1.3.11 2022-11-25 22:35:53 +05:30
Anjan Chanda
8af85b8883 ieee1905: 6.0.1 2022-11-25 16:47:48 +01:00
Amin Ben Romdhane
55b69db576 bbf: 6.8.5 2022-11-25 14:51:33 +01:00
Amin Ben Romdhane
07f2cc555e bbf: 6.8.4 2022-11-25 14:17:16 +01:00
Amin Ben Romdhane
6b6383c237 icwmp: 9.1.1 2022-11-25 14:16:21 +01:00
Janusz Dziedzic
03344e0df5 map-agent: 2.10.3.28
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-11-25 12:27:17 +00:00
vdutta
75ed0c7a18 uspd: 2.2.17 2022-11-25 16:48:56 +05:30
Suvendhu Hansa
0d076595f8 swmodd: Fix AutoStart, RequestedState for OCI containers 2022-11-25 08:36:13 +00:00
vdutta
1ba2d5ab89 obuspa: 6.0.0.10 2022-11-24 19:45:00 +05:30
vdutta
ec6533707f sulu: Role based access control 2022-11-24 19:42:50 +05:30
vdutta
f868713ed9 sulu: 1.3.10 2022-11-24 13:42:46 +05:30
vdutta
1ef8245cf9 obuspa: 6.0.0.9 2022-11-23 21:00:00 +05:30
Amit Kumar
0385a0b715 qos: qos reload handling updated 2022-11-23 18:08:57 +05:30
vdutta
5dd35e99e2 obuspa: Fix db update with uci delete 2022-11-23 12:07:26 +05:30
hemlata
43dd5bf8c7 endptmgr :Correction of codec names for codecs ubus call 2022-11-22 14:11:53 +01:00
Filip Matusiak
98ea973e61 map-agent: 2.10.3.27
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-11-22 10:49:26 +01:00
vdutta
f7d0cc8dbd sulu: 1.3.9 2022-11-21 17:27:48 +05:30
hemlata
0afb94dc77 endptmngr :Support hardware specific codec capability other than hardcoding 2022-11-21 11:39:05 +01:00
Amin Ben Romdhane
3835cc0bc9 bbf: 6.8.3 2022-11-18 14:19:09 +01:00
subramanian c
7b766ea7f1 qos: Apply qos classify config in the order of order param value 2022-11-18 11:37:55 +00:00
Dineshkumar
4efacdaee5 iop: genconfig_min: Added ipq95xx target in TARGET_DEVICES model
Signed-off-by: Dineshkumar <quic_dinel@quicinc.com>
2022-11-18 10:43:15 +05:30
Dineshkumar
fb91a7f70f iop: genconfig: Added ipq95xx target in TARGET_DEVICES model
Signed-off-by: Dineshkumar <quic_dinel@quicinc.com>
2022-11-17 15:08:34 +00:00
Jakob Olsson
47f47ac097 map-controller: 2.11.0.14 2022-11-17 15:55:25 +01:00
vdutta
b4cb466f4e icwmp: 9.1.0 2022-11-17 17:02:21 +05:30
vdutta
9a1cd147d0 bbf: 6.8.2 2022-11-17 17:01:57 +05:30
vdutta
c67e429387 sulu: 1.3.8 2022-11-17 16:32:22 +05:30
Jakob Olsson
a5e6d08394 map-controller: 2.11.0.13 2022-11-17 09:45:31 +01:00
Andreas Gnau
a37729d885 iop: config: Set version config-settings
Set version config settings and document the motivation behind some
settings. This enables use of standard OpenWrt image naming for IOWRT.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2022-11-17 08:42:07 +00:00
vdutta
2efa706f67 bbf: 6.8.1 2022-11-16 21:28:38 +05:30
Jakob Olsson
1911881b94 wifimngr: 05-wifi: fix multiap.backhaul path 2022-11-16 16:57:50 +01:00
Jakob Olsson
8c9f390b89 map-agent: fix multiap.backhaul path 2022-11-16 16:57:30 +01:00
Wenpeng Song
9dacae709b evoice 0.2.39
Correct libvoiceservice MaxQIValues
2022-11-16 09:16:32 +00:00
Amin Ben Romdhane
363fb57b3e bbf: Added support for UserInterface Object 2022-11-15 17:41:25 +00:00
Jakob Olsson
99ed84be4d map-controller: 2.11.0.12 2022-11-15 16:42:42 +01:00
Jakob Olsson
930611301b map-agent: 2.10.3.26 2022-11-15 16:42:05 +01:00
Jakob Olsson
e06e0a6599 ieee1905: 5.0.20 2022-11-15 16:40:16 +01:00
Filip Matusiak
9de5fe3362 map-controller: validate sta_steering section of cntlr config file
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-11-15 14:00:24 +00:00
Filip Matusiak
c9fded45b7 map-controller: add sta_steering in example cntlr config file
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-11-15 14:00:24 +00:00
Lukasz Kotasa
545a54eb9f TARGET rename: iopsys-brcm63xx-arm -> brcmbca 2022-11-15 12:04:23 +00:00
Lukasz Kotasa
b979bf4891 genconfig: rename iopsys-brcm63xx-arm -> brcmbca 2022-11-15 12:04:23 +00:00
Sukru Senli
d2111b2bad qosmngr: econet -> airoha 2022-11-15 11:30:10 +01:00
Lukasz Kotasa
ffb839b1d0 qosmngr: rename econet target 2022-11-14 12:47:19 +00:00
suvendhu
360e48a3cf urlfilter: added description of vendor parameters 2022-11-14 06:50:10 +00:00
vdutta
71198a83de bulkdata: 2.0.9 2022-11-14 11:04:33 +05:30
Grzegorz Sluja
87eb713593 endptmngr: Refactor inconsistency about call_id, pcm_id and pcm_state 2022-11-11 10:37:08 +01:00
vdutta
5fbc3e9efb sulu: 1.3.7 2022-11-11 14:20:46 +05:30
Janusz Dziedzic
6140efcb5a easy-soc-libs: 6.7.6
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-11-10 14:47:33 +00:00
Yalu Zhang
108c98c8bb Update package voicemngr
Fix a compiling error on release-6.5 branch
2022-11-10 15:35:42 +01:00
Lukasz Kotasa
887fb46dbd Rename TARGET_iopsys_econet -> TARGET_airoha 2022-11-09 09:39:34 +00:00
Lukasz Kotasa
1b65330af4 genconfig: rename iopsys-econet -> airoha 2022-11-09 09:39:34 +00:00
vdutta
cf709c995f sulu: 1.3.6 2022-11-09 12:27:19 +05:30
Amit Kumar
6a1b7d91a1 qosmngr: handled qos reload, statistics reset
hanlded the qos reload without statistics reset.
shaping , classification or policer change and qos reload should
not cause queue reset in driver that was causing statistics of that queue
reset to 0. qos reload if trigerred with queue specific config change,in
that case only statistics will reset tot 0.
2022-11-09 02:47:46 +00:00
vdutta
a1bbf877a1 uspd: 2.2.16 2022-11-08 17:08:08 +05:30
vdutta
ac24516ec0 sulu: 1.3.5 2022-11-08 15:45:21 +05:30
vdutta
aab79b15f1 sulu: 1.3.4 2022-11-08 15:21:11 +05:30
vdutta
39fd5323b0 bulkdata: 2.0.8 2022-11-07 18:17:49 +05:30
vdutta
ba6f732628 icwmp: 9.0.17 2022-11-07 18:01:03 +05:30
vdutta
ada4e7cfd5 sulu: 1.3.3 2022-11-04 20:51:46 +05:30
Sukru Senli
c9d73a6bcb sulu: 1.3.2 2022-11-04 16:13:28 +01:00
vdutta
e91fc5169c sulu: 1.3.1 2022-11-04 12:51:25 +00:00
vdutta
452b1e548a bbf: 6.7.5 2022-11-04 18:10:43 +05:30
Amin Ben Romdhane
630c3ec7ba bbf: 6.7.4 2022-11-04 12:16:27 +01:00
vdutta
c808bb188d icwmp: 9.0.16 2022-11-04 16:32:42 +05:30
vdutta
dce4728377 uspd: 2.2.15 2022-11-04 16:31:40 +05:30
Amin Ben Romdhane
38d77bcf5c bbf: 6.7.3 2022-11-03 17:03:41 +01:00
vdutta
e99cdc434f bbf: 6.7.2 2022-11-03 12:04:56 +05:30
Maxim Menshikov
225bf15ae7 qosmngr: implement Econet support in configuration scripts
- restructure qosmngr separating broadcom and airoha
2022-11-03 06:21:48 +00:00
Yalu Zhang
dd69c0b4b1 Update voicemngr and libvoice 2022-11-02 15:16:30 +01:00
subramanian c
cc7d076dc8 qos: Apply qos classify config in the order of order param value 2022-11-01 09:41:03 +00:00
Yalu Zhang
1d1c621821 Add a new package voicemngr
Voicemngr is an upgrading of endptmngr and supports multiple platforms.
2022-10-31 16:26:01 +01:00
vdutta
d70db5ef94 icwmp: 9.0.15 2022-10-31 15:22:19 +05:30
vdutta
656ead95cb icwmp: 9.0.14 2022-10-31 08:58:54 +05:30
Vivek Kumar Dutta
d13ee35789 Revert "icwmp: 2.0.7"
This reverts commit db3147076e
2022-10-31 03:27:01 +00:00
vdutta
0534b9c616 bulkdata: 2.0.7 2022-10-31 08:54:24 +05:30
vdutta
db3147076e icwmp: 2.0.7 2022-10-31 08:53:27 +05:30
vdutta
3c67fbf70b icwmp: 9.0.13 2022-10-30 13:00:03 +05:30
Anjan Chanda
49d6c61a8a ieee1905: 5.0.19: fixup EASYMESH_VERSION default value 2022-10-28 16:02:42 +02:00
Sukru Senli
549746bffd sulu: 1.3.0 2022-10-28 13:02:47 +02:00
Anjan Chanda
bc73d859a2 ieee1905: 5.0.19: move plugin makefiles to plugins directory 2022-10-27 13:31:16 +02:00
Anjan Chanda
998ea1fa85 ieee1905: 5.0.19 2022-10-27 12:17:36 +02:00
Grzegorz Bielski
020606132e evoice: 0.2.38 accept msgs only from proxy 2022-10-27 11:03:34 +02:00
Piotr Kubik
d693cb2fbb iop: ssh_install_key: Disable host key checking
This change simplifies ssh key install
when connecting to different hosts with same IP address.
2022-10-27 06:46:50 +00:00
Piotr Kubik
9cf572e22e iop: ssh_upgrade: Disable host key checking
This change simplifies ssh updates when connecting to
different hosts with same IP address.
2022-10-27 06:46:50 +00:00
Piotr Kubik
1759f36740 iop: ssh_upgrade: Fix usage option typo 2022-10-27 06:46:50 +00:00
Janusz Dziedzic
c3666a7b40 wifimngr: 14.3.1
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-26 10:04:14 +00:00
hemlata
c691dd210a evoice : Support transmit and receive gain on Airoha 2022-10-26 09:39:41 +02:00
Jakob Olsson
d3c5f0d78a map-agent: 2.10.3.25 2022-10-25 16:34:29 +02:00
Sukru Senli
62dc66831a iop: config: deselect peripheral-manager
will be selectd by target device which needs it
2022-10-25 14:51:52 +02:00
Jakob Olsson
1ba9025809 map-agent: 2.10.3.24 2022-10-25 11:01:38 +02:00
Anjan Chanda
da2a5a6a9d map-topology: 2.5.1.8 2022-10-25 09:47:23 +02:00
Anjan Chanda
da9bd48dd5 wfadatad: 2.10.0.4 2022-10-25 09:21:10 +02:00
Anjan Chanda
56a49d4628 ieee1905: 5.0.17 2022-10-25 09:10:54 +02:00
Roman Azarenko
152a15d147 swmodd: fix typos in error message for low disk space, bundle existence 2022-10-23 21:36:28 +02:00
Andreas Gnau
47f938f0fd iop: config: iptables-legacy => iptables-zz-legacy
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2022-10-22 10:02:02 +00:00
Jakob Olsson
56f653c84b map-agent: 2.10.3.23 2022-10-21 14:11:39 +02:00
Jakob Olsson
5527f66c11 map-controler: allow band 6 in radio section 2022-10-21 09:47:35 +02:00
Jakob Olsson
aadc11e7f4 map-agent: allow band 6 in radio setion 2022-10-21 09:47:23 +02:00
vdutta
15e7f35459 obuspa: 6.0.0.7 2022-10-21 10:19:22 +05:30
vdutta
8569ef77fc icwmp: 9.0.12 2022-10-21 09:30:56 +05:30
Jakob Olsson
e3c1e47040 map-agent: 2.10.3.22 2022-10-20 15:57:16 +02:00
Rahul
c722f70f10 ponmngr: update serial number generation 2022-10-20 12:26:05 +00:00
Anjan Chanda
e6a6703b73 ieee1905: 5.0.16 2022-10-20 14:24:58 +02:00
vdutta
dddd927d30 obuspa: Fix internal role for set command 2022-10-20 12:08:41 +05:30
Amin Ben Ramdhane
f9a31cd9dc bbf: 6.7.1 2022-10-19 19:58:24 +01:00
Jakob Olsson
abeedffa94 map-agent: 2.10.3.21 2022-10-19 16:12:46 +02:00
Suvendhu Hansa
bda286a27d icwmpd: 9.0.11 2022-10-19 12:40:09 +00:00
vdutta
3039f3725e stunc: 1.1.14 2022-10-19 14:11:33 +05:30
Jakob Olsson
21d63db2f8 wfadatad: 2.10.0.1 2022-10-18 17:48:55 +02:00
Jakob Olsson
6ec7d8c06b map-controller: 2.11.0.11 2022-10-18 17:48:20 +02:00
Jakob Olsson
09949f6823 map-agent: 2.10.3.20 2022-10-18 17:47:35 +02:00
Anjan Chanda
e870ac2161 ieee1905: 5.0.14 2022-10-18 17:02:59 +02:00
hemlata
2415a92f08 evoice : Support Echo Cancellation which can be configured via TR-104 2022-10-18 16:07:15 +02:00
Jakob Olsson
f3be07599e map-controller: 2.11.0.10 2022-10-18 15:48:04 +02:00
vdutta
2593f9d472 obuspa: 6.0.0.5 2022-10-18 17:33:29 +05:30
Anjan Chanda
7d8396f21c wifimngr: 14.3.0 2022-10-18 13:01:28 +02:00
Dineshkumar
84c8f673c5 iop: genconfig: add qualcomm ipq95xx target
Signed-off-by: Dineshkumar <quic_dinel@quicinc.com>
2022-10-18 10:00:53 +00:00
Grzegorz Sluja
e3ed5f9581 dectmngr: Play dial tone if called number is not included in call establish message 2022-10-18 11:34:08 +02:00
vdutta
e904e57bc8 obuspa: 6.0.0.4 2022-10-18 11:19:30 +05:30
Amin Ben Ramdhane
3fcb150330 bbf: 6.7.0 2022-10-17 18:36:24 +01:00
Anjan Chanda
928cde7e3c ieee1905: 5.0.13 2022-10-17 15:23:37 +02:00
Grzegorz Bielski
f2aa11ba83 evoice: 0.2.35 support of sip sess. timer per account 2022-10-17 13:50:08 +02:00
Jakob Olsson
dd18b4ff9a map-controller: 2.11.0.9 2022-10-17 11:38:13 +02:00
Janusz Dziedzic
875ed0fc12 easy-soc-libs: 6.7.5
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-17 08:05:11 +00:00
Jakob Olsson
affdd43f7a map-agent: 2.10.3.19 2022-10-14 17:28:57 +02:00
vdutta
9de9248d5a owsd: 1.1.5 2022-10-13 14:59:44 +05:30
vdutta
31a89052f8 bbf: 6.9.9 2022-10-13 14:25:32 +05:30
suvendhu
0248cd1e38 icwmpd: fix uloop deadlock for ProcessStatus 2022-10-13 12:36:31 +05:30
Jakob Olsson
6f21f9bb4b map-controller: 2.11.0.8 2022-10-12 17:24:53 +02:00
Amin Ben Ramdhane
0f87f89b71 bbf: 6.9.8 2022-10-12 12:20:46 +01:00
Amin Ben Ramdhane
ab65dba802 bbf: 6.9.7 2022-10-12 12:15:05 +01:00
Jakob Olsson
6c40e135e9 map-agent: add ip-bridge dependency 2022-10-12 09:58:25 +02:00
Jakob Olsson
893deb57d0 map-agent: initd: remove legacy vlan setup 2022-10-12 09:30:42 +02:00
Anjan Chanda
c3b450a679 ieee1905: 4.11.0 2022-10-11 22:52:17 +02:00
Jakob Olsson
62573f47dc map-controller: 2.11.0.7 2022-10-11 15:52:31 +02:00
hemlata
71bf9943b7 evoice : CallStatus fix for R4/R5 call transfer and 486 busy when on-hold 2022-10-11 14:42:52 +02:00
Suvendhu Hansa
d0fe5d68e3 icwmpd: 9.0.9 2022-10-11 12:04:52 +00:00
Amin Ben Ramdhane
612ea61b0e bbf: 6.9.6 2022-10-10 21:18:14 +01:00
Sukru Senli
53b6001a51 ponmngr: airoha: don't start pon daemons if xpon module is not loaded 2022-10-10 16:53:17 +02:00
Amit Kumar
ad8cee56df libqos: nvg678 qos stats handling
nvg678 is having 64bit broadcom chip.
added compilation flag KERNEL64 for nvg678.
2022-10-10 10:20:50 +05:30
Janusz Dziedzic
ae8c079e8c wifimngr: 14.2.4
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-07 12:58:45 +00:00
Janusz Dziedzic
68d1b91701 easy-soc-libs: 6.7.4
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-07 12:57:39 +00:00
suvendhu
3389378868 icwmp: added support of AutonomousDUStateChangeComplPolicy 2022-10-07 10:36:38 +00:00
Amin Ben Ramdhane
6a6c123a63 bbf: 6.9.5 2022-10-07 10:37:17 +01:00
hemlata
64c0fa39a0 evoice : Codec name fix for Brcm platform for CodecProfile display 2022-10-07 11:29:39 +02:00
Hemlata
c19fd6cd11 evoice: Correct codec names in the JSON file 2022-10-07 09:21:39 +00:00
Jakob Olsson
6dd17390d7 map-agent: 2.10.3.18 2022-10-06 15:43:08 +02:00
hemlata
59e724dcf2 evoice: libvoiceservice: fix a bug in codec capability initialisation that causes uspd crash on Broadcom platform 2022-10-06 15:29:09 +02:00
vdutta
cc71eb3ef5 obuspa: 6.0.0.3 2022-10-06 15:57:28 +05:30
vdutta
d4ac43a3bf icwmp: 9.0.7 2022-10-06 09:20:53 +05:30
Grzegorz Sluja
56fa7db0a7 dectmngr: Change DECT handset presence check to RSSI request 2022-10-05 15:10:13 +02:00
vdutta
1b58259562 bbf: 6.9.4 2022-10-04 17:01:54 +05:30
vdutta
23d564116c obuspa: 6.0.0.2 2022-10-04 17:00:07 +05:30
vdutta
a5aeba560e icwmp: 9.0.6 2022-10-04 16:43:23 +05:30
Amit Kumar
58688bd436 easy-soc-libs: libqos handling for qos stats 2022-10-03 19:27:37 +05:30
vdutta
3682edfe7b sulu: 1.2.3 2022-09-30 18:57:47 +05:30
Jakob Olsson
feb1932e25 map-topology: 2.5.1.5 2022-09-30 12:31:28 +02:00
Jakob Olsson
696dc1f798 map-controller: 2.11.0.6 2022-09-30 12:30:45 +02:00
Jakob Olsson
4ad3a464fe map-agent: 2.10.3.17 2022-09-30 12:30:03 +02:00
Jakob Olsson
b75f473a5a map-controller: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:28:48 +02:00
Jakob Olsson
26023599c1 map-agent: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:28:32 +02:00
Anjan Chanda
5f276201b3 ieee1905: 4.10.8 2022-09-30 11:39:14 +02:00
hemlata
f9072e9a21 evoice : Support hardware specific codec capability 2022-09-30 11:34:16 +02:00
Hemlata
3638e0efa2 evoice: provide codecs_evoice.json for codecs capability ubus call 2022-09-30 09:29:44 +00:00
vdutta
fa613814d5 icwmp: 9.0.5 2022-09-30 11:21:21 +05:30
vdutta
9b673e44dc umoci: Switch to tar source 2022-09-30 11:19:40 +05:30
vdutta
44f0bc818e skopeo: Switch to tar source 2022-09-30 11:18:45 +05:30
Wenpeng Song
5d64b987aa evoice 0.2.30
Makefile update for ABI version dependency of libbbf_api
2022-09-29 14:21:45 +00:00
Janusz Dziedzic
da4f911bd9 easy-soc-libs: 6.7.3
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-29 12:03:56 +00:00
Janusz Dziedzic
8c0ae77797 easy-soc-libs: 6.7.2
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-29 11:19:10 +00:00
Filip Matusiak
613656d485 map-controller: load rcpi plugin by default
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-09-28 14:09:18 +00:00
Amin Ben Ramdhane
570f421c3d bbf: 6.9.3 2022-09-28 13:03:21 +01:00
Janusz Dziedzic
1c538249ea easy-soc-libs: 6.7.1
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-28 11:06:46 +00:00
Jakob Olsson
2b94cae86b map-controller: 2.11.0.5 2022-09-28 12:38:19 +02:00
vdutta
c2d92def50 icwmp: 9.0.4 2022-09-28 14:36:12 +05:30
Amin Ben Ramdhane
32628e4165 bbf: 6.9.2 2022-09-28 09:01:19 +01:00
Amin Ben Ramdhane
2501484ac2 bulkdata: 2.0.6 2022-09-28 08:59:09 +01:00
Janusz Dziedzic
87b565d552 easy-soc-libs: 6.7.0
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-27 14:56:13 +00:00
Amin Ben Ramdhane
56af686410 bbf: 6.9.1 2022-09-26 14:12:35 +01:00
vdutta
90fd7508b6 periodicstats: 1.2.1 2022-09-26 17:00:09 +05:30
vdutta
5f8cbe5393 stunc: 1.1.13 2022-09-26 16:46:19 +05:30
vdutta
94433b4502 swmodd: 2.1.17 2022-09-26 16:44:58 +05:30
vdutta
e311e64900 udpecho: 2.0.2 2022-09-26 16:43:26 +05:30
vdutta
973b11e33b xmppc: 2.0.3 2022-09-26 16:25:35 +05:30
vdutta
fd3f544210 twamp: 1.2.3 2022-09-26 16:23:24 +05:30
vdutta
078bcd16c1 bbf: 6.9.0 2022-09-26 15:58:49 +05:30
vdutta
4c5073ad03 sulu: 1.2.2 2022-09-24 20:31:33 +05:30
vdutta
2660d8ad2e twamp: 1.2.2 2022-09-23 18:23:51 +05:30
vdutta
588478e981 sulu: 1.2.1 2022-09-23 15:59:10 +05:30
Amin Ben Ramdhane
0f9326cff6 bbf: 6.8.34 2022-09-23 10:49:53 +01:00
Jakob Olsson
e01fc47ab6 map-agent: 2.10.3.16 2022-09-23 10:56:05 +02:00
vdutta
a35893a722 sulu: 1.2.0 2022-09-22 20:54:49 +05:30
205 changed files with 11306 additions and 2319 deletions

View File

@@ -18,6 +18,10 @@ config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBF_TR471
bool "Enable TR-471 Data Model Support"
default y
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default y

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.8.33
PKG_VERSION:=6.8.49
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=9bdcb1ac188c44fc2274bf01dd9dce46f572b967
PKG_SOURCE_VERSION:=87ae46df8b4e221b8894fd861d2eb785ae1f3bf3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -25,7 +25,8 @@ define Package/libbbf_api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for libbbfdm API
TITLE:=BBF datamodel library, provides API to extend datamodel using DotSO plugins
ABI_VERSION:=1.0
endef
define Package/libbbfdm/default
@@ -33,7 +34,8 @@ define Package/libbbfdm/default
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libcurl
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbf_api \
+BBF_TR471:obudpst
endef
define Package/libbbfdm
@@ -66,6 +68,17 @@ define Package/libbbfdm-wolfssl
VARIANT:=wolfssl
endef
define Package/userinterface
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Package to add Device.UserInterface. datamodel support
endef
define Package/userinterface/description
Package to add Device.UserInterface. datamodel support using libbbf JSON Plugin
endef
define Package/libbbfdm/config
source "$(SOURCE)/Config_bbfdm.in"
endef
@@ -98,6 +111,11 @@ CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_TR471),y)
CMAKE_OPTIONS += \
-DBBF_TR471=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
@@ -137,13 +155,17 @@ endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
endef
define Package/libbbfdm/default/prerm
@@ -152,6 +174,18 @@ define Package/libbbfdm/default/prerm
exit 0
endef
define Package/userinterface/install
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DATA) ./files/etc/bbfdm/json/UserInterface.json $(1)/etc/bbfdm/json/
$(INSTALL_DATA) ./files/etc/config/userinterface $(1)/etc/config/userinterface
$(INSTALL_BIN) ./files/etc/init.d/userinterface $(1)/etc/init.d/userinterface
$(INSTALL_BIN) ./files/etc/uci-defaults/93-userinterface-firewall $(1)/etc/uci-defaults/93-userinterface-firewall
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
endef
Package/libbbfdm-openssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-wolfssl/prerm = $(Package/libbbfdm/default/prerm)
Package/libbbfdm-mbedtls/prerm = $(Package/libbbfdm/default/prerm)
@@ -169,9 +203,9 @@ define Build/InstallDev
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef
$(eval $(call BuildPackage,userinterface))
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))

View File

@@ -0,0 +1,117 @@
{
"Device.UserInterface.": {
"type": "object",
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Device.UserInterface.RemoteAccess.": {
"type": "object",
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Enable": {
"type": "boolean",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "enable"
}
}
}
]
},
"Port": {
"type": "unsignedInt",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"range": [
{
"max": 65535
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "port"
}
}
}
]
},
"SupportedProtocols": {
"type": "string",
"read": true,
"write": false,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string",
"enumerations": [
"HTTP",
"HTTPS"
]
},
"default": "HTTP"
},
"Protocol": {
"type": "string",
"read": true,
"write": true,
"version": "2.0",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "userinterface",
"section": {
"name": "remote_access"
},
"option": {
"name": "protocol"
}
}
}
]
}
}
}
}

View File

@@ -0,0 +1,6 @@
config userinterface 'remote_access'
option enable '0'
option interface 'wan'
option port '80'
option protocol 'HTTP'

View File

@@ -0,0 +1,85 @@
#!/bin/sh
#!/bin/sh
. /lib/functions.sh
IDENTIFIER="REMOTE-ACCESS-WAN"
log() {
echo "${@}"|logger -t firewall.userinterface -p info
}
if [ ! -f "/etc/config/userinterface" ]; then
exit 0;
fi
exec_cmd() {
if ! "$@"; then
log "Failed to run [$*]"
fi
}
configure_firewall_rule() {
local enable port protocol gui_port
local zone interface
config_load userinterface
config_get_bool enable remote_access enable 1
config_get port remote_access port
config_get interface remote_access interface
if [ "${enable}" -eq "0" ] || [ -z "${port}" ] || [ -z "${interface}" ]; then
return 0;
fi
zone="zone_${interface}_input"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate NEW,ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
zone="zone_${interface}_output"
iptables -w 1 -t filter -nL "${zone}" 2>/dev/null 1>&2
if [ "$?" -eq 0 ]; then
iptables -w 1 -I "${zone}" -p tcp -m multiport --dports "${port}" -m conntrack --ctstate ESTABLISHED -m comment --comment "${IDENTIFIER}" -j ACCEPT
fi
}
delete_firewall_rule() {
local zone interface
local CMD
config_load userinterface
config_get interface remote_access interface
# Clean remote interface rules
if [ -z "${interface}" ]; then
return 0
fi
zone="zone_${interface}_input"
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
fi
done
zone="zone_${interface}_output"
CMD="iptables -w 1 -t filter -nL ${zone} --line-numbers"
while ${CMD} 2>/dev/null | grep "${IDENTIFIER}"; do
rule_num="$(${CMD} | grep "${IDENTIFIER}" | head -1|awk '{print $1}')"
if [ -n "${rule_num}" ]; then
exec_cmd iptables -w 1 -t filter -D "${zone}" "${rule_num}";
fi
done
}
# Delete existing remote access rules
delete_firewall_rule
# Configure the User Interface rule
configure_firewall_rule

View File

@@ -0,0 +1,27 @@
#!/bin/sh /etc/rc.common
START=99
STOP=01
USE_PROCD=1
start_service() {
local enable
procd_open_instance usp
config_load userinterface
config_get_bool enable global enable 1
# Inject firewall rules
if [ "${enable}" -eq "1" ]; then
/etc/firewall.userinterface
fi
procd_close_instance
}
service_triggers()
{
procd_add_reload_trigger "userinterface"
}

View File

@@ -0,0 +1,12 @@
#!/bin/sh
uci -q batch <<-EOT
delete firewall.userinterface
set firewall.userinterface=include
set firewall.userinterface.path=/etc/firewall.userinterface
set firewall.userinterface.reload=1
commit firewall
EOT
exit 0

View File

@@ -0,0 +1 @@
/etc/bbfdm/sysctl.conf

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.0.5
PKG_VERSION:=2.0.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=33a6648de9ee0af33c44518656b56b0a30b6c1ab
PKG_SOURCE_VERSION:=6e85d2032e66df581fae7c72cd83cc89367b8fc8
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -25,8 +25,6 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=bbf
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
@@ -50,8 +48,8 @@ endif
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.so $(1)/usr/lib/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.json $(1)/etc/bbfdm/json
$(CP) ./files/* $(1)/
endef

View File

@@ -7,20 +7,17 @@ USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local enable=$(uci -q get bulkdata.bulkdata.enable)
local enable
[ "$enable" != "1" ] && {
return 0
}
config_load bulkdata
config_get_bool enable bulkdata enable 1
procd_open_instance
procd_open_instance bulkdata
[ "$enable" -eq "1" ] && {
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
}
boot() {
start
procd_close_instance
}
reload_service() {

View File

@@ -16,8 +16,8 @@ get_next_count()
fi
while [ "${found}" -ne 1 ]; do
uci -q get ${config}.${default_name}_${count} >/dev/null
if [ $? -eq 0 ]; then
uci -q get "${config}"."${default_name}"_${count} >/dev/null
if [ "$?" -eq 0 ]; then
count=$((count + 1))
else
found=1;
@@ -39,8 +39,8 @@ translate_profile_id_to_profile_name() {
[ "${curr_profile_id}" != "${profile_id}" ] && return
uci -q set bulkdata.${section}.profile_name="${profile_name}"
uci -q set bulkdata.${section}.profile_id=""
uci -q set bulkdata."${section}".profile_name="${profile_name}"
uci -q set bulkdata."${section}".profile_id=""
}
update_profile_sections() {
@@ -54,7 +54,7 @@ update_profile_sections() {
case "${section}" in
"cfg"*)
profile_name="$(get_next_count bulkdata ${default} ${PROFILE_COUNT})"
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
uci_rename bulkdata "${section}" "${profile_name}"
;;
esac
@@ -62,7 +62,7 @@ update_profile_sections() {
[ -n "$profile_name" ] && section="${profile_name}"
uci -q set bulkdata.${section}.profile_id=""
uci -q set bulkdata."${section}".profile_id=""
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"

View File

@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.5
PKG_VERSION:=3.5.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:=c5695bc92f7f22089c9a85d3e1f4dac7c12ca900
PKG_SOURCE_VERSION:=83f89a83cf860bbcf2b7f2e030215db315a5bbbf
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.1.2
PKG_VERSION:=1.2.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
@@ -26,7 +26,7 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
else
$(info Unexpected CONFIG_TARGET)
@@ -68,6 +68,10 @@ define Build/Compile
endef
define Package/dslmngr/install
$(CP) ./files/common/* $(1)/
ifeq ($(CONFIG_TARGET_brcmbca),y)
$(CP) ./files/broadcom/* $(1)/
endif
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
endef

View File

@@ -0,0 +1,311 @@
#!/bin/sh
. /lib/functions.sh
# ATM #
check_pvc() {
local vpi=$1
local vci=$2
local ret
ret=$(xtmctl operate conn --show | awk -v test="$vpi/$vci" '{if ($3==test ) print $5 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
check_xtm_list() {
local qclass=$1
local pcr scr mbs
local ret
case $# in
1)
pcr=0
scr=0
mbs=0
;;
2)
pcr=$2
scr=0
mbs=0
;;
4)
pcr=$2
scr=$3
mbs=$4
;;
esac
ret=$(xtmctl operate tdte --show | awk -v test="$qclass" -v pcr="$pcr" -v scr="$scr" -v mbs="$mbs" '{if ($2==test && $3==pcr && $4==scr && $5==mbs ) print $1 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_atm_device() {
local name vpi vci device link_type encapsulation qos_class pcr mbs scr i
config_get name $1 name "ATM"
config_get vpi $1 vpi "8"
config_get vci $1 vci "35"
config_get device $1 device "atm0"
config_get link_type $1 link_type "eoa"
config_get encapsulation $1 encapsulation "llc"
config_get qos_class $1 qos_class "ubr"
config_get pcr $1 pcr
config_get mbs $1 mbs
config_get scr $1 scr
check_pvc $vpi $vci
ret=$?
if [ "$ret" -eq 0 ]; then
check_xtm_list $qos_class $pcr $scr $mbs
ret=$?
if [ "$ret" -eq 0 ]; then
case $qos_class in # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
ubr)
xtmctl operate tdte --add "$qos_class"
;;
ubr_pcr|ubr+)
xtmctl operate tdte --add "$qos_class" $pcr
;;
cbr)
xtmctl operate tdte --add "$qos_class" $pcr
;;
nrtvbr|vbr-nrt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
rtvbr|vbr-rt)
xtmctl operate tdte --add "$qos_class" $pcr $scr $mbs
;;
gfr)
;;
abr)
;;
esac
fi
case $link_type in # EoA, IPoA, PPPoA, CIP
EoA|eoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_eth" || encapsulation="llcsnap_eth"
;;
PPPoA|pppoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_pppoa" || encapsulation="llcencaps_ppp"
;;
IPoA|ipoa)
[ $encapsulation == "vcmux" ] && encapsulation="vcmux_ipoa" || encapsulation="llcsnap_rtip"
;;
CIP|cip)
;;
esac
check_xtm_list $qos_class $pcr $scr $mbs
ret="$?"
xtmctl operate conn --add 1.$vpi.$vci aal5 $encapsulation 0 1 $ret
for i in `seq 0 7`; do
xtmctl operate conn --addq 1.$vpi.$vci $i wrr 1 dt # queue priority 0-7
done
xtmctl operate conn --createnetdev 1.$vpi.$vci $device
xtmctl operate intf --state 1 enable
fi
}
remove_atm_devices() {
local vpi vci rest
local vpivci=`xtmctl operate conn --show | grep "ATM\|mode" | awk '{if (NR!=1 && $1!="PTM") {print $3}}'`
for i in $vpivci
do
rest=${i#\/}
vpi=${rest%%\/*}
vci=${rest#*\/}
echo "xtmctl operate conn --delete 1.$vpi.$vci"
xtmctl operate conn --delete 1.$vpi.$vci
echo "xtmctl operate conn --deletenetdev 1.$vpi.$vci"
xtmctl operate conn --deletenetdev 1.$vpi.$vci
done
}
create_atm_devices() {
echo "Creating ATM Device(s)"
config_load dsl
config_foreach configure_atm_device atm-device
}
# ATM END #
# PTM #
check_ptm() {
local ret
local ptmprio=$1
local dslat=$2
if [ "$ptmprio" -eq 2 ]; then
ptmprio="high"
else
ptmprio="low"
fi
ret=$(xtmctl operate conn --show | awk -v dslat="$dslat" -v ptmprio="$ptmprio" '{if ($2 == dslat && $3 == ptmprio ) print $2 }')
case $ret in
''|*[!0-9]*) return 0 ;;
*) return $ret ;;
esac
}
configure_ptm_device() {
local name device priority portid i
config_get name $1 name "PTM"
config_get device $1 device "ptm0"
config_get priority $1 priority 1
config_get portid $1 portid 1
check_ptm $priority $portid
ret=$?
if [ "$ret" -eq 0 ]; then
xtmctl operate conn --add $portid.$priority
for i in `seq 0 7`; do
xtmctl operate conn --addq $portid.$priority $i wrr 1 dt -1 -1 3000 # queue priority 0-7
done
echo "xtmctl operate conn --createnetdev $portid.$priority $device"
xtmctl operate conn --createnetdev $portid.$priority $device
xtmctl operate intf --state 1 enable
fi
}
remove_ptm_devices() {
local delptm
local x=0
IFS=$'\n'
for i in `xtmctl operate conn --show | grep "PTM\|mode"`
do
if [ $x -eq 1 ]; then
delptm=$(echo $i | awk '{if ($1!="ATM") print $2"."$11}')
echo "xtmctl operate conn --delete $delptm"
xtmctl operate conn --delete $delptm
xtmctl operate conn --deletenetdev $delptm
fi
x=1
done
unset IFS
}
create_ptm_devices() {
echo "Creating PTM Device(s)"
config_load dsl
config_foreach configure_ptm_device ptm-device
}
# PTM END #
prioritize_arp()
{
ebtables -t nat -D POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
ebtables -t nat -A POSTROUTING -j mark --mark-or 0x7 -p ARP >/dev/null
}
xtm_remove_devices() {
remove_atm_devices
remove_ptm_devices
}
xtm_create_devices() {
local tpstc="$(xdslctl info --show | grep TPS-TC)"
if echo "$tpstc" | grep -q "ATM Mode"; then
create_atm_devices
elif echo "$tpstc" | grep -q "PTM Mode"; then
create_ptm_devices
fi
}
xdsl_configure() {
local VDSL=0
local GFAST=0
local mod=""
local modes=""
local profile=""
config_load dsl
# Modes
config_get mode line mode
for mod in $mode; do
[ $mod == "gdmt" ] && modes="${modes}d"
[ $mod == "glite" ] && modes="${modes}l"
[ $mod == "t1413" ] && modes="${modes}t"
[ $mod == "adsl2" ] && modes="${modes}2"
[ $mod == "adsl2p" ] && modes="${modes}p"
[ $mod == "annexl" ] && modes="${modes}e"
[ $mod == "annexm" ] && modes="${modes}m"
[ $mod == "vdsl2" ] && modes="${modes}v" && VDSL=1
[ $mod == "gfast" ] && modes="${modes}f" && GFAST=1
done
# VDSL Profiles
config_get profile line profile
# Capabilities
config_get_bool bitswap line bitswap 1
[ $bitswap -eq 1 ] && bitswap="on" || bitswap="off"
config_get_bool sra line sra 1
[ $sra -eq 1 ] && sra="on" || sra="off"
# config_get_bool trellis line trellis 1
config_get_bool sesdrop line sesdrop 0
[ $sesdrop -eq 1 ] && sesdrop="on" || sesdrop="off"
# VDSL2 only
config_get_bool us0 line us0 1
[ $us0 -eq 1 ] && us0="on" || us0="off"
# config_get_bool dynamicd line dynamicd 1
# config_get_bool dynamicf line dynamicf 1
config_get_bool sos line sos 0
[ $sos -eq 1 ] && sos="on" || sos="off"
config_get_bool phyReXmtUs line phyReXmtUs 0
config_get_bool phyReXmtDs line phyReXmtDs 1
phyReXmt=$(( $((phyReXmtUs<<1)) + phyReXmtDs))
if [ $VDSL -eq 1 -o $GFAST -eq 1 ]; then
echo "xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --profile "$profile" --sra $sra --bitswap $bitswap --us0 $us0 --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
else
echo "xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt"
xdslctl start --up --mod $modes --sra $sra --bitswap $bitswap --sesdrop $sesdrop --SOS $sos --phyReXmt $phyReXmt
fi
if [ $GFAST -eq 1 ]; then
# G.Fast hardware to VDSL hardware, to set the driver bit kPhyCfg2EnableGfastVdslMMTimeOut0.
# Enable V43 tone for GFAST.
echo "xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400"
xdslctl configure1 --phycfg 0 0 0 0 0 0 0 0 0 0 0 0x1400400 0x1400400
fi
}
xdsl_stop() {
# echo "Stopping DSL"
# stop causes IRQ issues
# xdslctl stop
return 0
}
xdsl_init() {
prioritize_arp
echo "Starting DSL"
xtmctl start
xtmctl operate intf --state 1 enable
}

View File

@@ -0,0 +1,53 @@
# OEM specific parameters
config oem-parameters 'oem'
# option country_code "0000" # 2 bytes hex
# option vendor_id "IO" # 4 bytes string
# option vendor_suffix "0000" # 2 bytes hex
# option sw_version "iopsys" # 16 bytes string
# option serial_nr "00000000" # 32 bytes string
# DSL Modes
config dsl-line line
list mode gdmt
list mode glite
list mode t1413
list mode adsl2
list mode adsl2p
list mode annexl
list mode annexm
list mode vdsl2
# VDSL2 profiles
list profile 8a
list profile 8b
list profile 8c
list profile 8d
list profile 12a
list profile 12b
list profile 17a
list profile 30a
option bitswap 1
option sra 1
option us0 1 # VDSL2 only
option sesdrop 0
option sos 0
option phyReXmtUs 0
option phyReXmtDs 1
config atm-device atm0
option name 'ATM'
option vpi '8'
option vci '35'
option device atm0
option link_type 'eoa' # EoA, IPoA, PPPoA, CIP
option encapsulation 'llc' # llc, vcmux
option qos_class 'ubr' # ubr, cbr, gfr, vbr-nrt, vbr-rt, ubr+, abr
# option pcr '512'
# option scr '256'
# option mbs '1024'
config ptm-device ptm0
option name 'PTM'
option device 'ptm0'
option priority '1'
option portid '1'

View File

@@ -0,0 +1,7 @@
[ "$STATUS" == "up" -o "$STATUS" == "down" ] || exit 0
. /lib/functions.sh
include /lib/dsl
xtm_remove_devices
xtm_create_devices

View File

@@ -0,0 +1,7 @@
if [ "$STATUS" == "up" ]; then
ubus call led.dsl set '{"state":"ok"}'
elif [ "$STATUS" == "down" ]; then
ubus call led.dsl set '{"state":"off"}'
elif [ "$STATUS" == "training" ]; then
ubus call led.dsl set '{"state":"alert"}'
fi

View File

@@ -0,0 +1,48 @@
#!/bin/sh /etc/rc.common
. /lib/functions.sh
include /lib/dsl
START=20
USE_PROCD=1
DSLMNGR=$(which dslmngr)
start_service() {
[ -n "$DSLMNGR" ] && {
procd_open_instance
procd_set_param command "$DSLMNGR"
procd_set_param respawn
procd_close_instance
}
xdsl_configure
xtm_create_devices
}
stop_service() {
[ -n "$DSLMNGR" ] && service_stop $DSLMNGR
xtm_remove_devices
xdsl_stop
}
boot() {
local HASADSL="$(db -q get hw.board.hasAdsl)"
local HASVDSL="$(db -q get hw.board.hasVdsl)"
[ "$HASADSL" == "1" -o "$HASVDSL" == "1" ] || return
xdsl_init
start
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger dsl
}

View File

@@ -19,7 +19,7 @@ define Package/easy-qos
SECTION:=net
CATEGORY:=Network
TITLE:=Easy QoS
DEPENDS:=@(TARGET_iopsys_brcm63xx_arm||TARGET_iopsys_econet)
DEPENDS:=@(TARGET_brcmbca||TARGET_airoha)
endef
define Package/easy-qos/description

View File

@@ -19,7 +19,7 @@ include $(INCLUDE_DIR)/package.mk
-include $(TOPDIR)/.config
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
ifneq ($(CONFIG_TARGET_brcmbca),)
LINUX_DIR=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.1
LINUX_VERSION := 4.1.52
LINUXINCLUDE=-Iarch/$(LINUX_KARCH)/mach-bcm963xx/include
@@ -85,7 +85,7 @@ define Build/Compile
endef
ifneq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),)
ifneq ($(CONFIG_TARGET_brcmbca),)
define KernelPackage/easy-soc-events/install-extra
cp $(PKG_BUILD_DIR)/easyevent.ko $(FS_DIR)/lib/modules/$(LINUX_VERSION)/extra
endef

View File

@@ -1,5 +0,0 @@
# libeasy configuration
config LIBWIFI_USE_CTRL_IFACE
bool "Use UNIX sockets"
default n

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=6.6.0
PKG_VERSION:=7.2.26
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c8c406568822b170e373a54fbf32323e960259ff
PKG_SOURCE_VERSION:=350793b45873480d8981dac540c4145705a7b7ba
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -36,17 +36,13 @@ define Package/easy-soc-libs
MENU:=1
endef
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
TARGET_WIFI_TYPE=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_PLATFORM=MEDIATEK
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_MAC80211
else ifeq ($(CONFIG_TARGET_iopsys_x86),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
@@ -55,10 +51,18 @@ else ifeq ($(CONFIG_TARGET_iopsys_armvirt),y)
TARGET_PLATFORM=TEST
TARGET_WIFI_TYPE=TEST
TARGET_CFLAGS +=-DIOPSYS_TEST
else ifeq ($(CONFIG_TARGET_iopsys_econet),y)
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MAC80211
TARGET_WIFI_TYPE=MEDIATEK MAC80211
TARGET_CFLAGS +=-DIOPSYS_ECONET
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIPQ95XX
else ifeq ($(CONFIG_TARGET_iopsys_mediatek),y)
TARGET_PLATFORM=LINUX
TARGET_WIFI_TYPE=MAC80211
TARGET_CFLAGS +=-DIOPSYS_LINUX
else
$(info Unexpected CONFIG_TARGET, use default MAC80211)
TARGET_PLATFORM=MAC80211
@@ -66,18 +70,29 @@ else
TARGET_CFLAGS +=-DIOPSYS_MAC80211
endif
export TARGET_PLATFORM
export TARGET_WIFI_TYPE
subdirs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifiutils),libwifi) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libqos),libqos)
EASY_SOC_LIBS := \
ifneq ($(CONFIG_PACKAGE_libwifi),)
TARGET_CFLAGS +=-DHAS_WIFI
endif
esl-pkgs := \
$(if $(CONFIG_PACKAGE_libeasy),libeasy) \
$(if $(CONFIG_PACKAGE_libwifiutils),libwifiutils) \
$(if $(CONFIG_PACKAGE_libwifi),libwifi) \
$(if $(CONFIG_PACKAGE_libdsl),libdsl) \
$(if $(CONFIG_PACKAGE_libethernet),libethernet) \
$(if $(CONFIG_PACKAGE_libqos),libqos)
esl-pkgs-all := \
libeasy \
libwifiutils \
libwifi \
libdsl \
libethernet \
@@ -127,15 +142,15 @@ define Build/Compile
$(Build/Compile/rebuild)
touch $(PKG_BUILD_DIR)/.config_$(CONFIG_TARGET_PROFILE)
$(call Build/Compile/Default)
$(foreach dir,$(subdirs),$(call Build/Compile/$(dir)))
$(foreach dir,$(esl-pkgs),$(call Build/Compile/$(dir)))
endef
define Build/InstallDev
$(foreach dir,$(subdirs),$(call Build/InstallDev/$(dir),$(1),$(2));)
$(foreach dir,$(esl-pkgs),$(call Build/InstallDev/$(dir),$(1),$(2));)
endef
define Package/easy-soc-libs/install
:
endef
$(eval $(foreach e,$(EASY_SOC_LIBS),$(call BuildPackage,$(e))))
$(eval $(foreach e,$(esl-pkgs-all),$(call BuildPackage,$(e))))

View File

@@ -6,10 +6,6 @@ define Package/libeasy
DEPENDS+=+libnl +libnl-route
endef
define Package/libeasy/config
source "$(SOURCE)/Config.in"
endef
define Build/InstallDev/libeasy
$(INSTALL_DIR) $(1)/usr/include/easy
$(INSTALL_DIR) $(1)/usr/lib

View File

@@ -2,7 +2,7 @@
define Package/libethernet
$(call Package/easy-soc-libs)
TITLE:= Ethernet library (libethernet)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_ramips:swconfig +TARGET_iopsys_econet:ecnt_api
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_airoha:ecnt_api
endef
define Package/libethernet/config

View File

@@ -1,29 +1,53 @@
define Package/libwifiutils
$(call Package/easy-soc-libs)
TITLE:= WiFi utility library (libwifiutils.so)
DEPENDS+=+libnl +libnl-route +libeasy
endef
define Build/InstallDev/libwifiutils
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/wifidefs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiutils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifiutils/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifi
$(call Package/easy-soc-libs)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_iopsys_brcm63xx_arm:bcmkernel
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcmkernel
endef
define Package/libwifi/config
if PACKAGE_libdsl
if PACKAGE_libwifi
config LIBWIFI_DEBUG
depends on PACKAGE_libwifi
bool "Enable wifi debugging"
bool "Enable debugging in libwifi"
default n
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default n
endif
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiops.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef

View File

@@ -13,7 +13,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_VERSION:=0901382048bb7ce01fc1767fef75e54692f56743
PKG_SOURCE_VERSION:=fb85081443c19b5062bede49c80b1802c0f05d34
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -30,7 +30,6 @@ PKG_BUILD_PARALLEL:=1
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
export CONFIG_BRCM_SDK_VER_504040
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.0.1
PKG_VERSION:=2.1.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
@@ -23,7 +23,7 @@ define Package/ethmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Ethernet status and configration utility
DEPENDS:=+libethernet +libuci +libubox +ubus +libpthread +libnl-genl
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_iopsys_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl
endef
define Package/ethmngr/description
@@ -37,10 +37,24 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
define Build/Compile
endef
endif
define Package/ethmngr/install
$(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/sbin
$(INSTALL_BIN) ./files/ethmngr.init $(1)/etc/init.d/ethmngr
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/
else
$(CP) ./files/linux/* $(1)/
endif
ifneq ($(CONFIG_TARGET_brcmbca)$(CONFIG_TARGET_airoha)$(CONFIG_TARGET_ipq95xx)$(CONFIG_TARGET_iopsys_mediatek),)
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethmngr $(1)/usr/sbin/
endif
endef
$(eval $(call BuildPackage,ethmngr))

View File

@@ -0,0 +1,208 @@
#!/bin/sh
. /lib/functions.sh
unset -f switchmgr
# alias for switchmgr
switchmgr() {
"/userfs/bin/switchmgr" "$@"
}
unset -f tc3162_get_lan_port
# get lan port port by ifname
# arg1: port ifname, ex: eth0.1
tc3162_get_lan_port() {
[[ -z "$1" ]] && return 255
local ifname="$1"
local if_idx=255
# only for tc3162 eth switch ports (eth0.x, 0 < x < 7)
case "${ifname}" in
eth0.*)
;;
*)
logger -t "port-management" \
"unsupported - ${ifname} is not tc3162 switch port"
return 255
;;
esac
let "if_idx=$(echo "${ifname}" | cut -f2 -d'.')"
[[ -z "${if_idx}" ]] && return 255
[[ ${if_idx} -lt 1 || ${if_idx} -gt 6 ]] && {
logger -t "port-management" \
"incorrect tc3162 lan port index ${if_idx} picked from ifname ${ifname}"
return 255
}
let "if_idx=${if_idx}-1"
return ${if_idx}
}
unset -f tc3162_get_mapped_port
# get mapped switch port by ifname
# arg1: port ifname, ex: eth0.1
tc3162_get_mapped_port() {
[[ -z "$1" ]] && return 255
local ifname="$1"
local if_idx=255
local prtmap_procfile="/proc/tc3162/eth_portmap"
local lan_prt=255
local port=255
local prtmap_out_line_num=4
local prtmap_out_line=""
# check "lan port map" marker in portmap output string
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
[[ ${prtmap_out_line} != "lan_port_map" ]] && return 255
tc3162_get_lan_port "${ifname}"
let "if_idx=$?"
[[ -z "${if_idx}" || ${if_idx} -eq 255 ]] && return
# get lan portmapping string "lan_port mapped_port" for ifname by it's index
let "prtmap_out_line_num=${prtmap_out_line_num}+1+${if_idx}"
prtmap_out_line="$(sed -n "${prtmap_out_line_num}p" ${prtmap_procfile})"
# get and check lan port index from lan portmapping string
lan_prt=$(echo "${prtmap_out_line}" | cut -f 1 -d' ')
[[ -z "${lan_prt}" || "${if_idx}" != "${lan_prt}" ]] && return 255
# get and check mapped port from lan portmapping string
let "port=$(echo "${prtmap_out_line}" | cut -f 2 -d' ')"
[[ ${port} -lt 0 || ${port} -gt 255 ]] && return 255
return ${port}
}
unset -f get_max_port_speed
# arg1: port ifname, ex: eth0.1
get_max_port_speed() {
[[ -z "$1" ]] && { echo 0; return; }
local ifname="$1"
local port=255
local speed=0
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
# tc3162 capability for all ports is 1Gbps
speed=1000
echo $speed
}
unset -f power_updown
# arg1: port ifname, ex: eth0.1
# arg2: port enabled, ex: 0/1/off/on/..
power_updown() {
[[ -z "$1" ]] && return
[[ -z "$2" ]] && return
local ifname="$1"
local enabled="$2"
local port=255
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
let "enabled=$(get_bool "${enabled}" "-1")"
[[ ${enabled} -eq -1 ]] && return
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
switchmgr phy admin "${port}" "${enabled}"
}
unset -f set_port_settings
# arg1: port ifname, ex: eth0.1
# arg2: port enabled, ex: 0/1/off/on/..
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: 0/1/off/on/..
# arg6: port eee, ex: 0/1/off/on/..
# arg7: port pause, ex: 0/1/off/on/..
set_port_settings() {
[[ -z "$1" ]] && return
[[ -z "$2" ]] && return
[[ -z "$3" ]] && return
[[ -z "$4" ]] && return
[[ -z "$5" ]] && return
[[ -z "$6" ]] && return
[[ -z "$7" ]] && return
local ifname="$1"
local enabled="$2"
local speed="$3"
local duplex="$4"
local autoneg=$5
local eee="$6"
local pause="$7"
local port=255
local speedmode=1
local last_speed=0
[[ -d "/sys/class/net/${ifname}" ]] || {
logger -t "port-management" "interface ${ifname} is not found"
return
}
let "enabled=$(get_bool "${enabled}" "-1")"
[[ ${enabled} -eq -1 ]] && return
let "autoneg=$(get_bool "${autoneg}" "-1")"
[[ ${autoneg} -eq -1 ]] && return
let "eee=$(get_bool "${eee}" "-1")"
[[ ${eee} -eq -1 ]] && return
let "pause=$(get_bool "${pause}" "-1")"
[[ ${pause} -eq -1 ]] && return
duplex="$(echo "${duplex}" | awk '{print tolower($0)}')"
[[ "${duplex}" != "half" && "${duplex}" != "full" ]] && return
tc3162_get_lan_port "${ifname}"
let "port=$?"
[[ -z "${port}" || ${port} -eq 255 ]] && return
last_speed="$(switchmgr phy maxspeed "${port}" | cut -f2 -d':')"
[[ -z "${last_speed}" || "${last_speed}" == "*Down*" ]] \
&& last_speed=${speed}
switchmgr phy pause "${port}" "${pause}"
# set speedmode: speed+duplex+autoneg
# FIXME: switchmgr has no separate setting for 1Gbps speed - use autoneg instead
if [[ ${autoneg} -eq 1 || ${speed} -gt 100 ]]; then
switchmgr phy speedmode ${port} "1"
else
[[ ${speed} -gt 10 ]] && let "speedmode=2" || let "speedmode=4"
[[ "${duplex}" == "half" ]] && let "speedmode=${speedmode}+1"
switchmgr phy speedmode "${port}" "${speedmode}"
fi
# TODO: implement MAC control register manipulations (mapped ports used) for
# eee settings change
# separate (tx/rx) pause (flow control) settings change
# set speed to 1Gbps separately from autoneg mode
# FIXME: workaround for duplex/pause settings being not applied if speed is unchanged
[[ ${last_speed} -eq ${speed} ]] && power_updown "${ifname}" 0
power_updown "${ifname}" ${enabled}
}

View File

@@ -0,0 +1,140 @@
# arg1: port ifname, ex: eth0
get_max_port_speed() {
if [ -z "$1" ]; then
echo 0
return
fi
local ifname="$1"
local phycap="$(ethctl $ifname media-type 2>/dev/null | grep 'PHY Capabilities' | awk '{print$NF}' | cut -d'|' -f1)"
local speed=1000
case "$phycap" in
10GFD) speed=10000 ;;
5GFD) speed=5000 ;;
2.5GFD) speed=2500 ;;
1GFD|1GHD) speed=1000 ;;
100MFD|100MHD) speed=100 ;;
10MFD|10MHD) speed=10 ;;
esac
echo $speed
}
# arg1: port name, ex: eth0
get_port_number() {
[ -z "$1" ] && return
local ports="0 1 2 3 4 5 6 7 8"
local units="0 1"
local port="$1"
local ifname
for unit in $units; do
for prt in $ports; do
ifname="$(ethswctl getifname $unit $prt 2>/dev/null | awk '{print$NF}')"
if [ "$ifname" == "$port" ]; then
echo "$unit $prt"
return
fi
done
done
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
power_updown() {
local ifname="$1"
local enabled=$2
local updown="up"
[ $enabled -eq 0 ] && updown="down"
ethctl $ifname phy-power $updown >/dev/null
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: on
# arg6: port eee, ex: 0
# arg7: port pause, ex: 0
set_port_settings() {
local ifname="$1"
local enabled=$2
local speed="$3"
local duplex=$4
local autoneg=$5
local eee=$6
local pause=$7
[ -d /sys/class/net/$ifname ] || return
local unitport="$(get_port_number $ifname)"
local unit=$(echo $unitport | cut -d ' ' -f 1)
local port=$(echo $unitport | cut -d ' ' -f 2)
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
[ "$duplex" == "half" ] && duplex=0 || duplex=1
[ "$duplex" == 0 ] && dplx="HD" || dplx="FD"
[ "$autoneg" == "on" ] && media_type="auto" || media_type="$speed$dplx"
phycrossbar="$(ethctl $ifname phy-crossbar | head -1)"
crossbartype="$(echo $phycrossbar | awk '{print$2$3}')"
# Take only the last PHY Endpoint (non-Serdes) into account as Serdes port number precedes
[ "$crossbartype" == "oncrossbar" ] && pyhendpoint="$(echo $phycrossbar | awk '{print$NF}')"
phycaps="$(ethctl $ifname media-type ${pyhendpoint:+ port $pyhendpoint} | awk -F'PHY Capabilities: ' '{print$2}')"
numofcaps="$(echo $phycaps | tr '|' ' ' | wc -w)"
if [ "$numofcaps" == "1" ]; then
logger -t "port-management" "$ifname is capable of $phycaps only; not setting speed/duplex"
else
logger -t "port-management" "$ifname is capable of $phycaps; setting speed/duplex to $media_type"
ethctl $ifname media-type $media_type ${pyhendpoint:+ port $pyhendpoint} &>/dev/null
fi
[ $eee -eq 1 ] && eee="on" || eee="off"
ethtool --set-eee $ifname eee $eee 2>/dev/null
case $pause in
off|0)
pause=0x0
auto=off
rx=off
tx=off
;;
on|1)
pause=0x2
auto=off
rx=on
tx=on
;;
auto)
pause=0x1
auto=on
rx=on
tx=on
;;
tx)
pause=0x3
auto=off
rx=off
tx=on
;;
rx)
pause=0x4
auto=off
rx=on
tx=off
;;
esac
if [ "$auto" == "on" ]; then
# Use ethswctl utility to set pause autoneg
# as ethtool is not setting it properly
ethswctl -c pause -n $unit -p $port -v $pause 2>&1 >/dev/null
else
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
fi
power_updown $ifname $enabled
}

View File

@@ -1,12 +1,15 @@
#!/bin/sh /etc/rc.common
START=15
STOP=90
USE_PROCD=1
PROG=/usr/sbin/ethmngr
. /lib/functions.sh
include /lib/network
include /lib/ethernet
configure_ports(){
configure_ethernet_port(){
local cfg=$1
local ifname enabled speed duplex autoneg eee pause
@@ -24,11 +27,22 @@ configure_ports(){
}
start_service() {
[ -f /lib/network/port.sh ] || return
if [ -s /etc/config/ports ]; then
config_load ports
config_foreach configure_ports ethport
config_foreach configure_ports sfpport
config_foreach configure_ethernet_port ethport
fi
if [ -f $PROG ]; then
procd_open_instance
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
fi
}
reload_service() {
stop
start
}
service_triggers() {

View File

@@ -2,7 +2,8 @@
populate_config_from_db() {
. /lib/functions.sh
include /lib/network
. /lib/network/utils.sh
include /lib/ethernet
portorder="$(db -q get hw.board.ethernetPortOrder)"
for port in $portorder; do

View File

@@ -1,19 +0,0 @@
#!/bin/sh /etc/rc.common
START=95
STOP=10
USE_PROCD=1
PROG=/usr/sbin/ethmngr
start_service() {
procd_open_instance
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}

View File

@@ -0,0 +1,95 @@
# arg1: port ifname, ex: eth0
get_max_port_speed() {
if [ -z "$1" ]; then
echo 0
return
fi
local ifname="$1"
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 000 | tail -n 1 | awk '{print$NF}')"
local speed=1000
case "$phycap" in
10000*) speed=10000 ;;
5000*) speed=5000 ;;
2500*) speed=2500 ;;
1000*) speed=1000 ;;
100*) speed=100 ;;
10*) speed=10 ;;
esac
echo $speed
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
power_updown() {
local ifname="$1"
local enabled=$2
local updown="up"
[ $enabled -eq 0 ] && updown="down"
ip link set dev $ifname $updown
}
# arg1: port ifname, ex: eth0
# arg2: port enabled, ex: 1
# arg3: port speed, ex: 1000
# arg4: port duplex, ex: full
# arg5: port autoneg, ex: on
# arg6: port eee, ex: 0
# arg7: port pause, ex: 0
set_port_settings() {
local ifname="$1"
local enabled=$2
local speed="$3"
local duplex=$4
local autoneg=$5
local eee=$6
local pause=$7
[ -d /sys/class/net/$ifname ] || return
[ $autoneg -eq 1 ] && autoneg="on" || autoneg="off"
ethtool --change $ifname speed $speed duplex $duplex autoneg $autoneg
[ $eee -eq 1 ] && eee="on" || eee="off"
ethtool --set-eee $ifname eee $eee 2>/dev/null
case $pause in
off|0)
pause=0x0
auto=off
rx=off
tx=off
;;
on|1)
pause=0x2
auto=off
rx=on
tx=on
;;
auto)
pause=0x1
auto=on
rx=on
tx=on
;;
tx)
pause=0x3
auto=off
rx=off
tx=on
;;
rx)
pause=0x4
auto=off
rx=on
tx=off
;;
esac
ethtool --pause $ifname autoneg $auto rx $rx tx $tx 2>/dev/null
power_updown $ifname $enabled
}

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=evoice
PKG_VERSION:=0.2.29
PKG_VERSION:=0.2.39
LOCAL_DEV=0
LOCAL_DEV_EVOICE_DIR=~/voip/evoice
@@ -13,7 +13,7 @@ LOCAL_DEV_EVOICE_DIR=~/voip/evoice
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/evoice.git
PKG_SOURCE_VERSION:=ee4e9e00ec1c54b41e15a3de38f6a733634622dd
PKG_SOURCE_VERSION:=30d65330de0368f73ecf4a2e804c39a2ee280454
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -21,8 +21,6 @@ endif
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_DEPENDS:=bbf
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
#PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
@@ -34,10 +32,10 @@ define Package/$(PKG_NAME)
SUBMENU:=Telephony
TITLE:=Ensemble Voice
URL:=
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp +libopenssl\
+TARGET_iopsys_brcm63xx_arm:bcmkernel\
+TARGET_iopsys_econet:kmod-voip_driver\
+TARGET_iopsys_econet:voip_app
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp +libopenssl +libjson-c +libblobmsg-json\
+TARGET_brcmbca:bcmkernel\
+TARGET_airoha:kmod-voip_driver\
+TARGET_airoha:voip_app +libbbf_api
endef
define Package/$(PKG_NAME)/description
@@ -58,17 +56,19 @@ endif
IDIR = $(STAGING_DIR)/usr/include
TONES_INI_REQUIRED=
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
BDIR = bcm963xx/userspace/private/apps/voice
CC_FLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc\
-I$(IDIR)/bcm963xx/xchg/bos/publicInc\
-I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
TRG=SVrgBcmFxs
else ifeq ($(CONFIG_TARGET_iopsys_econet),y)
JSONFILE=codecs_brcm.json
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TONES_INI_REQUIRED=y
TRG=SVrgMtekOwrt
JSONFILE=codecs_airoha.json
endif
# disable temporarily some not important warnings, force PIC
@@ -95,6 +95,9 @@ define Package/evoice/install
$(CP) ./files/* $(1)/
$(if $(TONES_INI_REQUIRED),,$(RM) $(1)/etc/evoice/tones.ini)
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(1)/lib/voice/$(JSONFILE) $(1)/lib/voice/codecs_evoice.json
$(RM) $(1)/lib/voice/codecs_brcm.json
$(RM) $(1)/lib/voice/codecs_airoha.json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/evoice $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/libvoiceservice.so $(1)/usr/lib/bbfdm/

View File

@@ -22,6 +22,7 @@ config SIPClient 'Client2'
config SIPNetwork 'Network1'
option Enable '1'
option ProxyServer 'sip-proxy.iopsys.eu'
option AcceptFromProxyOnly '0'
option ProxyServerPort '5060'
option ProxyServerTransport 'UDP'
option RegistrarServer 'sip-proxy.iopsys.eu'
@@ -33,6 +34,12 @@ config SIPNetwork 'Network1'
option TimerRegistrationFailed '120'
option TimerT1 '500'
option VoIPProfile 'VoIPProfile1'
option SIPSessionTimerEnable '0'
option SIPSessionExpireInterval '1800'
option SIPSessionMinimumTimer '90'
option SIPSessionRefresher 'NONE'
option SIPSessionTimerMode 'REQUEST'
option SIPSessionRefreshRequest 'UPDATE'
list CodecList '1CodecProfile1'
list CodecList '1CodecProfile2'
list CodecList '1CodecProfile3'

View File

@@ -51,6 +51,7 @@ config network 'map_net'
option Enable 'voice.Network@.Enable'
option Registration_Server 'voice.Network@.RegistrarServer'
option Outbound_Proxy 'voice.Network@.ProxyServer'
option Accept_From_Registered 'voice.Network@.AcceptFromProxyOnly'
option SIP_Port 'voice.Network@.RegistrarServerPort'
option SIP_Transport 'voice.Network@.RegistrarServerTransport'
option RegistrationPeriod 'voice.Network@.RegistrationPeriod'
@@ -58,6 +59,12 @@ config network 'map_net'
option Reg_Failure_Interval 'voice.Network@.TimerRegistrationFailed'
option T1 'voice.Network@.TimerT1'
option UserAgentDomain 'voice.Network@.UserAgentDomain'
option SIP_SessTmrEnable 'voice.Network@.SIPSessionTimerEnable'
option SIP_SessTmrMode 'voice.Network@.SIPSessionTimerMode'
option SIP_SessTmrMsg 'voice.Network@.SIPSessionRefreshRequest'
option SIP_SessTmrRefresher 'voice.Network@.SIPSessionRefresher'
option SIP_MinSE 'voice.Network@.SIPSessionMinimumTimer'
option SIP_SessInterval 'voice.Network@.SIPSessionExpireInterval'
config VoIPProfile 'map_voip'
option Enable 'voice.VoIPProfile@.Enable'

View File

@@ -22,7 +22,6 @@ config static_prm 'defaults'
option Tone_On_Hangup '1'
option BusyTone_On_Hangup '1'
option Enable_Analouge_Conf '0'
option SIP_SessTmrEnable '0'
option PrackUsage '1'
option SIP_SupportedPath '0'
option IMS_Access_Network_Info ' '

View File

@@ -0,0 +1,50 @@
{
"G.711ALaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.711MuLaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.722": [
{
"BitRate": 64000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.726": [
{
"BitRate": 32000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
},
{
"BitRate": 24000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"G.729": [
{
"BitRate": 8000,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
],
"AMR": [
{
"BitRate": 7400,
"PacketizationPeriod": "20",
"SilenceSuppression": false
}
]
}

View File

@@ -0,0 +1,140 @@
{
"G.711MuLaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.711ALaw": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.726": [
{
"BitRate": 16000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 24000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 32000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 40000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.723.1": [
{
"BitRate": 5300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 6300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.729": [
{
"BitRate": 8000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"iLBC": [
{
"BitRate": 15200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 13300,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"G.722": [
{
"BitRate": 64000,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"AMR": [
{
"BitRate": 12200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 10200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 7950,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 7400,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 6700,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 5900,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 5150,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
},
{
"BitRate": 4750,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-EFR": [
{
"BitRate": 12200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-FR": [
{
"BitRate": 13200,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
],
"GSM-HR": [
{
"BitRate": 5600,
"PacketizationPeriod": "10-30",
"SilenceSuppression": true
}
]
}

View File

@@ -28,7 +28,7 @@ define KernelPackage/$(PKG_NAME)
FILES:=$(PKG_BUILD_DIR)/$(PKG_NAME).$(LINUX_KMOD_SUFFIX)
KCONFIG:=CONFIG_PACKAGE_kmod-gryphon-led-kernel-module=y
AUTOLOAD:=$(call AutoLoad,60,$(PKG_NAME))
DEPENDS:= +(TARGET_iopsys_brcm63xx_arm):bcmkernel
DEPENDS:= +(TARGET_brcmbca):bcmkernel
PKG_LICENSE:=GPLv2
PKG_LICENSE_URL:=
endef
@@ -42,7 +42,7 @@ EXTRA_KCONFIG:= CONFIG_RGB_LED=m
MODULE_INCLUDE=-I$(PKG_BUILD_DIR)
ifeq ($(CONFIG_TARGET_iopsys_brcm63xx_arm),y)
ifeq ($(CONFIG_TARGET_brcmbca),y)
LINUX_DIR:=$(BUILD_DIR)/bcmkernel/bcm963xx/kernel/linux-4.19
# This assumes that the MODULES_SUBDIR set by OpenWrt is of the form
# lib/modules/4.19.235-abcdef where 4.19.235 is the version of our fake bcmlinux kernel

View File

@@ -220,7 +220,6 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
leds->clock_gpio = NULL;
return PTR_ERR(leds->clock_gpio);
}
@@ -228,7 +227,6 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->clock_gpio)) {
dev_err(&pdev->dev, "Failed to acquire clock GPIO %ld\n",
PTR_ERR(leds->clock_gpio));
leds->clock_gpio = NULL;
return PTR_ERR(leds->clock_gpio);
} else {
printk(KERN_INFO "Got clock gpio\n");
@@ -246,7 +244,6 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
leds->data_gpio = NULL;
return PTR_ERR(leds->data_gpio);
}
@@ -254,7 +251,6 @@ static int canyon_led_probe(struct platform_device *pdev)
if (IS_ERR(leds->data_gpio)) {
dev_err(&pdev->dev, "Failed to acquire data GPIO %ld\n",
PTR_ERR(leds->data_gpio));
leds->data_gpio = NULL;
return PTR_ERR(leds->data_gpio);
} else {
printk(KERN_INFO "Got data gpio\n");

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.0.3
PKG_VERSION:=9.1.19
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=304db5eb064d89cf4e4df0bb81fa22b88933d602
PKG_SOURCE_VERSION:=9d8389cda16f410826920bb27fd8af4d28c79de9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -29,7 +29,7 @@ define Package/icwmp/default
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbf_api
endef
define Package/icwmp-openssl
@@ -83,6 +83,9 @@ define Package/icwmp/default/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libcwmpdm.so $(1)/usr/lib/bbfdm/libcwmpdm.so
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
@@ -92,6 +95,8 @@ define Package/icwmp/default/install
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/icwmpd/update.sh $(1)/etc/icwmpd/update.sh
$(INSTALL_DATA) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)/etc/bbfdm/json/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
endef
Package/icwmp-openssl/install = $(Package/icwmp/default/install)

View File

@@ -38,6 +38,7 @@ config cpe 'cpe'
option periodic_notify_enable '1'
option periodic_notify_interval '10'
option incoming_rule 'Port_Only'
option active_notif_throttle '0'
config lwn 'lwn'
option enable '1'

View File

@@ -20,13 +20,13 @@ if [ -z "${zone_name}" ]; then
exit 0
elif [ "$zone_name" = "icwmp" ]; then
iptables -nL zone_icwmp_input 2> /dev/null
if [ $? != 0 ]; then
if [ "$?" != 0 ]; then
iptables -w 1 -N zone_icwmp_input
iptables -w 1 -t filter -A INPUT -j zone_icwmp_input
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
else
iptables -w 1 -F zone_icwmp_input
iptables -w 1 -I zone_icwmp_input -p tcp --dport $port -j REJECT
iptables -w 1 -I zone_icwmp_input -p tcp --dport "${port}" -j REJECT
fi
else
iptables -w 1 -F zone_icwmp_input 2> /dev/null
@@ -64,13 +64,13 @@ else
fi
fi
echo ${cmd}|grep -q "\-\-dport \|\-s "
echo "${cmd}"|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd}
fi
echo ${cmd6}|grep -q "\-\-dport \|\-s "
echo "${cmd6}"|grep -q "\-\-dport \|\-s "
if [ "$?" -eq 0 ]; then
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
${cmd6}

View File

@@ -14,16 +14,19 @@ handle_icwmp_update() {
return 0
fi
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" = "true" ]; then
# read status from var/state/cwmp
status=$(uci -q -c /var/state get cwmp.sess_status.current_status)
if [ "$status" != "running" ]; then
log "Trigger out of bound inform, since last inform status was failure"
ubus -t 10 call tr069 inform >/dev/null 2>&1
# Handle timeout or tr069 object not found
if [ "$?" -eq 7 ] || [ "$?" -eq 4 ]; then
fi
else
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
fi
}
handle_icwmp_update $@
handle_icwmp_update "$@"

View File

@@ -23,22 +23,22 @@ regenerate_ssl_link()
[ ! -d "${cert_dir}" ] && return 0;
### Generate all ssl link for pem certicates ###
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
all_file=$(ls "${cert_dir}"/*.pem 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
[ -f "${cert_dir}"/"${rehash}".0 ] || \
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
done
fi
### Generate all ssl link for crt certicates ###
all_file=$(ls $cert_dir/*.crt 2>/dev/null)
all_file=$(ls "${cert_dir}"/*.crt 2>/dev/null)
if [ -n "${all_file}" ]; then
for cfile in $all_file; do
rehash="$(openssl x509 -hash -noout -in $cfile)"
[ -f ${cert_dir}/${rehash}.0 ] || \
ln -s $cfile $cert_dir/${rehash}.0
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
[ -f "${cert_dir}"/"${rehash}".0 ] || \
ln -s "${cfile}" "${cert_dir}"/"${rehash}".0
done
fi
}
@@ -47,8 +47,8 @@ enable_dhcp_option43() {
local wan="${1}"
### Ask for DHCP Option 43 only if CWMP is enabled ###
local reqopts="$(uci -q get network.$wan.reqopts)"
local proto="$(uci -q get network.$wan.proto)"
local reqopts="$(uci -q get network."${wan}".reqopts)"
local proto="$(uci -q get network."${wan}".proto)"
local newreqopts=""
local option43_present=0
@@ -64,8 +64,8 @@ enable_dhcp_option43() {
fi
newreqopts="$reqopts 43"
if [ "${proto}" == "dhcp" ]; then
uci -q set network.$wan.reqopts="$newreqopts"
if [ "${proto}" = "dhcp" ]; then
uci -q set network."${wan}".reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
@@ -77,7 +77,7 @@ convert_to_hex() {
OPTIND=1
while getopts ":" opt "-$optval"
do
temp=$(printf "%X" "'${OPTARG:-:}")
temp=$(printf "%02X" "'${OPTARG:-:}")
val="${val}:${temp}"
done
@@ -122,25 +122,25 @@ configure_send_op125() {
serial_len=$(echo -n "${serial}" | wc -m)
class_len=$(echo -n "${class}" | wc -m)
if [ ${oui_len} -eq 0 ] || [ ${serial_len} -eq 0 ]; then
if [ "${oui_len}" -eq 0 ] || [ "${serial_len}" -eq 0 ]; then
return 0
fi
opt125_len=$((oui_len + serial_len + class_len))
if [ ${class_len} -gt 0 ]; then
if [ "${class_len}" -gt 0 ]; then
opt125_len=$((opt125_len + 6))
else
opt125_len=$((opt125_len + 4))
fi
hex_opt125_len=$(printf "%X" "${opt125_len}")
hex_opt125_len=$(printf "%02X" "${opt125_len}")
opt125="${opt125}:${hex_opt125_len}"
hex_oui=$(convert_to_hex "${oui}")
if [ -z "${hex_oui}" ]; then
return 0
fi
hex_oui_len=$(printf "%X" "${oui_len}")
hex_oui_len=$(printf "%02X" "${oui_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:01:${hex_oui_len}${hex_oui}"
else
@@ -152,20 +152,20 @@ configure_send_op125() {
return 0
fi
hex_serial_len=$(printf "%X" "${serial_len}")
hex_serial_len=$(printf "%02X" "${serial_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:02:${hex_serial_len}${hex_serial}"
else
opt125="${opt125}:05:${hex_serial_len}${hex_serial}"
fi
if [ ${class_len} -gt 0 ]; then
if [ "${class_len}" -gt 0 ]; then
hex_class=$(convert_to_hex "${class}")
if [ -z "${hex_class}" ]; then
return 0
fi
hex_class_len=$(printf "%X" "${class_len}")
hex_class_len=$(printf "%02X" "${class_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:03:${hex_class_len}${hex_class}"
else
@@ -176,9 +176,9 @@ configure_send_op125() {
if [ "${uci}" = "network" ]; then
new_send_opt="$sendopt $opt125"
uci -q set network.$intf.sendopts="$new_send_opt"
uci -q set network."${intf}".sendopts="$new_send_opt"
else
uci -q add_list dhcp.$intf.dhcp_option="$opt125"
uci -q add_list dhcp."${intf}".dhcp_option="$opt125"
fi
}
@@ -187,9 +187,9 @@ enable_dnsmasq_option125() {
local send125_present=0
local opt125="125,"
local proto="$(uci -q get dhcp.$lan.dhcpv4)"
local proto="$(uci -q get dhcp."${lan}".dhcpv4)"
if [ "${proto}" = "server" ]; then
opt_list="$(uci -q get dhcp.$lan.dhcp_option)"
opt_list="$(uci -q get dhcp."${lan}".dhcp_option)"
for sopt in $opt_list; do
if [[ "$sopt" == "$opt125"* ]]; then
@@ -205,13 +205,27 @@ enable_dnsmasq_option125() {
fi
}
enable_disable_dhcp_option125() {
set_vendor_id() {
local wan="${1}"
local action="${2}"
local proto="$(uci -q get network."${wan}".proto)"
local reqopts="$(uci -q get network.$wan.reqopts)"
local sendopts="$(uci -q get network.$wan.sendopts)"
local proto="$(uci -q get network.$wan.proto)"
if [ "${proto}" = "dhcp" ]; then
vendorid="$(uci -q get network."${wan}".vendorid)"
if [ -z "${vendorid}" ]; then
uci -q set network."${wan}".vendorid="dslforum.org"
ubus call uci commit '{"config":"network"}'
elif [[ $vendorid != *"dslforum.org"* ]]; then
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
ubus call uci commit '{"config":"network"}'
fi
fi
}
enable_dhcp_option125() {
local wan="${1}"
local reqopts="$(uci -q get network."${wan}".reqopts)"
local sendopts="$(uci -q get network."${wan}".sendopts)"
local proto="$(uci -q get network."${wan}".proto)"
local newreqopts=""
local newsendopts=""
local req125_present=0
@@ -233,11 +247,10 @@ enable_disable_dhcp_option125() {
fi
done
if [ "${proto}" == "dhcp" ]; then
if [ "${action}" == "enable" ]; then
if [ "${proto}" = "dhcp" ]; then
if [ ${req125_present} -eq 0 ]; then
newreqopts="$reqopts 125"
uci -q set network.$wan.reqopts="$newreqopts"
uci -q set network."${wan}".reqopts="$newreqopts"
network_uci_update=1
fi
@@ -245,24 +258,6 @@ enable_disable_dhcp_option125() {
configure_send_op125 "${sendopts}" "${wan}" "network"
network_uci_update=1
fi
else
if [ ${req125_present} -eq 1 ]; then
newreqopts=$(echo ${reqopts/125/})
uci -q set network.$wan.reqopts="$newreqopts"
network_uci_update=1
fi
if [ ${send125_present} -eq 1 ]; then
for sopt in $sendopts; do
if [[ "$sopt" == "$opt125"* ]]; then
newsendopts=$(echo ${sendopts/"${sopt}"/})
uci -q set network.$wan.sendopts="$newreqopts"
network_uci_update=1
break
fi
done
fi
fi
fi
if [ ${network_uci_update} -eq 1 ]; then
@@ -288,12 +283,6 @@ wait_for_resolvfile() {
copy_cwmp_etc_files_to_varstate() {
mkdir -p /var/run/icwmpd
if [ -f /etc/icwmpd/cwmp ]; then
uci -q -c /etc/icwmpd delete cwmp.acs
uci -q -c /etc/icwmpd commit cwmp
cp -f /etc/icwmpd/cwmp /var/state/cwmp
fi
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]; then
cp -f /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd/ 2>/dev/null
fi
@@ -312,10 +301,6 @@ copy_cwmp_varstate_files_to_etc() {
cp -f /var/run/icwmpd/dm_enabled_notify /etc/icwmpd/ 2>/dev/null
fi
if [ -f /var/state/cwmp ]; then
cp -f /var/state/cwmp /etc/icwmpd/
fi
# move the successful custom notify import marker to persistent storage
if [ -f /var/run/icwmpd/icwmpd_notify_import_marker ]; then
cp -f /var/run/icwmpd/icwmpd_notify_import_marker /etc/icwmpd/
@@ -392,25 +377,30 @@ validate_defaults() {
}
boot() {
local enable_cwmp="0"
local dhcp_discovery="0"
config_load cwmp
config_get dhcp_discovery acs dhcp_discovery "0"
config_get_bool enable_cwmp cpe enable 1
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
config_get dhcp_discovery acs dhcp_discovery "0"
config_get wan_interface cpe default_wan_interface "wan"
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
fi
config_get lan_interface cpe default_lan_interface ""
if [ -n "${lan_interface}" ]; then
# Set dhcp_option 125 if not already configured
enable_disable_dhcp_option125 "${wan_interface}" "enable"
enable_dhcp_option125 "${wan_interface}"
enable_dnsmasq_option125 "${lan_interface}"
else
# Remove dhcp option 125 if exists
enable_disable_dhcp_option125 "${wan_interface}" "disable"
fi
config_get ssl_capath acs ssl_capath
@@ -419,6 +409,11 @@ boot() {
regenerate_ssl_link "${ssl_capath}"
fi
# Copy backup data so that if it restart latter on, it gets the info
copy_cwmp_etc_files_to_varstate
mkdir -p /var/run/icwmpd/
touch /var/run/icwmpd/cwmp
start
}
@@ -441,9 +436,6 @@ start_service() {
return 1;
}
# Copy backup data so that if it restart latter on it gets the info
copy_cwmp_etc_files_to_varstate
procd_open_instance icwmp
procd_set_param command "$PROG"
procd_append_param command -b
@@ -455,7 +447,7 @@ start_service() {
procd_close_instance
}
service_stopped()
stop_service()
{
copy_cwmp_varstate_files_to_etc
}
@@ -473,7 +465,14 @@ reload_service() {
return 0
fi
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
tr069_status="$(ubus -t 1 call tr069 status)"
ret="$?"
if [ "$ret" = "7" ]; then
# ubus timed out may be due to uloop is busy in some task so returning
return 0
fi
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
ret="$?"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'

View File

@@ -1,6 +1,6 @@
if (PACKAGE_ieee1905)
menu "Configurations"
menu "Configuration"
config IEEE1905_EXTENSION_ALLOWED
bool "Allow plugins to extend 1905 CMDUs and/or TLVs"
@@ -10,5 +10,18 @@ config IEEE1905_PLATFORM_HAS_WIFI
bool "Platform has WiFi"
default y if PACKAGE_libwifi
config IEEE1905_CMDU_SA_IS_ALMAC
bool "Send CMDUs with SA set to 1905 AL-macaddress instead of interface macaddress"
default n
config IEEE1905_WIFI_EASYMESH
bool "Include WiFi-Alliance's Easymesh updates"
default y
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
default y
endmenu
endif

View File

@@ -1,14 +0,0 @@
if (PACKAGE_map-plugin)
menu "Configurations"
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=4.10.7
PKG_VERSION:=8.0.12
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b50f79061a95840d89a6129aa0a95aff82b5a1b7
PKG_SOURCE_VERSION:=b265053762a3d6c901872f29fa3e70b8666daf46
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -35,31 +35,21 @@ define Package/ieee1905/config
endef
define Package/libieee1905
$(call Package/ieee1905/Default,$(1))
TITLE+= (library for CMDU and TLV handling)
$(call Package/ieee1905/Default)
TITLE:=libieee1905.so (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json
endef
define Package/ieee1905
$(call Package/ieee1905/Default,$(1))
TITLE+= ieee1905d (daemon implementing 1905.1 and provides cli)
$(call Package/ieee1905/Default)
TITLE:=ieee1905d (daemon implementing 1905.1 and provides cli)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ubus +libpthread \
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi
endef
define Package/map-plugin
$(call Package/ieee1905/Default,$(1))
TITLE:=Multi-AP (Easymesh) plugin
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/map-plugin/config
source "$(SOURCE)/Config.map-plugin.in"
endef
include $(wildcard plugins/*.mk)
define Package/ieee1905/description
This package provides IEEE Std 1905.1 stack.
@@ -69,8 +59,16 @@ define Package/libieee1905/description
This package provides library functions for IEEE Std 1905.1 stack.
endef
plugins := \
$(if $(CONFIG_PACKAGE_map-plugin),map) \
$(if $(CONFIG_PACKAGE_snoop-plugin),snoop) \
$(if $(CONFIG_PACKAGE_topology-plugin),topology)
ppkg:=$(patsubst plugins/%.mk,%-plugin,$(wildcard plugins/*.mk))
TARGET_CFLAGS += \
-Wno-error=deprecated-declarations \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
@@ -79,10 +77,20 @@ ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI
endif
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
ifeq ($(CONFIG_IEEE1905_CMDU_SA_IS_ALMAC),y)
TARGET_CFLAGS += -DCMDU_SA_IS_ALMAC
endif
ifeq ($(CONFIG_IEEE1905_WIFI_EASYMESH),y)
TARGET_CFLAGS += -DWIFI_EASYMESH
endif
ifeq ($(CONFIG_IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY),y)
TARGET_CFLAGS += -DIEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
endif
MAKE_FLAGS += \
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"
MAKE_PATH:=src
@@ -101,25 +109,6 @@ define Package/libieee1905/install
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/
endef
define Package/map-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
endef
define Build/InstallDev/map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map2.h $(1)/usr/include/map2.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Build/InstallDev/libieee1905
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
@@ -137,7 +126,7 @@ endef
define Build/InstallDev
$(call Build/InstallDev/libieee1905,$(1),$(2))
$(call Build/InstallDev/map-plugin,$(1),$(2))
$(foreach p,$(ppkg),$(call Build/InstallDev/$(p),$(1),$(2)))
endef
ifeq ($(LOCAL_DEV),1)
@@ -148,4 +137,4 @@ endif
$(eval $(call BuildPackage,ieee1905))
$(eval $(call BuildPackage,libieee1905))
$(eval $(call BuildPackage,map-plugin))
$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p))))

View File

@@ -44,7 +44,8 @@ validate_ap_section() {
uci_validate_section ieee1905 $section "${1}" \
'band:or("2", "5", "60", "6")' \
'ssid:string' \
'encryption:or("psk2", "sae-mixed", "sae", string)' \
'encryption:or("psk2", "sae-mixed", "sae",
"psk", "psk-mixed", "none", string)' \
'key:string' \
'uuid:string' \
'manufacturer:string' \
@@ -82,8 +83,10 @@ start_service() {
validate_ieee1905_config || return 1;
procd_open_instance
procd_set_param command "/usr/sbin/ieee1905d"
procd_set_param command "/usr/sbin/ieee1905d" "-o" "/tmp/ieee1905.log" "-f"
procd_set_param respawn
procd_set_param limits core="unlimited"
# procd_set_param env IEEE1905_LOG_CMDU=1
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance

View File

@@ -0,0 +1,18 @@
#!/bin/sh
. /lib/functions.sh
config_load ieee1905
ifname_to_list() {
local section=$1
config_get ifname $section ifname # get list or option as space separated values
ifname=${ifname//,/\ } # convert csv with space separation
uci del ieee1905.${section}.ifname # delete entry
for i in ${ifname}; do
uci add_list ieee1905.${section}.ifname="$i" # writeback entry as list
done
}
config_foreach ifname_to_list al-iface

51
ieee1905/plugins/map.mk Normal file
View File

@@ -0,0 +1,51 @@
define Package/map-plugin
$(call Package/ieee1905/Default)
TITLE:=Multi-AP plugin supporting WiFi-Alliance Easymesh standard
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/map-plugin/config
if (PACKAGE_map-plugin)
menu "Configuration"
config MULTIAP_EASYMESH_VERSION
int "Easymesh version"
default 2
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif
endef
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_MULTIAP_EASYMESH_VERSION)
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
define Build/InstallDev/map-plugin
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/easymesh.h $(1)/usr/include/easymesh.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map_module.h $(1)/usr/include/map_module.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/cntlrsync.h $(1)/usr/include/cntlrsync.h
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
endef
define Package/map-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/libmaputil.so $(1)/usr/lib/libmaputil.so
$(CP) $(PKG_BUILD_DIR)/src/extensions/map/map.so $(1)/usr/lib/ieee1905/map.so
endef

12
ieee1905/plugins/snoop.mk Normal file
View File

@@ -0,0 +1,12 @@
define Package/snoop-plugin
$(call Package/ieee1905/Default)
TITLE:=Show all received 1905 CMDUs over UBUS
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/snoop-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/snoop/snoop.so $(1)/usr/lib/ieee1905/snoop.so
endef

View File

@@ -0,0 +1,12 @@
define Package/topology-plugin
$(call Package/ieee1905/Default)
TITLE:=Build full network topology of the 1905 nodes only
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef
define Package/topology-plugin/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(CP) $(PKG_BUILD_DIR)/src/extensions/topology/topology.so $(1)/usr/lib/ieee1905/topology.so
endef

View File

@@ -18,8 +18,21 @@ CONFIG_TARGET_ROOTFS_TARGZ=y
# /etc/banner and /etc/device_info #
CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
CONFIG_VERSION_MANUFACTURER="iopsysWrt"
CONFIG_VERSION_MANUFACTURER="IOPSYS"
CONFIG_VERSION_MANUFACTURER_URL="https://iopsys.eu/"
CONFIG_VERSION_DIST="IOWRT"
# OpenWrt is given by CONFIG_VERSION_NUMBER which we do not want to override.
# disabling CONFIG_VERSION_FILENAMES will hide the OpenWrt version from the image filename
# CONFIG_VERSION_FILENAMES is not set
# CONFIG_VERSION_CODE is set to the IOWRT version instead by the genconfig-script and
# CONFIG_VERSION_CODE_FILENAMES will put it into the image filename.
CONFIG_VERSION_CODE_FILENAMES=y
CONFIG_VERSION_HOME_URL="https://iopsys.eu"
CONFIG_VERSION_BUG_URL="https://iopsys.eu"
CONFIG_VERSION_SUPPORT_URL="https://iopsys.eu"
# /lib/preinit #
CONFIG_PREINITOPT=y
@@ -43,9 +56,8 @@ CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
# EasySoC HAL #
CONFIG_PACKAGE_inbd=y
CONFIG_PACKAGE_libwifi=y
CONFIG_PACKAGE_peripheral_manager=y
CONFIG_PACKAGE_port-management=y
CONFIG_PACKAGE_qosmngr=y
CONFIG_PACKAGE_libwifiutils=y
CONFIG_PACKAGE_wifimngr=y
# Multi-AP #
@@ -64,6 +76,7 @@ CONFIG_PACKAGE_urlfilter=y
CONFIG_PACKAGE_imonitor=m
CONFIG_PACKAGE_questd=y
CONFIG_PACKAGE_rulengd=y
CONFIG_PACKAGE_usermngr=y
# TR-x69 #
CONFIG_PACKAGE_uspd-mbedtls=y
@@ -118,7 +131,7 @@ CONFIG_PACKAGE_atftp=m
CONFIG_PACKAGE_atftpd=m
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_dnsmasq=y
CONFIG_PACKAGE_miniupnpd-iptables=y
CONFIG_PACKAGE_ssdpd=y
CONFIG_PACKAGE_mosquitto-client-ssl=y
CONFIG_PACKAGE_mosquitto-ssl=y
CONFIG_PACKAGE_nginx=y
@@ -140,7 +153,8 @@ CONFIG_PACKAGE_ip-bridge=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_ipset=y
CONFIG_PACKAGE_iptables-legacy=y
CONFIG_PACKAGE_ip6tables-zz-legacy=y
CONFIG_PACKAGE_iptables-zz-legacy=y
CONFIG_PACKAGE_iptables-mod-conntrack-extra=y
CONFIG_PACKAGE_iptables-mod-filter=y
CONFIG_PACKAGE_iptables-mod-ipopt=y

View File

@@ -13,12 +13,12 @@ function genconfig {
export DEVELOPER=0
target="bogus"
target_config_path=""
brcm63xx_arm="target/linux/feeds/iopsys-brcm63xx-arm"
ramips="target/linux/feeds/iopsys-ramips"
econet="target/linux/feeds/iopsys-econet"
x86="target/linux/feeds/iopsys-x86"
armvirt="target/linux/feeds/iopsys-armvirt"
mediatek="target/linux/feeds/iopsys-mediatek"
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/iopsys-x86"
armvirt_feed="target/linux/feeds/iopsys-armvirt"
mediatek_feed="target/linux/feeds/iopsys-mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -108,21 +108,21 @@ function genconfig {
return
fi
[ -e $brcm63xx_arm/genconfig ] &&
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
[ -e $ramips/genconfig ] &&
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $econet/genconfig ] &&
iopsys_econet=$(cd $econet; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
[ -e $mediatek/genconfig ] &&
iopsys_mediatek=$(cd $mediatek; ./genconfig)
[ -e $brcmbca_feed/genconfig ] &&
brcmbca=$(cd $brcmbca_feed; ./genconfig)
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
iopsys_x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
iopsys_mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt iopsys_mediatek; do
for list in brcmbca airoha iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
echo "$list based boards:"
for b in ${!list}; do
echo -e "\t$b"
@@ -131,26 +131,18 @@ function genconfig {
return
fi
for p in $iopsys_brcm63xx_arm; do
for p in $brcmbca; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_arm"
target_config_path="$brcm63xx_arm/config"
target="brcmbca"
target_config_path="$brcmbca_feed/config"
return
fi
done
for p in $iopsys_ramips; do
for p in $airoha; do
if [ $p == $profile ]; then
target="iopsys_ramips"
target_config_path="$ramips/config"
return
fi
done
for p in $iopsys_econet; do
if [ $p == $profile ]; then
target="iopsys_econet"
target_config_path="$econet/config"
target="airoha"
target_config_path="$airoha_feed/config"
return
fi
done
@@ -158,7 +150,7 @@ function genconfig {
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
target_config_path="$x86/config"
target_config_path="$x86_feed/config"
return
fi
done
@@ -166,7 +158,7 @@ function genconfig {
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
target_config_path="$armvirt/config"
target_config_path="$armvirt_feed/config"
return
fi
done
@@ -174,7 +166,15 @@ function genconfig {
for p in $iopsys_mediatek; do
if [ $p == $profile ]; then
target="iopsys_mediatek"
target_config_path="$mediatek/config"
target_config_path="$mediatek_feed/config"
return
fi
done
for p in $ipq95xx; do
if [ $p == $profile ]; then
target="ipq95xx"
target_config_path="$qualcomm_ipq95xx_feed/config"
return
fi
done
@@ -265,11 +265,22 @@ function genconfig {
setup_dirs()
{
git remote -v | grep -q http || {
CUSTBRANCH="$(git rev-parse --abbrev-ref HEAD)"
if git ls-remote $CUSTREPO -q 2>/dev/null; then
if [ ! -d "$CUSTPATH" ]; then
echo "Cloning $CUSTBRANCH branch of $CUSTREPO"
git clone -b "$CUSTBRANCH" "$CUSTREPO" "$CUSTPATH" 2>/dev/null || {
DEFBRANCH="$(git remote show $CUSTREPO | grep 'HEAD branch' | cut -d' ' -f5)"
echo "$CUSTBRANCH branch is not found, cloning $DEFBRANCH branch of $CUSTREPO"
git clone "$CUSTREPO" "$CUSTPATH"
}
elif [ $IMPORT -eq 1 ]; then
cd $CUSTPATH
echo "Checking out $CUSTBRANCH branch in $CUSTPATH"
git checkout "$CUSTBRANCH" 2>/dev/null || {
DEFBRANCH="$(git symbolic-ref refs/remotes/origin/HEAD | cut -d '/' -f4)"
echo "Checking out $CUSTBRANCH branch has failed, using $DEFBRANCH branch in $CUSTPATH"
}
v "git pull"
git pull
cd - >/dev/null #go back
@@ -331,7 +342,7 @@ function genconfig {
# Special handling for targets which use TARGET_DEVICES
case "$target" in
iopsys_ramips | iopsys_econet | iopsys_mediatek | iopsys_brcm63xx_arm)
airoha | iopsys_mediatek | brcmbca | ipq95xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
@@ -377,12 +388,15 @@ function genconfig {
fi
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
local GIT_REV=$(git rev-parse --short HEAD)
local GIT_VER="$GIT_TAG"
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
local version_lower="${version,,}"
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected

View File

@@ -12,12 +12,12 @@ function genconfig_min {
export DEVELOPER=0
target="bogus"
target_config_path=""
brcm63xx_arm="target/linux/feeds/iopsys-brcm63xx-arm"
ramips="target/linux/feeds/iopsys-ramips"
econet="target/linux/feeds/iopsys-econet"
x86="target/linux/feeds/iopsys-x86"
armvirt="target/linux/feeds/iopsys-armvirt"
mediatek="target/linux/feeds/iopsys-mediatek"
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/iopsys-x86"
armvirt_feed="target/linux/feeds/iopsys-armvirt"
mediatek_feed="target/linux/feeds/iopsys-mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
Red='\033[0;31m' # Red
Color_Off='\033[0m' # Text Reset
@@ -107,21 +107,21 @@ function genconfig_min {
return
fi
[ -e $brcm63xx_arm/genconfig ] &&
iopsys_brcm63xx_arm=$(cd $brcm63xx_arm; ./genconfig)
[ -e $ramips/genconfig ] &&
iopsys_ramips=$(cd $ramips; ./genconfig)
[ -e $econet/genconfig ] &&
iopsys_econet=$(cd $econet; ./genconfig)
[ -e $x86/genconfig ] &&
iopsys_x86=$(cd $x86; ./genconfig)
[ -e $armvirt/genconfig ] &&
iopsys_armvirt=$(cd $armvirt; ./genconfig)
[ -e $mediatek/genconfig ] &&
iopsys_mediatek=$(cd $mediatek; ./genconfig)
[ -e $brcmbca_feed/genconfig ] &&
brcmbca=$(cd $brcmbca_feed; ./genconfig)
[ -e $airoha_feed/genconfig ] &&
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
iopsys_x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
iopsys_armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
iopsys_mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
ipq95xx=$(cd $qualcomm_ipq95xx_feed; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in iopsys_brcm63xx_arm iopsys_ramips iopsys_econet iopsys_x86 iopsys_armvirt iopsys_mediatek; do
for list in brcmbca airoha iopsys_x86 iopsys_armvirt iopsys_mediatek ipq95xx; do
echo "$list based boards:"
for b in ${!list}; do
echo -e "\t$b"
@@ -130,26 +130,18 @@ function genconfig_min {
return
fi
for p in $iopsys_brcm63xx_arm; do
for p in $brcmbca; do
if [ $p == $profile ]; then
target="iopsys_brcm63xx_arm"
target_config_path="$brcm63xx_arm/config"
target="brcmbca"
target_config_path="$brcmbca_feed/config"
return
fi
done
for p in $iopsys_ramips; do
for p in $airoha; do
if [ $p == $profile ]; then
target="iopsys_ramips"
target_config_path="$ramips/config"
return
fi
done
for p in $iopsys_econet; do
if [ $p == $profile ]; then
target="iopsys_econet"
target_config_path="$econet/config"
target="airoha"
target_config_path="$airoha_feed/config"
return
fi
done
@@ -157,7 +149,7 @@ function genconfig_min {
for p in $iopsys_x86; do
if [ $p == $profile ]; then
target="iopsys_x86"
target_config_path="$x86/config"
target_config_path="$x86_feed/config"
return
fi
done
@@ -165,7 +157,7 @@ function genconfig_min {
for p in $iopsys_armvirt; do
if [ $p == $profile ]; then
target="iopsys_armvirt"
target_config_path="$armvirt/config"
target_config_path="$armvirt_feed/config"
return
fi
done
@@ -173,7 +165,15 @@ function genconfig_min {
for p in $iopsys_mediatek; do
if [ $p == $profile ]; then
target="iopsys_mediatek"
target_config_path="$mediatek/config"
target_config_path="$mediatek_feed/config"
return
fi
done
for p in $ipq95xx; do
if [ $p == $profile ]; then
target="ipq95xx"
target_config_path="$qualcomm_ipq95xx_feed/config"
return
fi
done
@@ -181,12 +181,6 @@ function genconfig_min {
git remote -v | grep -qE '(git@|ssh://)' && {
DEVELOPER=1
bcmAllowed=0
endptAllowed=0
git ls-remote git@dev.iopsys.eu:broadcom/bcmcreator.git -q 2>/dev/null && bcmAllowed=1
git ls-remote git@dev.iopsys.eu:iopsys/endptmngr.git -q 2>/dev/null && endptAllowed=1
}
v() {
@@ -322,7 +316,7 @@ function genconfig_min {
# Special handling for targets which use TARGET_DEVICES
case "$target" in
iopsys_ramips | iopsys_econet | iopsys_mediatek | iopsys_brcm63xx_arm)
airoha | iopsys_mediatek | brcmbca | ipq95xx)
# This assumes the device name to be unique within one target,
# which is a fair assumption to make.
local mk_file="$(grep -Fx --files-with-matches "define Device/${BOARDTYPE}" "$target_config_path/../image/"*.mk)"
@@ -368,12 +362,15 @@ function genconfig_min {
fi
# Set target version
local GIT_TAG=$(git describe --abbrev=0 --tags)
local GIT_REV=$(git rev-parse --short HEAD)
local GIT_VER="$GIT_TAG"
git describe --contains $GIT_REV >/dev/null 2>&1 || GIT_VER="${GIT_TAG}_${GIT_REV}"
echo "CONFIG_TARGET_VERSION=\"${GIT_VER}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${GIT_VER}\"" >> .config
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
local version="${git_version,,}${CUSTOMERS:+-${CUSTOMERS// /}}"
local version_lower="${version,,}"
echo "CONFIG_TARGET_VERSION=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_CODE=\"${version_lower}\"" >> .config
echo "CONFIG_VERSION_PRODUCT=\"$BOARDTYPE"\" >> .config
# Enable Package source tree override if selected

View File

@@ -48,7 +48,10 @@ function ssh_install_key {
local keys="$(get_ssh_public_keys)"
echo "Adding the following keys to $DROPBEAR_AUTHORIZED_KEYS_FILE on $host:"
echo "$keys"
ssh root@$host "echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
ssh \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@$host \
"echo '$keys' >> '$DROPBEAR_AUTHORIZED_KEYS_FILE'" && echo ok
}
register_command "ssh_install_key" "Install the users public ssh key on host running dropbear"

View File

@@ -274,9 +274,10 @@ function ssh_upgrade {
pv "$upd_fw" |
ssh \
-o ConnectTimeout=60 \
-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
root@"$upd_host" \
sh -c "cat > '/tmp/$upd_fw_base' && (set -x && sysupgrade -v $extra_args /tmp/$upd_fw_base)" ||
echo "Sysupgrade failed" >&2 && return 1
}
register_command "ssh_upgrade" "-h <host> -f <file> [opts] Install firmware on remote host with SSH"
register_command "ssh_upgrade" "-t <host> -f <file> [opts] Install firmware on remote host with SSH"

52
libpicoevent-bcm/Makefile Normal file
View File

@@ -0,0 +1,52 @@
#
# Copyright (C) 2006-2010 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_RELEASE:=1
PKG_VERSION:=0.3
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libpicoevent.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f446f186102539cceedaa15a95a33547ac3c1fd7
PKG_NAME:=libpicoevent-bcm
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk
define Package/libpicoevent-bcm
CATEGORY:=Libraries
TITLE:=Libpicoevent-bcm
URL:=
DEPENDS:= +TARGET_brcmbca:bcmkernel
include $(TOPDIR)/feeds/broadcom/bcmkernel/bcm-toolchain.mk
TARGET_CFLAGS := -Os -pipe -mfpu=vfpv3-d16 -mfloat-abi=softfp -DCONFIG_TARGET_brcmbca -g3 -fno-caller-saves -fno-plt -Wno-error=unused-but-set-variable -Wno-error=unused-result \
-mfloat-abi=soft -fmacro-prefix-map=$(BUILD_DIR)libpicoevent-bcm-0.3=libpicoevent-bcm-0.3 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 \
-Wl,-z,now -Wl,-z,relro -Wl,--build-i
endef
define Package/libpicoevent-bcm/description
Minimal event library
endef
define Package/libpicoevent-bcm/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib
$(INSTALL_DIR) $(STAGING_DIR)/usr/lib/broadcom
$(INSTALL_DIR) $(STAGING_DIR)/usr/include
$(INSTALL_DIR) $(STAGING_DIR)/usr/include/bcm963xx
$(CP) $(PKG_BUILD_DIR)/libpicoevent.h $(STAGING_DIR)/usr/include/bcm963xx
mkdir -p $(1)/usr/lib/broadcom
$(CP) $(PKG_BUILD_DIR)/libpicoevent.so $(STAGING_DIR)/usr/lib/broadcom
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libpicoevent.so $(1)/usr/lib/broadcom
endef
$(eval $(call BuildPackage,libpicoevent-bcm))

58
libvoice-airoha/Makefile Normal file
View File

@@ -0,0 +1,58 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_VERSION:=0.1
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
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:=2a6ef141747ad0f7b32a536b5b5bd174834a7af5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for Airoha platform
URL:=
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-airoha -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -0,0 +1,60 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-broadcom
PKG_VERSION:=0.1
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
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:=401a392a72e2933f527eb92466faaf2907c38730
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
export CONFIG_BCM_CHIP_ID
include $(INCLUDE_DIR)/package.mk
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for Broadcom
URL:=
DEPENDS:=
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-broadcom -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

58
libvoice-d2/Makefile Normal file
View File

@@ -0,0 +1,58 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_VERSION:=0.1
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
LOCAL_SRC_DIR:=~/git/voip/$(PKG_NAME)
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:=8a67b666e57836600457167ccadfba8c46461e5c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
# All config variable that are passed to the make invocation, directly or
# indirectly. This ensures that the package is rebuilt on config-changes.
PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
include $(INCLUDE_DIR)/package.mk
export D2_VTSP_PLATFORM := $(shell echo $(CONFIG_D2_VTSP_PLATFORM))
TARGET_CFLAGS += -Wall -Werror
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=IOPSYS libvoice for D2 which is software DSP
URL:=
DEPENDS:=+d2-voice
endef
define Package/$(PKG_NAME)/description
Libvoice is a library that provides a uniform set of APIs and data types with hardware abstract layer for DSP/SLIC from different vendors
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -av --exclude=.* $(LOCAL_SRC_DIR)/* $(PKG_BUILD_DIR)/
endef
endif
define Package/$(PKG_NAME)/install
# Although there is nothing needs to be installed, but the install section must NOT be empty. Otherwise the package will be skipped as below.
# WARNING: skipping libvoice-d2 -- package has no install section
$(INSTALL_DIR) $(1)/usr/lib
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -13,6 +13,9 @@ config AGENT_ISLAND_PREVENTION
config AGENT_EASYMESH_R2_CERT
bool "Compile for WFA test bed"
config AGENT_EASYMESH_VERSION
int "Support Easymesh version"
default 2
config AGENT_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
@@ -30,5 +33,17 @@ config AGENT_EASYMESH_VENDOR_EXT_OUI
enabled through AGENT_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST
bool "Create STA entry before authorization is completed"
config AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE
bool "Skip DFS unavailable channels when channel switch"
config AGENT_LOCAL_ACS_SERVICE
bool "Enable loacal ACS daemon usage"
config AGENT_STRICT_OPER_CHANNEL_REPORT
bool "Report operation channel strictly, skip some unsolicited reports"
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=2.10.3.15
PKG_VERSION:=4.2.0.7
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=075fb9f89722979d4622cbc575f34f74f19c1a91
PKG_SOURCE_VERSION:=142314d9a555ce30399d99ae1a44fbf8be8bb247
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -28,7 +28,7 @@ define Package/map-agent
CATEGORY:=Utilities
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+map-plugin
+map-plugin +ip-bridge
endef
@@ -59,6 +59,8 @@ TARGET_CFLAGS += \
-Wno-error=deprecated-declarations \
-D_GNU_SOURCE
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_AGENT_EASYMESH_VERSION)
ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
endif
@@ -73,8 +75,24 @@ endif
ifeq ($(CONFIG_AGENT_EASYMESH_VENDOR_EXT),y)
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_AGENT_EASYMESH_VENDOR_EXT_OUI)\\\"
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
endif
ifeq ($(CONFIG_AGENT_UNAUTHORIZED_STA_IN_ASSOCLIST),y)
TARGET_CFLAGS += -DUNAUTHORIZED_STA_IN_ASSOCLIST
endif
ifeq ($(CONFIG_AGENT_CHANSWITCH_SKIP_DFS_UNAVAILABLE),y)
TARGET_CFLAGS += -DCHANSWITCH_SKIP_DFS_UNAVAILABLE
endif
ifeq ($(CONFIG_AGENT_LOCAL_ACS_SERVICE),y)
TARGET_CFLAGS += -DLOCAL_ACS_SERVICE
endif
ifeq ($(CONFIG_AGENT_STRICT_OPER_CHANNEL_REPORT),y)
TARGET_CFLAGS += -DSTRICT_OPER_CHANNEL_REPORT
endif
MAKE_PATH:=src

View File

@@ -7,6 +7,7 @@ config agent 'agent'
option island_prevention '0'
option eth_onboards_wifi_bhs '0'
# option controller_macaddr '0a:1b:2c:3d:4e:50'
option scan_on_boot_only '0'
config dynamic_backhaul
option missing_bh_timer '60'

View File

@@ -3,7 +3,7 @@
. /lib/network/utils.sh
conn_ports_file="/tmp/map.connected.ports"
map_bh_file="/tmp/multiap.backhaul"
map_bh_file="/var/run/multiap/multiap.backhaul"
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
[ "${al_bridge:0:3}" = "br-" ] || exit 0
al_brnet="${al_bridge:3}"

View File

@@ -10,56 +10,9 @@ IS_CFG_VALID=1
MAP_DEV="map_dev"
MAP_IF="map"
create_map() {
ip link add lei type veth peer name lei_map 2>/dev/null
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
uci -q set network.${MAP_DEV}=device
uci -q set network.${MAP_DEV}.name=br-map
uci -q set network.${MAP_DEV}.type=bridge
uci -q show network.${MAP_DEV}.ports | grep -q lei_map || {
uci -q add_list network.${MAP_DEV}.ports='lei_map'
}
uci -q set network.${MAP_IF}=interface
uci -q set network.${MAP_IF}.device=br-map
uci -q set network.${MAP_IF}.is_lan=1
uci -q show network.br_lan.ports | grep -q lei_lan || {
uci -q add_list network.br_lan.ports="lei_lan"
}
uci -q set mapagent.agent.al_bridge=br-map
uci -q commit
ubus call network reload
ubus -t 5 wait_for network.interface.map
brctl addif br-map lei_map 2>/dev/null
brctl addif br-lan lei_lan 2>/dev/null
ip link set lei up 2>/dev/null
ip link set lei_map up 2>/dev/null
ip link set lei_lan up 2>/dev/null
}
remove_map() {
ip link delete ${MAP_VETH} &>/dev/null
uci -q delete network.${MAP_DEV}
uci -q delete network.${MAP_IF}
uci -q set mapagent.agent.al_bridge=br-lan
uci -q commit
ubus call network reload
}
start_dynbhd_service() {
rm -f /tmp/multiap.backhaul
rm -f /var/run/multiap/multiap.backhaul
procd_open_instance
procd_set_param command "/usr/sbin/dynbhd"
procd_set_param respawn
@@ -72,7 +25,7 @@ validate_agent_section() {
uci_validate_section mapagent agent "agent" \
'enabled:bool:true' \
'debug:range(0,16)' \
'profile:range(1,2):2' \
'profile:range(1,4):2' \
'brcm_setup:bool:false' \
'controller_macaddr:macaddr' \
'al_bridge:string' \
@@ -81,7 +34,8 @@ validate_agent_section() {
'resend_num:uinteger:0' \
'dyn_cntlr_sync:bool:true' \
'island_prevention:bool:false' \
'eth_onboards_wifi_bhs:bool:false'
'eth_onboards_wifi_bhs:bool:false' \
'scan_on_boot_only:bool:false'
[ "$?" -ne 0 ] && {
@@ -138,7 +92,7 @@ validate_radio_section() {
uci_validate_section mapagent $section "${1}" \
'device:string' \
'band:or("2", "5")' \
'band:or("2", "5", "6")' \
'configured:bool:false' \
'onboarded:bool:false' \
'dedicated_backhaul:bool:false' \
@@ -150,7 +104,11 @@ validate_radio_section() {
'include_sta_metric:bool:false' \
'rcpi_hysteresis_margin:range(0,255)' \
'report_util_threshold:range(0,255)' \
'encryption:or("sae", "psk2", "sae-mixed")'
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes",
"none", "psk-mixed", "psk-mixed+aes",
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
"psk", "psk+aes")' \
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of radio section failed"
@@ -233,10 +191,6 @@ start_service() {
config_get_bool enabled agent enabled 1
[ "$enabled" -eq 0 ] && return 1
local ts
config_get_bool ts agent vlan_segregation 0
[ "$ts" -eq 1 ] && create_map #|| remove_map
procd_open_instance
create_dir
procd_set_param command "/usr/sbin/mapagent" "-d"
@@ -246,10 +200,6 @@ start_service() {
procd_close_instance
}
#stop_service() {
# remove_map
#}
service_triggers()
{
procd_add_reload_trigger "mapagent"

View File

@@ -14,6 +14,10 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
string
default "\\\\x11\\\\x22\\\\x33"
config CONTROLLER_EASYMESH_VERSION
int "Support Easymesh version"
default 2
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
default CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=2.11.0.4
PKG_VERSION:=4.2.0.3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a4a626539ede73c1c4eb1ad768331524a8ee9ce8
PKG_SOURCE_VERSION:=a88dea065f40c81d3356d850fe447a9deeb972e4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
@@ -26,7 +26,7 @@ define Package/map-controller
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
DEPENDS:=+libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 +map-plugin
DEPENDS:=+libuci +libubox +ubus +libeasy +libwifiutils +libieee1905 +ieee1905 +map-plugin
endef
define Package/map-controller/description
@@ -45,12 +45,15 @@ TARGET_CFLAGS += \
MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_CONTROLLER_EASYMESH_VERSION)
ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
endif
ifeq ($(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT),y)
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_CONTROLLER_EASYMESH_VENDOR_EXT_OUI)\\\"
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
endif
define Package/map-controller/install
@@ -58,6 +61,8 @@ define Package/map-controller/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
$(CP) $(PKG_BUILD_DIR)/src/plugins/steer/rcpi/rcpi.so $(1)/usr/lib/mapcontroller/rcpi.so
endef
ifeq ($(LOCAL_DEV),1)

View File

@@ -2,15 +2,23 @@ config controller 'controller'
option enabled '1'
option registrar '2 5'
option debug '0'
option enable_sta_steer '0'
option enable_bsta_steer '0'
option use_bcn_metrics '0'
option use_usta_metrics '0'
option bcn_metrics_max_num '10'
option initial_channel_scan '0'
option primary_vid '0'
option primary_pcp '0'
option allow_bgdfs '0'
option channel_plan '0'
config sta_steering
option steer_module 'rcpi'
option enabled '1'
option enable_sta_steer '0'
option enable_bsta_steer '0'
option use_bcn_metrics '0'
option use_usta_metrics '0'
option bandsteer '0'
option diffsnr '8'
config ap
option band '2'
option encryption 'sae-mixed'
@@ -60,8 +68,8 @@ config ap
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# list steer_exclude 'e0:d4:e8:79:c4:ee'
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'
@@ -107,8 +115,8 @@ config ap
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# list steer_exclude 'e0:d4:e8:79:c4:ee'
# list steer_exclude_btm 'e0:d4:e8:79:c4:11'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'

View File

@@ -19,11 +19,9 @@ validate_controller_section() {
'enabled:bool:true' \
'registrar:string' \
'debug:range(0,16)' \
'bcn_metrics_max_num:range(1,256)' \
'initial_channel_scan:bool:true' \
'resend_num:uinteger:0' \
'enable_sta_steer:bool:false' \
'enable_bsta_steer:bool:false' \
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false' \
'allow_bgdfs:range(0,2629744)' \
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false'
@@ -36,6 +34,33 @@ validate_controller_section() {
return 0
}
validate_sta_steering_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'steer_module:string' \
'enabled:bool:true' \
'enable_sta_steer:bool:false' \
'enable_bsta_steer:bool:false' \
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false' \
'bandsteer:bool:false' \
'diffsnr:range(0,100)' \
'rcpi_threshold_2g:range(0,220)' \
'rcpi_threshold_5g:range(0,220)' \
'rcpi_threshold_6g:range(0,220)' \
'report_rcpi_threshold_2g:range(0,220)' \
'report_rcpi_threshold_5g:range(0,220)' \
'report_rcpi_threshold_6g:range(0,220)'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of sta_steering section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ap_section() {
local section="$1"
@@ -43,7 +68,10 @@ validate_ap_section() {
'band:or("2", "5", "6")' \
'ssid:string' \
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes")' \
"psk2+aes", "sae-mixed", "sae-mixed+aes",
"none", "psk-mixed", "psk-mixed+aes",
"wpa", "wpa+aes", "wpa2", "wpa2+aes",
"psk", "psk+aes")' \
'key:string' \
'vid:range(1,65535):1' \
'type:or("backhaul", "fronthaul", "combined")' \
@@ -93,7 +121,7 @@ validate_radio_section() {
uci_validate_section mapcontroller $section "${1}" \
'agent_id:macaddr' \
'macaddr:macaddr' \
'band:or("2", "5")' \
'band:or("2", "5", "6")' \
'steer_policy:range(0,2)' \
'util_threshold:range(0,255)' \
'rcpi_threshold:range(0,255)' \
@@ -116,6 +144,7 @@ validate_controller_config() {
IS_CFG_VALID=1
validate_controller_section &&
config_foreach validate_sta_steering_section sta_steering &&
config_foreach validate_ap_section ap &&
config_foreach validate_node_section node &&
config_foreach validate_radio_section radio
@@ -170,7 +199,7 @@ reload_service() {
return
fi
pidof "mapcontroller" > /dev/null
pidof "/usr/sbin/mapcontroller" > /dev/null
if [[ $? -ne 0 ]] ; then
start
return

View File

@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=map-topology
PKG_VERSION:=2.5.1.4
PKG_VERSION:=2.5.1.18
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=488ce1ce576b57c9b3c4d7c034969bf65e66216f
PKG_SOURCE_VERSION:=4320fa30e73b916ae6e4ff489294640e61feeb34
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -4,3 +4,4 @@ config topology 'topology'
option depth '8'
option interval '60'
option maxlog '32'
option profile '2'

View File

@@ -0,0 +1,126 @@
#!/bin/sh
. /lib/functions.sh
day=""
IP_RULE=""
process_ac_schedule() {
local acs_id="$1"
local is_enabled
local access_control
local start_time=""
local stop_time=""
local mac=""
handle_day_list() {
local value=$1
val=$(echo $value | cut -c 1-3)
if [ -z $day ]; then
day="$val"
else
day="$day,$val"
fi
}
config_list_foreach "$acs_id" "day" handle_day_list
config_get is_enabled "$acs_id" "enable" 1
config_get access_control "$acs_id" "dm_parent"
if [ "$is_enabled" == "0" ] || [ -z "$access_control" ]; then
return
fi
IP_RULE=""
mac=$(uci -q get hosts.$access_control.macaddr)
access_policy=$(uci -q get hosts.$access_control.access_policy)
config_get start_time "$acs_id" "start_time"
config_get duration "$acs_id" "duration"
if [ -z "$mac" ] && [ -z "$start_time" ] && [ -z "$duration" ] && [ -z "$day" ] && [ -z "$access_policy" ]; then
return
fi
if [ -n "$mac" ]; then
IP_RULE="$IP_RULE -m mac --mac-source $mac"
fi
# as per iptables manual default starttime is 00:00
# default stoptime is 23:59
if [ -z "$start_time" ]; then
start_time="0:0"
fi
if [ -n "$duration" ]; then
hh=$(echo $start_time | awk -F: '{ print $1 }')
mm=$(echo $start_time | awk -F: '{ print $2 }')
hh_s=`expr $hh \* 3600`
mm_s=`expr $mm \* 60`
ss=$(( hh_s + mm_s ))
stop_ss=$(( ss + duration ))
hh=$(( stop_ss / 3600 ))
if [ $hh -lt 24 ]; then
rem_ss=$(( stop_ss % 3600 ))
mm=$(( rem_ss / 60 ))
ss=$(( rem_ss % 60 ))
stop_time="$hh:$mm:$ss"
else
stop_time="23:59"
fi
else
stop_time="23:59"
fi
# conversion to utc
zone=$(date +%z | cut -c 1)
utc_h=$(date -u -d @$(date "+%s" -d "$start_time") +%H)
local_h=$(echo $start_time | awk -F: '{ print $1 }')
if [ "$zone" == "+" ] && [ $utc_h -gt $local_h ]; then
start_utc="0:0"
else
start_utc=$(date -u -d @$(date "+%s" -d "$start_time") +%H:%M)
fi
utc_h=$(date -u -d @$(date "+%s" -d "$stop_time") +%H)
local_h=$(echo $stop_time | awk -F: '{ print $1 }')
if [ "$zone" == "-" ] && [ $utc_h -lt $local_h ]; then
stop_utc="23:59"
else
stop_utc=$(date -u -d @$(date "+%s" -d "$stop_time") +%H:%M)
fi
IP_RULE="$IP_RULE -m time --timestart $start_utc --timestop $stop_utc"
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
if [ "$access_policy" == "Deny" ]; then
IP_RULE="$IP_RULE -j DROP"
else
IP_RULE="$IP_RULE -j ACCEPT"
fi
iptables -w -A hosts_forward ${IP_RULE}
ip6tables -w -A hosts_forward ${IP_RULE}
day=""
}
iptables -w -F hosts_forward
ip6tables -w -F hosts_forward
iptables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && iptables -w -t filter -I FORWARD -j hosts_forward
ip6tables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && ip6tables -w -t filter -I FORWARD -j hosts_forward
# Load /etc/config/hosts UCI file
config_load hosts
config_foreach process_ac_schedule ac_schedule

View File

@@ -71,6 +71,10 @@ start_service() {
config_load "hosts"
validate_hosts_config || return 1;
if [ -f "/proc/sys/net/netfilter/nf_conntrack_timestamp" ]; then
echo 1 >/proc/sys/net/netfilter/nf_conntrack_timestamp
fi
procd_open_instance
procd_set_param command "/usr/sbin/topologyd"
procd_set_param respawn

View File

@@ -0,0 +1,12 @@
#!/bin/sh
if [ -f /etc/firewall.hosts ]; then
uci -q get firewall.hosts || {
uci -q set firewall.hosts=include
uci -q set firewall.hosts.path="/etc/firewall.hosts"
uci -q set firewall.hosts.reload=1
}
fi
exit 0

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mcastmngr
PKG_VERSION:=1.0.2
PKG_VERSION:=1.1.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -17,7 +17,8 @@ include $(INCLUDE_DIR)/package.mk
define Package/mcastmngr
CATEGORY:=Utilities
TITLE:=multicast packets manager daemon
TITLE:=Multicast Proxy/Snooping Manager
DEPENDS:=+!TARGET_brcmbca:mcproxy
endef
define Package/mcastmngr/description
@@ -32,7 +33,12 @@ define Build/Compile
endef
define Package/mcastmngr/install
$(CP) ./files/* $(1)/
$(CP) ./files/common/* $(1)/
ifneq ($(CONFIG_TARGET_brcmbca),)
$(CP) ./files/broadcom/* $(1)/
else
$(CP) ./files/linux/* $(1)/
endif
endef
$(eval $(call BuildPackage,mcastmngr))

View File

@@ -0,0 +1,254 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/mcast/common.sh
include /lib/network
CONFFILE=/var/mcpd.conf
PROG_EXE=/usr/sbin/mcpd
proxdevs=""
ethwan="$(db -q get hw.board.ethernetWanPort)"
config_snooping_common_params() {
local protocol="$1"
echo "${protocol}-default-version $2" >> $CONFFILE
echo "${protocol}-robustness-value $3" >> $CONFFILE
echo "${protocol}-max-groups $max_groups" >> $CONFFILE
echo "${protocol}-max-sources $max_msf" >> $CONFFILE
echo "${protocol}-max-members $max_members" >> $CONFFILE
echo "${protocol}-snooping-enable $4" >> $CONFFILE
}
config_mcast_querier_params() {
local protocol="$1"
local query_interval=$2
local q_resp_interval=$3
local last_mem_q_int=$4
echo "${protocol}-query-interval $query_interval" >> $CONFFILE
echo "${protocol}-query-response-interval $q_resp_interval" >> $CONFFILE
echo "${protocol}-last-member-query-interval $last_mem_q_int" >> $CONFFILE
}
config_snooping_upstream_interface() {
local snooping_upstream_intf=""
json_load "$(devstatus $1)"
logger -t "mcastconf" "$(devstatus $1)"
itr=1
json_select bridge-members
# loop over the bridge and find the device on wan port
while json_get_var dev $itr; do
case "$dev" in
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && $snooping_upstream_intf="$dev" && break
fi
;;
esac
itr=$(($itr + 1))
done
json_select ..
# if none of the bridge members are on wan port, set the wan port itself
if [ -n "$snooping_upstream_intf" ]; then
echo "upstream-interface $snooping_upstream_intf" >>$CONFFILE
else
echo "upstream-interface $ethwan" >>$CONFFILE
fi
}
config_snooping_on_bridge() {
local protocol="$1"
local bcm_mcast_p=1
echo "${protocol}-snooping-interfaces $2" >> $CONFFILE
[ "$protocol" == "mld" ] && bcm_mcast_p=2
for snpif in $2; do
case "$snpif" in
br-*)
# set snooping mode on the bridge
bcmmcastctl mode -i $snpif -p $bcm_mcast_p -m $3
;;
esac
done
}
config_mcast_proxy_interface() {
local itr
local p1="$1"
local p_enable
if [ "$p1" == "igmp" ]; then
p_enable=$igmp_p_enable
else
p_enable=$mld_p_enable
fi
for proxif in $2; do
case "$proxif" in
br-*)
proxdevs="$proxdevs $proxif"
echo "upstream-interface $proxif" >>$CONFFILE
;;
*)
ifconfig $proxif | grep RUNNING >/dev/null && proxdevs="$proxdevs $proxif"
;;
esac
done
if [ $p_enable -eq 1 ]; then
echo "${p1}-proxy-interfaces $proxdevs" >> $CONFFILE
fi
# if proxdevs is empty set the wan port as mcast-interface
if [ -n "$proxdevs" ]; then
echo "${p1}-mcast-interfaces $proxdevs" >> $CONFFILE
else
echo "${p1}-mcast-interfaces $ethwan" >> $CONFFILE
fi
}
configure_mcpd_snooping() {
local protocol="$1"
local exceptions
local filter_ip=""
local fast_leave=0
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_s_version $igmp_s_robustness $igmp_s_mode
config_mcast_querier_params $protocol $igmp_s_query_interval $igmp_s_q_resp_interval $igmp_s_last_mem_q_int
config_snooping_upstream_interface "$igmp_s_iface"
config_snooping_on_bridge $protocol $igmp_s_iface $igmp_s_mode
exceptions=$igmp_s_exceptions
fast_leave=$igmp_s_fast_leave
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_s_version $mld_s_robustness $mld_s_mode
config_mcast_querier_params $protocol $mld_s_query_interval $mld_s_q_resp_interval $mld_s_last_mem_q_int
config_snooping_upstream_interface "$mld_s_iface"
config_snooping_on_bridge $protocol $mld_s_iface $mld_s_mode
exceptions=$mld_s_exceptions
fast_leave=$mld_s_fast_leave
fi
echo "${protocol}-proxy-enable 0" >> $CONFFILE
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
configure_mcpd_proxy() {
local protocol="$1"
local fast_leave=0
local exceptions=""
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_p_version $igmp_p_robustness $igmp_p_mode
config_mcast_querier_params $protocol $igmp_query_interval $igmp_q_resp_interval $igmp_last_mem_q_int
config_mcast_proxy_interface $protocol "$igmp_p_up_interfaces"
config_snooping_on_bridge $protocol $igmp_p_down_interfaces $igmp_p_mode
fast_leave=$igmp_fast_leave
exceptions=$igmp_p_exceptions
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_p_version $mld_p_robustness $mld_p_mode
config_mcast_querier_params $protocol $mld_query_interval $mld_q_resp_interval $mld_last_mem_q_int
config_mcast_proxy_interface $protocol "$mld_p_up_interfaces"
config_snooping_on_bridge $protocol $mld_p_down_interfaces $mld_p_mode
fast_leave=$mld_fast_leave
exceptions=$mld_p_exceptions
fi
# This function will only be hit in case proxy is enabled, so hard coding
# proxy enable should not be a problem
echo "${protocol}-proxy-enable 1" >> $CONFFILE
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
disable_snooping() {
local bcm_mcast_p=$1
for br in $(brctl show | grep 'br-' | awk '{print$1}' | tr '\n' ' '); do
bcmmcastctl mode -i $br -p $bcm_mcast_p -m 0 # disable snooping on all bridges
done
}
configure_mcpd() {
disable_snooping 1
disable_snooping 2
# BCM's mcpd does not allow configuration of proxy and L2 snooping simultaneously, hence
# here, if proxy is to be configured then the configuration params of snooping are ignored.
if [ "$igmp_p_enable" == "1" ]; then
configure_mcpd_proxy igmp
elif [ "$igmp_s_enable" == "1" ]; then
configure_mcpd_snooping igmp
fi
proxdevs=""
if [ "$mld_p_enable" == "1" ]; then
configure_mcpd_proxy mld
elif [ "$mld_s_enable" == "1" ]; then
configure_mcpd_snooping mld
fi
}
setup_mcast_mode() {
# set the mode at chip to allow both tagged and untagged multicast forwarding
bs /b/c iptv lookup_method=group_ip_src_ip
}
configure_mcast() {
rm -f $CONFFILE
touch $CONFFILE
# mcpd internally writes max_groups and max_msf, no need to modify
# here directly
config_global_params
read_mcast_snooping_params
read_mcast_proxy_params
configure_mcpd
}

View File

@@ -14,15 +14,36 @@ service_triggers() {
procd_add_reload_trigger network $NAME
}
start_mcast_service() {
local param=$@
procd_open_instance
procd_set_param command "${PROG_EXE}"
if [ -n "${param}" ]; then
procd_append_param command ${param}
fi
procd_set_param respawn
procd_close_instance
}
start_service() {
if [ -f "/etc/config/mcast" ]; then
configure_mcast
fi
procd_open_instance
procd_set_param command "$PROG_EXE"
procd_set_param respawn
procd_close_instance
if [ -z "${PROG_PARAMS}" ]; then
start_mcast_service
return
fi
local prev_IFS="${IFS}"
IFS=${PROG_PARAMS_SEPARATOR}
for param in ${PROG_PARAMS}; do
IFS="${prev_IFS}"
start_mcast_service ${param}
done
}
boot() {
@@ -31,11 +52,10 @@ boot() {
}
stop_service() {
service_stop $PROG_EXE
service_stop "${PROG_EXE}"
}
reload_service() {
stop
start
}

View File

@@ -0,0 +1,117 @@
#!/bin/sh
. /lib/functions.sh
generate_igmp_global_params(){
uci add mcast igmp
uci rename mcast.@igmp[-1]="igmp"
uci set mcast.@igmp[-1].max_membership="20"
uci set mcast.@igmp[-1].max_msf="10"
uci set mcast.@igmp[-1].qrv="2"
uci set mcast.@igmp[-1].force_version="0"
uci add mcast mld
uci rename mcast.@mld[-1]="mld"
uci set mcast.@mld[-1].mldv1_unsolicited_report_interval="10"
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(){
local u_itf="$1"
uci add mcast proxy
uci rename mcast.@proxy[-1]="mc_proxy_MLD"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="mld"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $u_itf; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
}
generate_igmp_proxy_config(){
local u_itf="$1"
uci add mcast proxy
uci rename mcast.@proxy[-1]="igmp_proxy_1"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="igmp"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $u_itf; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
}
generate_mcast_config(){
up_itf="$(uci -q get network.wan.device)"
generate_igmp_proxy_config "$up_itf"
generate_mld_proxy_config "$up_itf"
uci commit mcast
}
interfaces_ok(){
local section_name=$1
local up_interf=$(uci -q get ${section_name}.upstream_interface)
[ -z "$up_interf" ] && return 1
local down_interf=$(uci -q get ${section_name}.downstream_interface)
[ -z "$down_interf" ] && return 1
# check if upstream untagged
IFS=" "
for itf in $up_interf; do
# check if there exist a device section for this upstream interface, if yes the
# do nothing, if no then split the it at . and use the native interface as
# upstream interface
dev_section=$(ubus call uci get '{"config":"network", "type":"device", "match":{"name":"'"$itf"'"}}' | jsonfilter -e @.values | jq keys[])
# mcast config is outdated, simply generate as per new logic
[ -z "$dev_section" ] && return 1
done
}
if [ -s "/etc/config/mcast" ]; then
if uci -q get mcast.@proxy[0] >/dev/null; then
interfaces_ok "mcast.@proxy[0]" && exit
elif uci -q get mcast.@snooping[0] >/dev/null; then
# return if there is any valid content
exit
fi
fi
rm -f /etc/config/mcast
touch /etc/config/mcast
generate_igmp_global_params
generate_mcast_config

View File

@@ -0,0 +1,182 @@
#!/bin/sh
. /lib/functions.sh
include /lib/network
# Parameters available in snooping configuration
igmp_s_enable=0
igmp_s_version=2
igmp_s_query_interval=125
igmp_s_q_resp_interval=100
igmp_s_last_mem_q_int=10
igmp_s_fast_leave=1
igmp_s_robustness=2
igmp_s_mode=0
igmp_s_iface=""
igmp_s_exceptions=""
mld_s_enable=0
mld_s_version=2
mld_s_robustness=2
mld_s_mode=0
mld_s_iface=""
mld_s_exceptions=""
# Global params
max_groups=25
max_msf=10
max_members=25
mldv1_unsolicited_report_interval=10
mldv2_unsolicited_report_interval=1
# Parameters available in proxy configuration
igmp_p_enable=0
igmp_p_version=2
igmp_query_interval=125
igmp_q_resp_interval=100
igmp_last_mem_q_int=10
igmp_fast_leave=1
igmp_p_robustness=2
igmp_p_mode=0
igmp_p_up_interfaces=""
igmp_p_down_interfaces=""
igmp_p_exceptions=""
mld_p_enable=0
mld_p_version=1
mld_query_interval=125
mld_q_resp_interval=100
mld_last_mem_q_int=10
mld_fast_leave=1
mld_p_robustness=2
mld_p_mode=0
mld_p_up_interfaces=""
mld_p_down_interfaces=""
mld_p_exceptions=""
read_snooping() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_s_enable=$sec_enable
config_get igmp_s_version "$config" version 2
config_get igmp_s_query_interval "$config" query_interval 125
config_get igmp_s_q_resp_interval "$config" query_response_interval 100
config_get igmp_s_last_mem_q_int "$config" last_member_query_interval 10
config_get igmp_s_fast_leave "$config" fast_leave 1
config_get igmp_s_robustness "$config" robustness 2
config_get igmp_s_mode "$config" snooping_mode 0
config_get igmp_s_iface "$config" interface
config_get igmp_s_exceptions "$config" filter
return
fi
if [ "$proto" == "mld" ]; then
mld_s_enable=$sec_enable
config_get mld_s_version "$config" version 2
config_get mld_s_query_interval "$config" query_interval 125
config_get mld_s_q_resp_interval "$config" query_response_interval 100
config_get mld_s_last_mem_q_int "$config" last_member_query_interval 10
config_get mld_s_fast_leave "$config" fast_leave 1
config_get mld_s_robustness "$config" robustness 2
config_get mld_s_mode "$config" snooping_mode 0
config_get mld_s_iface "$config" interface
config_get mld_s_exceptions "$config" filter
return
fi
}
read_proxy() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_p_enable=$sec_enable
config_get igmp_p_version "$config" version 2
config_get igmp_query_interval "$config" query_interval 125
config_get igmp_q_resp_interval "$config" query_response_interval 100
config_get igmp_last_mem_q_int "$config" last_member_query_interval 10
config_get igmp_fast_leave "$config" fast_leave 1
config_get igmp_p_robustness "$config" robustness 2
config_get igmp_p_mode "$config" snooping_mode 0
config_get igmp_p_up_interfaces "$config" upstream_interface
config_get igmp_p_down_interfaces "$config" downstream_interface
config_get igmp_p_exceptions "$config" filter
return
fi
if [ "$proto" == "mld" ]; then
mld_p_enable=$sec_enable
config_get mld_p_version "$config" version 2
config_get mld_query_interval "$config" query_interval 125
config_get mld_q_resp_interval "$config" query_response_interval 100
config_get mld_last_mem_q_int "$config" last_member_query_interval 10
config_get mld_fast_leave "$config" fast_leave 1
config_get mld_p_robustness "$config" robustness 2
config_get mld_p_mode "$config" snooping_mode 0
config_get mld_p_up_interfaces "$config" upstream_interface
config_get mld_p_down_interfaces "$config" downstream_interface
config_get mld_p_exceptions "$config" filter
return
fi
}
read_mcast_snooping_params() {
config_load mcast
config_foreach read_snooping snooping
}
read_mcast_proxy_params() {
config_load mcast
config_foreach read_proxy proxy
}
config_global_params() {
local igmp_qrv
local igmp_force_version
local mld_qrv
local mld_force_version
config_load mcast
config_get max_msf igmp max_msf 10
config_get max_groups igmp max_membership 25
config_get igmp_qrv igmp qrv 2
config_get igmp_force_version igmp force_version 0
config_get mld_qrv mld qrv 2
config_get mldv1_unsolicited_report_interval mld mldv1_unsolicited_report_interval 10
config_get mldv2_unsolicited_report_interval mld mldv2_unsolicited_report_interval 1
config_get mld_force_version mld force_version 0
if [ "$1" == "set_max_groups_and_sources" ]; then
echo $max_groups > /proc/sys/net/ipv4/igmp_max_memberships
echo $max_msf > /proc/sys/net/ipv4/igmp_max_msf
echo $max_msf > /proc/sys/net/ipv6/mld_max_msf
fi
echo $igmp_qrv > /proc/sys/net/ipv4/igmp_qrv
echo $igmp_force_version > /proc/sys/net/ipv4/conf/all/force_igmp_version
echo $mld_qrv > /proc/sys/net/ipv6/mld_qrv
echo $mld_force_version > /proc/sys/net/ipv6/conf/all/force_mld_version
echo $mldv1_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv1_unsolicited_report_interval
echo $mldv2_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv2_unsolicited_report_interval
}

View File

@@ -0,0 +1,142 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
read_mcast_stats() {
cat /proc/net/igmp_snooping > /tmp/igmp_stats
local mcast_addrs=""
local ifaces=""
while read line; do
# reading each line
case $line in
br-*)
found_iface=0
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ -z "$ifaces" ]; then
ifaces="$snoop_iface"
continue
fi
IFS=" "
for ifx in $ifaces; do
if [ $ifx == $snoop_iface ]; then
found_iface=1
break
fi
done
if [ $found_iface -eq 0 ]; then
ifaces="$ifaces $snoop_iface"
continue
fi
;;
esac
done < /tmp/igmp_stats
while read line; do
# reading each line
case $line in
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
fi
IFS=" "
for ip_addr in $mcast_addrs; do
if [ $ip_addr == $grp_ip ]; then
found_ip=1
break
fi
done
if [ $found_ip -eq 0 ]; then
mcast_addrs="$mcast_addrs $grp_ip"
continue
fi
;;
esac
done < /tmp/igmp_stats
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < /tmp/igmp_stats
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
if [ "$grp_ip" != "$gip_addr" ]; then
continue
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
fi
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $14 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
json_add_string "device" "$src_port"
timeout="$(echo $line | awk -F ' ' '{ print $15 }')"
json_add_int "timeout" "$timeout"
json_close_object #close the associated device object
;;
esac
done < /tmp/igmp_stats
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
done # close the loop for interfaces
json_close_object # close the snooping object
json_close_array # close the snooping array
json_dump
rm -f /tmp/igmp_stats
}
case "$1" in
list)
echo '{ "stats":{} }'
;;
call)
case "$2" in
stats)
read_mcast_stats
;;
esac
;;
esac

View File

@@ -1,64 +0,0 @@
#!/bin/sh
. /lib/functions.sh
generate_igmp_global_params(){
uci add mcast igmp
uci rename mcast.@igmp[-1]="igmp"
uci set mcast.@igmp[-1].max_membership="20"
uci set mcast.@igmp[-1].max_msf="10"
uci set mcast.@igmp[-1].qrv="2"
uci set mcast.@igmp[-1].force_version="0"
uci add mcast mld
uci rename mcast.@mld[-1]="mld"
uci set mcast.@mld[-1].mldv1_unsolicited_report_interval="10"
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_mcast_config(){
up_itf="$(uci -q get network.wan.device)"
uci add mcast proxy
uci rename mcast.@proxy[-1]="igmp_proxy_1"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="igmp"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $up_itf; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
uci commit mcast
}
if [ -s "/etc/config/mcast" ]; then
if uci -q get mcast.@proxy[0] >/dev/null; then
# return if there is any valid content
exit
elif uci -q get mcast.@snooping[0] >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/mcast
fi
fi
touch /etc/config/mcast
generate_igmp_global_params
generate_mcast_config

View File

@@ -1,547 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
include /lib/network
CONFFILE=/var/mcpd.conf
PROG_EXE=/usr/sbin/mcpd
# Parameters available in snooping configuration
igmp_s_enable=0
igmp_s_version=2
igmp_s_query_interval=125
igmp_s_q_resp_interval=100
igmp_s_last_mem_q_int=10
igmp_s_fast_leave=1
igmp_s_robustness=2
igmp_s_mode=0
igmp_s_iface=""
igmp_s_exceptions=""
mld_s_enable=0
mld_s_version=2
mld_s_robustness=2
mld_s_mode=0
mld_s_iface=""
mld_s_exceptions=""
# Global params
max_groups=25
max_msf=10
max_members=25
mldv1_unsolicited_report_interval=10
mldv2_unsolicited_report_interval=1
# Parameters available in proxy configuration
igmp_p_enable=0
igmp_p_version=2
igmp_query_interval=125
igmp_q_resp_interval=100
igmp_last_mem_q_int=10
igmp_fast_leave=1
igmp_p_robustness=2
igmp_p_mode=0
igmp_p_up_interfaces=""
igmp_p_down_interfaces=""
igmp_p_exceptions=""
mld_p_enable=0
mld_p_version=1
mld_query_interval=125
mld_q_resp_interval=100
mld_last_mem_q_int=10
mld_fast_leave=1
mld_p_robustness=2
mld_p_mode=0
mld_p_up_interfaces=""
mld_p_down_interfaces=""
mld_p_exceptions=""
proxdevs=""
ethwan="$(db -q get hw.board.ethernetWanPort)"
read_snooping() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_s_enable=$sec_enable
config_get igmp_s_version "$config" version 2
config_get igmp_s_query_interval "$config" query_interval 125
config_get igmp_s_q_resp_interval "$config" query_response_interval 100
config_get igmp_s_last_mem_q_int "$config" last_member_query_interval 10
config_get igmp_s_fast_leave "$config" fast_leave 1
config_get igmp_s_robustness "$config" robustness 2
config_get igmp_s_mode "$config" snooping_mode 0
config_get igmp_s_iface "$config" interface
config_get igmp_s_exceptions "$config" filter
return
fi
if [ "$proto" == "mld" ]; then
mld_s_enable=$sec_enable
config_get mld_s_version "$config" version 2
config_get mld_s_query_interval "$config" query_interval 125
config_get mld_s_q_resp_interval "$config" query_response_interval 100
config_get mld_s_last_mem_q_int "$config" last_member_query_interval 10
config_get mld_s_fast_leave "$config" fast_leave 1
config_get mld_s_robustness "$config" robustness 2
config_get mld_s_mode "$config" snooping_mode 0
config_get mld_s_iface "$config" interface
config_get mld_s_exceptions "$config" filter
return
fi
}
read_proxy() {
local config="$1"
local sec_enable
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
if [ "$sec_enable" == "0" ]; then
return
fi
if [ "$proto" == "igmp" ]; then
igmp_p_enable=$sec_enable
config_get igmp_p_version "$config" version 2
config_get igmp_query_interval "$config" query_interval 125
config_get igmp_q_resp_interval "$config" query_response_interval 100
config_get igmp_last_mem_q_int "$config" last_member_query_interval 10
config_get igmp_fast_leave "$config" fast_leave 1
config_get igmp_p_robustness "$config" robustness 2
config_get igmp_p_mode "$config" snooping_mode 0
config_get igmp_p_up_interfaces "$config" upstream_interface
config_get igmp_p_down_interfaces "$config" downstream_interface
config_get igmp_p_exceptions "$config" filter
return
fi
if [ "$proto" == "mld" ]; then
mld_p_enable=$sec_enable
config_get mld_p_version "$config" version 2
config_get mld_query_interval "$config" query_interval 125
config_get mld_q_resp_interval "$config" query_response_interval 100
config_get mld_last_mem_q_int "$config" last_member_query_interval 10
config_get mld_fast_leave "$config" fast_leave 1
config_get mld_p_robustness "$config" robustness 2
config_get mld_p_mode "$config" snooping_mode 0
config_get mld_p_up_interfaces "$config" upstream_interface
config_get mld_p_down_interfaces "$config" downstream_interface
config_get mld_p_exceptions "$config" filter
return
fi
}
config_snooping_common_params() {
local protocol="$1"
echo "${protocol}-default-version $2" >> $CONFFILE
echo "${protocol}-robustness-value $3" >> $CONFFILE
echo "${protocol}-max-groups $max_groups" >> $CONFFILE
echo "${protocol}-max-sources $max_msf" >> $CONFFILE
echo "${protocol}-max-members $max_members" >> $CONFFILE
echo "${protocol}-snooping-enable $4" >> $CONFFILE
}
config_mcast_querier_params() {
local protocol="$1"
local query_interval=$2
local q_resp_interval=$3
local last_mem_q_int=$4
echo "${protocol}-query-interval $query_interval" >> $CONFFILE
echo "${protocol}-query-response-interval $q_resp_interval" >> $CONFFILE
echo "${protocol}-last-member-query-interval $last_mem_q_int" >> $CONFFILE
}
config_snooping_upstream_interface() {
local snooping_upstream_intf=""
json_load "$(devstatus $1)"
logger -t "mcastconf" "$(devstatus $1)"
itr=1
json_select bridge-members
# loop over the bridge and find the device on wan port
while json_get_var dev $itr; do
case "$dev" in
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && $snooping_upstream_intf="$dev" && break
fi
;;
esac
itr=$(($itr + 1))
done
json_select ..
# if none of the bridge members are on wan port, set the wan port itself
if [ -n "$snooping_upstream_intf" ]; then
echo "upstream-interface $snooping_upstream_intf" >>$CONFFILE
else
echo "upstream-interface $ethwan" >>$CONFFILE
fi
}
config_snooping_on_bridge() {
local protocol="$1"
local bcm_mcast_p=1
echo "${protocol}-snooping-interfaces $2" >> $CONFFILE
[ "$protocol" == "mld" ] && bcm_mcast_p=2
for snpif in $2; do
case "$snpif" in
br-*)
# set snooping mode on the bridge
bcmmcastctl mode -i $snpif -p $bcm_mcast_p -m $3
;;
esac
done
}
config_mcast_proxy_interface() {
local itr
local p1="$1"
local p_enable
if [ "$p1" == "igmp" ]; then
p_enable=$igmp_p_enable
else
p_enable=$mld_p_enable
fi
for proxif in $2; do
case "$proxif" in
br-*)
proxdevs="$proxdevs $proxif"
echo "upstream-interface $proxif" >>$CONFFILE
;;
*)
ifconfig $proxif | grep RUNNING >/dev/null && proxdevs="$proxdevs $proxif"
;;
esac
done
if [ $p_enable -eq 1 ]; then
echo "${p1}-proxy-interfaces $proxdevs" >> $CONFFILE
fi
# if proxdevs is empty set the wan port as mcast-interface
if [ -n "$proxdevs" ]; then
echo "${p1}-mcast-interfaces $proxdevs" >> $CONFFILE
else
echo "${p1}-mcast-interfaces $ethwan" >> $CONFFILE
fi
}
configure_mcpd_snooping() {
local protocol="$1"
local exceptions
local filter_ip=""
local fast_leave=0
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_s_version $igmp_s_robustness $igmp_s_mode
config_mcast_querier_params $protocol $igmp_s_query_interval $igmp_s_q_resp_interval $igmp_s_last_mem_q_int
config_snooping_upstream_interface "$igmp_s_iface"
config_snooping_on_bridge $protocol $igmp_s_iface $igmp_s_mode
exceptions=$igmp_s_exceptions
fast_leave=$igmp_s_fast_leave
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_s_version $mld_s_robustness $mld_s_mode
config_mcast_querier_params $protocol $mld_s_query_interval $mld_s_q_resp_interval $mld_s_last_mem_q_int
config_snooping_upstream_interface "$mld_s_iface"
config_snooping_on_bridge $protocol $mld_s_iface $mld_s_mode
exceptions=$mld_s_exceptions
fast_leave=$mld_s_fast_leave
fi
echo "${protocol}-proxy-enable 0" >> $CONFFILE
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
configure_mcpd_proxy() {
local protocol="$1"
local fast_leave=0
local exceptions=""
# Configure snooping related params
if [ "$protocol" == "igmp" ]; then
config_snooping_common_params $protocol $igmp_p_version $igmp_p_robustness $igmp_p_mode
config_mcast_querier_params $protocol $igmp_query_interval $igmp_q_resp_interval $igmp_last_mem_q_int
config_mcast_proxy_interface $protocol "$igmp_p_up_interfaces"
config_snooping_on_bridge $protocol $igmp_p_down_interfaces $igmp_p_mode
fast_leave=$igmp_fast_leave
exceptions=$igmp_p_exceptions
elif [ "$protocol" == "mld" ]; then
config_snooping_common_params $protocol $mld_p_version $mld_p_robustness $mld_p_mode
config_mcast_querier_params $protocol $mld_query_interval $mld_q_resp_interval $mld_last_mem_q_int
config_mcast_proxy_interface $protocol "$mld_p_up_interfaces"
config_snooping_on_bridge $protocol $mld_p_down_interfaces $mld_p_mode
fast_leave=$mld_fast_leave
exceptions=$mld_p_exceptions
fi
# This function will only be hit in case proxy is enabled, so hard coding
# proxy enable should not be a problem
echo "${protocol}-proxy-enable 1" >> $CONFFILE
echo "${protocol}-fast-leave $fast_leave" >> $CONFFILE
if [ -n "$exceptions" ]; then
IFS=" "
for excp in $exceptions; do
case $excp in
*/*)
tmp="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
tmp1="$(ipcalc.sh $excp | grep NETMASK | awk '{print substr($0,9)}')"
filter_ip="$filter_ip $tmp/$tmp1"
;;
*)
filter_ip="$filter_ip $excp"
;;
esac
done
echo "${protocol}-mcast-snoop-exceptions $filter_ip" >> $CONFFILE
fi
}
disable_snooping() {
local bcm_mcast_p=$1
for br in $(brctl show | grep 'br-' | awk '{print$1}' | tr '\n' ' '); do
bcmmcastctl mode -i $br -p $bcm_mcast_p -m 0 # disable snooping on all bridges
done
}
configure_mcpd() {
disable_snooping 1
disable_snooping 2
# BCM's mcpd does not allow configuration of proxy and L2 snooping simultaneously, hence
# here, if proxy is to be configured then the configuration params of snooping are ignored.
if [ "$igmp_p_enable" == "1" ]; then
configure_mcpd_proxy igmp
elif [ "$igmp_s_enable" == "1" ]; then
configure_mcpd_snooping igmp
fi
proxdevs=""
if [ "$mld_p_enable" == "1" ]; then
configure_mcpd_proxy mld
elif [ "$mld_s_enable" == "1" ]; then
configure_mcpd_snooping mld
fi
}
read_mcast_snooping_params() {
config_load mcast
config_foreach read_snooping snooping
}
read_mcast_proxy_params() {
config_load mcast
config_foreach read_proxy proxy
}
config_global_params() {
local igmp_qrv
local igmp_force_version
local mld_qrv
local mld_force_version
config_load mcast
config_get max_msf igmp max_msf 10
config_get max_groups igmp max_membership 25
config_get igmp_qrv igmp qrv 2
config_get igmp_force_version igmp force_version 0
config_get mld_qrv mld qrv 2
config_get mldv1_unsolicited_report_interval mld mldv1_unsolicited_report_interval 10
config_get mldv2_unsolicited_report_interval mld mldv2_unsolicited_report_interval 1
config_get mld_force_version mld force_version 0
# mcpd internally writes max_groups and max_msf, no need to modify
# here directly
echo $igmp_qrv > /proc/sys/net/ipv4/igmp_qrv
echo $igmp_force_version > /proc/sys/net/ipv4/conf/all/force_igmp_version
echo $mld_qrv > /proc/sys/net/ipv6/mld_qrv
echo $mld_force_version > /proc/sys/net/ipv6/conf/all/force_mld_version
echo $mldv1_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv1_unsolicited_report_interval
echo $mldv2_unsolicited_report_interval > /proc/sys/net/ipv6/conf/all/mldv2_unsolicited_report_interval
}
setup_mcast_mode() {
# set the mode at chip to allow both tagged and untagged multicast forwarding
bs /b/c iptv lookup_method=group_ip_src_ip
}
configure_mcast() {
rm -f $CONFFILE
touch $CONFFILE
config_global_params
read_mcast_snooping_params
read_mcast_proxy_params
configure_mcpd
}
read_mcast_stats() {
cat /proc/net/igmp_snooping > /tmp/igmp_stats
local mcast_addrs=""
local ifaces=""
while read line; do
# reading each line
case $line in
br-*)
found_iface=0
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ -z "$ifaces" ]; then
ifaces="$snoop_iface"
continue
fi
IFS=" "
for ifx in $ifaces; do
if [ $ifx == $snoop_iface ]; then
found_iface=1
break
fi
done
if [ $found_iface -eq 0 ]; then
ifaces="$ifaces $snoop_iface"
continue
fi
;;
esac
done < /tmp/igmp_stats
while read line; do
# reading each line
case $line in
br-*)
found_ip=0
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
if [ -z "$mcast_addrs" ]; then
mcast_addrs="$grp_ip"
continue
fi
IFS=" "
for ip_addr in $mcast_addrs; do
if [ $ip_addr == $grp_ip ]; then
found_ip=1
break
fi
done
if [ $found_ip -eq 0 ]; then
mcast_addrs="$mcast_addrs $grp_ip"
continue
fi
;;
esac
done < /tmp/igmp_stats
json_init
json_add_array "snooping"
json_add_object ""
IFS=" "
for intf in $ifaces; do
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
json_add_string "interface" "$intf"
json_add_array "groups"
break
;;
esac
done < /tmp/igmp_stats
IFS=" "
for gip_addr in $mcast_addrs; do
grp_obj_added=0
while read line; do
# reading each line
case $line in
br-*)
snoop_iface="$(echo $line | awk -F ' ' '{ print $1 }')"
if [ "$snoop_iface" != "$intf" ]; then
continue
fi
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
if [ "$grp_ip" != "$gip_addr" ]; then
continue
fi
if [ $grp_obj_added -eq 0 ]; then
json_add_object ""
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
json_add_string "groupaddr" "$gip"
json_add_array "clients"
grp_obj_added=1
fi
json_add_object ""
host_ip="$(echo $line | awk -F ' ' '{ print $14 }')"
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
json_add_string "ipaddr" "$h_ip"
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
json_add_string "device" "$src_port"
timeout="$(echo $line | awk -F ' ' '{ print $15 }')"
json_add_int "timeout" "$timeout"
json_close_object #close the associated device object
;;
esac
done < /tmp/igmp_stats
json_close_array #close the associated devices array
json_close_object # close the groups object
done # close the loop for group addresses
json_close_array #close the groups array
done # close the loop for interfaces
json_close_object # close the snooping object
json_close_array # close the snooping array
json_dump
rm -f /tmp/igmp_stats
}

View File

@@ -0,0 +1,2 @@
# Forward multicast packets from wan to lan
iptables -t filter -A zone_wan_forward -p udp -d 224.0.0.0/240.0.0.0 -m comment --comment "!fw3: Allow-Multicast-UDP" -j zone_lan_dest_ACCEPT

View File

@@ -0,0 +1,12 @@
#!/bin/sh
. /lib/functions.sh
# Add firewall include instance
uci -q batch <<-EOT
delete firewall.mcast
set firewall.mcast=include
set firewall.mcast.path=/etc/firewall.mcast
set firewall.mcast.reload=1
commit firewall
EOT

View File

@@ -0,0 +1,149 @@
#!/bin/sh
. /lib/mcast/common.sh
include /lib/network
CONFFILE=
PROG_EXE=/usr/sbin/mcproxy
PROG_PARAMS=
PROG_PARAMS_SEPARATOR=:
setup_mcast_mode() {
unused(){ :;}
}
config_mcproxy_interfaces() {
local upstreams="$1"
local downstreams="$2"
local exceptions="$3"
local str_up=""
if [ -n "$upstreams" ]; then
for upstream in $upstreams; do
str_up="$str_up \"$upstream\""
done
fi
local str_down=""
if [ -n "$downstreams" ]; then
for downstream in $downstreams; do
str_down="$str_down \"$downstream\""
done
fi
if [ ! -z $downstream ]; then
echo -e "pinstance main:$str_up ==>$str_down;\n" >> $CONFFILE
fi
if [ -z "$exceptions" ] || [ -z "$upstreams" ]; then
return
fi
for upstream in $upstreams; do
local filter=""
for excp in $exceptions; do
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
ip_end="$(ipcalc.sh $excp | grep BROADCAST | awk '{print substr($0,11)}')"
filter="$filter ($ip_start - $ip_end | *)"
;;
*)
filter="$filter ($excp | *)"
;;
esac
done
echo "pinstance main upstream \"$upstream\" in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream \"$upstream\" out blacklist table{$filter };" >> $CONFFILE
done
}
config_mcproxy_instance() {
local protocol="$1"
local version="$2"
local robustness=
local query_interval=
local q_resp_interval=
local last_mem_q_int=
local fast_leave=0
local exceptions=
local upstreams=
local downstreams=
CONFFILE=/var/etc/mcproxy_"$protocol".conf
rm -f $CONFFILE
touch $CONFFILE
if [ "$protocol" == "igmp" ]; then
case "$version" in
[1-3])
echo -e "protocol IGMPv${version};\n" >> $CONFFILE
;;
*)
echo -e "protocol IGMPv2;\n" >> $CONFFILE
;;
esac
robustness=$igmp_p_robustness
query_interval=$igmp_query_interval
q_resp_interval=$igmp_q_resp_interval
last_mem_q_int=$igmp_last_mem_q_int
fast_leave=$igmp_fast_leave
exceptions=$igmp_p_exceptions
upstreams=$igmp_p_up_interfaces
downstreams=$igmp_p_down_interfaces
elif [ "$protocol" == "mld" ]; then
case "$version" in
[1-2])
echo -e "protocol MLDv${version};\n" >> $CONFFILE
;;
*)
echo -e "protocol MLDv2;\n" >> $CONFFILE
;;
esac
robustness=$mld_p_robustness
query_interval=$mld_query_interval
q_resp_interval=$mld_q_resp_interval
last_mem_q_int=$mld_last_mem_q_int
fast_leave=$mld_fast_leave
exceptions=$mld_p_exceptions
upstreams=$mld_p_up_interfaces
downstreams=$mld_p_down_interfaces
fi
[ -n "$robustness" ] && echo -e "rv $robustness;" >> $CONFFILE
[ -n "$query_interval" ] && echo -e "qi $query_interval;" >> $CONFFILE
[ -n "$q_resp_interval" ] && echo -e "qri $q_resp_interval;" >> $CONFFILE
[ -n "$last_mem_q_int" ] && echo -e "lmqi $last_mem_q_int;" >> $CONFFILE
[ -n "$fast_leave" ] && echo -e "fastleave $fast_leave;\n" >> $CONFFILE
[ -n "$upstreams" ] && [ -n "$downstreams" ] &&
config_mcproxy_interfaces "$upstreams" "$downstreams" "$exceptions"
PROG_PARAMS="${PROG_PARAMS} -f ${CONFFILE}${PROG_PARAMS_SEPARATOR}"
}
config_mcproxy() {
if [ "$igmp_p_enable" == "1" ]; then
config_mcproxy_instance igmp "$igmp_p_version"
fi
if [ "$mld_p_enable" == "1" ]; then
config_mcproxy_instance mld "$mld_p_version"
fi
}
configure_mcast() {
config_global_params "set_max_groups_and_sources"
read_mcast_snooping_params
read_mcast_proxy_params
config_mcproxy
}

View File

@@ -1,18 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
include /lib/mcast
case "$1" in
list)
echo '{ "stats":{} }'
;;
call)
case "$2" in
stats)
read_mcast_stats
;;
esac
;;
esac

View File

@@ -6,19 +6,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obudpst
PKG_VERSION:=7.2.1
PKG_SOURCE_VERSION:=9c448095c9773bd7e5cea143af07817ad9f3c6ba
PKG_VERSION:=7.5.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/BroadbandForum/obudpst.git
PKG_SOURCE_VERSION:=a8faf1925ea9189467e7f8d3b9d93c67c8b927bd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
CMAKE_OPTIONS += -DDISABLE_INT_TIMER=ON
define Package/obudpst
CATEGORY:=Utilities
DEPENDS+=+libopenssl
@@ -39,4 +42,10 @@ define Package/obudpst/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/udpst $(1)/usr/sbin/udpst
endef
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOST)/obudpst
$(CP) $(HOST_BUILD_DIR)/udpst $(STAGING_DIR_HOST)/obudpst/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,obudpst))

View File

@@ -20,7 +20,7 @@ config OBUSPA_MTP_ENABLE_STOMP
config OBUSPA_MTP_ENABLE_COAP
bool "Enable CoAP as mtp protocol"
default n
default y
config OBUSPA_CONTROLLER_MTP_VERIFY
bool "Enable verification of MQTT response topic before processing the message"

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=6.0.0.1
PKG_VERSION:=7.0.0.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_SOURCE_VERSION:=6372841ada18a4f577799fedb19f489ec1f28255
PKG_SOURCE_VERSION:=0a2a3481dddea672a2b12d1fcaa689d7fa761fe3
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -91,6 +91,7 @@ endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
$(Build/Patch)
endef
endif
@@ -109,6 +110,7 @@ define Package/obuspa/install
$(INSTALL_DATA) ./files/etc/bbfdm/json/USPAgent.json $(1)/etc/bbfdm/json/USPAgent.json
$(INSTALL_DATA) ./files/etc/bbfdm/json/TransferComplete.json $(1)/etc/bbfdm/json/TransferComplete.json
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/05-obuspa-mqtt-config $(1)/etc/uci-defaults/
endef
$(eval $(call BuildPackage,obuspa))

View File

@@ -1,8 +1,8 @@
config obuspa 'global'
option enabled '1'
option debug '1'
option debug '0'
option log_level '1'
option prototrace '1'
option prototrace '0'
option db_file '/etc/obuspa/usp.db'
#option role_file '/etc/obuspa/roles.json'
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
@@ -11,54 +11,22 @@ config obuspa 'global'
#option log_dest '/var/log/obuspa'
# Adds Device.LocalAgent.MTP.
config mtp 'agent_mtp'
config mtp 'test_mtp'
option Protocol 'MQTT'
option ResponseTopicConfigured '/usp/endpoint'
option mqtt 'localmqtt'
option mqtt 'testmqtt'
# Adds Device.MQTT.Client.
config mqtt 'localmqtt'
config mqtt 'testmqtt'
option BrokerAddress '127.0.0.1'
option BrokerPort '1883'
option TransportProtocol 'TCP/IP'
# Adds Device.LocalAgent.Controller.
config controller 'localcontroller'
config controller 'testcontroller'
option EndpointID 'proto::interop-usp-controller'
option Protocol 'MQTT'
option Topic '/usp/controller'
option mqtt 'localmqtt'
option mqtt 'testmqtt'
option assigned_role_name 'full_access'
# Add Device.LocalAgent.Subscription.
#config subscription 'sub_event'
# option ID 'uci-sub-events'
# option NotifType 'Event'
# list ReferenceList 'Device.Boot!'
# list ReferenceList 'Device.LocalAgent.TransferComplete!'
# option Persistent 'true'
# option controller 'localcontroller'
#config subscription 'sub_op_comp'
# option ID 'uci-sub-op_complete'
# option NotifType 'OperationComplete'
# list ReferenceList 'Device.DeviceInfo.FirmwareImage.*.Download()'
# list ReferenceList 'Device.DeviceInfo.FirmwareImage.*.Activate()'
# option Persistent 'true'
# option controller 'localcontroller'
#config challenge 'admin'
# option Description 'Request to get Administrative access'
# option role_name 'full_access'
# option Enable '1'
# option Value 'YWRtaW4='
# option Retries 2
# option LockoutPeriod 60
#config challenge 'user'
# option Description 'Request to get User access'
# option role_name 'user'
# option Enable '1'
# option Value 'dXNlcg=='
# option Retries 3
# option LockoutPeriod 30

View File

@@ -1,14 +1,14 @@
#!/bin/sh /etc/rc.common
START=99
STOP=2
STOP=02
USE_PROCD=1
PROG=/usr/sbin/obuspa
CONFIGURATION=obuspa
ENV_PROFILE="/root/.profile"
KEEP_FILES="/lib/upgrade/keep.d/obuspa"
KEEP_FILE="/lib/upgrade/keep.d/obuspa"
RESET_FILE="/tmp/obuspa/obuspa_param_reset.txt"
SQL_DB_FILE="/tmp/obuspa/usp.db"
@@ -59,6 +59,17 @@ db_set_sql()
fi
}
db_del_sql()
{
local param
param="${1}"
if [ -n "${param}" ]; then
${PROG} -f ${SQL_DB_FILE} -c dbdel "${param}" >/dev/null 2>&1
fi
}
db_set()
{
# if sql db present, update sql db
@@ -70,6 +81,14 @@ db_set()
fi
}
update_db_dump()
{
if [ -f "${DB_DUMP}" ]; then
rm ${DB_DUMP}
${PROG} -f ${SQL_DB_FILE} -c show database |sort > ${DB_DUMP}
fi
}
# if db present then check if it matches with existing instances
# fallback to max instance present + 1
# In case of no db get the count
@@ -112,8 +131,8 @@ get_refrence_path()
value="${2}"
path=""
if [ -f "${SQL_DB_FILE}" ]; then
path=$(${PROG} -f ${SQL_DB_FILE} -c show database |grep "${dmref}\d.Alias "|grep -w "${value}")
if [ -f "${DB_DUMP}" ]; then
path=$(grep "${dmref}\d.Alias " ${DB_DUMP}|grep -w "${value}")
elif [ -f "${RESET_FILE}" ]; then
path=$(grep "${dmref}\d.Alias " ${RESET_FILE}|grep -w "${value}")
fi
@@ -123,14 +142,18 @@ get_refrence_path()
update_keep()
{
keep_file=${1}
file=${1}
if [ -z "${keep_file}" ]; then
if [ -z "${file}" ]; then
return;
fi
if ! grep -q "${keep_file}" ${KEEP_FILES}; then
echo "${keep_file}" >> ${KEEP_FILES}
if [ ! -f "${KEEP_FILE}" ]; then
touch "${KEEP_FILE}"
fi
if ! grep -q "${file}" ${KEEP_FILE}; then
echo "${file}" >> ${KEEP_FILE}
fi
}
@@ -200,13 +223,15 @@ validate_controller_section()
'Enable:bool:1' \
'EndpointID:string' \
'assigned_role_name:string' \
'AssignedRole:string' \
'Protocol:or("STOMP","CoAP","MQTT", "WebSocket")' \
'Destination:string' \
'Topic:string' \
'ParameterName:list(string)' \
'Reference:string' \
'mqtt:string' \
'stomp:string' \
'Host:host' \
'Host:string' \
'Port:port' \
'Path:string' \
'EnableEncryption:bool'
@@ -218,7 +243,7 @@ validate_subscription_section()
'Enable:bool:1' \
'NotifType:or("ValueChange","ObjectCreation","ObjectDeletion","OperationComplete","Event")' \
'ReferenceList:list(string)' \
'Persistent:bool:1' \
'Recipient:string' \
'controller:string'
}
@@ -233,6 +258,7 @@ validate_mtp_section()
'Path:string' \
'mqtt:string' \
'stomp:string' \
'Reference:string' \
'EnableEncryption:bool'
}
@@ -240,7 +266,7 @@ validate_stomp_connection_section()
{
uci_validate_section ${CONFIGURATION} stomp "${1}" \
'Enable:bool:1' \
'Host:host' \
'Host:string' \
'Port:port:61613' \
'Username:string' \
'Password:string' \
@@ -253,7 +279,7 @@ validate_mqtt_client_section()
{
uci_validate_section ${CONFIGURATION} mqtt "${1}" \
'Enable:bool:1' \
'BrokerAddress:host' \
'BrokerAddress:string' \
'BrokerPort:port:1883' \
'Username:string' \
'Password:string' \
@@ -288,8 +314,7 @@ publish_endpoint()
{
local AgentEndpointID serial oui user pass
if ! uci -q get obuspa.localmqtt; then
log "Remote mqtt broker configured, skip publishing endpoint"
if ! uci -q get obuspa.testmqtt; then
return 0;
fi
@@ -305,11 +330,11 @@ publish_endpoint()
if [ -z "${AgentEndpointID}" ]; then
serial=$(get_serial_from_db)
oui=$(get_oui_from_db)
AgentEndpointID="os::${oui}-${serial}"
AgentEndpointID="os::${oui}-${serial//+/%2B}"
fi
config_get user localmqtt Username
config_get pass localmqtt Password
config_get user testmqtt Username
config_get pass testmqtt Password
# publish Agent's EndpointID in mosquito broker for discovery by usp-js
# This is a work around till obuspa adds supports for mDNS discovery
@@ -335,6 +360,7 @@ configure_localagent()
}
db_set Device.LocalAgent.EndpointID "${EndpointID}"
update_db_dump
}
update_reset_reason()
@@ -350,16 +376,18 @@ configure_controller()
{
local EndpointID Enable
local Protocol Destination
local Topic mqtt stomp assigned_role_name ParameterName
local Host Port Path EnableEncryption
local dm_ref
local Topic mqtt stomp assigned_role_name AssignedRole ParameterName
local Host Port Path EnableEncryption Reference
local dm_ref sec
sec="${1}"
validate_controller_section "${1}" || {
log "Validation of controller section failed"
return 1;
}
get_base_path "Device.LocalAgent.Controller." "uci-${1}"
sec="${sec/controller_/cpe-}"
get_base_path "Device.LocalAgent.Controller." "${sec}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
@@ -371,21 +399,30 @@ configure_controller()
fi
dm_ref=""
if [ -z "${Reference}" ]; then
if [ "${Protocol}" = "STOMP" ]; then
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "uci-${stomp}")
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
dm_ref=$(get_refrence_path "Device.MQTT.Client." "uci-${mqtt}")
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
else
dm_ref="${Reference}"
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.EndpointID" "${EndpointID}"
if [ -n "${assigned_role_name}" ]; then
AssignedRole=$(get_role_index "${assigned_role_name}")
fi
if [ -n "${AssignedRole}" ]; then
db_set "${BASEPATH}.AssignedRole" "${AssignedRole}"
fi
db_set "${BASEPATH}.MTP.1.Alias" "uci-${1}"
db_set "${BASEPATH}.MTP.1.Alias" "${sec}"
db_set "${BASEPATH}.MTP.1.Enable" "${Enable}"
db_set "${BASEPATH}.MTP.1.Protocol" "${Protocol}"
# only support configuration of one mtp path per controller using uci
@@ -412,36 +449,41 @@ configure_controller()
for param in ${ParameterName}
do
db_set "${BASEPATH}.BootParameter.${_pnum}.Alias" "uci-${1}-${_pnum}"
db_set "${BASEPATH}.BootParameter.${_pnum}.Alias" "${sec}_boot_${_pnum}"
db_set "${BASEPATH}.BootParameter.${_pnum}.Enable" "${Enable}"
db_set "${BASEPATH}.BootParameter.${_pnum}.ParameterName" "${param}"
_pnum=$(( _pnum + 1 ))
done
db_set
update_db_dump
}
configure_subscription()
{
local Enable NotifType ReferenceList Persistent controller
local Enable NotifType ReferenceList controller
local dm_ref
local sec
sec="${1}"
validate_subscription_section "${1}" || {
log "Validation of subscription section failed"
return 1;
}
get_base_path "Device.LocalAgent.Subscription." "uci-${1}"
sec="${sec/sub_/cpe-}"
get_base_path "Device.LocalAgent.Subscription." "sub_${1}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
fi
if [ -n "${controller}" ]; then
dm_ref=$(get_refrence_path "Device.LocalAgent.Controller." "uci-${controller}")
controller="${controller/controller_/cpe-}"
dm_ref=$(get_refrence_path "Device.LocalAgent.Controller." "${controller}")
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.ID" "uci-${1}"
db_set "${BASEPATH}.CreationDate" "$(date -I'seconds')"
db_set "${BASEPATH}.Enable" "${Enable}"
@@ -450,8 +492,10 @@ configure_subscription()
ReferenceList=${ReferenceList// /,}
db_set "${BASEPATH}.ReferenceList" "${ReferenceList}"
fi
db_set "${BASEPATH}.Persistent" "${Persistent}"
db_set "${BASEPATH}.Persistent" "1"
db_set "${BASEPATH}.Recipient" "${dm_ref}"
# Entry updated in db, remove uci entry
uci_remove obuspa "${1}"
}
check_json_load()
@@ -488,8 +532,7 @@ get_role_index()
*)
local ji=0
check_json_load
if [ "$?" -eq "0" ]; then
if check_json_load; then
ji=$(get_role_index_from_json "${role_name}" "${role_def_file}")
fi
idx=$(( ji + 2 )) # Add predefined roles
@@ -501,13 +544,16 @@ get_role_index()
configure_challenges()
{
local Enable Description role_name Role Value Retries LockoutPeriod
local sec
sec="${1}"
validate_challenge_section "${1}" || {
log "Validation of challenge section failed"
exit 1;
}
get_base_path "Device.LocalAgent.ControllerTrust.Challenge." "uci-${1}"
sec="${sec/challenge_/cpe-}"
get_base_path "Device.LocalAgent.ControllerTrust.Challenge." "${sec}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
@@ -518,7 +564,7 @@ configure_challenges()
return 1;
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.Description" "${Description}"
@@ -530,19 +576,22 @@ configure_challenges()
db_set "${BASEPATH}.Value" "${Value}"
db_set "${BASEPATH}.Retries" "${Retries}"
db_set "${BASEPATH}.LockoutPeriod" "${LockoutPeriod}"
# Entry updated in db, remove uci entry
uci_remove obuspa "${1}"
}
configure_mtp() {
local Enable Protocol ResponseTopicConfigured
local Path Port EnableEncryption
local stomp mqtt dm_ref
local stomp mqtt dm_ref sec
sec="${1}"
validate_mtp_section "${1}" || {
log "Validation of mtp section failed"
return 1;
}
get_base_path "Device.LocalAgent.MTP." "uci-${1}"
sec="${sec/mtp_/cpe-}"
get_base_path "Device.LocalAgent.MTP." "${sec}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
@@ -554,13 +603,19 @@ configure_mtp() {
fi
dm_ref=""
if [ -z "${Reference}" ]; then
if [ "${Protocol}" = "STOMP" ]; then
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "uci-${stomp}")
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
dm_ref=$(get_refrence_path "Device.MQTT.Client." "uci-${mqtt}")
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
else
dm_ref="${Reference}"
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.Protocol" "${Protocol}"
if [ "${Protocol}" = "MQTT" ]; then
@@ -578,24 +633,28 @@ configure_mtp() {
db_set "${BASEPATH}.WebSocket.EnableEncryption" "${EnableEncryption}"
fi
db_set
update_db_dump
}
configure_stomp_connection() {
local Host Username Password Enable Port VirtualHost
local EnableEncryption EnableHeartbeats
local sec
sec="${1}"
validate_stomp_connection_section "${1}" || {
log "Validation of stomp section failed"
return 1;
}
get_base_path "Device.STOMP.Connection." "uci-${1}"
sec="${sec/stomp_/cpe-}"
get_base_path "Device.STOMP.Connection." "${sec}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Host" "${Host}"
db_set "${BASEPATH}.Username" "${Username}"
db_set "${BASEPATH}.Password" "${Password}"
@@ -606,24 +665,28 @@ configure_stomp_connection() {
db_set "${BASEPATH}.EnableHeartbeats" "${EnableHeartbeats}"
db_set "${BASEPATH}.VirtualHost" "${VirtualHost}"
db_set
update_db_dump
}
configure_mqtt_client() {
local BrokerAddress BrokerPort Enable Username Password ProtocolVersion
local TransportProtocol ClientID
local sec
sec="${1}"
validate_mqtt_client_section "${1}" || {
log "Validation of mqtt section failed"
return 1;
}
get_base_path "Device.MQTT.Client." "uci-${1}"
sec="${sec/mqtt_/cpe-}"
get_base_path "Device.MQTT.Client." "${sec}"
if [ -z "${BASEPATH}" ]; then
log "Failed to get path [$BASEPATH]"
return 1;
fi
db_set "${BASEPATH}.Alias" "uci-${1}"
db_set "${BASEPATH}.Alias" "${sec}"
db_set "${BASEPATH}.Enable" "${Enable}"
db_set "${BASEPATH}.BrokerAddress" "${BrokerAddress}"
db_set "${BASEPATH}.BrokerPort" "${BrokerPort}"
@@ -634,6 +697,7 @@ configure_mqtt_client(){
db_set "${BASEPATH}.ClientID" "${ClientID}"
db_set
update_db_dump
}
@@ -705,21 +769,277 @@ configure_obuspa() {
fi
}
get_instances_from_db_dump()
{
local obj inst
obj="${1}\d"
if [ ! -f "${DB_DUMP}" ]; then
echo ""
return 0;
fi
inst="$(grep -oe "${obj}" "${DB_DUMP}"|uniq)"
echo "$inst"
}
get_param_value_from_dump()
{
local param value
param="${1}"
if [ -z "${param}" ] || [ ! -f "${DB_DUMP}" ]; then
log "error getting param"
echo ""
return 0
fi
value="$(grep "^${param} " ${DB_DUMP}|awk '{print $3}')"
echo "$value"
}
update_uci_sec()
{
local sec tmp
sec="${1}"
stype="${2}"
if [ -z "$sec" ] || [ -z "$stype" ]; then
log "No section name, error"
return 0
fi
tmp="$(uci_get obuspa "${sec}")"
if [ "$tmp" != "$stype" ]; then
uci_add obuspa "${stype}" "${sec}"
fi
}
sync_db_controller()
{
local cntrs copts sec pvalue protocol
copts="Enable EndpointID AssignedRole"
popts="Destination Topic Reference Host Port Path EnableEncryption"
cntrs="$(get_instances_from_db_dump Device.LocalAgent.Controller.)"
for cntr in $cntrs; do
sec="$(get_param_value_from_dump "${cntr}".Alias)"
sec="${sec/cpe-/controller_}"
sec="${sec/-/_}"
update_uci_sec "${sec}" controller
for param in ${copts}; do
pvalue="$(get_param_value_from_dump "${cntr}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
uci_set obuspa "${sec}" "_sync" "1"
protocol="$(get_param_value_from_dump "${cntr}".MTP.1.Protocol)"
if [ -z "${protocol}" ]; then
break;
fi
uci_set obuspa "${sec}" "Protocol" "${protocol}"
for param in ${popts}; do
pvalue="$(get_param_value_from_dump "${cntr}".MTP.1."${protocol}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
done
}
sync_db_localagent_mtp()
{
local mtps opts popts sec pvalue protocol
opts="Enable"
popts="ResponseTopicConfigured Destination Port Path Reference EnableEncryption"
ropts="mqtt stomp"
mtps="$(get_instances_from_db_dump Device.LocalAgent.MTP.)"
for inst in $mtps; do
sec="$(get_param_value_from_dump "${inst}".Alias)"
sec="${sec/cpe-/mtp_}"
sec="${sec/-/_}"
update_uci_sec "${sec}" mtp
for param in ${opts}; do
pvalue="$(get_param_value_from_dump "${inst}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
uci_set obuspa "${sec}" "_sync" "1"
protocol="$(get_param_value_from_dump "${inst}".Protocol)"
if [ -z "${protocol}" ]; then
break;
fi
uci_set obuspa "${sec}" "Protocol" "${protocol}"
for param in ${popts}; do
pvalue="$(get_param_value_from_dump "${inst}"."${protocol}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
for param in ${ropts}; do
uci_set obuspa "${sec}" "${param}" ""
done
done
}
sync_db_mqtt_client()
{
local mtps copts sec pvalue protocol
opts="Enable BrokerAddress BrokerPort Username ProtocolVersion TransportProtocol ClientID"
mtps="$(get_instances_from_db_dump Device.MQTT.Client.)"
for inst in $mtps; do
sec="$(get_param_value_from_dump "${inst}".Alias)"
sec="${sec/cpe-/mqtt_}"
sec="${sec/-/_}"
update_uci_sec "${sec}" mqtt
for param in ${opts}; do
pvalue="$(get_param_value_from_dump "${inst}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
uci_set obuspa "${sec}" "_sync" "1"
done
}
sync_db_stomp_connection()
{
local mtps copts sec pvalue protocol
opts="Enable Host Port Username EnableEncryption EnableHeartbeats VirtualHost"
mtps="$(get_instances_from_db_dump Device.STOMP.Connection.)"
for inst in $mtps; do
sec="$(get_param_value_from_dump "${inst}".Alias)"
sec="${sec/cpe-/stomp_}"
sec="${sec/-/_}"
update_uci_sec "${sec}" stomp
for param in ${opts}; do
pvalue="$(get_param_value_from_dump "${inst}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
uci_set obuspa "${sec}" "_sync" "1"
done
}
sync_update_sec()
{
local _sync
config_get _sync "${1}" _sync ""
if [ -z "${_sync}" ]; then
uci_remove obuspa "${1}"
else
uci_remove obuspa "${1}" _sync
fi
}
sync_uci_with_db()
{
if [ ! -f "${DB_DUMP}" ]; then
return 0;
fi
config_load obuspa
sync_db_controller
sync_db_localagent_mtp
sync_db_mqtt_client
sync_db_stomp_connection
uci_commit obuspa
config_load obuspa
config_foreach sync_update_sec controller
config_foreach sync_update_sec mtp
config_foreach sync_update_sec mqtt
config_foreach sync_update_sec stomp
uci_commit obuspa
}
delete_sql_db_entry_with_pattern()
{
local params pattern
pattern="${1}"
if [ ! -f "${DB_DUMP}" ]; then
return 0;
fi
if [ "${#pattern}" -lt 7 ]; then
return 0;
fi
params="$(grep "${pattern}" ${DB_DUMP}|awk '{print $1}')"
for p in ${params}; do
db_del_sql "${p}"
done
}
check_n_delete_db()
{
local sec t r path
sec="${1}"
if uci -q get obuspa."${sec}" >/dev/null 2>&1; then
return 0
fi
t="${2}"
r="${3}"
sec="${sec/${t}_/cpe-}"
path=$(grep "${r}\d.Alias => ${sec}" ${DB_DUMP})
path=${path%.*}
delete_sql_db_entry_with_pattern "${path}"
}
reverse_update_db_with_uci()
{
if [ ! -f "${DB_DUMP}" ]; then
return 0;
fi
export UCI_CONFIG_DIR="/tmp/obuspa"
config_load obuspa
config_foreach check_n_delete_db controller controller "Device.LocalAgent.Controller."
config_foreach check_n_delete_db mtp mtp "Device.LocalAgent.MTP."
config_foreach check_n_delete_db mqtt mqtt "Device.MQTT.Client."
config_foreach check_n_delete_db stomp stomp "Device.STOMP.Connection."
unset UCI_CONFIG_DIR
}
# Create factory reset file
db_init()
{
local reason
reason="${1}"
mkdir -p /tmp/obuspa/
# Load configuration
config_load $CONFIGURATION
config_get SQL_DB_FILE global db_file "/tmp/obuspa/usp.db"
# Dump datamodel parameters from DB
if [ -f "${SQL_DB_FILE}" ]; then
${PROG} -f ${SQL_DB_FILE} -c show database > ${DB_DUMP}
${PROG} -f ${SQL_DB_FILE} -c show database |sort > ${DB_DUMP}
fi
# Only sync uci with db in case of non service triggers
if [ -f "${DB_DUMP}" ] && [ "${reason}" != "update" ]; then
sync_uci_with_db
fi
# remove entries from db if deleted from uci
if [ -f "${DB_DUMP}" ] && [ "${reason}" = "update" ] && [ -f "/tmp/obuspa/obuspa" ]; then
reverse_update_db_with_uci
fi
# Remove reset file if present
[ -f "${RESET_FILE}" ] && rm -f ${RESET_FILE}
config_load $CONFIGURATION
global_init
config_foreach configure_localagent localagent
global_init
@@ -736,6 +1056,9 @@ db_init()
config_foreach configure_challenges challenge
global_init
update_reset_reason
uci_commit ${CONFIGURATION}
cp /etc/config/obuspa /tmp/obuspa/
[ -f "${DB_DUMP}" ] && rm -f ${DB_DUMP}
@@ -771,7 +1094,7 @@ start_service() {
fi
mkdir -p /tmp/obuspa/
db_init
db_init "${1}"
register_service
}
@@ -781,7 +1104,7 @@ stop_service() {
reload_service() {
stop
start
start update
}
service_triggers() {
@@ -801,7 +1124,7 @@ service_triggers() {
json_add_array
json_add_string "" "run_script"
json_add_string "" "/etc/init.d/obuspa"
json_add_string "" "reload"
json_add_string "" "restart"
json_close_array
json_close_array
json_add_int "" "2000"

View File

@@ -1,7 +1,7 @@
{
"dmcaching_exclude": [
"Device.DeviceInfo.ProcessStatus.Process.",
"Device.Hosts.Host.",
"Device.IEEE1905.",
"Device.WiFi.DataElements."
]
}

View File

@@ -5,10 +5,10 @@
fix_stomp_section() {
local encryption
config_get_bool encryption $1 encryption ""
config_get_bool encryption "${1}" encryption ""
if [ -n "${encryption}" ]; then
uci_set obuspa $1 encryption ""
uci_set obuspa $1 EnableEncryption "$encryption"
uci_set obuspa "${1}" encryption ""
uci_set obuspa "${1}" EnableEncryption "$encryption"
fi
}

View File

@@ -0,0 +1,22 @@
#!/bin/sh
. /lib/functions.sh
if [ ! -f "/etc/config/mosquitto" ]; then
echo "Local mosquitto broker not available"
return 0
fi
add_obuspa_config()
{
if ! uci_get mosquitto obuspa >/dev/null 2>&1; then
uci_add mosquitto listener obuspa
uci_set mosquitto obuspa enabled 1
uci_set mosquitto obuspa port '1883'
uci_set mosquitto obuspa no_remote_access '1'
uci_set mosquitto obuspa allow_anonymous '1'
fi
}
uci_load mosquitto
add_obuspa_config

View File

@@ -1,140 +0,0 @@
diff --git a/src/core/device.h b/src/core/device.h
index adf8fa6..072f953 100644
--- a/src/core/device.h
+++ b/src/core/device.h
@@ -111,6 +111,7 @@ typedef struct
// Following member variables only set if USP message was received over MQTT
int mqtt_instance;
char *mqtt_topic; // only set if reply_to was specified in the received MQTT packet
+ char *mqtt_topic_recv;
// Following member variables only set if USP message was received over CoAP
@@ -252,7 +253,7 @@ void DEVICE_MTP_NotifyMqttConnDeleted(int mqtt_instance);
int DEVICE_MTP_ValidateMqttReference(dm_req_t *req, char *value);
void DEVICE_CONTROLLER_SetRolesFromMqtt(int mqtt_instance, ctrust_role_t role);
char *DEVICE_CONTROLLER_GetControllerTopic(int mqtt_instance);
-
+int validate_controller_topic_by_endpointid(char *endpointid, mtp_protocol_t proto, char *recv_topic);
//------------------------------------------------------------------------------
// Tables used to convert to/from an enumeration to/from a string
extern const enum_entry_t mtp_protocols[kMtpProtocol_Max];
diff --git a/src/core/device_controller.c b/src/core/device_controller.c
index 62c803f..103388d 100755
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
@@ -239,6 +239,41 @@ int Async_E2ESessionReset(dm_req_t *req, kv_vector_t *input_args, int request);
extern const enum_entry_t e2e_session_modes[kE2EMode_Max];
#endif
+
+int validate_controller_topic_by_endpointid(char *endpointid, mtp_protocol_t proto, char *recv_topic)
+{
+ controller_t *cont = FindEnabledControllerByEndpointId(endpointid);
+ if (cont == NULL)
+ {
+ USP_LOG_Error("not able to find the controller from endpointid [%s]", endpointid);
+ return USP_ERR_PERMISSION_DENIED;
+ }
+#ifdef ENABLE_MQTT
+ if (proto == kMtpProtocol_MQTT)
+ {
+ controller_mtp_t *mtp = FindFirstEnabledMtp(cont, proto);
+
+ if (mtp == NULL) {
+ USP_LOG_Error("Not able to find mtp[%d] for endpointid [%s]", proto, endpointid);
+ return USP_ERR_REQUEST_DENIED;
+ }
+
+ if (mtp->protocol != proto) {
+ USP_LOG_Error("No matching mtp[%d] for endpointid [%s]", proto, endpointid);
+ return USP_ERR_REQUEST_DENIED;
+ }
+
+ char *response_topic = DEVICE_MTP_GetAgentMqttResponseTopic(mtp->mqtt_connection_instance);
+ if (response_topic && strcmp(response_topic, recv_topic) != 0 ) {
+ USP_LOG_Error("Controller response topic[%s] and recv topic[%s] mismatch, probably a spoof message", response_topic, recv_topic);
+ return USP_ERR_PERMISSION_DENIED;
+ }
+ }
+#endif
+
+ return USP_ERR_OK;
+}
+
/*********************************************************************//**
**
** DEVICE_CONTROLLER_Init
diff --git a/src/core/dm_exec.c b/src/core/dm_exec.c
index c0b95d8..6eb51e2 100755
--- a/src/core/dm_exec.c
+++ b/src/core/dm_exec.c
@@ -624,6 +624,7 @@ void DM_EXEC_PostUspRecord(unsigned char *pbuf, int pbuf_len, ctrust_role_t role
pur->mtp_reply_to.coap_encryption = mrt->coap_encryption;
pur->mtp_reply_to.coap_reset_session_hint = mrt->coap_reset_session_hint;
pur->mtp_reply_to.mqtt_topic = USP_STRDUP(mrt->mqtt_topic);
+ pur->mtp_reply_to.mqtt_topic_recv = USP_STRDUP(mrt->mqtt_topic_recv);
pur->mtp_reply_to.mqtt_instance = mrt->mqtt_instance;
pur->mtp_reply_to.wsclient_cont_instance = mrt->wsclient_cont_instance;
pur->mtp_reply_to.wsclient_mtp_instance = mrt->wsclient_mtp_instance;
@@ -1144,6 +1145,7 @@ void ProcessMessageQueueSocketActivity(socket_set_t *set)
USP_SAFE_FREE(mrt->coap_resource);
USP_SAFE_FREE(mrt->mqtt_topic);
USP_SAFE_FREE(mrt->cont_endpoint_id);
+ USP_SAFE_FREE(mrt->mqtt_topic_recv);
break;
#ifndef DISABLE_STOMP
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 7dba9f4..3ee9c97 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -3141,6 +3141,7 @@ void ReceiveMqttMessage(mqtt_client_t *client, const struct mosquitto_message *m
mrt.mqtt_topic = response_topic;
}
+ mrt.mqtt_topic_recv = message->topic;
// Message may not be valid USP
DM_EXEC_PostUspRecord(message->payload, message->payloadlen, client->role, &mrt);
}
diff --git a/src/core/msg_handler.c b/src/core/msg_handler.c
index ce67626..4af9ade 100644
--- a/src/core/msg_handler.c
+++ b/src/core/msg_handler.c
@@ -118,7 +118,7 @@ static enum_entry_t mtp_content_types[] = {
//------------------------------------------------------------------------------
// Forward declarations. Note these are not static, because we need them in the symbol table for USP_LOG_Callstack() to show them
int HandleUspMessage(Usp__Msg *usp, char *controller_endpoint, mtp_reply_to_t *mrt);
-int ValidateUspRecord(UspRecord__Record *rec);
+int ValidateUspRecord(UspRecord__Record *rec, mtp_reply_to_t *mrt);
char *MtpSendItemToString(mtp_send_item_t *msi);
void CacheControllerRoleForCurMsg(char *endpoint_id, ctrust_role_t role, mtp_protocol_t protocol);
int QueueUspNoSessionRecord(usp_send_item_t *usi, char *endpoint_id, char *usp_msg_id, mtp_reply_to_t *mrt, time_t expiry_time);
@@ -172,7 +172,7 @@ int MSG_HANDLER_HandleBinaryRecord(unsigned char *pbuf, int pbuf_len, ctrust_rol
#endif
// Exit if USP record failed validation
- err = ValidateUspRecord(rec);
+ err = ValidateUspRecord(rec, mrt);
if (err != USP_ERR_OK)
{
goto exit;
@@ -725,7 +725,7 @@ exit:
** \return USP_ERR_OK if record is valid
**
**************************************************************************/
-int ValidateUspRecord(UspRecord__Record *rec)
+int ValidateUspRecord(UspRecord__Record *rec, mtp_reply_to_t *mrt)
{
char *endpoint_id;
@@ -806,6 +806,9 @@ int ValidateUspRecord(UspRecord__Record *rec)
return USP_ERR_REQUEST_DENIED;
}
+#if OBUSPA_CONTROLLER_MTP_VERIFY
+ return validate_controller_topic_by_endpointid(rec->from_id, mrt->protocol, mrt->mqtt_topic_recv);
+#endif
// If the code gets here, then the USP record passed validation, and the encapsulated USP message may be processed
return USP_ERR_OK;
}

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