Compare commits

...

690 Commits

Author SHA1 Message Date
nevadita.chatterjee
b7597b920d ieee1905: 4.10.40 2023-06-21 12:14:45 +05:30
Grzegorz Sluja
749678804a Update package dectmngr 3.5.8
Anonymous call to DECT should be displayed as "Withheld"
2023-06-15 12:33:56 +02:00
Vivek Kumar Dutta
d6d623e761 icwmp: 8.4.26.10 2023-06-15 09:12:09 +05:30
Grzegorz Sluja
2264847f69 Update package dectmngr
6ea57b3 Fix the bug that missed calls are not cleared after reading from the handset
ae9e8f3 Change narrow band to wide band for incoming calls to DECT handsets
a9b4e71 Fix memory corruption in converAsciiToHexString()
b48f408 CI: move code-analysis to own container registry (IOP-9341)
903ea46 Fix the second caller id display issue
83f89a8 Stop building libdect.so
a3ce12a Always use pthread_t as the type of thread id other than u32
2023-06-13 10:49:16 +02:00
Filip Matusiak
4e773fb976 map-agent: 2.10.4.1 2023-06-12 09:44:20 +02:00
Jakob Olsson
68f5ac2402 map-agent: remove legacy parts of vlan teardown 2023-06-08 15:52:46 +02:00
Jakob Olsson
5cb9293bd9 map-agent: traffic_separation: set guest zone default fw rule to DROP 2023-06-08 14:29:14 +02:00
nevadita.chatterjee
6fb739d980 ieee1905: 4.10.39 2023-06-08 16:21:46 +05:30
Jakob Olsson
19d34e3417 map-agent: 2.10.4.0 2023-06-03 19:28:27 +02:00
Jakob Olsson
2bf41d47b0 map-agent: traffic_separation: remove patch and diff teardown usage 2023-06-03 19:28:27 +02:00
Jakob Olsson
fb4abd07eb map-agent: traffic_separation: update guest ping fw rule 2023-06-02 13:57:50 +02:00
Jakob Olsson
cedcb18ce9 map-agent: traffic_separation: refactor teardown 2023-06-02 13:57:50 +02:00
Jakob Olsson
41c4512235 Revert "Revert "map-agent: traffic_separation: allow al-bridge to untag primary""
This reverts commit 5fe134d348.
2023-06-02 13:57:29 +02:00
Jakob Olsson
fc87cf8197 map-agent: traffic_separation: create 8021q interfaces from network cfg 2023-06-02 13:57:29 +02:00
Marek Puzyniak
9a119ba0dd map-agent: 2.10.3.4 2023-05-31 11:10:20 +00:00
Jakob Olsson
5fe134d348 Revert "map-agent: traffic_separation: allow al-bridge to untag primary"
This reverts commit b5f38bf1f5.
2023-05-24 16:49:10 +02:00
Filip Matusiak
de057f0d58 map-agent: 2.10.3.3 2023-05-24 10:52:59 +02:00
Jakob Olsson
ffc0f1cad1 map-agent: 2.10.3.2 2023-05-23 13:52:40 +02:00
Jakob Olsson
379f1bc95a map-agent: traffic_separation: fixes to fw rules and their teardown 2023-05-23 13:50:30 +02:00
Filip Matusiak
ec7a8d0244 map-controller: 2.8.0.25
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-22 13:32:41 +02:00
Filip Matusiak
ffa7f9bbc6 map-controller: 2.8.0.24
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-17 16:25:02 +02:00
Jakob Olsson
0d3da06f85 map-agent: 2.10.3.1 2023-05-17 14:16:44 +00:00
Jakob Olsson
55cc54e7f7 map-agent: traffic_separation: update ebtable isolation rules for ethports 2023-05-17 14:16:44 +00:00
Jakob Olsson
b5f38bf1f5 map-agent: traffic_separation: allow al-bridge to untag primary 2023-05-17 14:16:44 +00:00
Jakob Olsson
e43631ecaa map-agent: traffic_separation: allow guests only access to DHCP and DNS 2023-05-17 14:16:44 +00:00
Jakob Olsson
ddf478f77a map-agent: multiap: attempt to update ebtable rules when uplink changes 2023-05-17 14:16:44 +00:00
nevadita.chatterjee
38d9ef7526 decollector: 2.10.1.2 2023-05-17 17:02:50 +05:30
Jakob Olsson
6b8ee5491a map-agent: traffic_separation: add support for guest-to-guest isolation across eth backhaul 2023-05-15 12:16:49 +02:00
Jakob Olsson
38b64c584e map-agent: traffic_separation: fixes and properly set tags on extender bridge 2023-05-11 09:45:30 +02:00
Amit Kumar
492cc5c029 map-topology: Added flag to get active connection
Added compilation flag in Makefile that enables fetch of
active connection using netlink from libconntrack.
2023-05-10 16:10:02 +05:30
Filip Matusiak
f030674f68 map-controller: 2.8.0.23
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-10 12:10:29 +02:00
Filip Matusiak
32a13d12f0 ieee1905: 4.10.38
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-05-09 14:44:12 +02:00
nevadita.chatterjee
3dbe7f7f3e map-topology: 2.5.0.16 2023-05-04 17:16:35 +05:30
Jakob Olsson
f1b3ec5a7d map-agent: 2.10.3.0 2023-05-02 14:39:40 +00:00
Jakob Olsson
b839ad3a35 map-agent: add dependency on patch and diff 2023-05-02 14:39:40 +00:00
Jakob Olsson
50d8f9536c map-agent: platform scripts: fix guest-to-guest isolation and guest pkt leak 2023-05-02 14:39:40 +00:00
suvendhu
1829f69726 icwmpd: remove DHCP option 125 deletion 2023-05-02 19:57:59 +05:30
Vivek Kumar Dutta
d228445386 icwmp: 8.4.26.8 2023-05-01 12:17:36 +05:30
Vivek Kumar Dutta
80dbe5da48 icwmp: 8.4.26.7 2023-04-27 10:52:15 +05:30
Filip Matusiak
11540c919a map-controller: 2.8.0.22 2023-04-26 14:51:20 +02:00
Filip Matusiak
1278e4d936 ieee1905: 4.10.37
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-04-24 10:50:43 +02:00
Vivek Kumar Dutta
402ac6f5b2 icwmp: 8.4.26.6 2023-04-21 16:02:11 +05:30
Vivek Kumar Dutta
5097780ae3 icwmp: 8.4.26.5 2023-04-13 10:48:41 +05:30
Anjan Chanda
16d0184b73 ieee1905: 4.10.36 2023-04-12 08:31:26 +02:00
Vivek Kumar Dutta
282026b14d bbf: 6.8.9.35 2023-04-11 11:08:48 +05:30
Marek Puzyniak
faf81bbe2b ieee1905: 4.10.35 2023-04-06 07:08:27 +00:00
Marek Puzyniak
cfce60fd58 map-controller: 2.8.0.21 2023-04-06 06:52:59 +00:00
Marek Puzyniak
486b6c4b1f map-agent: 2.10.2.12 2023-04-06 06:01:44 +00:00
Vivek Kumar Dutta
e180e17bfe icwmp: 8.4.26.4 2023-04-03 15:43:59 +05:30
Vivek Kumar Dutta
14b3cf4657 icwmp: 8.4.26.3 2023-03-31 15:10:57 +05:30
Vivek Kumar Dutta
77d641c688 icwmp: Fix duplicate Bootstap 2023-03-30 13:02:47 +05:30
Grzegorz Sluja
5cfc71114c endptmngr: Fix for congestion tone not played 2023-03-27 09:02:58 +02:00
vdutta
9fdc3d6126 icwmp: Fix probable crashes 2023-03-23 19:04:01 +05:30
Anjan Chanda
316e6d080a wfadatad: 2.10.1.1 2023-03-22 15:51:54 +01:00
Anjan Chanda
652e6335e5 easy-soc-libs: 6.5.60 2023-03-22 15:32:33 +01:00
nevadita.chatterjee
82a68b2f27 ieee1905: 4.10.34 2023-03-17 15:07:49 +05:30
Filip Matusiak
2d638220b2 map-agent: 2.10.2.11 2023-03-10 12:59:51 +01:00
Filip Matusiak
0811488af9 map-controller: 2.8.0.20 2023-03-10 12:59:43 +01:00
Omar Kallel
18eb5d7f58 icwmp: Fix Vendor Conf Download issue 2023-03-08 17:31:32 +01:00
Jakob Olsson
14d2d0934f map-agent: 2.10.2.10 2023-02-21 10:01:08 +01:00
vdutta
3fd9ca090d bbf: 6.8.9.34 2023-02-17 10:45:22 +05:30
vdutta
8ea89f2b98 icwmp: 8.4.25.17 2023-02-15 18:17:52 +05:30
Jakob Olsson
39f8886e25 map-agent: 2.10.2.9 2023-02-15 10:55:18 +01:00
vdutta
22d496ac67 obuspa: 5.0.0.16.7 2023-02-13 14:56:29 +05:30
Jakob Olsson
cc7ad3a31c map-agent: 2.10.2.8 2023-02-06 10:06:23 +01:00
vdutta
29e9923bf7 icwmp: 8.4.25.16 2023-02-03 18:46:34 +05:30
Anjan Chanda
9fa6c02fa7 wfadatad: 2.10.1.0 2023-02-03 10:46:10 +01:00
vdutta
35396ea204 icwmp: 8.4.25.15 2023-02-03 15:10:46 +05:30
vdutta
7f108c27ee bbf: 6.8.9.33 2023-01-31 20:19:49 +05:30
vdutta
9d3db6e1a0 icwmp: 8.4.25.14 2023-01-31 20:18:18 +05:30
Omar Kallel
767aff87b8 icwmp: Update dhcp option 60 handling 2023-01-31 14:46:35 +00:00
nevadita.chatterjee
65cf5ba958 map-topology:2.5.0.15 2023-01-31 19:07:37 +05:30
Jakob Olsson
c8cfbc194d map-agent: 2.10.2.7 2023-01-31 10:22:31 +01:00
Jakob Olsson
364b6223fa map-controller: 2.8.0.19 2023-01-31 10:21:11 +01:00
Omar Kallel
64fb2de39a icwmp: set dslforum.org as value for option 60 2023-01-27 14:37:00 +01:00
vdutta
98ea0bbf05 bbf: align with icwmp 2023-01-27 16:30:04 +05:30
vdutta
901666827e icwmp: Updated notification handling 2023-01-27 16:26:17 +05:30
vdutta
08a9824d5e uspd: 2.2.14.3 2023-01-26 18:54:49 +05:30
vdutta
330ce960fc bbf: 6.8.9.31 2023-01-26 18:54:12 +05:30
vdutta
ea8a6fd790 Revert "bbf: 6.8.9.31"
This reverts commit 531b441f80.
2023-01-26 18:52:09 +05:30
vdutta
531b441f80 bbf: 6.8.9.31 2023-01-26 18:49:44 +05:30
Jakob Olsson
471c8d8e5e map-controller: 2.8.0.18 2023-01-26 14:05:16 +01:00
Amin Ben Romdhane
5981e5b563 ssdpd: 1.0.5
(cherry picked from commit a715e0a659)
2023-01-26 04:20:01 +00:00
Anjan Chanda
90ca84517c easy-soc-libs: 6.5.57 2023-01-25 14:23:38 +01:00
Anjan Chanda
0fe517315e ieee1905: 4.10.33 2023-01-25 14:08:31 +01:00
Anjan Chanda
21f18cfd34 easy-soc-libs: 6.5.55 2023-01-25 08:21:00 +01:00
nevadita.chatterjee
ad39e7603b ieee1905: 4.10.32 2023-01-24 17:32:51 +05:30
Marek Puzyniak
be0595cb13 easy-soc-libs: 6.4.54 2023-01-24 09:30:53 +00:00
Filip Matusiak
1b9c7328a3 map-controller: validate thresholds in sta_steering section of config
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2023-01-16 11:07:21 +00:00
Sukru Senli
3aa9e7fbe2 iop: genconfig: in customerconfigs use the same branch as in iowrt repo 2023-01-16 11:59:18 +01:00
Marek Puzyniak
6c1a16b3b4 wifimngr: 14.0.10 2023-01-13 13:10:39 +00:00
Marek Puzyniak
860c9ce9e9 easy-soc-libs: 6.4.53 2023-01-13 13:07:59 +00:00
Jakob Olsson
c5de1a939f wfadatad: 2.10.0.8 2023-01-13 13:09:20 +01:00
vdutta
7ccd66f2e0 bbf: 6.8.9.30 2023-01-13 17:04:23 +05:30
vdutta
886bc94363 ssdpd: 1.0.4 2023-01-13 12:29:02 +05:30
vdutta
03bd91650b sulu: 1.3.26 2023-01-13 12:28:26 +05:30
suvendhu
b6d834467d icwmp: cherry-pick option43 handling 2023-01-12 12:47:48 +05:30
Amit Kumar
a69268966c map-topology: enhanced wan per host statistics 2023-01-11 09:21:22 +05:30
Amit Kumar
35c02b68d3 topologyd: enabled timestamp flag in nf conntrack 2023-01-10 14:10:59 +05:30
Wenpeng Song
8605c1e455 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
2023-01-03 13:24:41 +00:00
vdutta
76457bc80a ssdpd: 1.0.3 2022-12-23 13:53:15 +05:30
vdutta
0a17b21d66 obuspa: 5.0.0.16.6 2022-12-22 16:24:25 +05:30
vdutta
579e188bc8 icwmp: 8.4.25.11 2022-12-22 16:10:41 +05:30
vdutta
42c3fd9ce4 bbf: 6.8.9.29 2022-12-22 15:54:51 +05:30
nevadita.chatterjee
d3d638dd6f map-topology: 2.5.0.14 2022-12-22 10:28:20 +05:30
Jakob Olsson
3c9aabbc1b ieee1905: 4.10.31 2022-12-21 15:52:40 +01:00
Jakob Olsson
ccb83f2c91 map-agent: 2.10.2.6 2022-12-21 15:51:59 +01:00
sverma
6d9b07317b add psk mode on i1905, agent and controller 2022-12-21 17:17:00 +05:30
sverma
69cca97ff6 map-agent: add support for other enc modes 2022-12-21 14:48:46 +05:30
sverma
fdf4abda52 map-controller: add support for wpa/wpa2 2022-12-21 14:40:17 +05:30
Jakob Olsson
cbbdbca752 map-agent: 2.10.2.5 2022-12-20 16:13:15 +01:00
Jakob Olsson
1bb1733238 map-controller: 2.8.0.17 2022-12-20 16:12:35 +01:00
Saurabh Verma
6b44d95bd5 map-controller: init.d: add support for other enc methods 2022-12-20 14:56:43 +00:00
suvendhu
8289dce603 Fix GW info overwrite on boot
(cherry picked from commit 7353a6bfe7)
2022-12-20 12:51:30 +00:00
sverma
d0ca976d71 wfadatad: 2.10.0.7 2022-12-19 12:17:07 +00:00
Anjan Chanda
2bb5272e3d ieee1905: 4.10.30 2022-12-19 13:14:09 +01:00
Amin Ben Romdhane
7bc170188b Add ssdpd package
(cherry picked from commit 39f2dab3f2)
2022-12-19 11:24:48 +00:00
vdutta
6bd264e6d5 sulu: 1.3.24 2022-12-19 16:53:03 +05:30
vdutta
d0e229743c bbf: 6.8.9.28 2022-12-19 16:27:15 +05:30
vdutta
79edd055bf bbf: gateway info fallback 2022-12-19 15:54:56 +05:30
Vivek Kumar Dutta
2408f215ac icwmp: dhcp handling for option 125 2022-12-19 07:28:46 +00:00
Jakob Olsson
d66e7fab9b map-controller: 2.8.0.16 2022-12-14 12:34:43 +01:00
Jakob Olsson
b96ebeb84c map-agent: 2.10.2.4 2022-12-14 12:34:09 +01:00
vdutta
2a7ba5608f bbf: 6.8.9.26 2022-12-09 17:16:09 +05:30
Jakob Olsson
ec61d302c5 map-agent: 2.10.2.3 2022-12-09 11:52:43 +01:00
Jakob Olsson
186e8a960d map-agent: traffic_separation: check for existing bridge-vlan section before appending new one 2022-12-09 11:51:59 +01:00
Jakob Olsson
1692ed2afe map-agent: 2.10.2.2 2022-12-07 15:50:26 +01:00
vdutta
404ae888a8 sulu: 1.3.15 2022-12-07 19:40:08 +05:30
vdutta
bbe4473f40 uspd: 2.2.14.2 2022-12-07 19:37:56 +05:30
vdutta
51707f0272 bbf: 6.8.9.25 2022-12-07 16:56:05 +05:30
Jakob Olsson
c598a47281 map-agent: traffic_separation: fix bridge var typo 2022-12-07 10:45:39 +01:00
Jakob Olsson
63c5275f42 map-agent: 2.10.2.1 2022-12-07 10:44:46 +01:00
Jakob Olsson
8875203b9b map-topology: 2.5.0.13 2022-12-06 16:17:45 +01:00
vdutta
1d9e70a1d2 sulu: 1.3.13 2022-12-05 18:54:39 +05:30
Jakob Olsson
c8042b2b6c Revert "mapagent: port add delete to bridge using uci ubus"
This reverts commit a316b74555.
2022-12-05 09:32:06 +01:00
Amit Kumar
a316b74555 mapagent: port add delete to bridge using uci ubus 2022-12-05 08:22:47 +05:30
Jakob Olsson
91a81169bc map-agent: 2.10.2.0 2022-11-30 16:30:04 +01:00
Marek Puzyniak
d12aff727c easy-soc-libs: 6.4.52 2022-11-29 14:28:07 +00:00
Jakob Olsson
0daddcd84f ieee1905: uci-default: change al-iface ifname from list to option 2022-11-29 14:18:19 +01:00
vdutta
7a684f0a40 bbf: 6.8.9.24 2022-11-29 18:44:43 +05:30
vdutta
bc8bc4bd48 bbf: 6.8.9.23 2022-11-28 15:43:59 +05:30
vdutta
5316eb2cca obuspa: 5.0.0.16.5 2022-11-28 15:43:30 +05:30
vdutta
37621309e8 uspd: 2.2.14.1 2022-11-28 15:43:04 +05:30
Wenpeng Song
ac7abe0536 bbf: 6.8.9.22 2022-11-23 10:04:41 +00:00
Yalu Zhang
242fc21967 Update package endptmngr
Correction of codec names for codecs ubus call
2022-11-23 10:30:03 +01:00
Filip Matusiak
8d4453b107 map-agent: 2.10.1.2
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-11-22 10:47:28 +01:00
vdutta
5213d64579 sulu: 1.3.8 2022-11-17 11:57:58 +00:00
Jakob Olsson
3e872da3ce map-controller: 2.8.0.15 2022-11-15 16:59:13 +01:00
Anjan Chanda
c35824f5ec wfadatad: 2.10.0.6 2022-11-15 10:34:08 +01:00
Grzegorz Sluja
bf6e0244f4 endptmngr: Refactor inconsistency about call_id, pcm_id and pcm_state 2022-11-11 10:29:49 +01:00
Yalu Zhang
dc20fe3654 Update package voicemngr
Fix a compiling error for release-6.5 branch
2022-11-10 16:09:52 +01:00
Yalu Zhang
c3b0ecb042 Add package voicemngr 2022-11-10 15:39:21 +01:00
vdutta
38c0a6b60f bbf: 6.8.9.21 2022-11-03 12:26:13 +05:30
vdutta
fc475de4da icwmp: 8.4.25.10 2022-11-03 12:24:42 +05:30
Jakob Olsson
74f4716ccd map-agent: 2.11.1.1 2022-10-28 12:57:19 +02:00
Jakob Olsson
24f125ff94 map-agent: 2.11.1.0 2022-10-27 15:08:20 +02:00
Sukru Senli
caccbdfdf0 icwmp: 8.4.25.9
Make the enable/disable of GetRPCMethods ACS methods done via cwmp uci option
2022-10-27 11:44:38 +02:00
Jakob Olsson
ce124fc5da map-agent: 2.10.0.28 2022-10-26 12:16:39 +02:00
Jakob Olsson
8abc606452 map-agent: config: add missing otpions options 2022-10-26 10:48:06 +02:00
Jakob Olsson
6417542d62 map-agent: 2.10.0.27 2022-10-26 10:46:12 +02:00
Jakob Olsson
98ef763849 map-agent: 2.10.0.26 2022-10-25 16:31:51 +02:00
Jakob Olsson
e0f501a75f map-agent: 2.10.0.25 2022-10-25 10:14:47 +02:00
Jakob Olsson
a9850c25cb map-agent: traffic_seperation: add func isolate guest by ebtables 2022-10-24 17:41:18 +02:00
Jakob Olsson
91509243e5 map-agent: 2.10.0.24 2022-10-21 15:14:02 +02:00
Jakob Olsson
3b8c236546 map-agent: 2.10.0.23 2022-10-20 15:55:02 +02:00
Anjan Chanda
c2ccb89855 ieee1905: 4.10.28 2022-10-19 17:18:44 +02:00
Jakob Olsson
1994c26d23 map-agent: 2.10.0.22 2022-10-19 16:09:49 +02:00
vdutta
6ece55c134 bbf: 6.8.9.20 2022-10-19 18:19:12 +05:30
vdutta
ed58db0758 obuspa: 5.0.0.16.4 2022-10-19 18:18:46 +05:30
Anjan Chanda
d2f317c20c wfadatad: 2.10.0.2 2022-10-19 10:17:04 +02:00
Jakob Olsson
efb4429e76 easy-soc-libs: 6.4.51 2022-10-18 20:50:15 +02:00
Anjan Chanda
e3836e6dff ieee1905: 4.10.27 2022-10-18 16:40:52 +02:00
Jakob Olsson
cb9ddf3b59 map-controller: 2.8.0.14 2022-10-18 15:44:40 +02:00
Grzegorz Sluja
956ae7d35e dectmngr: Play dial tone if called number is not included in call establish message 2022-10-18 11:26:45 +02:00
Jakob Olsson
b7767e0333 map-controller: 2.8.0.13 2022-10-17 11:35:57 +02:00
Jakob Olsson
255aab4ef2 map-agent: 2.10.0.21 2022-10-14 17:04:35 +02:00
Jakob Olsson
827d19e557 map-agent: multiap: disable_lower_prio: always enable passed ifname 2022-10-14 16:14:44 +02:00
Marek Puzyniak
096310eca3 map-agent: don't enable bsta
When call bsta_disable_lower_priority
do not enable bsta.

Signed-off-by: Marek Puzyniak <marek.puzyniak@iopsys.eu>
2022-10-14 11:05:00 +00:00
Anjan Chanda
4afc0d6b10 ieee1905: 4.10.26 2022-10-14 09:53:58 +02:00
vdutta
01b12e0f59 bbf: 6.8.9.19 2022-10-13 19:20:59 +05:30
vdutta
f164d0f23f icwmp: 8.4.25.8 2022-10-13 17:24:26 +05:30
vdutta
bb8e213cdd icwmp: 8.4.25.7 2022-10-13 12:17:36 +05:30
vdutta
3998edded4 bbf: 6.8.9.18 2022-10-13 12:16:21 +05:30
Jakob Olsson
478e87d472 map-controller: 2.8.0.12 2022-10-12 17:23:58 +02:00
Rahul Thakur
05829038fa ponmngr: update serial number generation logic 2022-10-12 13:22:29 +00:00
Jakob Olsson
5cffc3cae3 map-agent: add ip-bridge dependency 2022-10-12 09:54:08 +02:00
Jakob Olsson
904f18411d map-agent: initd: remove legacy vlan setup 2022-10-12 09:29:57 +02:00
Anjan Chanda
f8ba7f0dcf ieee1905: 4.10.15 2022-10-11 22:32:14 +02:00
Jakob Olsson
5cb8608927 map-agent: 2.10.0.20 2022-10-11 16:34:14 +02:00
Jakob Olsson
9acead4347 map-controller: 2.8.0.11 2022-10-11 15:44:48 +02:00
Janusz Dziedzic
42bec0b4c8 wifimngr: 14.0.9
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-11 08:31:21 +00:00
Janusz Dziedzic
f038e661b6 easy-soc-libs: 6.4.50
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-10-11 08:30:20 +00:00
Jakob Olsson
84f93c585d map-controller: 2.8.0.10 2022-10-10 18:16:38 +02:00
Jakob Olsson
f609fe8845 Revert "map-agent: 2.10.0.20"
This reverts commit f254adbfb2.
2022-10-10 18:15:58 +02:00
Jakob Olsson
f254adbfb2 map-agent: 2.10.0.20 2022-10-10 18:15:44 +02:00
vdutta
a41fa2790e bbf: 6.8.9.17 2022-10-10 10:48:05 +05:30
vdutta
6c16e88598 icwmp: 8.4.25.6 2022-10-10 10:32:48 +05:30
Jakob Olsson
3c581fca1a map-agent: 2.10.0.19 2022-10-07 15:12:27 +02:00
Jakob Olsson
035263a450 map-agent: 2.10.0.18 2022-10-06 15:40:42 +02:00
vdutta
11287b6faa bbf: 6.8.9.16 2022-10-06 18:22:24 +05:30
suvendhu
b6371cba1a icwmpd: 8.4.25.5 2022-10-06 18:19:46 +05:30
vdutta
c5097fc375 obuspa: 5.0.0.16.3 2022-10-06 14:42:20 +05:30
Grzegorz Sluja
ebaab686ed dectmngr: Change DECT handset presence check to RSSI request 2022-10-05 14:54:42 +02:00
vdutta
c758ec49fe bulkdata: 2.0.3.1 2022-10-04 12:11:45 +05:30
vdutta
84a52004bb bbf: 6.8.9.15 2022-10-04 12:10:28 +05:30
Marek Puzyniak
85df013680 map-agent: 2.10.0.17 2022-10-03 17:12:20 +00:00
Jakob Olsson
5c491c84dd map-agent: multiap: del vid on iface teardown 2022-10-03 17:04:17 +02:00
Jakob Olsson
ef34422a54 map-agent: 2.10.0.16 2022-10-03 16:01:27 +02:00
Jakob Olsson
50949e63b0 map-controller: 2.8.0.9 2022-09-30 16:11:56 +02:00
Filip Matusiak
38a07a87a0 map-controller: load rcpi plugin by default
Signed-off-by: Filip Matusiak <filip.matusiak@iopsys.eu>
2022-09-30 14:09:45 +00:00
Jakob Olsson
eb0cf4f1fa map-controller: 2.8.0.8 2022-09-30 12:49:55 +02:00
Jakob Olsson
1a15a4c42d map-topology: 2.5.0.12 2022-09-30 12:49:23 +02:00
Jakob Olsson
cd262d78b6 map-agent: 2.10.0.15 2022-09-30 12:48:57 +02:00
Jakob Olsson
654c047df7 map-controller: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:48:32 +02:00
Jakob Olsson
28cf302e58 map-agent: pass CFLAGS EASYMESH_VENDOR_EXT 2022-09-30 12:48:32 +02:00
Janusz Dziedzic
972eb125f0 easy-soc-libs: 6.4.49
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-27 13:18:27 +00:00
vdutta
d429fd24ee icwmp: 8.4.25.4 2022-09-26 19:10:36 +05:30
vdutta
6dda009eb5 twamp: 1.2.2
(cherry picked from commit 2660d8ad2e)
2022-09-26 09:07:26 +00:00
Janusz Dziedzic
84754a2704 map-agent: enable pktfwd when no TS
Enable pktfwd again when we disable
traffic separation.
Flush also FlowCache rules.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-23 10:21:30 +00:00
vdutta
4a0a34cc19 bbf: 6.8.9.14 2022-09-23 15:29:02 +05:30
vdutta
4c0aac777e icwmp: 8.4.25.3 2022-09-23 08:51:45 +05:30
Anjan Chanda
0c14c69c2c wfadatad: 2.10.0.1 2022-09-22 21:21:55 +02:00
Jakob Olsson
f44fdd8db1 map-agent: 2.10.0.14 2022-09-22 10:58:44 +02:00
Jakob Olsson
1d849bd57a map-agent: ts: add func to clean stale vids from network conf 2022-09-22 10:58:28 +02:00
Janusz Dziedzic
d906c17eb0 easy-soc-libs: 6.4.48
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-21 18:22:51 +00:00
Jakob Olsson
dffe253f12 map-agent: 2.10.0.13 2022-09-21 12:17:22 +02:00
Sukru Senli
b26ddb4edb evoice: remove from 6.5 as it is incomplete 2022-09-20 17:47:59 +02:00
Jakob Olsson
eff6d9b96b map-agent: 2.10.0.12 2022-09-20 16:26:07 +02:00
suvendhu
2e852c5a99 twamp: 1.2.1
(cherry picked from commit 2391836769)
2022-09-20 13:02:26 +00:00
vdutta
3ee627c4ce bbf: 6.8.9.13 2022-09-20 15:06:13 +05:30
Jakob Olsson
726982c3e6 map-agent: 2.10.0.11 2022-09-20 10:50:10 +02:00
Janusz Dziedzic
ab6c67f643 map-agent: 2.10.0.10
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 13:10:22 +00:00
vdutta
06f7f65b4d icwmp: 8.4.25.2 2022-09-19 16:28:21 +05:30
Jakob Olsson
77f7315b53 map-agent: 2.10.0.9 2022-09-19 12:03:27 +02:00
Janusz Dziedzic
47f8651078 map-agent: 2.10.0.8
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 09:25:31 +00:00
Janusz Dziedzic
b903a4f332 wifimngr: 14.0.8
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 08:45:34 +00:00
Janusz Dziedzic
b627749ae6 easy-soc-libs: 6.4.47
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-19 08:44:28 +00:00
Jakob Olsson
62120c6769 map-agent: 2.10.0.7 2022-09-16 16:18:14 +02:00
Jakob Olsson
13bf602a93 map-agent: 2.10.0.6 2022-09-15 13:58:44 +02:00
Grzegorz Sluja
be36ca0ab0 endptmngr: Add debug for RTP statistics received from Brcm 2022-09-15 08:06:32 +02:00
Jakob Olsson
3bf9566a62 map-agent: 2.10.0.5 2022-09-14 11:47:00 +02:00
Jakob Olsson
3a6295d370 map-topology: 2.5.0.11 2022-09-13 12:03:02 +02:00
Jakob Olsson
7418afc3e1 map-agent: 2.10.0.4 2022-09-12 10:44:20 +02:00
vdutta
026814da18 bbf: 6.8.9.12 2022-09-09 15:26:00 +05:30
Jakob Olsson
a11c28214c map-agent: 2.10.0.3 2022-09-09 11:34:11 +02:00
Jakob Olsson
9af889d28e map-agent: 2.10.0.2 2022-09-09 09:48:43 +02:00
Jakob Olsson
70294978f5 6.5 vlan teardown 2022-09-08 13:28:07 +00:00
Anjan Chanda
be01ee85f6 ieee1905: 4.10.14 2022-09-08 10:16:38 +02:00
Erik Karlsson
72e5126a0f icwmp: fix starting of icwmpd when enabled
When disabling, it is necessary to run start after stop. This will not
actually start icwmpd as there is a condition in start_service but it
is needed for the triggers to be registered. Otherwise, icwmpd will
not start later when enabled.
2022-09-08 11:52:04 +05:30
vdutta
038f5af58f bbf: 6.8.9.11 2022-09-08 11:50:14 +05:30
Anjan Chanda
9d6d189707 wfadatad: 2.8.1.5 2022-09-06 20:45:59 +02:00
Jakob Olsson
3f1aae0d5a map-agent: 2.10.0.0 2022-09-06 16:09:03 +02:00
Janusz Dziedzic
e15dd68933 map-agent: ts: use PVID for eth ports
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
Janusz Dziedzic
5cd72947e9 map-agent: ts: skip eth name check add wlanX.staY
On DSA platform we could have lan/lanX/wan ports.
Tested on ex400.

Version: 2.10.2.0

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
Janusz Dziedzic
24cb62f6e3 map-agent: verD: files traffic_separation
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-09-06 16:08:51 +02:00
vdutta
9910cde335 obuspa: Fix zombie instances for non-existent parameters 2022-09-06 11:52:31 +05:30
Anjan Chanda
63cfcd9968 wfadatad: 2.8.1.1 2022-09-05 21:16:16 +02:00
vdutta
cf91dc7a2a bbf: 6.8.9.10 2022-09-05 16:49:20 +05:30
Anjan Chanda
122b14c8b0 map-topology: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:22 +02:00
Anjan Chanda
7eb490ce87 map-controller: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:13 +02:00
Anjan Chanda
38cb923a38 map-agent: add config EASYMESH_VENDOR_EXT_OUI 2022-09-02 13:44:00 +02:00
Jakob Olsson
5b8dca53e9 map-topology: 2.5.0.10 2022-09-02 10:39:24 +02:00
Jakob Olsson
4799456b48 Map-agent: 2.9.1.2 2022-09-02 10:38:18 +02:00
Jakob Olsson
50492f67c3 map-controller: 2.8.0.7 2022-09-02 10:36:55 +02:00
Sukru Senli
717b83f0e4 sulu: 1.0.16 2022-08-31 15:12:40 +02:00
vdutta
d7da9d900c swmodd: Added cgroup mount handler package 2022-08-31 17:57:45 +05:30
Jakob Olsson
ebf076b539 map-agent: 2.9.1.1 2022-08-31 13:42:10 +02:00
vdutta
4a843187c8 bbf: 6.8.9.9 2022-08-31 16:09:49 +05:30
Jakob Olsson
94aa904234 map-agent: 2.9.1.0 2022-08-31 12:27:38 +02:00
Jakob Olsson
ebc7ab4334 map-agent: multiap: update bsta_clear_bssid API 2022-08-30 17:06:32 +02:00
Grzegorz Sluja
f30abfe5bd dectmngr: Send CMBS_EV_DEE_CALL_ANSWER to target when the remote party answers an outgoing call 2022-08-30 14:30:52 +02:00
Grzegorz Sluja
61882e980a endptmngr: Inform dectmngr about answer-call signal from asterisk 2022-08-30 14:29:32 +02:00
Sukru Senli
739faa80fe sulu: 1.0.15 2022-08-26 14:28:26 +02:00
Jakob Olsson
3ccc122539 wfadatad: 2.8.1.0 2022-08-26 13:41:04 +02:00
Jakob Olsson
eac510d7ea map-agent: 2.9.0.8 2022-08-25 16:57:46 +02:00
vdutta
1d34ac77e5 bbf: 6.8.9.8 2022-08-22 09:35:57 +05:30
Sukru Senli
e79f917e7e sulu-1.0.14 2022-08-19 13:37:53 +02:00
vdutta
bf59291610 bbf: 6.8.9.7 2022-08-19 15:58:38 +05:30
Jakob Olsson
17b223d35f map-agent: 2.9.0.7 2022-08-19 11:42:29 +02:00
Jakob Olsson
755efd42ae map-agent: 2.9.0.6 2022-08-19 10:58:05 +02:00
Rahul
46b8d717d5 urlfilter: update dns transaction id generation 2022-08-19 08:16:55 +05:30
Rahul Thakur
9be656695c ponmngr: configure serial no. at start 2022-08-17 17:51:19 +00:00
Jakob Olsson
8c242bbdad wfa-capi: 1.1.3 2022-08-17 10:20:51 +02:00
Jakob Olsson
d36da9d94b map-topology: 2.5.0.9 2022-08-15 09:08:22 +02:00
Anjan Chanda
ec4ac5a195 wfadatad: 2.8.0.2 2022-08-12 10:32:14 +02:00
Grzegorz Sluja
238f8bf928 dectmngr: Release the incoming call if it cannot be proceeded 2022-08-09 12:33:49 +02:00
Grzegorz Sluja
787abf300f endptmngr: Send DECT_UNAVAILABLE event to Asterisk if there is no handset available for an incoming call 2022-08-09 12:31:31 +02:00
Erik Karlsson
a96c18eb17 mosquitto-auth-shadow: initial implementation
Plugin for the mosquitto MQTT broker that allows authentication of
users via /etc/shadow
2022-08-09 12:11:05 +05:30
vdutta
f3d05939c8 sulu: Use system login credential for mqtt auth 2022-08-09 10:49:52 +05:30
vdutta
d438d4d269 bbf: 6.8.9.6 2022-08-09 10:43:04 +05:30
vdutta
b4985825c6 bbf: Free mem check before up/download diagnostics 2022-08-05 09:33:09 +05:30
nevadita.chatterjee
9fa8f7c8a6 ieee1905: 4.10.6 2022-08-04 09:35:55 +02:00
Grzegorz Sluja
5195434ee0 dectmngr: Release the incoming call if it cannot be proceeded 2022-08-03 11:09:04 +02:00
Grzegorz Sluja
1c4fee3b2d endptmngr: Send DECT_UNAVAILABLE event to Asterisk if there is no free DECT handset 2022-08-03 11:07:29 +02:00
vdutta
4d609b0d4c bbf: 6.8.9.4 2022-08-01 20:57:48 +05:30
Marek Puzyniak
9f2e663c66 easy-soc-libs: 6.4.46
Signed-off-by: Marek Puzyniak <marek.puzyniak@iopsys.eu>
2022-07-29 12:58:29 +00:00
Rahul
02de70ad19 qosmngr: update queue setup
Update q setup that allows better coverage of q setup specially in
mixed mode scheduling.
Also remove dead code related to stats since that is already taken
care of by qosmngr daemon now.
And lastly, simplify the logic to calculate q precedence.
2022-07-29 10:47:35 +00:00
vdutta
15dd3f227c bbf: Optimal memory allocation for json plugins 2022-07-29 10:45:46 +05:30
Grzegorz Sluja
2dab01fcf7 dectmngr: Add new dspg FW 4.13 Build17 2022-07-28 09:54:49 +02:00
vdutta
f1f31b1373 bbf: 6.8.9.2 2022-07-27 13:04:31 +05:30
vdutta
c405f8d9aa obuspa: Support for async operate restart callback 2022-07-27 12:58:29 +05:30
vdutta
2a3128f08c uspd: 2.2.14 2022-07-27 11:23:35 +05:30
vdutta
3d4aac4cef uspd: 2.2.13 2022-07-27 11:23:24 +05:30
vdutta
0f7d11e247 bbf: 6.8.9.1 2022-07-22 19:25:58 +05:30
Amin Ben Ramdhane
10407ee99a bbf: 6.8.9 2022-07-22 19:21:05 +05:30
Amin Ben Ramdhane
9ee39a451f uspd: 2.2.12 2022-07-22 19:20:24 +05:30
Jakob Olsson
141fd56567 map-controller: 2.8.0.6: add enable_ts uci docs and validator 2022-07-22 10:28:51 +02:00
nevadita.chatterjee
2f91df7419 map-topology: 2.5.0.8 2022-07-22 10:49:34 +05:30
Rahul
5e4a805880 ponmngr: resolve pon startup issues 2022-07-22 03:54:41 +00:00
Jakob Olsson
11f5012b63 map-controller: add enable_ts to example config 2022-07-21 17:01:57 +02:00
Jakob Olsson
4776861483 map-agent: 2.9.0.5 2022-07-21 16:34:15 +02:00
Jakob Olsson
40f255189f ieee1905: 4.10.5 2022-07-19 17:29:27 +02:00
Jakob Olsson
b71991ac56 map-agent: traffic_separation: do network restart if vid mapping is incorrect on reload 2022-07-19 15:28:34 +00:00
vdutta
5c9d1f09a6 stunc: 1.1.12 2022-07-18 19:16:43 +05:30
vdutta
c3ba98f2f3 icwmp: 8.4.25.1 2022-07-18 19:16:00 +05:30
Amin Ben Ramdhane
307b828994 bbf: 6.8.8 2022-07-15 17:33:29 +05:30
Jakob Olsson
1dbacbb880 ieee1905: 4.10.4 2022-07-15 13:59:46 +02:00
suvendhu
387be147e6 icwmp: fix icwmpd infinite restart 2022-07-14 15:59:10 +05:30
vdutta
75988519f5 icwmp: 8.4.24 2022-07-14 15:58:57 +05:30
Jakob Olsson
f46f994ce2 map-controller: 2.8.0.5 2022-07-13 17:46:27 +02:00
Jakob Olsson
40a43b643c map-topology: 2.5.0.7 2022-07-13 13:35:38 +02:00
Anjan Chanda
80fe362716 ieee1905: 4.10.3 2022-07-12 15:52:09 +02:00
Jakob Olsson
72b385e50f map-agent: 2.9.0.4 2022-07-12 15:06:36 +02:00
Jakob Olsson
853f895c6d map-controller: 2.8.0.4 2022-07-12 09:56:03 +02:00
Jakob Olsson
03b1576b8d map-agent: 2.9.0.3 2022-07-12 09:56:03 +02:00
Jakob Olsson
6e738b7fcb ieee1905: 4.9.9 2022-07-12 09:56:03 +02:00
Amin Ben Ramdhane
5b3e5d157d bbf: 6.8.7 2022-07-11 19:22:53 +05:30
vdutta
018a530f35 icwmp: 8.4.23 2022-07-11 15:57:48 +05:30
Jakob Olsson
12d3905280 ieee1905: add default script setting alid 2022-07-08 13:55:30 +02:00
Jakob Olsson
47b176a94c Map-agent: 2.9.0.2 2022-07-06 22:18:29 +02:00
Sukru Senli
12ff0f953d sulu: 1.0.12 2022-07-06 17:09:18 +02:00
Jakob Olsson
47a250754f map-controller: 2.8.0.3 2022-07-06 17:07:43 +02:00
Jakob Olsson
5b0e926cd9 ieee1905: 4.9.8 2022-07-06 15:59:49 +02:00
Jakob Olsson
18453ce68e map-agent: 2.9.0.1 2022-07-06 15:50:29 +02:00
Jakob Olsson
12645e7525 map-controller: 2.8.0.2 2022-07-06 15:49:30 +02:00
Sukru Senli
73e354c8cc sulu: 1.0.11 2022-07-06 10:33:46 +02:00
Jakob Olsson
abdd812601 map-agent: simplify pvid unset default script 2022-07-01 16:58:54 +02:00
Jakob Olsson
e56c279786 map-agent: add uci-default script setting pvid to 0 2022-07-01 16:33:34 +02:00
Yalu Zhang
e01fbf3fad Update package bbf: Fix voice CallLog filter
Fix the SIP response code handling and optimization
(cherry picked from commit d70c637aa4)
2022-07-01 14:00:21 +00:00
Amin Ben Ramdhane
22b37efad9 bbf: 6.8.6 2022-06-30 14:30:57 +02:00
Jakob Olsson
5628a1bee6 ieee1905: 4.9.7 2022-06-30 14:23:44 +02:00
Janusz Dziedzic
6d9c8d1090 map-agent: check no HT configured
We hit this on arcee - simplest workaround.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-06-29 16:58:51 +00:00
vdutta
dee5ea0da3 icwmp: 8.4.22 2022-06-29 21:01:31 +05:30
Jakob Olsson
0c6dad2c58 ieee1905: 4.9.6 2022-06-29 16:43:30 +02:00
Amin Ben Ramdhane
f9cd9c627e bbf: 6.8.5 2022-06-28 21:41:44 +05:30
Grzegorz Sluja
31f03a7b47 dectmngr-3.5.4: Fix for setting extension_id for handset 2022-06-28 17:27:23 +02:00
Jakob Olsson
50d2408ddb map-topology: 2.5.0.6 2022-06-28 14:15:00 +02:00
Amin Ben Ramdhane
79f5bbd0cf bbf: 6.8.4 2022-06-28 15:43:42 +05:30
Amin Ben Ramdhane
58fdac62b0 icwmp: 8.4.21 2022-06-28 15:43:20 +05:30
Amin Ben Ramdhane
32192f5423 icwmp: regenerate ssl link in boot() 2022-06-28 09:05:39 +05:30
Amin Ben Ramdhane
35bb02b726 bbf: 6.8.2 2022-06-27 20:31:30 +05:30
vdutta
77536709f0 bbf: 6.8.1 2022-06-24 13:19:15 +05:30
vdutta
e67a5e505f icwmp: 8.4.20 2022-06-24 13:18:45 +05:30
vdutta
cd7826de33 obuspa: 5.0.0.16 2022-06-24 13:18:22 +05:30
vdutta
c09a4a0ca5 uspd: Move TransferComplete event to obuspa 2022-06-24 13:17:30 +05:30
Grzegorz Sluja
49e7f2e349 dectmngr: Fix for setting extension_id for handset 2022-06-24 09:45:24 +02:00
vdutta
44e614d8e2 inbd: Fix static code analysis warnings 2022-06-24 00:09:28 +02:00
Jakob Olsson
dba358a542 map-agent: traffic_separation: reload netifd by ubus call uci commit 2022-06-23 12:02:40 +02:00
vdutta
6688812576 obuspa: 5.0.0.15 2022-06-23 15:26:32 +05:30
vdutta
9b14d0574f icwmp: 8.4.19 2022-06-23 15:19:09 +05:30
Amin Ben Ramdhane
82bf3bbba4 bbf: 6.8.0 2022-06-23 15:18:06 +05:30
Amin Ben Ramdhane
311273865d bbf: 6.7.9 2022-06-23 15:17:44 +05:30
vdutta
e64714e538 obuspa: Added option to verify the mqtt received topic 2022-06-23 15:15:07 +05:30
Jakob Olsson
f29ade1e60 map-topology: 2.5.0.5 2022-06-22 13:48:00 +02:00
vdutta
ddf6d7ba32 icwmp: 8.4.18 2022-06-22 11:10:29 +05:30
suvendhu
803be5fcad icwmp: 8.4.17 2022-06-22 11:10:00 +05:30
Amin Ben Ramdhane
08abbdfe5b periodicstats: 1.2.0 2022-06-22 11:09:32 +05:30
Grzegorz Sluja
3ad949442c Update package endptmngr
Return to the first call without playing any tones on DECT handset when the second call ends
2022-06-21 15:20:44 +02:00
Jakob Olsson
6b37f2fccb map-controller: 2.8.0.1 2022-06-17 13:51:08 +02:00
Jakob Olsson
8d3aa2aa60 map-controller: 2.8.0.0 2022-06-17 11:07:01 +02:00
Jakob Olsson
9f5d5eb347 map-agent: 2.9.0.0 2022-06-17 11:07:01 +02:00
Stanislaw Gruszka
2d9a47073b map-agent: ts: reload firewall 2022-06-16 17:55:41 +02:00
Stanislaw Gruszka
dc0ab5dbd3 map-agent: ts: configure firewall 2022-06-16 17:55:41 +02:00
Stanislaw Gruszka
f513b5ba46 map-agent: traffic separation script rework 2022-06-16 17:55:41 +02:00
vdutta
aa5e98a35c obuspa: 5.0.0.13 2022-06-16 19:27:56 +05:30
Amin Ben Ramdhane
051c6f2cc1 bbf: 6.7.8 2022-06-16 19:27:30 +05:30
vdutta
aa2a78e211 obuspa: 5.0.0.12 2022-06-15 20:30:34 +05:30
vdutta
063d20932a urlfilter: 1.1.3 2022-06-15 17:57:09 +05:30
vdutta
59752df3d4 bbf: 6.7.7 2022-06-15 17:56:33 +05:30
Grzegorz Sluja
66f28e376d endptmngr: Fixes for call waiting and 3way call scenarios 2022-06-15 10:32:41 +02:00
Jakob Olsson
fbb6a84da8 map-agent: add missing uci validation and new cfg option to default 2022-06-14 15:13:13 +02:00
vdutta
bcd8b4f010 bbf: 6.7.6 2022-06-14 18:34:26 +05:30
vdutta
e98ef22bc5 icwmp: 8.4.16 2022-06-14 18:33:59 +05:30
Jakob Olsson
c45938f5ad map-topology: 2.5.0.4 2022-06-14 09:50:03 +02:00
Jakob Olsson
05b24396af map-agent: 2.8.1.2 2022-06-13 17:34:57 +02:00
Jakob Olsson
ba0e9e25ba map-agent: 2.8.1.1 2022-06-13 17:21:10 +02:00
Jakob Olsson
a6005cb439 map-agent: 2.8.1.0 2022-06-13 16:50:32 +02:00
Jakob Olsson
3ebb026453 map-agent: multiap: manage wpa_supplicant bssid_ignore 2022-06-13 16:50:32 +02:00
Jakob Olsson
921b0fc335 map-agent: multiap: introduce func to clear bssid of all bstas 2022-06-13 16:04:00 +02:00
vdutta
10eeef5a32 bbf: 6.7.5 2022-06-10 20:15:17 +05:30
vdutta
a55c39c32e uspd: 2.2.10 2022-06-10 20:12:26 +05:30
vdutta
70422f048b icwmp: 8.4.15 2022-06-10 18:42:05 +05:30
Jakob Olsson
8670fb8e7d map-topology: 2.5.0.3 2022-06-10 10:51:46 +02:00
Jakob Olsson
54ddfb5b2d map-topology: 2.5.0.2 2022-06-09 14:17:58 +02:00
Amin Ben Ramdhane
e8cdea9a79 bbf: 6.7.5 2022-06-09 17:09:43 +05:30
Amin Ben Ramdhane
7613b55f49 uspd: 2.2.9 2022-06-09 16:10:03 +05:30
Amin Ben Ramdhane
ecc65760b7 bbf: 6.7.3 2022-06-09 16:10:03 +05:30
Amit Kumar
053c36c1c7 qosmngr: updated QoS clasification
l3 iptables rule with ethx was not matching this was causing incorrect classification to wrong queue.
ebtables rule correction done with ethertype,protocol and port to classify packet for destination queue.
2022-06-09 06:31:02 +00:00
Grzegorz Sluja
7d9325abff dectmngr: Fix scenario when active call hangs up and return to onhold call 2022-06-08 17:55:07 +02:00
vdutta
baee22e19f urlfilter: 1.1.2 2022-06-08 19:57:25 +05:30
vdutta
cc765c2704 uspd: 2.2.8 2022-06-08 09:34:43 +05:30
vdutta
2ae8cd2987 bbf: 6.7.2 2022-06-08 09:33:47 +05:30
Sukru Senli
1ce681afac sulu: 1.0.10 2022-06-07 19:59:59 +02:00
vdutta
b66629350d icwmp: 8.4.14 2022-06-07 20:53:57 +05:30
vdutta
3a6dce64de stunc: 1.1.11 2022-06-07 19:13:09 +05:30
Jakob Olsson
fbf4c2d7ed map-topology: 2.5.0.1 2022-06-03 17:07:09 +02:00
Yalu Zhang
57386b0e87 Update packages endptmngr and dectmngr
Support call waiting and 3 way call for DECT
2022-06-03 13:58:32 +02:00
Jakob Olsson
37505a1c24 map-agent: 2.8.0.5 2022-06-03 09:36:44 +02:00
Jakob Olsson
4b28a1cd4a map-agent: 2.8.0.4 2022-06-02 15:16:25 +02:00
Jakob Olsson
26fff3a9ac wfadatad: 2.8.0.1 2022-06-02 09:59:34 +02:00
Jakob Olsson
fe3592b382 map-controller: 2.7.0.1 2022-06-01 10:17:23 +02:00
Jakob Olsson
78cc239b3d map-agent: 2.8.0.3 2022-05-31 15:58:50 +02:00
Yalu Zhang
714c822e7d Update package endptmngr and dectmngr
dectmngr-3.5.2: Release the call completely when the first handset rejects an incoming call
endptmngr: Send CALL_REJECT event to Asterisk when DECT handset rejects the call
2022-05-31 14:48:56 +02:00
Anjan Chanda
d5d8cbff6e ieee1905: 4.9.5 2022-05-31 10:57:28 +02:00
Jakob Olsson
66f5f5315a map-agent: 2.8.0.2 2022-05-30 17:08:09 +02:00
Jakob Olsson
96a8f4f8fa map-agent: 2.8.0.1 2022-05-30 16:05:12 +02:00
Jakob Olsson
80b71b4a9c map-agent: 2.8.0.0 with new license update for release-6.5 2022-05-30 14:49:31 +02:00
Jakob Olsson
cb86ec3c50 Revert "map-agent: 2.8.0.0 with new license update"
This reverts commit 2e30eb75b5.
2022-05-30 14:48:18 +02:00
Sukru Senli
6451da621d wfadatad: 2.8.0.0 BSD-3-Clause license change 2022-05-30 14:41:11 +02:00
Sukru Senli
8596640c59 map-agent: update license to BSD-3-Clause 2022-05-30 14:35:42 +02:00
Sukru Senli
e61adabad1 map-controller: update license to BSD-3-Clause 2022-05-30 14:35:29 +02:00
Sukru Senli
2e30eb75b5 map-agent: 2.8.0.0 with new license update 2022-05-30 13:28:22 +02:00
Sukru Senli
b00dbbfc16 map-topology: 2.5.0.0 with new license update 2022-05-30 13:24:34 +02:00
suvendhu
7acb31977c twamp: 1.2.0 2022-05-30 14:19:21 +05:30
Jakob Olsson
8f075c2dde map-agent: 2.7.2.6 2022-05-30 10:33:31 +02:00
Sukru Senli
15ab530afb usp-js: add license 2022-05-28 18:38:18 +02:00
Sukru Senli
d7d28d4d53 smwodd: add license 2022-05-28 18:34:41 +02:00
Sukru Senli
ac05fc5e09 map-topology: correct license 2022-05-28 18:07:20 +02:00
Sukru Senli
affd3a59ee shflags: remove unused package 2022-05-28 18:07:17 +02:00
Sukru Senli
702558940f libmicroxml: remove unused package 2022-05-28 18:07:09 +02:00
Sukru Senli
96af293828 sulu: 1.0.9 2022-05-27 16:07:31 +02:00
vdutta
9220eaab7f bbf: 6.6.43 2022-05-26 18:56:25 +05:30
Jakob Olsson
d2e6343808 map-topology: 2.4.0.5 2022-05-25 18:52:49 +02:00
sverma
8b71e43391 wfadatad: 2.7.0.7 2022-05-25 20:42:01 +05:30
Sukru Senli
b12b3dcf79 sulu: 1.0.8 2022-05-25 17:08:48 +02:00
vdutta
2af76e93d6 bbf: 6.6.42 2022-05-25 20:10:31 +05:30
Jakob Olsson
8eff3b57e7 map-agent: 2.7.2.5 2022-05-25 16:31:56 +02:00
vdutta
24470ed5f8 icwmp: 8.4.12 2022-05-25 19:40:16 +05:30
Sukru Senli
aba55434de sulu: 1.0.7 2022-05-25 15:33:40 +02:00
vdutta
49a4936cc0 swmodd: 2.1.5 2022-05-25 18:17:30 +05:30
vdutta
1d63ac6583 questd: 5.2.4 2022-05-25 18:13:52 +05:30
vdutta
bb9f180b77 rulengd: 1.2.7 2022-05-25 18:13:28 +05:30
Jakob Olsson
64c624c281 ieee1905: 4.9.2 2022-05-25 12:40:59 +02:00
vdutta
d7946e13f1 bbf: 6.6.41 2022-05-24 19:18:44 +05:30
vdutta
baa19aad3f bbf: Heartbeat support 2022-05-24 19:12:42 +05:30
vdutta
48c0d51e0e icwmp: Heartbeat support 2022-05-24 19:12:01 +05:30
vdutta
f0301c8a45 bbf: 6.6.39 2022-05-24 11:59:32 +05:30
vdutta
458a57bbb7 swmodd: 2.1.4 2022-05-24 11:58:55 +05:30
Sukru Senli
ebcee30bce sulu: 1.0.6 2022-05-23 11:41:00 +02:00
Sukru Senli
34f90babf5 sulu: 1.0.5 2022-05-20 15:44:41 +02:00
Jakob Olsson
34dc1fed4b map-topology: 2.4.0.4 2022-05-20 13:09:08 +02:00
vdutta
7633ca403c periodicstats: 1.1.3 2022-05-20 10:15:46 +05:30
vdutta
ec392c923c icwmp: 8.4.10 2022-05-20 10:14:59 +05:30
Stanislaw Gruszka
24205bf73f iop: config: enable ip-bridge 2022-05-19 14:42:33 +00:00
Jakob Olsson
76b1e43b6f map-topology: 2.4.0.3 2022-05-19 14:52:09 +02:00
Jakob Olsson
4672afb6de ieee1905: 4.9.1 2022-05-19 13:16:15 +02:00
Jakob Olsson
d2ff5738cd wfadatad: 2.7.0.6 2022-05-19 13:13:45 +02:00
Jakob Olsson
43246014e1 map-topology: 2.4.0.2 2022-05-19 13:03:44 +02:00
Amin Ben Ramdhane
115b752ade bbf: 6.6.38
(cherry picked from commit 62935f5016)
2022-05-19 03:26:06 +00:00
Amin Ben Ramdhane
26b06548f6 udpecho: 2.0.1
(cherry picked from commit 3b7b6fd627)
2022-05-19 03:25:18 +00:00
vdutta
6c99b9fc72 icwmp: 8.4.9
(cherry picked from commit d68a6add62)
2022-05-19 03:24:23 +00:00
vdutta
135ebebd44 stunc: 1.1.9
(cherry picked from commit 12b6a72a48)
2022-05-19 03:23:13 +00:00
Jakob Olsson
2d188b5c37 map-agent: 2.7.2.4 2022-05-18 14:53:58 +02:00
Amit KUmar
14ce1429a4 map-topology: per host statistics collection
included conntrack netfilter library
2022-05-18 10:32:31 +02:00
Jakob Olsson
a6b585cccf map-agent: multiap: lock operations on backhaul file 2022-05-18 10:29:40 +02:00
Amit KUmar
6db304b6ff qosmngr: WRR schdeuling configuration
sequence corrected in initialization as first tm initialization
then delcfg. porttminit bydefault does queue configuration as SP.
2022-05-17 17:07:46 +02:00
Amin Ben Ramdhane
817a7e8301 bbf: 6.6.37 2022-05-17 17:06:49 +02:00
Jakob Olsson
e8790801d0 map: prepend all multiap packages version number with the supported revision 2022-05-17 15:11:03 +02:00
Jakob Olsson
a6790ac523 map-agent: 7.2.3 2022-05-17 15:07:40 +02:00
Jakob Olsson
76656bb043 map-controller: 6.0.22 2022-05-17 13:08:18 +02:00
Erik Karlsson
abd741b9e6 map-agent: multiap: fix subshell invocation 2022-05-16 15:12:36 +00:00
Jakob Olsson
c33fd589fb map-agent: 7.2.2 2022-05-16 14:47:43 +02:00
Jakob Olsson
b1750ac6ba map-agent: add missing option validation 2022-05-16 14:40:33 +02:00
Jakob Olsson
de51136608 map-controller: add missing option validation 2022-05-16 13:07:52 +02:00
Sukru Senli
3da3e6b86d dectmngr: do not use hardcoded gpio for dect 2022-05-16 12:54:52 +02:00
Anjan Chanda
fdba0d497a wfadatad: also wait_for 'topology' object 2022-05-16 12:02:51 +02:00
Anjan Chanda
4092c0e43f wfadatad: 7.0.5 2022-05-16 11:35:30 +02:00
Rahul
4b06b07acf ponmngr: first drop
- Most fundamental uci mapping to proposed XPON.ONU.i.ANI.i.Enable
  object in 2.16
- The init scripts to procd trigger relevant components
2022-05-13 13:36:16 +00:00
Amin Ben Ramdhane
6636e7ff47 bbf: 6.6.36 2022-05-13 11:47:29 +01:00
vdutta
ec8a7cffa2 stunc: 1.1.8 2022-05-13 14:18:33 +05:30
Amin Ben Ramdhane
41cdc9672c bbf: 6.6.35 2022-05-12 16:40:16 +01:00
Amin Ben Ramdhane
6fdf37e179 bbf: 6.6.34 2022-05-12 00:11:14 +01:00
Anjan Chanda
60c198e2e2 map-topology: fix package build dependency 2022-05-11 21:29:04 +02:00
vdutta
154b8465a6 iop: Align with udpecho 2022-05-11 20:34:11 +05:30
Amin Ben Ramdhane
d352796d46 udpecho: 2.0.0 2022-05-11 15:26:13 +01:00
Amin Ben Ramdhane
562aefcab2 bbf: 6.6.33 2022-05-11 15:25:31 +01:00
Jakob Olsson
a4c6aec761 map-agent: 7.2.1 2022-05-11 10:24:14 +02:00
vdutta
0e1894e5ff bbf: 6.6.32
- Change libbbf_api to empty package
- Generate dummy/empty libbbf_api.so to prevent linking with binaries, as
  libbbf_api only provides APIs to build plugins for libbbf datamodel
- For packages which also generate bbf datamodel plugins, it is suggested to
  use PKG_BUILD_DEPENDS:=bbf, in place of package dependency on libbbf_api
2022-05-11 12:52:23 +05:30
vdutta
ca89315960 periodicstats: 1.1.2 2022-05-11 12:51:00 +05:30
vdutta
5764f7dd1d periodicstats: 1.1.1 2022-05-10 20:03:12 +05:30
Yalu Zhang
3d2b69bd33 evoice: Change the tx/rx gain to 0 in the default config
Transmit and receive gain shall be set as 0 according to Broadcom's support.
2022-05-10 16:17:07 +02:00
Anjan Chanda
56bfdfaf57 map-topology: 4.0.1 - remove build-time dependencies on ieee1905 2022-05-10 16:11:27 +02:00
Jakob Olsson
28835fc0ea map-agent: 7.2.0 2022-05-10 16:10:08 +02:00
Jakob Olsson
0f7d057261 map-agent: multiap: set disabled upon teardown 2022-05-10 16:09:44 +02:00
vdutta
9aaef85895 icwmp: 8.4.8 2022-05-10 17:56:35 +05:30
vdutta
50e1be5214 obuspa: 5.0.0.11 2022-05-10 17:04:35 +05:30
Jakob Olsson
13f1dcfdc3 map-controller: 6.0.21 2022-05-10 10:32:08 +02:00
vdutta
545f41ab6a bulkdata: 2.0.3 2022-05-09 19:29:25 +05:30
vdutta
a5306cb837 bbf: 6.6.31 2022-05-09 16:03:14 +05:30
Jakob Olsson
415768dd71 map-controller: config: add default values for agent and node section 2022-05-09 12:01:50 +02:00
vdutta
744bd43658 icwmp: 8.4.7 2022-05-09 14:39:07 +05:30
vdutta
f6cdb4c55d bbf: 6.6.30 2022-05-09 14:37:38 +05:30
Anjan Chanda
01d009734c ieee1905: 4.8.0 2022-05-09 10:53:09 +02:00
vdutta
120e333a67 libtrace: Fix iterative compilation 2022-05-09 13:10:04 +05:30
Erik Karlsson
caf1367dd2 Preserve links while installing libraries
Use $(CP) rather than $(INSTALL_BIN) to install libraries so that
symbolic lings are not being dereferenced.
2022-05-09 07:37:22 +00:00
Sukru Senli
82d3171604 ieee1905: update example ieee1905 config 2022-05-09 09:09:12 +02:00
Sukru Senli
68b8051fb2 map-agent: update example mapagent config 2022-05-09 09:09:12 +02:00
Sukru Senli
9fc87d618b map-controller: update example mapcontroller config 2022-05-09 09:09:12 +02:00
Sukru Senli
013a2f2b19 evoice: update dependency based on target
also limit target platforms to the ones evoice supports
2022-05-07 13:30:33 +02:00
Sukru Senli
b4d831147e Revert "sulu: 1.1.0"
This reverts commit 2816342a69.
2022-05-07 13:05:47 +02:00
Sukru Senli
2816342a69 sulu: 1.1.0
new way of creating themes
2022-05-07 12:28:35 +02:00
Yalu Zhang
68bb2d48d5 evoice: Support multiple platform building 2022-05-06 16:18:50 +02:00
Yalu Zhang
4333127c74 evoice: Update UCI config files 2022-05-06 14:42:27 +02:00
Jakob Olsson
d03fa0c5e3 map-agent: 7.1.45 2022-05-06 14:06:47 +02:00
vdutta
584e3db8f0 bbf: 6.6.29 2022-05-06 15:12:34 +05:30
vdutta
4e365be18e usp-js: Added qjs version 2022-05-06 10:24:02 +05:30
Jakob Olsson
e722665f2f map-agent: 7.1.44 2022-05-05 17:15:40 +02:00
Jakob Olsson
7566301349 map-controller: 6.0.20 2022-05-05 16:35:47 +02:00
Jakob Olsson
213f840309 map-agent: 7.1.43 2022-05-05 16:04:16 +02:00
vdutta
35c58d63d7 icwmp: 8.4.6 2022-05-05 17:59:48 +05:30
Wenpeng Song
8382bcc0ac dectmngr: Call openlog() at the beginning to avoid some incomplete log messages 2022-05-05 12:12:18 +00:00
Jakob Olsson
ac32ff013e map-agent: 7.1.42 2022-05-05 12:40:51 +02:00
Jakob Olsson
3d077f2a18 map-agent: 7.1.41 2022-05-05 09:53:31 +02:00
vdutta
1d6c3b5466 obuspa: Fix assigned role index 2022-05-05 10:46:00 +05:30
Arun Muthusamy
47130407a5 urlfilter: Fix IPv6 traffic related issue 2022-05-04 16:59:11 +02:00
Jakob Olsson
9f7db62c89 map-topology: 3.2.13 2022-05-04 15:08:49 +02:00
Jakob Olsson
8d1d4b5590 wfa-capi: 1.1.2 2022-05-04 13:36:41 +02:00
Wenpeng Song
889524d9a7 dectmngr: fix handset name update issue 2022-05-04 08:54:58 +00:00
vdutta
f293fa36a7 bbf: Align LocalTimeZoneName with TZ db 2022-05-04 13:53:08 +05:30
vdutta
ab144f4af9 twamp: Align with libbbf_api 2022-05-04 13:46:36 +05:30
vdutta
621010e16b swmodd: Align with libbbf_api 2022-05-04 13:09:55 +05:30
vdutta
3f2b130848 stunc: Align with bbf_api 2022-05-04 13:07:42 +05:30
vdutta
504c78965d udpechoserver: 1.0.5 2022-05-04 12:45:36 +05:30
Yalu Zhang
c625d8dc29 evoice-0.2.1: Support FXS CLIP on Broadcom platform 2022-05-03 15:51:14 +02:00
vdutta
9234254f76 icwmp: 8.4.5 2022-05-03 17:25:01 +05:30
Sukru Senli
436751ce8f evoice: make license PROPRIETARY 2022-05-02 16:25:22 +02:00
Sukru Senli
30bf53c79c endptmngr: make license PROPRIETARY 2022-05-02 16:25:16 +02:00
vdutta
775b71b6f1 xmppc: 2.0.2 2022-05-02 19:14:13 +05:30
vdutta
cf08d70000 icwmp: 8.4.4 2022-05-02 19:00:10 +05:30
vdutta
48727867eb xmppc: 2.0.1 2022-05-02 10:48:11 +05:30
Amin Ben Ramdhane
e82294aa2f xmppc: 2.0.0 2022-05-02 04:45:35 +00:00
Amin Ben Ramdhane
768304c5a1 bbf: 6.6.27 2022-05-02 04:45:35 +00:00
Sukru Senli
00c6557d0a sulu: 1.0.4 2022-04-29 17:05:44 +02:00
Sukru Senli
1c22d7a19d evoice: bump version: 0.2.0 2022-04-29 16:24:55 +02:00
Yalu Zhang
1eb12b7923 Update package evoice
Fix a compilation error in libvoiceservice
2022-04-29 16:05:57 +02:00
Yalu Zhang
1661322307 evoice: Update Makefile to add bcmkernel in dependency list 2022-04-29 15:28:28 +02:00
Sukru Senli
a408642afa sulu: 1.0.3 2022-04-29 12:18:16 +02:00
vdutta
62b1d840dc bulkdata: 2.0.2 2022-04-29 10:33:35 +05:30
vdutta
55afadf895 stunc: 1.1.6 2022-04-28 20:05:46 +05:30
vdutta
4c4e12a8ff bulkdata: 2.0.1 2022-04-28 20:04:39 +05:30
Jakob Olsson
73c5d2c481 map-agent: 7.1.40 2022-04-28 10:42:44 +02:00
Jakob Olsson
7c041f933d wfadatad: 7.0.3 2022-04-27 16:36:48 +02:00
vdutta
fddb7e3ba7 icwmp: 8.4.3 2022-04-27 19:27:21 +05:30
Jakob Olsson
bf82f6966d map-agent: 7.1.39 2022-04-27 15:29:52 +02:00
Amin Ben Ramdhane
81a348efee bbf: 6.6.26 2022-04-27 13:24:02 +01:00
vdutta
f24602d8d4 iop: config: update bulkdata package 2022-04-27 17:26:50 +05:30
Amin Ben Ramdhane
0f5677e544 bulkdata: align with new design
- remove libbbfdm dependency
- make bulkdata run on top of ubus usp.raw object
2022-04-27 12:14:13 +01:00
Jakob Olsson
02d52bd9e1 map-agent: 7.1.38 2022-04-27 09:58:32 +02:00
Sukru Senli
acb2f35982 iop: config: remove undefined package 2022-04-26 22:27:44 +02:00
vdutta
c1ef23456b icwmp: GetRPCMethod from cpe and ssl keep update 2022-04-26 19:32:36 +05:30
Jakob Olsson
00fd54ba1b map-agent: 7.1.37 2022-04-26 14:45:08 +02:00
Amin Ben Ramdhane
3406185b1c bbf: 6.6.25 2022-04-25 18:34:21 +01:00
Jakob Olsson
6f233e19bf map-agent: 7.1.36 2022-04-25 16:04:50 +02:00
Jakob Olsson
9227f52a16 wfa-capi: 1.1.1 2022-04-25 16:03:27 +02:00
Anjan Chanda
70889fd1ae ieee1905: 4.8.0 2022-04-25 15:37:11 +02:00
Jakob Olsson
c09267da8f wfadatad: 7.0.2 2022-04-25 14:23:27 +02:00
Jakob Olsson
d4a9cde562 map-agent: 7.1.35 2022-04-22 15:31:07 +02:00
vdutta
1824013aeb udpechoserver: 1.0.4 2022-04-21 17:36:42 +05:30
Yalu Zhang
13c858421c Update package evoice
Enable the development log messages and fix compilation errors
2022-04-21 12:07:13 +02:00
Omar Kallel
a917d47854 icwmp: 8.4.1 2022-04-21 10:01:21 +01:00
Jakob Olsson
4c11a12d11 map-agent: make EASYMESH_R2_CERT compile flag selectable 2022-04-20 13:20:13 +02:00
Anjan Chanda
73a7d9cc42 config: deselect wfadatad package 2022-04-20 10:53:52 +02:00
Yalu Zhang
68a51047e9 Update package evoice
libvoiceservice updating
2022-04-20 10:50:25 +02:00
Anjan Chanda
42db3eaf5d wfadatad: 7.0.1 2022-04-20 10:39:38 +02:00
Roman Azarenko
8c867fc829 obuspa: init: fix manipulating USP_BOARD_IFNAME env var in .profile
This addresses two problems:

1. `sed 'g/export USP_BOARD_NAME/d'` would erase all the lines in the affected
file, regardless of whether there was a match or not. Replace this with
`sed '/foo/d'`, which correctly deletes just the affected lines.

2. Changing an `interface`/`ifname` in UCI configuration would end up
appending to /root/.profile due to how the control flow was written.
2022-04-20 09:11:40 +02:00
Omar Kallel
c9bc7a3dea icwmp: 8.4.0 2022-04-19 15:28:14 +01:00
Yalu Zhang
7c05f41418 eVoice: Update Makefile to build libvoiceservice.so by default 2022-04-19 11:51:13 +02:00
Anjan Chanda
47fe3342d3 ieee1905: 4.7.7 2022-04-14 16:32:15 +02:00
Sukru Senli
135b15c101 sulu: 1.0.2 2022-04-14 13:40:50 +02:00
Jakob Olsson
26a75d11f0 map-controller: 6.0.19 2022-04-14 12:37:19 +02:00
vdutta
85a20c9485 bbf: 6.6.24 2022-04-14 14:01:48 +05:30
Amin Ben Ramdhane
e239e77fdd bbf: 6.6.23 2022-04-13 15:16:11 +01:00
vdutta
4824b441b6 stunc: Fix compilation issue for wolfssl variant 2022-04-13 13:23:06 +00:00
vdutta
3bb9298485 iop: Select mbedtls variants for TRx69 packages 2022-04-13 13:23:06 +00:00
vdutta
557ed06daa bulkdata: Added ssl variants to align with bbf variants 2022-04-13 13:23:06 +00:00
vdutta
1f0e4a191c uspd: Added ssl variants 2022-04-13 13:23:06 +00:00
vdutta
03e29020e2 bbf: Added ssl variants for libbbfdm 2022-04-13 13:23:06 +00:00
vdutta
f314c20b8a obuspa: Removed build dependency from uspd 2022-04-13 13:23:06 +00:00
vdutta
5f2e737e7c icwmp: Added ssl variants 2022-04-13 13:23:06 +00:00
vdutta
0e32d885b0 stunc: Added ssl variants 2022-04-13 13:23:06 +00:00
Wenpeng Song
363ae3044e dectmngr: provide UBUS API test 2022-04-13 13:02:23 +00:00
Jakob Olsson
2f5d167976 map-agent: 7.1.34 2022-04-13 14:22:13 +02:00
Sukru Senli
558936d23d sulu: 1.0.1 2022-04-13 12:58:10 +02:00
Anjan Chanda
b946784deb ieee1905: 4.7.6 2022-04-12 20:19:16 +02:00
Amin Ben Ramdhane
7adf27bcaf bbf: 6.6.21 2022-04-12 17:12:19 +01:00
Amit KUmar
85d804d575 qosmngr: uniform code handling for qos policer
removed POLICER_SKIP check from broadcom.sh to make policer configuration
code uniform for all devices.
2022-04-12 13:02:11 +00:00
Jakob Olsson
4a756c84c7 ieee1905: 4.7.5 2022-04-12 12:47:17 +02:00
Jakob Olsson
db91f3809a wfadatad: 6.12.2 2022-04-12 10:36:27 +02:00
Jakob Olsson
55ba075a82 ieee1905: 4.7.4 2022-04-12 09:34:29 +02:00
Jakob Olsson
98403702fe ieee1905: 4.7.3 2022-04-11 15:28:41 +02:00
Jakob Olsson
f50af42366 map-controller: 6.0.18 2022-04-11 15:27:57 +02:00
vdutta
9ea69b1c07 bbf: 6.6.20 2022-04-11 15:32:04 +05:30
Jakob Olsson
338856f15d map-topology: 3.2.12 2022-04-08 17:04:21 +02:00
vdutta
a5459d4ee6 uspd: 2.2.6 2022-04-08 18:24:37 +05:30
Jakob Olsson
d143e9af96 map-controller: 6.0.17 2022-04-08 14:28:31 +02:00
Anjan Chanda
bf7e5fca47 wfadatad: 6.12.1 2022-04-08 12:32:41 +02:00
Anjan Chanda
eb1224022e ieee1905: 4.7.2 2022-04-08 12:24:11 +02:00
Anjan Chanda
55835b3af0 easy-soc-libs: 6.4.44 2022-04-08 12:23:33 +02:00
vdutta
e0eec6c755 uspd: 2.2.5 2022-04-08 15:36:46 +05:30
Anjan Chanda
c8e1e6538a ieee1905: 4.7.1 2022-04-08 12:04:20 +02:00
Sukru Senli
3e60ebb118 sulu: v1.0.0 2022-04-08 10:29:17 +02:00
Jakob Olsson
42bd799915 map-controller: 6.0.16 2022-04-07 18:05:43 +02:00
Yalu Zhang
64369a08f4 evoice: update /etc/config/voice to support variable length of called numbers
The previous config only allows the fixed number of digits as a called number. With
MinimumNumberOfDigits as 5, MaximumNumberOfDigits as 15 and TerminationDigit as ' ',
users can only dial 5 digits as a called number. That is wrong.

After this change, the number of digits for a called number is in the range between
MinimumNumberOfDigits (1) and MaximumNumberOfDigits (15). But the number must terminate
with '#' which is not a part of called number and will be strapped off.

TODO: support variable length of called numbers without termination digit.
2022-04-07 16:39:54 +02:00
Jakob Olsson
3dd570990e map-topology: 3.2.11 2022-04-07 15:50:19 +02:00
vdutta
7e8f51d15b uspd: 2.2.4 2022-04-07 17:17:18 +05:30
vdutta
2faada9f0b icwmp: 8.3.10 2022-04-07 17:13:07 +05:30
Jakob Olsson
1d88107cc6 map-topology: 3.2.10 2022-04-07 11:12:00 +02:00
Anjan Chanda
65ecbbde31 ieee1905: 4.7.0 2022-04-07 10:56:10 +02:00
vdutta
0c8b29d7d5 icwmp: Fix race condition in config backup 2022-04-07 11:16:20 +05:30
Jakob Olsson
45f0f50740 map-agent: 7.1.33 2022-04-06 17:15:13 +02:00
Jakob Olsson
6ecc48540f map-agent: 7.1.32 2022-04-06 16:11:35 +02:00
Janusz Dziedzic
a027edeca2 easy-soc-libs: 6.4.43
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-04-06 12:22:16 +00:00
Anjan Chanda
dd25486412 ieee1905: 4.6.27 2022-04-06 10:23:30 +02:00
Yalu Zhang
d345eefd86 evoice: update /etc/config/voice for easy testing
Domain name "sip-proxy.iopsys.eu" is used for URI and proxy instead of IP address.

In order to make it work, the proxy server's configuration needs to be updated for accepting
sip-proxy.iopsys.eu as domain instead of IP address by default for kamailio example.

$ diff /etc/kamailio/kamailio.cfg.orig /etc/kamailio/kamailio.cfg
176c176
< # alias="sip.mydomain.com"
---
> alias="sip-proxy.iopsys.eu"

On the DUT, run the following to add a domain name entry in dnsmasq for sip-proxy.iopsys.eu.

uci add dhcp domain
uci set dhcp.@domain[-1].name='sip-proxy.iopsys.eu'
uci set dhcp.@domain[-1].ip="10.100.1.254" # Replace 10.100.1.254 with the actual IP in your environment
uci commit dhcp
/etc/init.d/dnsmasq restart

Then restart evoice at the last step.
2022-04-05 16:52:51 +02:00
Jakob Olsson
4b272be181 map-agent: 7.1.31 2022-04-05 15:21:50 +02:00
Jakob Olsson
09d49cb77d ieee1905: 4.6.26 2022-04-05 15:09:49 +02:00
vdutta
0e8b8eb69d cwmp: Fix upload 2022-04-05 17:39:42 +05:30
Jakob Olsson
a2610d371d map-agent: 7.1.30 2022-04-05 11:32:17 +02:00
vdutta
e1886e61bc bbf: 6.6.19 2022-04-05 08:52:33 +05:30
Grzegorz Sluja
c1f4056723 dectmngr: Play DialTone on handset based on SIP registration status 2022-04-04 16:01:04 +02:00
Anjan Chanda
1a404e9be5 ieee1905: 4.6.25 2022-04-04 14:14:59 +02:00
Anjan Chanda
6899e35524 easy-soc-libs: 6.4.42 2022-04-04 14:14:15 +02:00
Jakob Olsson
17c9858783 map-agent: 7.1.29 2022-04-04 11:44:22 +02:00
Anjan Chanda
eb4e698b90 wfadatad: 6.12.0 2022-04-01 18:07:24 +02:00
Sukru Senli
c30b8937a0 sulu: adapt to URL change 2022-04-01 17:34:22 +02:00
Jakob Olsson
491098c51f map-agent: 7.1.28 2022-04-01 17:22:49 +02:00
Sukru Senli
f190fd9085 evoice: adapt to URL change 2022-04-01 17:21:07 +02:00
Filip Matusiak
96b7aad9f2 map-agent: handle link loss of eth when active bh 2022-04-01 15:20:26 +00:00
Jakob Olsson
0166ee6540 map-controller: 6.0.15 2022-04-01 14:09:52 +02:00
vdutta
bcd9d70c52 bbf: 6.6.18 2022-04-01 16:32:07 +05:30
Sukru Senli
6ce86e0a68 sulu: 0.2.37 2022-04-01 10:36:52 +02:00
Janusz Dziedzic
b206df8ad9 easy-soc-libs: 6.4.41
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-04-01 07:49:17 +00:00
vdutta
4a09f80d40 bbf: 6.6.17 2022-03-31 22:06:19 +05:30
Andreas Gnau
32fbe3288f Update feed [ iopsys ] package [ u-boot-ex400 ]
-------------------------------------------------------------------------------
* 4cd73fe5db ex400: Update bootloader version to new IOWRT 6 format
* b22609213e Revert "ex400: enable network by default"
-------------------------------------------------------------------------------
commit 4cd73fe5db0ebfc1242ca9c85c14d7f0718eaf73
Author: Jani Juvan <jani.juvan@iopsys.eu>
Date: 2021-12-08 17:27:59 +0100

    ex400: Update bootloader version to new IOWRT 6 format

Base directory -> /
 board/inteno/common/board.c |  4 ++--
 board/inteno/ex400/board.c  | 17 ++++++++++++++++-
 2 files changed, 18 insertions(+), 3 deletions(-)
-------------------------------------------------------------------------------
commit b22609213e92496f6cc44028f9b9930becb8a999
Author: Andreas Gnau <andreas.gnau@iopsys.eu>
Date: 2022-03-31 13:35:09 +0200

    Revert "ex400: enable network by default"

    This reverts commit 0cd508d8dd077d62baa59a0d74e2e5f24cff8926.

    It turns out that not starting network by default had a reason. See
    fccb9d5ee7 (Prevent ethernet to start up by default., 2017-05-11).

    Quoting the commit message:

    > This is needed as the setup has all port in the same switch
    > so WAN is connected to LAN and dhcp on clients on LAN is getting
    > out to the ISP and stealing ip numbers.

    We do not want to have networking by default with a static IP on the
    WAN-port. In addition, test-scripts would need adaptation if the networking
    is not to started by default, which is not worth it for an old platform like
    this.

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

Base directory -> /
 board/inteno/common/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2022-03-31 18:35:32 +02:00
vdutta
9d099ff1ce icwmp: 8.3.7 2022-03-31 20:09:35 +05:30
Jakob Olsson
c03c76c74f map-agent: 7.1.27 2022-03-31 15:12:43 +02:00
vdutta
000da5e808 stunc: Datamodel improvements 2022-03-31 16:13:35 +05:30
Alf Håkansson
2343ace07c evoice: RTCP statistics and TR104 CallLog added. Tested on E600,SH3 and CRM based boards 2022-03-30 17:46:00 +02:00
vdutta
a45cef5c05 bbf: 6.6.16 2022-03-28 17:00:42 +05:30
Sukru Senli
af6ca71559 sulu: 0.2.36 2022-03-25 15:45:21 +01:00
Sukru Senli
0418327c52 sulu: 0.2.35 2022-03-25 15:04:39 +01:00
Sukru Senli
cca1c6e81d sulu: 0.2.34 2022-03-25 13:28:20 +01:00
Jakob Olsson
4cc8c9a21c map-controller: 6.0.14 2022-03-25 12:47:17 +01:00
Jakob Olsson
bc73e56726 map-agent: 7.1.26 2022-03-25 12:31:38 +01:00
Filip Matusiak
eb2d8c8f27 map-agent: add configuration flag for island prevention 2022-03-25 12:14:00 +01:00
Filip Matusiak
49ccbe6155 map-agent: up fronthauls on eth backhaul connection 2022-03-25 12:14:00 +01:00
Anjan Chanda
89c58e227c ieee1905: 4.6.24 2022-03-25 10:50:15 +01:00
Anjan Chanda
e706738f96 map-controller: 6.0.13 2022-03-25 10:18:18 +01:00
Sukru Senli
55a1541818 sulu: 0.2.33 2022-03-25 10:15:07 +01:00
vdutta
10e62c21f4 obuspa: Fix datatype conversions in events payload 2022-03-25 10:29:54 +05:30
vdutta
b37aa436ec uspd: Added dataelements.Associated and Disassociated events 2022-03-25 10:22:36 +05:30
vdutta
5fff1f2033 bbf: 6.6.15 2022-03-24 17:30:08 +05:30
vdutta
7affe60a46 obuspa: Updated CreationDate of subscriptions 2022-03-24 13:21:48 +05:30
vdutta
5a3d08ba6d icwmp: Updated Readme 2022-03-24 09:24:35 +05:30
vdutta
82cbab5ab1 obuspa: Added minimal USPAgent bbf json plugin 2022-03-23 21:19:23 +05:30
Janusz Dziedzic
2e04d78a14 easy-soc-libs: 6.4.40
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-03-22 19:43:26 +00:00
Amin Ben Ramdhane
fc2f823119 bbf: 6.6.14 2022-03-22 20:17:07 +01:00
sandeep
cbf545ac16 qosmngr:Updated script to handle default value of QoS.Classification.{i}.VLANIDCheck 2022-03-22 18:52:55 +05:30
Sukru Senli
ce077af70f port-management: inclide /lib/network 2022-03-22 14:03:46 +01:00
vdutta
fac288f20b bbf: Fix wifi neighbor scan result 2022-03-21 15:08:44 +05:30
Amin Ben Ramdhane
b0828849bd bbf: 6.6.12 2022-03-20 20:11:04 +01:00
Jakob Olsson
39855bba25 map-agent: 7.1.25 2022-03-18 17:37:23 +01:00
Piotr Kubik
bf4bc1a299 peripheral_manager: Rename leds_manager to ledmngr 2022-03-18 15:58:45 +00:00
Jakob Olsson
bf6a343b97 map-controller: 6.0.12 2022-03-18 15:00:23 +01:00
Jakob Olsson
3d592d1dad wfadatad: 6.11.3 2022-03-18 13:54:36 +01:00
Piotr Kubik
d56da82dc9 peripheral_menager: Move iopsys led service to peripheral_manager 2022-03-18 11:21:19 +00:00
Sukru Senli
1510578835 sulu: 0.2.32 2022-03-18 09:47:53 +01:00
Sukru Senli
a1170e71a7 netmode: create netmodes folder if saving mode is needed 2022-03-17 17:41:50 +01:00
Filip Matusiak
6eee7361c2 map-agent: validate dynamic backhaul params 2022-03-17 13:32:22 +00:00
Jakob Olsson
a294c93902 map-agent: 7.1.24 2022-03-17 14:30:43 +01:00
Jakob Olsson
9f9626afb0 wifimngr: 14.0.7 2022-03-17 13:15:35 +01:00
Amin Ben Ramdhane
36ce5e1576 bbf: 6.6.11 2022-03-17 12:36:34 +01:00
Sukru Senli
3d545d9945 port-management: set speed based on capability 2022-03-17 10:56:46 +01:00
Jani Juvan
d756a2035d econet: Restore correct commit for econet uboot 2022-03-17 09:57:29 +01:00
Jani Juvan
175d381fb9 Update feed [ iopsys ] package [ u-boot ]
-------------------------------------------------------------------------------
* cc5b0b236c ex400: Set boot bank fallback attributes during upgrade
-------------------------------------------------------------------------------
commit cc5b0b236c4536ad4b694407f8ea258c61aaa76c
Author: Jani Juvan <jani.juvan@iopsys.eu>
Date: 2022-02-25 16:43:08 +0100

    ex400: Set boot bank fallback attributes during upgrade

Base directory -> /
 cmd/iopsys_upgrade.c | 3 +++
 1 file changed, 3 insertions(+)
-------------------------------------------------------------------------------
2022-03-17 09:43:38 +01:00
Jakob Olsson
6e4c42caaa map-agent: init.d: remove correct multiap.backhaul file upon restart 2022-03-16 16:51:31 +01:00
Grzegorz Sluja
f43f8fd966 dectmngr: Fix for setting model-id in DCX81
2869a87 Fix undefined reference to LOG_DECT_DEBUG when ENABLE_DECTMNGR_DEBUG=1
b91368e Restart CMBS target after model-id is changed
2022-03-16 12:41:10 +01:00
vdutta
f1f75c0b6b obuspa: Added websocket support in uci 2022-03-16 16:29:00 +05:30
Jakob Olsson
f9917d4ab7 map-agent: multiap: remove brcm prefixes 2022-03-16 09:57:16 +01:00
Jakob Olsson
3bc4565eb8 map-agent: 7.1.23 2022-03-16 09:56:59 +01:00
126 changed files with 5895 additions and 3265 deletions

View File

@@ -1,5 +1,3 @@
if PACKAGE_libbbfdm
config BBF_VENDOR_EXTENSION
bool "Enable Vendor Extension"
default y
@@ -12,10 +10,6 @@ config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
config BBF_TR181
bool "Enable TR-181 Data Model Support"
default y
config BBF_TR104
bool "Enable TR-104 Data Model Support"
default y
@@ -26,24 +20,12 @@ config BBF_TR143
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default n
default y
config BBFDM_ENABLE_DOTSO_PLUGIN
bool "Enable shared library plugin to extend datamodel"
default n
default y
choice
prompt "Select SSL utility"
default BBF_USE_WOLFSSL
config BBF_USE_WOLFSSL
bool "Use WolfSSL for ssl utilities"
select CONFIG_PACKAGE_libwolfssl
config BBF_USE_OPENSSL
bool "Use OpenSSL for ssl utilities"
select CONFIG_PACKAGE_libopenssl
endchoice
endif
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255

View File

@@ -1,42 +1,69 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.6.10
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_VERSION:=6.8.9.35
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3efc5ce5e6f639e50894e7b9e69b6e2408875db6
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=bce36468325a3cc4761a7c571583ec5d2b48a08d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbf_api
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for libbbfdm API
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libopenssl +libwolfssl
endef
define Package/libbbfdm
define Package/libbbfdm/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Library for broadband-forum data model
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libbbf_api +libcurl +libopenssl +libwolfssl
MENU:=1
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libtrace +libcurl
endef
define Package/libbbfdm
$(Package/libbbfdm/default)
TITLE += (internal)
VARIANT:=internal
endef
define Package/libbbfdm-mbedtls
$(Package/libbbfdm/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_libbbfdm-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/libbbfdm-openssl
$(Package/libbbfdm/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_libbbfdm-openssl:libopenssl
CONFLICTS := libbbfdm-mbedtls
VARIANT:=openssl
endef
define Package/libbbfdm-wolfssl
$(Package/libbbfdm/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_libbbfdm-wolfssl:libwolfssl
CONFLICTS := libbbfdm-mbedtls libbbfdm-openssl
VARIANT:=wolfssl
endef
define Package/libbbfdm/config
@@ -58,79 +85,83 @@ define Build/Prepare
endef
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror \
ifeq ($(CONFIG_BBF_TR181),y)
CONFIGURE_ARGS += \
--enable-tr181
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
ifeq ($(CONFIG_BBF_TR104),y)
CONFIGURE_ARGS += \
--enable-tr104
CMAKE_OPTIONS += \
-DBBF_TR104=ON
endif
ifeq ($(CONFIG_BBF_TR143),y)
CONFIGURE_ARGS += \
--enable-tr143
CMAKE_OPTIONS += \
-DBBF_TR143=ON
endif
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
CONFIGURE_ARGS += \
--enable-vendor-extension
CMAKE_OPTIONS += \
-DBBF_VENDOR_EXTENSION=ON
CONFIGURE_ARGS += \
BBF_VENDOR_LIST="$(CONFIG_BBF_VENDOR_LIST)" \
BBF_VENDOR_PREFIX="$(CONFIG_BBF_VENDOR_PREFIX)"
CMAKE_OPTIONS += \
-DBBF_VENDOR_LIST:String="$(CONFIG_BBF_VENDOR_LIST)" \
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
-DBBF_MAX_OBJECT_INSTANCES:Integer=$(CONFIG_BBF_MAX_OBJECT_INSTANCES)
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CONFIGURE_ARGS += \
--enable-json-plugin
CMAKE_OPTIONS += \
-DBBF_JSON_PLUGIN=ON
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CONFIGURE_ARGS += \
--enable-shared-library
CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(CONFIG_BBF_USE_WOLFSSL), y)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
TARGET_LDFLAGS += "-lwolfssl"
ifeq ($(BUILD_VARIANT),openssl)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(CONFIG_BBF_USE_OPENSSL), y)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lssl"
ifeq ($(BUILD_VARIANT),wolfssl)
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
define Package/libbbf_api/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.so* $(1)/lib/
endef
define Package/libbbfdm/install
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/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(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
endef
define Package/libbbfdm/prerm
define Package/libbbfdm/default/prerm
#!/bin/sh
rm -rf /etc/bbfdm/dmmap/*
exit 0
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)
Package/libbbfdm-openssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-wolfssl/install = $(Package/libbbfdm/default/install)
Package/libbbfdm-mbedtls/install = $(Package/libbbfdm/default/install)
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/include
@@ -139,9 +170,12 @@ define Build/InstallDev
$(INSTALL_DATA) $(PKG_BUILD_DIR)/include/*.h $(1)/usr/include/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/libbbf_api/*.h $(1)/usr/include/libbbf_api/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/.libs/libbbf_api.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef
$(eval $(call BuildPackage,libbbf_api))
$(eval $(call BuildPackage,libbbfdm))
$(eval $(call BuildPackage,libbbfdm-openssl))
$(eval $(call BuildPackage,libbbfdm-wolfssl))
$(eval $(call BuildPackage,libbbfdm-mbedtls))

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
# Copyright (C) 2022 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,22 +8,25 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=1.0.4
PKG_VERSION:=2.0.3.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bulkdata.git
PKG_SOURCE_VERSION:=b35e7862bc17fc11dc1f757c7b93900995a28633
PKG_SOURCE_VERSION:=33a6648de9ee0af33c44518656b56b0a30b6c1ab
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
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)
@@ -31,11 +34,7 @@ define Package/$(PKG_NAME)
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm +libbbf_api
endef
define Package/$(PKG_NAME)/description
BBF BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json
endef
TARGET_CFLAGS += \
@@ -52,7 +51,7 @@ 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)/*.so $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbf_plugin/*.so $(1)/usr/lib/bbfdm
$(CP) ./files/* $(1)/
endef

View File

@@ -1,43 +1,6 @@
config bulkdata 'bulkdata'
option enable '0'
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
#Log levels: Error=1, Warning=2, Info=3, Debug=4
option log_level '3'
config profile
option profile_id '1'
option enable '0'
option name ''
option nbre_of_retained_failed_reports '0'
option protocol 'http'
option encoding_type ''
option reporting_interval '86400'
option time_reference '0'
option csv_encoding_field_separator ','
option csv_encoding_row_separator '&#10;'
option csv_encoding_escape_character '&quot;'
option csv_encoding_report_format 'column'
option csv_encoding_row_time_stamp 'unix'
option json_encoding_report_format 'objecthierarchy'
option json_encoding_report_time_stamp 'unix'
option http_url ''
option http_username ''
option http_password ''
option http_compression 'none'
option http_method 'post'
option http_use_date_header '1'
option http_retry_enable '0'
option http_retry_minimum_wait_interval '5'
option http_retry_interval_multiplier '2000'
option http_persist_across_reboot '0'
config profile_parameter
option profile_id '1'
option name ''
option reference ''
config profile_http_request_uri_parameter
option profile_id '1'
option name ''
option reference ''

View File

@@ -1,7 +1,4 @@
#!/bin/sh /etc/rc.common
# Bulkdata Software
# Copyright (C) 2020 iopsys Software Solutions AB
# Author: Amin Ben Ramdhane <amin.benramdhane@pivasoftware.com>
START=99
STOP=10
@@ -10,13 +7,16 @@ USE_PROCD=1
PROG="/usr/sbin/bulkdatad"
start_service() {
local bulkdata_enable=`uci -q get bulkdata.bulkdata.enable`
if [ "$bulkdata_enable" = "1" ]; then
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
fi
local enable=$(uci -q get bulkdata.bulkdata.enable)
[ "$enable" != "1" ] && {
return 0
}
procd_open_instance
procd_set_param command "$PROG"
procd_set_param respawn "3" "7" "0"
procd_close_instance
}
boot() {

View File

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

View File

@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.1
PKG_VERSION:=3.5.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e609d736f572d3ff5e33aa6b585d6ccb7c8e14cf
PKG_SOURCE_VERSION:=18dece420502e25a9bd9f3b534bc6c338fcc9377
PKG_MIRROR_HASH:=skip
endif
@@ -34,7 +34,7 @@ include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
CATEGORY:=Utilities
TITLE:=DECT Manager
DEPENDS:= +libubox +ubus +uci +libxml2
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c
endef
define Package/$(PKG_NAME)/description

Binary file not shown.

Binary file not shown.

View File

@@ -11,6 +11,8 @@ PROG=/usr/sbin/dectmngr
LOG_PATH=/var/log/dectmngr
DB_PATH=/etc/dect
DECT_GPIO=$(db -q get hw.board.dect_gpio)
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
stop_and_wait_dectmngr() {
pidof $NAME && killall -q $NAME
@@ -30,7 +32,7 @@ start_service() {
test $(db get hw.board.hasDect) = "0" && return
echo 1 > /sys/class/gpio/gpio14/value
[ -n "$DECT_GPIO" ] && echo 1 > /sys/class/gpio/gpio${DECT_GPIO}/value
rfpi=$(db -q get hw.board.dect_rfpi)
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
@@ -71,7 +73,7 @@ start_service() {
stop_service() {
test $(db get hw.board.hasDect) = "0" && return
echo 0 > /sys/class/gpio/gpio14/value
[ -n "$DECT_GPIO" ] && echo 0 > /sys/class/gpio/gpio${DECT_GPIO}/value
stop_and_wait_dectmngr
}
@@ -86,8 +88,10 @@ service_triggers()
}
boot() {
echo 14 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio14/direction
[ -n "$DECT_GPIO" ] && {
echo ${DECT_GPIO} > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio${DECT_GPIO}/direction
}
[ ! -d $LOG_PATH ] && mkdir -p $LOG_PATH
[ ! -d $DB_PATH ] && mkdir -p $DB_PATH

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=6.4.39
PKG_VERSION:=6.5.60
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4d1c28405981cd803396afd0d1612df23baa135d
PKG_SOURCE_VERSION:=ec2e8d0341e246ff371481ae20418d8301dfcf12
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

View File

@@ -7,18 +7,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=endptmngr
PKG_VERSION:=0.6
PKG_VERSION:=0.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:=2390a3503990e04e33e8e448ad9dccc00f206908
PKG_SOURCE_VERSION:=e711227576cf876c1ae8139ebfa9170bae3c664e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=MIT
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
export BUILD_DIR

View File

@@ -1,62 +0,0 @@
#
# Copyright (C) 2022 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=evoice
PKG_VERSION:=0.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/ensemble/evoice.git
PKG_SOURCE_VERSION:=1f790ba0cbc1b62c4bff9fd09a20cb0c299422da
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
# 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
define Package/$(PKG_NAME)
CATEGORY:=Network
SUBMENU:=Telephony
TITLE:=Ensemble Voice
URL:=
DEPENDS:= +libubox +libubus +libpicoevent +libuci +libstdcpp
endef
define Package/$(PKG_NAME)/description
Ensemble Voice. A stand alone SIP VoIP application.
endef
ifeq ($(LOCAL_DEV),1)
# If you want to build the code from your own local repositiory enable
# LOCAL_DEV and change the path below to your own git repository.
define Build/Prepare
rsync -av /swdev/bide/evoice_clean/* $(PKG_BUILD_DIR)/
endef
endif
export IDIR = $(STAGING_DIR)/usr/include
export BDIR = bcm963xx/userspace/private/apps/voice
export _XFLAGS = -I$(IDIR) -I$(IDIR)/$(BDIR)/inc -I$(IDIR)/bcm963xx/xchg/bos/publicInc -I$(IDIR)/bcm963xx/bcmdrivers/broadcom/include/bcm963xx
define Build/Compile
+$(MAKE) -r -R -C $(PKG_BUILD_DIR) -f _bld/src/cdabs.mk SWB=b_gxxqca6 HWA=a_openwrt HWC=c_hosted OSP=p_posix TRG=SVrgBcmFxs LIF=cerder DBG=dbg
endef
define Package/evoice/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/_bin/a_openwrt/evoice $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,evoice))

View File

@@ -1,352 +0,0 @@
config SIPClient 'Client1'
option Enable '1'
option RegisterMode 'RFC3261'
option AuthUserName '51234'
option AuthPassword '51234'
option Network 'Network1'
option MaxSessions '5'
option RegisiterURI '51234@192.164.4.210'
option E164Format '1'
config SIPClient 'Client2'
option Enable '1'
option RegisterMode 'RFC3261'
option AuthUserName '51235'
option AuthPassword '51235'
option Network 'Network1'
option MaxSessions '5'
option RegisiterURI '51235@192.164.4.210'
option E164Format '1'
config SIPNetwork 'Network1'
option Enable '1'
option ProxyServer '192.168.4.210'
option ProxyServerPort '5060'
option ProxyServerTransport 'UDP'
option RegistrarServer '192.168.4.210'
option RegistrarServerPort '5060'
option RegistrarServerTransport 'UDP'
option RegistrationPeriod '3240'
option RegisterExpires '3600'
option UserAgentDomain ' '
option TimerRegistrationFailed '120'
option TimerT1 '500'
option VoIPProfile 'VoIPProfile1'
list CodecList '1CodecProfile1'
list CodecList '1CodecProfile2'
list CodecList '1CodecProfile3'
list CodecList '1CodecProfile5'
list CodecList '1CodecProfile4'
config Capabilities 'Capabilities'
option FacilityActions 'CW_ACTIVE,CFU_ACTIVE'
config CapabilitiesCodec 'Codec1'
option Codec 'G.711ALaw'
config CapabilitiesCodec 'Codec2'
option Codec 'G.711MuLaw'
config CapabilitiesCodec 'Codec3'
option Codec 'G.726'
config CapabilitiesCodec 'Codec4'
option Codec 'G.722'
config CapabilitiesCodec 'Codec5'
option Codec 'G.729'
config CodecProfile '1CodecProfile1'
option Enable '1'
option Codec 'Codec1'
option PacketizationPeriod '20'
option SilenceSupression '1'
config CodecProfile '1CodecProfile2'
option Enable '1'
option Codec 'Codec2'
option PacketizationPeriod '20'
option SilenceSupression '1'
config CodecProfile '1CodecProfile3'
option Enable '1'
option Codec 'Codec3'
option PacketizationPeriod '20'
option SilenceSupression '0'
config CodecProfile '1CodecProfile4'
option Enable '1'
option Codec 'Codec4'
option PacketizationPeriod '20'
option SilenceSupression '0'
config CodecProfile '1CodecProfile5'
option Enable '1'
option Codec 'Codec5'
option PacketizationPeriod '20'
option SilenceSupression '0'
config VoIPProfile 'VoIPProfile1'
option Enable '1'
option DTMFMethod 'RFC4733'
option RTP '1RTP'
config RTP '1RTP'
option LocalPortMin '10020'
option LocalPortMax '10039'
option JitterBufferType 'Static'
config FXXPorts 'POTS'
option Region 'SE'
config FXSPorts 'FXS1'
option Enable '1'
option DialType 'Tone'
option TransmitGain '4'
option ReceiveGain '4'
option EchoCancellationEnable '1'
config FXSPorts 'FXS2'
option Enable '1'
option DialType 'Tone'
option TransmitGain '4'
option ReceiveGain '4'
option EchoCancellationEnable '1'
config Extension 'Extension1'
option Enable '1'
option ExtensionNumber '10#'
option Provider 'FXS1'
option CallingFeatures 'Set1'
option Name 'Phone 1'
config Extension 'Extension2'
option Enable '1'
option ExtensionNumber '11#'
option Provider 'FXS2'
option CallingFeatures 'Set1'
option Name 'Phone 2'
config Line 'Line1'
option Enable '1'
option Provider 'Client1'
option CallingFeatures 'Set1'
config Line 'Line2'
option Enable '1'
option Provider 'Client2'
option CallingFeatures 'Set2'
config IncomingMap 'IncomingMap1'
option Enable '1'
option Extension 'Extension1'
option Line 'Line1'
config IncomingMap 'IncomingMap2'
option Enable '1'
option Extension 'Extension2'
option Line 'Line2'
config IncomingMap 'IncomingMap3'
option Enable '1'
option Extension 'Extension2'
option Line 'Line1'
config OutgoingMap 'OutgoingMap1'
option Enable '1'
option Extension 'Extension1'
option Line 'Line1'
config OutgoingMap 'OutgoingMap2'
option Enable '1'
option Extension 'Extension2'
option Line 'Line2'
config CallingFeatures 'Set1'
option CallerIDEnable '1'
option CallerIDNameEnable '1'
option CallForwardUnconditionalEnable '0'
option CallForwardUnconditionalNumber ' '
option CallForwardOnBusyEnable '0'
option CallForwardOnBusyNumber ' '
option CallForwardOnNoAnswerEnable '0'
option CallForwardOnNoAnswerRingTimeout '24'
option CallForwardOnNoAnswerNumber ' '
option CallTransferEnable '1'
option MWIEnable '1'
option VMWIEnable '1'
option LineMessagesWaiting '0'
option AnonymousCallRejectionEnable '0'
option AnonymousCallEnable '1'
option DoNotDisturbEnable '1'
option RepeatDialEnable '1'
option VoiceMailEnable '1'
option CallPickUpEnable '1'
option CCBSEnable '1'
option CallWaitingEnable '0'
config CallingFeatures 'Set2'
option CallerIDEnable '1'
option CallerIDNameEnable '1'
option CallForwardUnconditionalEnable '0'
option CallForwardUnconditionalNumber ' '
option CallForwardOnBusyEnable '0'
option CallForwardOnBusyNumber ' '
option CallForwardOnNoAnswerEnable '0'
option CallForwardOnNoAnswerRingTimeout '24'
option CallForwardOnNoAnswerNumber ' '
option CallTransferEnable '1'
option MWIEnable '1'
option VMWIEnable '1'
option LineMessagesWaiting '0'
option AnonymousCallRejectionEnable '0'
option AnonymousCallEnable '1'
option DoNotDisturbEnable '1'
option RepeatDialEnable '1'
option VoiceMailEnable '1'
option CallPickUpEnable '1'
option CCBSEnable '1'
option CallWaitingEnable '1'
config NumberingPlan 'NumberingPlan1'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit ' '
config NumberingPlan 'NumberingPlan2'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit '#'
config NumberingPlan 'NumberingPlan3'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit ' '
list PrefixList '3PrefixInfo1'
list PrefixList '3PrefixInfo2'
list PrefixList '3PrefixInfo3'
list PrefixList '3PrefixInfo4'
list PrefixList '3PrefixInfo5'
list PrefixList '3PrefixInfo6'
list PrefixList '3PrefixInfo7'
list PrefixList '3PrefixInfo8'
list PrefixList '3PrefixInfo9'
config NumberingPlan 'NumberingPlan4'
option MinimumNumberOfDigits '5'
option MaximumNumberOfDigits '15'
option InterDigitTimerStd '2000'
option InterDigitTimerOpen '2000'
option TerminationDigit '#'
list PrefixList '4PrefixInfo1'
config PrefixInfo '3PrefixInfo1'
option Enable '1'
option PrefixRange '*43#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CW_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo2'
option Enable '1'
option PrefixRange '#43#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CW_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo3'
option Enable '1'
option PrefixRange '*21*(X+)#'
option PrefixMinNumberOfDigits '9'
option PrefixMaxNumberOfDigits '9'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFU_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo4'
option Enable '1'
option PrefixRange '#21#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFU_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo5'
option Enable '1'
option PrefixRange '*67*(X+)#'
option PrefixMinNumberOfDigits '9'
option PrefixMaxNumberOfDigits '9'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFB_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo6'
option Enable '1'
option PrefixRange '#67#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFB_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo7'
option Enable '1'
option PrefixRange '*61*(X+(*X+)?)#'
option PrefixMinNumberOfDigits '15'
option PrefixMaxNumberOfDigits '15'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFNR_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo8'
option Enable '1'
option PrefixRange '#61#'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CFNR_DEACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '3PrefixInfo9'
option Enable '1'
option PrefixRange '*31*'
option PrefixMinNumberOfDigits '4'
option PrefixMaxNumberOfDigits '4'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'CA_ACTIVATE'
option FacilityActionArgument ' '
config PrefixInfo '4PrefixInfo1'
option Enable '1'
option PrefixRange '110|112'
option PrefixMinNumberOfDigits '7'
option PrefixMaxNumberOfDigits '7'
option NumberOfDigitsToRemove '0'
option PosOfDigitsToRemove '0'
option FacilityAction 'X_IOPSYS_EU_EMERGENCY'
option FacilityActionArgument ' '
config DialPlan 'X_IOPSYS_EU_InternalNumber1'
option RegExp '1X#'

View File

@@ -1,165 +0,0 @@
# RO (Main)
config account 'map_board'
option HW_Has_Voice 'hw.board.hasVoice'
option HW_Has_DECT 'hw.board.hasDect'
option HW_Nr_Of_POTS_Ports 'hw.board.VoicePorts'
option ProductID 'device.deviceinfo.ModelName'
option I3_VERSION 'device.deviceinfo.SoftwareVersion'
option SerialNumber 'device.deviceinfo.SerialNumber'
config account 'map_pots'
option Country 'voice.POTS.Region'
# Voice Service navigation paths
# Not used to initialize internal configuration
config navigation 'map_vs'
option Account 'voice.Client@.'
option Network 'voice.Client@.Network'
option VoIPProfile 'voice.Network@.VoIPProfile'
option CfAccount 'voice.Line@.CallingFeatures'
option CfPhone 'voice.Extension@.CallingFeatures'
option CodecList 'voice.Network@.CodecList'
option Codec 'voice.Codec@.Codec'
option OutgoingMapEnabled 'voice.OutgoingMap@.Enable'
option From_Phone 'voice.OutgoingMap@.Extension'
option Extension 'voice.Extension@.Provider'
option To_Account 'voice.OutgoingMap@.Line'
option Line 'voice.Line@.Provider'
option LineEnable 'voice.Line@.Enable'
option LineProvider 'voice.Line@.Provider'
option IncomingMapEnabled 'voice.IncomingMap@.Enable'
option From_Account 'voice.IncomingMap@.Line'
option To_Phone 'voice.IncomingMap@.Extension'
option ExtensionEnable 'voice.Extension@.Enable'
option ExtensionProvider 'voice.Extension@.Provider'
# Registration for account A-Z is associate with SIP.Clienti.Enable
# All parameters in this table are written to internal configuration
config account 'map_account'
option Registration 'voice.Client@.Enable'
option Display_Name ''
option PhoneNumber 'voice.Client@.RegisiterURI'
option Username 'voice.Client@.AuthUserName'
option Password 'voice.Client@.AuthPassword'
option SIP_Telephone_Syntax 'voice.Client@.E164Format'
option Device_Description 'voice.Client@.UserAgent'
# Network stuff associated with an account.
# All parameters in this table are written to internal configuration
config network 'map_net'
option Enable 'voice.Network@.Enable'
option Registration_Server 'voice.Network@.RegistrarServer'
option Outbound_Proxy 'voice.Network@.ProxyServer'
option SIP_Port 'voice.Network@.RegistrarServerPort'
option SIP_Transport 'voice.Network@.RegistrarServerTransport'
option RegistrationPeriod 'voice.Network@.RegistrationPeriod'
option Registration_Interval 'voice.Network@.RegisterExpires'
option Reg_Failure_Interval 'voice.Network@.TimerRegistrationFailed'
option T1 'voice.Network@.TimerT1'
option UserAgentDomain 'voice.Network@.UserAgentDomain'
config VoIPProfile 'map_voip'
option Enable 'voice.VoIPProfile@.Enable'
option DTMF_Method 'voice.VoIPProfile@.DTMFMethod'
option RTP 'voice.VoIPProfile@.RTP'
config RTP 'map_rtp'
option RTP_Port_Base 'voice.@RTP@.LocalPortMin'
option RTP_Port_End 'voice.@RTP@.LocalPortMax'
config codecs 'map_codec'
option Codec 'voice.CodecProfile@.Codec'
option enable 'voice.CodecProfile@.Enable'
option ptime 'voice.CodecProfile@.PacketizationPeriod'
option dtx 'voice.CodecProfile@.SilenceSupression'
config extensioninfo 'map_ext'
option Enable 'voice.Extension@.Enable'
option Internal_Number_Phone 'voice.Extension@.ExtensionNumber'
option Display_Name_Phone 'voice.Extension@.Name'
config capabilities 'map_capa'
option Call_Waiting_Enable 'voice.Capabilities@FacilityActions'
option Enable_Call_Diversion 'voice.Capabilities@FacilityActions'
config cs_account 'map_set'
option BusyCallWait 'voice.Set@.CallWaitingEnable'
option AlwaysDivert 'voice.Set@.CallForwardUnconditionalEnable'
option CFU_Number 'voice.Set@.CallForwardUnconditionalNumber'
option BusyDivert 'voice.Set@.CallForwardOnBusyEnable'
option CFB_Number 'voice.Set@.CallForwardOnBusyNumber'
option NoAnswDivert 'voice.Set@.CallForwardOnNoAnswerEnable'
option CFNR_Number 'voice.Set@.CallForwardOnNoAnswerNumber'
option CFNR_Timeout 'voice.Set@.CallForwardOnNoAnswerRingTimeout'
option Enable_Call_Transfer 'voice.Set@.CallTransferEnable'
option AnonymousReject 'voice.Set@.AnonymousCallRejectionEnable'
option AllowAnonymousConf 'voice.Set@.AnonymousCallEnable'
config cs_xvendor 'map_np_cs'
option np_sc_actCW 'voice.X_IOPSYS_EU_NpSc@.CW_ACT'
option np_sc_actCW_output 'voice.X_IOPSYS_EU_NpSc@.CW_OUT'
option np_sc_deactCW 'voice.X_IOPSYS_EU_NpSc@.CW_DEACT'
option np_sc_isactCW 'voice.X_IOPSYS_EU_NpSc@.CW_ISACT'
option np_sc_actCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_ACT'
option np_sc_actCFU_output 'voice.X_IOPSYS_EU_NpSc@.CFU_OUT'
option np_sc_deactCFU 'voice.X_IOPSYS_EU_NpSc@.CFU_DEACT'
option np_sc_actCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_ACT'
option np_sc_actCFB_output 'voice.X_IOPSYS_EU_NpSc@.CFB_OUT'
option np_sc_deactCFB 'voice.X_IOPSYS_EU_NpSc@.CFB_DEACT'
option np_sc_actCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_ACT'
option np_sc_actCFNR_output 'voice.X_IOPSYS_EU_NpSc@.CFNR_OUT'
option np_sc_deactCFNR 'voice.X_IOPSYS_EU_NpSc@.CFNR_DEACT'
option np_sc_actRA 'voice.X_IOPSYS_EU_NpSc@.RA_ACT'
option np_sc_deactRA 'voice.X_IOPSYS_EU_NpSc@.RA_DEACT'
option np_sc_actAC 'voice.X_IOPSYS_EU_NpSc@.AC_ACT'
option np_sc_deactAC 'voice.X_IOPSYS_EU_NpSc@.AC_DEACT'
option np_sc_actAA 'voice.X_IOPSYS_EU_NpSc@.AA_ACT'
option np_sc_deactAA 'voice.X_IOPSYS_EU_NpSc@.AA_DEACT'
option np_sc_actAD 'voice.X_IOPSYS_EU_NpSc@.AD_ACT'
option np_sc_actAD_output 'voice.X_IOPSYS_EU_NpSc@.AD_OUT'
option np_sc_deactAD 'voice.X_IOPSYS_EU_NpSc@.AD_DEACT'
option np_sc_actMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_ACT'
option np_sc_deactMWSplash 'voice.X_IOPSYS_EU_NpSc@.MWI_SPLASH_DEACT'
option np_sc_actMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_ACT'
option np_sc_deactMWTone 'voice.X_IOPSYS_EU_NpSc@.MWI_TONE_DEACT'
option np_sc_redial 'voice.X_IOPSYS_EU_NpSc@.REDIAL'
option np_sc_setMiscConf 'voice.X_IOPSYS_EU_NpSc@.SET_MISC'
config cc_xvendor 'map_np_in'
option np_in_limitExp 'voice.X_IOPSYS_EU_InternalNumber@.RegExp'
config cc_xvendor 'map_np_sh'
option sh_no_str 'voice.X_IOPSYS_EU_ShortNumber@.RegExp'
config cc_xvendor 'map_np_eme'
option np_eme 'voice.X_IOPSYS_EU_EmergencyNumber@.RegExp'
option np_eme_out 'voice.X_IOPSYS_EU_EmergencyNumber@.OutStr'
config cc_xvendor 'map_np_rn'
option np_rn 'voice.X_IOPSYS_EU_RegularNumber@.RegExp'
option np_rn_out 'voice.X_IOPSYS_EU_RegularNumber@.OutStr'
option np_rn_account 'voice.X_IOPSYS_EU_RegularNumber@.AccStr'
config cc_xvendor 'map_np_bn'
option np_bn 'voice.X_IOPSYS_EU_BarredNumber@.RegExp'
option np_bn_out 'voice.X_IOPSYS_EU_BarredNumber@.OutStr'
config TR104NumberingPlan 'map_np_tr'
option min_digits 'voice.NumberingPlan@.MinimumNumberOfDigits'
option max_digits 'voice.NumberingPlan@.MaximumNumberOfDigits'
option tmo_std 'voice.NumberingPlan@.InterDigitTimerStd'
option tmo_open 'voice.NumberingPlan@.InterDigitTimerOpen'
option term_digit 'voice.NumberingPlan@.TerminationDigit'
option prefix_list 'voice.NumberingPlan@.PrefixList'
config TR104NumberingPlanPrefix 'map_np_pf'
option enable 'voice.@PrefixInfo@.Enable'
option range 'voice.@PrefixInfo@.PrefixRange'
option prefix_min_digits 'voice.@PrefixInfo@.PrefixMinNumberOfDigits'
option prefix_max_digits 'voice.@PrefixInfo@.PrefixMaxNumberOfDigits'
option remove_digits 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
option remove_pos 'voice.@PrefixInfo@.NumberOfDigitsToRemove'
option facility_act 'voice.@PrefixInfo@.FacilityAction'
option facility_arg 'voice.@PrefixInfo@.FacilityActionArgument'

View File

@@ -1,56 +0,0 @@
config static_prm 'defaults'
option Print_Control '4'
option Print_UDP_Addr '192.168.1.3'
option Print_UDP_Port '60000'
option Verbosity 'Off'
option Failure_Log 'On'
option Message_Log 'Off'
option Method_Trace 'Off'
option Dial_Cache_Size '0'
option Reverse_Fax_Detection '0'
option DSP_24 '0'
option DSP_36 '0'
option DSP_43 '0'
option Swap_Name_Nr_CID '0'
option R_Button_Lower_Lim '100'
option R_Button_Upper_Lim '800'
option HookOn_Delay '0'
option SupportLDD '0'
option LDD_Min_Break_Time '41'
option LDD_Max_Break_Time '94'
option LDD_Percent_Break '55'
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 ' '
option SIP_Reason_Protocol '0'
option SIP_Body_QOST '0'
option SIP_HistoryInfo '0'
option Customer_Spec2 '1'
option UTF8_Enable '0'
option RFC3325 '0'
option Accept_From_Registered '0'
option Polarity_Reversal '0'
option Closed_Dial_Plan '0'
option Netw_Dial '0'
option No_Answer_Tmo '180'
option UPnP_Enabled '0'
option NAT_Address ' '
option NAT_Address_From_SIP '0'
option HookOn_Transfer '0'
option Enable_Call_Transfer '1'
option Multiparty_Transp '0'
option Presence_Indication '0'
option Login_Note ' '
option Login_Description ' '
option Logout_Note ' '
option Logout_Description ' '
option Resolve_Every_Transaction '2'
option Translate_Plus '1'
option Mid_Call_Services '0'
option Account_Restriction '0'
option Answering_Machine_Enable '0'

View File

@@ -1,36 +1,14 @@
if PACKAGE_icwmp
choice
prompt "Select ACS sever"
default CWMP_ACS_MULTI
prompt "Select ACS sever"
default CWMP_ACS_MULTI
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
config CWMP_ACS_MULTI
bool "No specific ACS, follow standard"
config CWMP_ACS_HDM
bool "HDM"
bool "Select HDM as ACS server"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
default y
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options"
default n
choice
prompt "Select SSL utility"
default CWMP_USE_WOLFSSL
config CWMP_USE_WOLFSSL
bool "Use WolfSSL for ssl utilities"
select CONFIG_PACKAGE_libwolfssl
config CWMP_USE_OPENSSL
bool "Use OpenSSL for ssl utilities"
select CONFIG_PACKAGE_libopenssl
endchoice
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,46 +8,71 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.3.5
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_VERSION:=8.4.26.10
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4dd933047dcce4d297b17cafcb0ee2ad39004c15
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=ac7410a726a7269dcaef4c80061cab7a4447f6d1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=COPYING
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS:= \
CONFIG_CWMP_ACS_MULTI \
CONFIG_CWMP_ACS_HDM \
CONFIG_CWMP_DEBUG \
CONFIG_CWMP_DEVEL_DEBUG
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
define Package/icwmp/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libwolfssl +curl +libcurl +libopenssl
MENU := 1
TITLE:=TR069 CWMP client
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml
endef
define Package/$(PKG_NAME)/description
A free client implementation of CWMP (TR-069) protocol
TARGET_CFLAGS += \
-D_GNU_SOURCE -g \
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
define Package/icwmp-openssl
$(Package/icwmp/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_icwmp-openssl:libopenssl
VARIANT:=openssl
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config_cwmp.in"
define Package/icwmp-wolfssl
$(Package/icwmp/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_icwmp-wolfssl:libwolfssl
CONFLICTS := icwmp-openssl
VARIANT:=wolfssl
endef
define Package/icwmp-mbedtls
$(Package/icwmp/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_icwmp-mbedtls:libmbedtls
CONFLICTS := icwmp-openssl icwmp-wolfssl
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --enable-libopenssl
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
endif
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
@@ -55,58 +80,32 @@ define Build/Prepare
endef
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE \
"-DCWMP_REVISION=\\\"$(PKG_SOURCE_VERSION)\\\""
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
CONFIGURE_ARGS += \
--enable-acs=multi
endif
ifeq ($(CONFIG_CWMP_ACS_HDM),y)
CONFIGURE_ARGS += \
--enable-acs=hdm
endif
ifeq ($(CONFIG_CWMP_DEBUG),y)
CONFIGURE_ARGS += \
--enable-debug
endif
ifeq ($(CONFIG_CWMP_DEVEL_DEBUG),y)
CONFIGURE_ARGS += \
--enable-devel
endif
ifeq ($(CONFIG_CWMP_USE_WOLFSSL), y)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
TARGET_LDFLAGS += "-lwolfssl"
endif
ifeq ($(CONFIG_CWMP_USE_OPENSSL), y)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lssl"
endif
define Package/$(PKG_NAME)/install
define Package/icwmp/default/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(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_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-icwmp-generate-ssl $(1)/etc/uci-defaults/
$(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
$(eval $(call BuildPackage,$(PKG_NAME)))
Package/icwmp-openssl/install = $(Package/icwmp/default/install)
Package/icwmp-wolfssl/install = $(Package/icwmp/default/install)
Package/icwmp-mbedtls/install = $(Package/icwmp/default/install)
$(eval $(call BuildPackage,icwmp-openssl))
$(eval $(call BuildPackage,icwmp-wolfssl))
$(eval $(call BuildPackage,icwmp-mbedtls))

View File

@@ -0,0 +1,36 @@
{
"json_plugin_version": 1,
"Device.CWMPManagementServer.": {
"type": "object",
"version": "2.15",
"protocols": [
"usp"
],
"access": false,
"array": false,
"dependency": "file:/etc/config/cwmp",
"EnableCWMP": {
"type": "boolean",
"version": "2.15",
"read": true,
"write": true,
"protocols": [
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "cwmp",
"section": {
"name": "cpe"
},
"option": {
"name": "enable"
}
}
}
]
}
}
}

View File

@@ -11,12 +11,13 @@ config acs 'acs'
option retry_min_wait_interval '5'
#­ possible configs interval :[1000:65535]
option retry_interval_multiplier '2000'
option https_ssl_capath ''
option ipv6_enable '0'
option ip_version '4'
config cpe 'cpe'
option enable '1'
option default_wan_interface 'wan'
option default_lan_interface 'lan'
option log_to_console 'disable'
option log_to_file 'disable'
# log_severity: INFO (Default)

View File

@@ -6,7 +6,6 @@ log() {
}
if [ ! -f "/var/state/cwmp" ]; then
touch "/var/state/cwmp"
exit 0;
fi

View File

@@ -1,93 +1,29 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "$@" |logger -t cwmp.update -p info
}
handle_icwmp_update() {
local defwan vendorspecinf update
local cwmp_enable
config_load cwmp
update="0"
defwan="$(uci -q get cwmp.cpe.default_wan_interface)"
vendorspecinf="$(ifstatus "${defwan}" | jsonfilter -e "@.data.vendorspecinf")"
config_get_bool cwmp_enable cpe enable 1
if [ "$cwmp_enable" = "0" ]; then
return 0
fi
log "Handling dhcp option value [${vendorspecinf}]"
[ -n "$vendorspecinf" ] && {
local url old_url
local prov_code old_prov_code
local min_wait_interval old_min_wait_interval
local retry_interval_multiplier old_retry_interval_multiplier
old_url="$(uci -q get cwmp.acs.dhcp_url)"
old_prov_code="$(uci -q get cwmp.cpe.dhcp_provisioning_code)"
old_min_wait_interval="$(uci -q get cwmp.acs.dhcp_retry_min_wait_interval)"
old_retry_interval_multiplier="$(uci -q get cwmp.acs.dhcp_retry_interval_multiplier)"
case $vendorspecinf in
http://*|https://*)
url="${vendorspecinf}"
;;
*)
for optval in $vendorspecinf; do
case $optval in
1=*)
url="$(echo "$optval" | cut -d"=" -f2-)"
;;
2=*)
prov_code="$(echo "$optval" | cut -d"=" -f2-)"
;;
3=*)
min_wait_interval="$(echo "$optval" | cut -d"=" -f2-)"
;;
4=*)
retry_interval_multiplier="$(echo "$optval" | cut -d"=" -f2-)"
;;
esac
done
;;
esac
if [ -n "$url" ]; then
if [ "${url}" != "${old_url}" ]; then
log "## icwmp url[${old_url}] changed to [${url}]"
uci -q set cwmp.acs.dhcp_url="$url"
update=1
fi
fi
if [ -n "$prov_code" ]; then
if [ "${prov_code}" != "${old_prov_code}" ]; then
log "## icwmp prov_code[${old_prov_code}] changed to [${prov_code}]"
uci -q set cwmp.cpe.dhcp_provisioning_code="$prov_code"
update=1
fi
fi
if [ -n "$min_wait_interval" ]; then
if [ "${min_wait_interval}" != "${old_min_wait_interval}" ]; then
log "## icwmp min_wait_interval[${old_min_wait_interval}] changed to [${min_wait_interval}]"
uci -q set cwmp.acs.dhcp_retry_min_wait_interval="$min_wait_interval"
update=1
fi
fi
if [ -n "$retry_interval_multiplier" ]; then
if [ "${retry_interval_multiplier}" != "${old_retry_interval_multiplier}" ]; then
log "## icwmp retry_interval_multiplier[${old_retry_interval_multiplier}] changed to [${retry_interval_multiplier}]"
uci -q set cwmp.acs.dhcp_retry_interval_multiplier="$retry_interval_multiplier"
update=1
fi
fi
}
if [ "${update}" -eq "1" ]; then
log "CWMP uci changes, reload cwmp with uci commit"
ubus call uci commit '{"config":"cwmp"}'
else
if ubus list tr069 >/dev/null 2>&1 ; then
log "Trigger out of bound inform"
ubus call tr069 inform
else
log "Restarting icwmp tr069 object not found"
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.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
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
fi
}
handle_icwmp_update
handle_icwmp_update $@

View File

@@ -1,20 +1,48 @@
#!/bin/sh /etc/rc.common
# Copyright (C) 2015-2019 iopsys Software Solutions AB
. /lib/functions.sh
include /lib/network
. /usr/share/libubox/jshn.sh
START=99
STOP=2
STOP=00
USE_PROCD=1
PROG="/usr/sbin/icwmpd"
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
include /lib/network
log() {
echo "${@}"|logger -t cwmp.init -p info
}
regenerate_ssl_link()
{
local cert_dir all_file rehash
cert_dir="${1}"
[ ! -d "${cert_dir}" ] && return 0;
### Generate all ssl link for pem certicates ###
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
done
fi
### Generate all ssl link for crt certicates ###
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
done
fi
}
enable_dhcp_option43() {
local wan="${1}"
@@ -36,13 +64,192 @@ enable_dhcp_option43() {
fi
newreqopts="$reqopts 43"
if [ "${proto}" == "dhcp" ]; then
if [ "${proto}" = "dhcp" ]; then
uci -q set network.$wan.reqopts="$newreqopts"
uci commit network
ubus call network reload
fi
}
convert_to_hex() {
local val=""
local optval="${1}"
OPTIND=1
while getopts ":" opt "-$optval"
do
temp=$(printf "%02X" "'${OPTARG:-:}")
val="${val}:${temp}"
done
echo "${val}"
}
configure_send_op125() {
local sendopt="${1}"
local intf="${2}"
local uci="${3}"
local hex_oui=""
local hex_serial=""
local hex_class=""
local oui_len=0
local serial_len=0
local class_len=0
if [ "${uci}" = "network" ]; then
local opt125="125:00:00:0D:E9"
else
local opt125="125,00:00:0D:E9"
fi
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
fi
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
config_get serial cpe serial_number ""
if [ -z "${serial}" ]; then
serial=$(db -q get device.deviceinfo.SerialNumber)
fi
config_get class cpe product_class ""
if [ -z "${class}" ]; then
class=$(db -q get device.deviceinfo.ProductClass)
fi
oui_len=$(echo -n "${oui}" | wc -m)
serial_len=$(echo -n "${serial}" | wc -m)
class_len=$(echo -n "${class}" | wc -m)
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
opt125_len=$((opt125_len + 6))
else
opt125_len=$((opt125_len + 4))
fi
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 "%02X" "${oui_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:01:${hex_oui_len}${hex_oui}"
else
opt125="${opt125}:04:${hex_oui_len}${hex_oui}"
fi
hex_serial=$(convert_to_hex "${serial}")
if [ -z "${hex_serial}" ]; then
return 0
fi
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
hex_class=$(convert_to_hex "${class}")
if [ -z "${hex_class}" ]; then
return 0
fi
hex_class_len=$(printf "%02X" "${class_len}")
if [ "${uci}" = "network" ]; then
opt125="${opt125}:03:${hex_class_len}${hex_class}"
else
opt125="${opt125}:06:${hex_class_len}${hex_class}"
fi
fi
if [ "${uci}" = "network" ]; then
new_send_opt="$sendopt $opt125"
uci -q set network.$intf.sendopts="$new_send_opt"
else
uci -q add_list dhcp.$intf.dhcp_option="$opt125"
fi
}
enable_dnsmasq_option125() {
local lan="${1}"
local send125_present=0
local opt125="125,"
local proto="$(uci -q get dhcp.$lan.dhcpv4)"
if [ "${proto}" = "server" ]; then
opt_list="$(uci -q get dhcp.$lan.dhcp_option)"
for sopt in $opt_list; do
if [[ "$sopt" == "$opt125"* ]]; then
send125_present=1
break
fi
done
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "" "${lan}" "dhcp"
ubus call uci commit '{"config":"dhcp"}'
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
local send125_present=0
local network_uci_update=0
local opt125="125:"
for ropt in $reqopts; do
case $ropt in
125) req125_present=1 ;;
*) ;;
esac
done
for sopt in $sendopts; do
if [[ "$sopt" == "$opt125"* ]]; then
send125_present=1
break
fi
done
if [ "${proto}" = "dhcp" ]; then
if [ ${req125_present} -eq 0 ]; then
newreqopts="$reqopts 125"
uci -q set network."${wan}".reqopts="$newreqopts"
network_uci_update=1
fi
if [ ${send125_present} -eq 0 ]; then
configure_send_op125 "${sendopts}" "${wan}" "network"
network_uci_update=1
fi
fi
if [ ${network_uci_update} -eq 1 ]; then
uci commit network
ubus call network reload
fi
}
wait_for_resolvfile() {
local time=$1
local tm=1
@@ -58,41 +265,30 @@ wait_for_resolvfile() {
}
copy_cwmp_etc_files_to_varstate() {
if [ ! -f /var/state/cwmp ]
then
if [ -f /etc/icwmpd/cwmp ]
then
uci -q -c /etc/icwmpd delete cwmp.acs
uci -q -c /etc/icwmpd commit cwmp
cp /etc/icwmpd/cwmp /var/state/cwmp
else
touch /var/state/cwmp
fi
mkdir -p /var/run/icwmpd
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]; then
cp -f /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd/ 2>/dev/null
fi
mkdir -p /var/run/icwmpd
if [ -f /etc/icwmpd/icwmpd_backup_session.xml ]
then
mv /etc/icwmpd/icwmpd_backup_session.xml /var/run/icwmpd 2>/dev/null
fi
if [ -f /etc/icwmpd/dm_enabled_notify.xml ]
then
mv /etc/icwmpd/dm_enabled_notify /var/run/icwmpd 2>/dev/null
if [ -f /etc/icwmpd/dm_enabled_notify.xml ]; then
cp -f /etc/icwmpd/dm_enabled_notify /var/run/icwmpd/ 2>/dev/null
fi
touch /var/run/icwmpd/cwmp
}
copy_cwmp_varstate_files_to_etc() {
if [ -f /var/state/cwmp ]
then
cp /var/state/cwmp /etc/icwmpd 2>/dev/null
if [ -f /var/run/icwmpd/icwmpd_backup_session.xml ]; then
cp -f /var/run/icwmpd/icwmpd_backup_session.xml /etc/icwmpd/ 2>/dev/null
fi
if [ -f /var/run/icwmpd/icwmpd_backup_session.xml ]
then
cp /var/run/icwmpd/icwmpd_backup_session.xml /etc/icwmpd 2>/dev/null
if [ -f /var/run/icwmpd/dm_enabled_notify.xml ]; then
cp -f /var/run/icwmpd/dm_enabled_notify /etc/icwmpd/ 2>/dev/null
fi
if [ -f /var/run/icwmpd/dm_enabled_notify.xml ]
then
cp /var/run/icwmpd/dm_enabled_notify /etc/icwmpd 2>/dev/null
# 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/
fi
}
@@ -104,12 +300,13 @@ validate_acs_section()
'periodic_inform_interval:uinteger' \
'periodic_inform_time:string' \
'url:string' \
'dhcp_discovery:string' \
'dhcp_url:string' \
'compression:or("GZIP","Deflate","Disabled")' \
'retry_min_wait_interval:range(1, 65535)' \
'retry_interval_multiplier:range(1000, 65535)' \
'https_ssl_capath:file' \
'ipv6_enable:bool'
'ipv6_enable:bool' \
'ssl_capath:string'
}
@@ -138,6 +335,7 @@ validate_cpe_section()
}
validate_defaults() {
local ssl_capath
config_load cwmp
validate_acs_section || {
@@ -145,10 +343,15 @@ validate_defaults() {
return 1;
}
[ -z "${url}" ] && [ -z "${dhcp_url}" ] && {
log "ACS url is empty can't start"
return 1;
}
ssl_capath="${ssl_capath%/}"
# Put the cert pem file in keep list
if [ -d "${ssl_capath}" ]; then
if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then
echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp
echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp
fi
fi
validate_cpe_section || {
log "Validation of cpe section failed"
@@ -158,42 +361,76 @@ validate_defaults() {
return 0;
}
set_vendor_id() {
local wan="${1}"
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
}
boot() {
local dhcp_url dhcp_discovery
local enable_cwmp="0"
local dhcp_discovery="0"
config_load cwmp
config_get_bool dhcp_discovery acs dhcp_discovery 1
config_get dhcp_url acs dhcp_url ""
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
if [ -z "${dhcp_url}" ]; then
log "dhcp discovery enabled but no dhcp url, trigger update"
/etc/icwmpd/update.sh
fi
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
# 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_dhcp_option125 "${wan_interface}"
enable_dnsmasq_option125 "${lan_interface}"
fi
config_get ssl_capath acs ssl_capath
if [ -n "${ssl_capath}" ]; then
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
touch /etc/icwmpd/cwmp_notifications
start
}
start_service() {
local enable_cwmp
local wan_interface
local dhcp_discovery
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get dhcp_discovery acs dhcp_discovery
config_get wan_interface cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ] || [ "$enable_cwmp" = "false" ]; then
log "CWMP is not enabled"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
# Set dhcp option 43 if dhcp discovery enabled
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
enable_dhcp_option43 "${wan_interface}"
fi
[ -f /sbin/netifd ] && log "Waiting for Network to be started ..." && ubus -t 5 wait_for network.interface
[ -f /usr/sbin/dnsmasq ] && log "Waiting for DNS Proxy to be started ..." && ubus -t 5 wait_for dnsmasq
[ -f /etc/config/dhcp ] && log "Waiting for DNS Server(s) ..." && wait_for_resolvfile 20
@@ -203,9 +440,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
@@ -223,9 +457,30 @@ stop_service()
}
reload_service() {
log "Restarting CWMP client"
stop
start
local ret
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
ret="0"
if [ "$enable_cwmp" = "0" ]; then
stop
start
return 0
fi
status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')"
ret="$?"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'
ret="$?"
fi
if [ "$status" = "init" ] || [ "$ret" -ne "0" ]; then
log "Restarting CWMP client"
stop
start
fi
}
service_triggers() {

View File

@@ -1,7 +1,11 @@
#!/bin/sh
. /lib/functions.sh
# Copy defaults by the factory to the cwmp UCI user section.
config_load cwmp
# Get Manufacturer OUI.
oui=$(uci -q get cwmp.cpe.manufacturer_oui)
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
oui=$(db -q get device.deviceinfo.ManufacturerOUI)
fi
@@ -9,24 +13,29 @@ fi
oui=$(echo "${oui}" | tr 'a-f' 'A-F')
# Get system serial number.
serial=$(uci -q get cwmp.cpe.serial_number)
config_get serial cpe serial_number ""
if [ -z "${serial}" ]; then
serial=$(db -q get device.deviceinfo.SerialNumber)
fi
# Get userid values
acs_userid=$(uci -q get cwmp.acs.userid)
cpe_userid=$(uci -q get cwmp.cpe.userid)
config_get acs_userid acs userid ""
config_get cpe_userid cpe userid ""
# Only set if they are empty
if [ -z "$acs_userid" ]
then
if [ -z "${acs_userid}" ]; then
uci -q set cwmp.acs.userid="${oui}-${serial}"
fi
if [ -z "$cpe_userid" ]
then
if [ -z "${cpe_userid}" ]; then
uci -q set cwmp.cpe.userid="${oui}-${serial}"
fi
# Fix the cwmp.cpe.enable parameter
# set default to 1 if not defined
config_get enable_cwmp cpe enable ""
if [ -z "${enable_cwmp}" ]; then
uci -q set cwmp.cpe.enable="1"
fi
# No need for commit here, it is done by uci_apply_defaults().

View File

@@ -1,18 +0,0 @@
#!/bin/sh
. /lib/functions.sh
regenerate_ssl_link(){
[ ! -d "/etc/ssl/certs" ] && return 0;
[ ! -f "/etc/ssl/certs/*.pem" ] && return 0;
local cert_dir="/etc/ssl/certs"
local all_file=$(ls $cert_dir/*.pem)
for cfile in $all_file
do
ln -s $cfile $cert_dir/$(openssl x509 -hash -noout -in $cfile).0
done
}
regenerate_ssl_link

View File

@@ -1 +1,2 @@
/var/run/icwmpd/icwmpd_backup_session.xml
/etc/icwmpd/cwmp_notifications

View File

@@ -1,16 +1,16 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2021-2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=4.6.22
PKG_VERSION:=4.10.40
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b5b5379bb7f8ec0c351bfa34385b74b21306d107
PKG_SOURCE_VERSION:=4533751a58cfb0fcf4ee878785f6c0872949c68d
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

View File

@@ -3,20 +3,24 @@ config ieee1905 'ieee1905'
option extension '1'
list extmodule 'map'
option registrar '2 5'
# option macaddress '0a:1b:2c:3d:4e:50'
config al-iface
option enabled '1'
option ifname 'br-lan'
option type 'bridge'
# ap sections are auto-generated/overwritten during onboarding
#
config ap
option band '2'
option ssid 'TestSSID.2'
option encryption 'psk2'
option key '5555500000'
option ssid 'IOWRT-2.4GHz'
option encryption 'sae-mixed'
option key '1234567890'
config ap
option band '5'
option ssid 'TestSSID.5'
option encryption 'psk2'
option key '2222200000'
option ssid 'IOWRT-5GHz'
option encryption 'sae-mixed'
option key '1234567890'
config al-iface
option enabled 1
option ifname 'br-lan'
option type 'bridge'

View File

@@ -44,7 +44,8 @@ validate_ap_section() {
uci_validate_section ieee1905 $section "${1}" \
'band:or("2", "5", "60")' \
'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' \

View File

@@ -0,0 +1,22 @@
#!/bin/sh
BMAC=$(db -q get hw.board.basemac)
BMAC=${BMAC//:/}
BMAC=${BMAC// /}
BMAC=$(printf "%12.12X" $((0x$BMAC)))
[ "$BMAC" == "" ] && exit 1
LMAC=$((0x$BMAC & 0xfeffffffffff))
LMAC=$(($LMAC | 0x020000000000))
LMAC=$(printf "%12.12X" $LMAC)
LMAC=$(echo $LMAC | sed -e 's/[0-9A-F]\{2\}/&:/g' -e 's/:$//')
mac=$(uci -q get ieee1905.ieee1905.macaddress)
[ "$mac" != "" ] && exit 0
uci set ieee1905.ieee1905.macaddress="$LMAC"
uci commit ieee1905

View File

@@ -0,0 +1,17 @@
#!/bin/sh
. /lib/functions.sh
config_load ieee1905
list_to_ifname() {
local section=$1
config_get ifname $section ifname # get list as space separated values
uci del ieee1905.${section}.ifname # delete entry
uci set ieee1905.${section}.ifname="$ifname" # writeback entry as option
}
config_foreach list_to_ifname al-iface

View File

@@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=inbd
PKG_VERSION:=1.2.2
PKG_VERSION:=1.2.3
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=10f765f3d0fcc226b6ecf0c481598c9e7f76315e
PKG_SOURCE_VERSION:=d4e910a31039e0c0b7a539311eafcd716c36be77
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/inbd
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz

View File

@@ -51,7 +51,6 @@ CONFIG_PACKAGE_wifimngr=y
# Multi-AP #
CONFIG_PACKAGE_ieee1905=y
CONFIG_PACKAGE_map-topology=y
CONFIG_PACKAGE_wfadatad=y
CONFIG_PACKAGE_wfadatad-collector=y
# Network #
@@ -65,15 +64,16 @@ CONFIG_PACKAGE_questd=y
CONFIG_PACKAGE_rulengd=y
# TR-x69 #
CONFIG_PACKAGE_uspd=y
CONFIG_PACKAGE_icwmp=y
CONFIG_PACKAGE_uspd-mbedtls=y
CONFIG_PACKAGE_icwmp-mbedtls=y
CONFIG_PACKAGE_obuspa=y
CONFIG_PACKAGE_bulkdata=y
CONFIG_PACKAGE_periodicstats=y
CONFIG_PACKAGE_stunc=m
CONFIG_PACKAGE_stunc-mbedtls=m
CONFIG_PACKAGE_swmodd=m
CONFIG_PACKAGE_twamp=m
CONFIG_PACKAGE_udpechoserver=m
CONFIG_PACKAGE_udpecho-client=m
CONFIG_PACKAGE_udpecho-server=m
CONFIG_PACKAGE_xmppc=m
# WebGUI #
@@ -133,6 +133,7 @@ CONFIG_LIBCURL_CRYPTO_AUTH=y
# CONFIG_LIBCURL_MBEDTLS is not set
CONFIG_LIBCURL_OPENSSL=y
CONFIG_PACKAGE_ethtool=y
CONFIG_PACKAGE_ip-bridge=y
CONFIG_PACKAGE_ip-full=y
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_ipset=y

View File

@@ -254,11 +254,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
git clone "$CUSTREPO" "$CUSTPATH"
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

View File

@@ -170,12 +170,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() {

View File

@@ -1,57 +0,0 @@
#
# Copyright (C) 2012-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libmicroxml
PKG_VERSION:=2012-06-11
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/mirror/microxml.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=72965423184f24cc0b963d91c2d1863cdb01b6aa
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=LGPL-2.0
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/libmicroxml
SECTION:=libs
CATEGORY:=Libraries
TITLE:=XML library
MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef
define Package/libmicroxml/description
A micro sized XML library
endef
CONFIGURE_ARGS += \
--disable-threads \
--enable-static \
--enable-shared
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_BUILD_DIR)/microxml.h $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_BUILD_DIR)/microxml.pc $(1)/usr/lib/pkgconfig
endef
define Package/libmicroxml/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libmicroxml.so* $(1)/usr/lib
endef
$(eval $(call BuildPackage,libmicroxml))

View File

@@ -1,130 +0,0 @@
diff --git a/mxml-file.c b/mxml-file.c
index 02eca9d..f10d202 100644
--- a/mxml-file.c
+++ b/mxml-file.c
@@ -363,9 +363,12 @@ mxmlSaveFile(mxml_node_t *node, /* I - Node to write */
* Write the node...
*/
- if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0)
+ if ((col = mxml_write_node(node, fp, cb, 0, mxml_file_putc, global)) < 0){
+ global_free(global);
return (-1);
-
+ }
+
+ global_free(global);
if (col > 0)
if (putc('\n', fp) < 0)
return (-1);
@@ -1448,6 +1451,7 @@ mxml_load_data(
if ((buffer = malloc(64)) == NULL)
{
mxml_error("Unable to allocate string buffer!");
+ global_free(global);
return (NULL);
}
@@ -2083,11 +2087,12 @@ mxml_load_data(
node->parent ? node->parent->value.element.name : "(null)");
mxmlDelete(first);
-
+ global_free(global);
return (NULL);
}
}
+ global_free(global);
if (parent)
return (parent);
else
@@ -2102,7 +2107,7 @@ error:
mxmlDelete(first);
free(buffer);
-
+ global_free(global);
return (NULL);
}
diff --git a/mxml-private.c b/mxml-private.c
index 4378ca3..ea6e452 100644
--- a/mxml-private.c
+++ b/mxml-private.c
@@ -41,6 +41,32 @@
* This code currently supports AIX, HP-UX, Linux, Mac OS X, Solaris, and
* Windows. It might work on the BSDs and IRIX, but I haven't tested that.
*/
+void *global_mem[16] = {0};
+
+static void *global_calloc(int x, int size)
+{
+ int i;
+ void *m = calloc(x, size);
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i > 0; i--) {
+ global_mem[i] = global_mem[i-1];
+ }
+ global_mem[0] = m;
+ return m;
+}
+
+void global_free(void *m)
+{
+ int i;
+ if (m == NULL)
+ return;
+ for (i = ((sizeof(global_mem)/sizeof(global_mem[0])) - 1); i >= 0; i--) {
+ if (global_mem[i] == m) {
+ global_mem[i] = NULL;
+ free(m);
+ break;
+ }
+ }
+}
#if defined(__sun) || defined(_AIX)
# pragma fini(_mxml_fini)
@@ -148,7 +174,6 @@ mxml_real_cb(mxml_node_t *node) /* I - Current node */
return (MXML_REAL);
}
-
#ifdef HAVE_PTHREAD_H /**** POSIX threading ****/
# include <pthread.h>
@@ -190,7 +215,6 @@ _MXML_FINI(void)
}
}
-
/*
* '_mxml_global()' - Get global data.
*/
@@ -205,7 +229,7 @@ _mxml_global(void)
if ((global = (_mxml_global_t *)pthread_getspecific(_mxml_key)) == NULL)
{
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
pthread_setspecific(_mxml_key, global);
global->num_entity_cbs = 1;
@@ -288,7 +312,7 @@ _mxml_global(void)
if ((global = (_mxml_global_t *)TlsGetValue(_mxml_tls_index)) == NULL)
{
- global = (_mxml_global_t *)calloc(1, sizeof(_mxml_global_t));
+ global = (_mxml_global_t *)global_calloc(1, sizeof(_mxml_global_t));
global->num_entity_cbs = 1;
global->entity_cbs[0] = _mxml_entity_cb;
diff --git a/mxml-private.h b/mxml-private.h
index c591208..72ed338 100644
--- a/mxml-private.h
+++ b/mxml-private.h
@@ -43,3 +43,4 @@ typedef struct _mxml_global_s
extern _mxml_global_t *_mxml_global(void);
extern int _mxml_entity_cb(const char *name);
+extern void global_free(void *m);

View File

@@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libtrace
PKG_VERSION:=3.0.22
PKG_VERSION:=3.0.23
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
@@ -72,11 +72,11 @@ endef
define Package/libtrace/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libtrace.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libwandio.so.* $(1)/usr/lib/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump.so.* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/libpacketdump
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpacketdump/*.so* $(1)/usr/lib/libpacketdump/
endef
define Package/libtrace-tools/install

View File

@@ -6,5 +6,29 @@ config AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
bool "Support Dynamic Controller configuration sync"
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
config AGENT_ISLAND_PREVENTION
bool "Support Island Prevention"
default y if MULTIAP_AGENT_ISLAND_PREVENTION
config AGENT_EASYMESH_R2_CERT
bool "Compile for WFA test bed"
config AGENT_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
default y
config AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
string
default "\\\\x11\\\\x22\\\\x33"
config AGENT_EASYMESH_VENDOR_EXT_OUI
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
default AGENT_EASYMESH_VENDOR_EXT_OUI_DEFAULT
help
Extra features not covered by the base Easymesh specification can be
enabled through AGENT_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
endmenu
endif

View File

@@ -1,16 +1,16 @@
#
# Copyright (C) 2020-21 IOPSYS Software Solutions AB
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=7.1.22
PKG_VERSION:=2.10.4.1
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=c3cf2f442ce79ffafe2e4e66e4120587f98b4da8
PKG_SOURCE_VERSION:=9e52e1476bd012914dfdd454cb16b292c99a0669
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
LOCAL_DEV=0
@@ -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
@@ -62,6 +62,20 @@ ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
endif
ifeq ($(CONFIG_AGENT_ISLAND_PREVENTION),y)
TARGET_CFLAGS += -DAGENT_ISLAND_PREVENTION
endif
ifeq ($(CONFIG_AGENT_EASYMESH_R2_CERT),y)
TARGET_CFLAGS += -DEASYMESH_R2_CERT
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
MAKE_PATH:=src
define Package/map-agent/install

View File

@@ -1,34 +1,134 @@
config agent 'agent'
option enabled '1'
option debug '6'
option debug '0'
option profile '2'
option al_bridge 'br-lan'
option netdev 'wlan'
option island_prevention '0'
option eth_onboards_wifi_bhs '0'
option ap_follow_sta_dfs '0'
option guest_isolation '0'
# option controller_macaddr '0a:1b:2c:3d:4e:50'
config dynamic_backhaul
option missing_bh_timer '60'
option missing_bh_reconfig_timer '1800'
config controller_select
option id 'auto'
option probe_int '20'
option retry_int '9'
option autostart '1'
option local '0'
config radio
option device 'phy0'
option band '2'
# options below are auto-generated during onboarding
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '70'
# option report_rcpi_threshold '80'
# option rcpi_hysteresis_margin '0'
# option report_util_threshold '0'
# option include_sta_stats '1'
# option include_sta_metric '1'
config radio
option device 'phy1'
option band '5'
# options below are auto-generated during onboarding
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '86'
# option report_rcpi_threshold '96'
# option rcpi_hysteresis_margin '0'
# option report_util_threshold '0'
# option include_sta_stats '1'
# option include_sta_metric '1'
config bsta
option enabled '1'
option ifname 'wlan0'
option band '2'
option device 'phy0'
option priority '2'
# options below are auto-generated during onboarding
# option ssid 'MAP-BH-2.4GHz'
# option encryption 'sae-mixed'
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
# option onboarded '1'
# option bssid '0a:1b:2c:3d:4e:53'
# option vid '1'
config bsta
option enabled '1'
option ifname 'wlan1'
option band '5'
option device 'phy1'
option priority '0'
# options below are auto-generated during onboarding
# option ssid 'MAP-BH-5GHz'
# option encryption 'sae-mixed'
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
# option onboarded '1'
# option bssid '0a:1b:2c:3d:4e:54'
# option vid '1'
# ap sections and policy section are
# auto-generated during onboarding
#
#config ap
# option ifname 'wl0'
# option steer 'rssi bssload'
# list exclude '00:11:22:33:44:55'
# list exclude_btm '00:aa:bb:cc:dd:ee'
# list assoc_ctrl '00:10:20:30:40:50'
# option btm_retry '3'
# option btm_retry_secs '180'
# option fallback_legacy '1'
# option steer_legacy_reassoc_secs '30'
# option steer_legacy_retry_secs '3600'
# option assoc_ctrl_secs '30'
# option band '2'
# option type 'fronthaul'
#config ap
# option ifname 'wl1'
# option steer 'rssi bssload'
# list exclude '00:11:22:33:44:55'
# list exclude_btm '00:aa:bb:cc:dd:ee'
# option band '5'
# option type 'fronthaul'
#config bsta
# option ifname 'apclii0'
# option enabled '1'
# option onboarded '0'
# option disallow_bsta '1 # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
# option ifname 'wlan0-1'
# option band '2'
# option device 'phy0'
# option type 'fronthaul'
# option ssid 'IOWRT-2.4GHz'
# option encryption 'sae-mixed+aes'
# option key '1234567890'
# option vid '1'
#config ap
# option enabled '1'
# option ifname 'wlan0-2'
# option band '2'
# option device 'phy0'
# option type 'backhaul'
# option ssid 'MAP-BH-2.4GHz'
# option encryption 'sae+aes'
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
# option disallow_bsta '0'
# option vid '1'
#config ap
# option enabled '1'
# option ifname 'wlan1-1'
# option band '5'
# option device 'phy1'
# option type 'fronthaul'
# option ssid 'IOWRT-5GHz'
# option encryption 'sae-mixed+aes'
# option key '1234567890'
# option vid '1'
#config ap
# option enabled '1'
# option ifname 'wlan1-2'
# option band '5'
# option device 'phy1'
# option type 'backhaul'
# option ssid 'MAP-BH-5GHz'
# option encryption 'sae+aes'
# option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
# option disallow_bsta '0'
# option vid '1'
#config policy
# option report_interval '0'
# option pvid '1'
# option pcp_default '0'
# option report_scan '0'
# option report_sta_assocfails '0'
# option report_sta_assocfails_rate '0'

View File

@@ -97,7 +97,9 @@ if [ "$LINK" = "up" ]; then
/lib/wifi/multiap set_uplink "eth" "$PORT"
else
rm -f "$map_bh_file"
/lib/wifi/multiap unset_uplink "eth"
#rm -f "$map_bh_file"
config_load "mapagent"
config_foreach update_bstas bsta up
fi

View File

@@ -10,56 +10,8 @@ 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/map.agent.bsta_global_disable
rm -f /tmp/multiap.backhaul
procd_open_instance
procd_set_param command "/usr/sbin/dynbhd"
procd_set_param respawn
@@ -79,7 +31,10 @@ validate_agent_section() {
'netdev:string' \
'vlan_segregation:bool:false' \
'resend_num:uinteger:0' \
'dyn_cntlr_sync:bool:true'
'dyn_cntlr_sync:bool:true' \
'island_prevention:bool:false' \
'eth_onboards_wifi_bhs:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of agent section failed"
@@ -139,14 +94,19 @@ validate_radio_section() {
'configured:bool:false' \
'onboarded:bool:false' \
'dedicated_backhaul:bool:false' \
'steer_policy:range(0,255)' \
'steer_policy:range(0,255)' \
'util_threshold:range(0,255)' \
'rcpi_threshold:range(0,255)' \
'report_rcpi_threshold:range(0,255)' \
'include_sta_stats:bool:false' \
'include_sta_metric:bool:false' \
'rcpi_hysteresis_margin:range(0,255)' \
'report_util_threshold:range(0,255)'
'report_util_threshold:range(0,255)' \
'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"
@@ -178,14 +138,31 @@ validate_policy_section() {
return 0
}
validate_dyn_bh_section() {
local section="$1"
uci_validate_section mapagent $section "${1}" \
'missing_bh_timer:range(1,255)'
uci_validate_section mapagent $section "${1}" \
'missing_bh_reconfig_timer:range(0,65535)'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of dynamic backhaul section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_agent_config() {
IS_CFG_VALID=1
validate_agent_section &&
config_foreach validate_cs_section controller_select &&
config_foreach validate_ap_section ap &&
config_foreach validate_radio_section radio &&
config_foreach validate_policy_section policy
config_foreach validate_radio_section radio &&
config_foreach validate_policy_section policy &&
config_foreach validate_dyn_bh_section dynamic_backhaul
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "mapagent" "Validation of mapagent UCI file failed"
@@ -208,22 +185,14 @@ 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
procd_set_param command "/usr/sbin/mapagent" "-d"
procd_set_param command "/usr/sbin/mapagent" "-d"
procd_set_param respawn
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance
}
#stop_service() {
# remove_map
#}
service_triggers()
{
procd_add_reload_trigger "mapagent"

View File

@@ -0,0 +1,13 @@
#!/bin/sh
. /lib/functions.sh
unset_pvid() {
local section=$1
uci -q set mapagent.${section}.pvid="0"
}
config_load mapagent
config_foreach unset_pvid policy

View File

@@ -55,7 +55,7 @@ get_type_by_section() {
echo "$(type_to_multi_ap $type)"
}
brcm_sync_credentials() {
sync_credentials() {
bands=""
json_init
mapagent_process_fh() {
@@ -160,7 +160,7 @@ brcm_sync_credentials() {
json_cleanup
}
brcm_write_credentials() {
write_credentials() {
config_load mapagent
mapagent_apply_wireless() {
@@ -207,7 +207,7 @@ brcm_write_credentials() {
#echo applying bk_ssid = "$bk_ssid" bk_key = "$bk_key"
# subshell in hopes to maintain mapagent config loaded
echo $(mapagent_apply_wireless $ifname "$bk_ssid" "$bk_key") 2> /dev/null
(mapagent_apply_wireless $ifname "$bk_ssid" "$bk_key")
}
mapagent_find_bbss() {
@@ -250,7 +250,7 @@ brcm_write_credentials() {
uci commit wireless
}
brcm_set_network() {
set_network() {
local ifname=$1
local num=$2
local bssid=$3
@@ -356,14 +356,14 @@ write_bsta_config() {
#echo result diff = $diff > /dev/console
[ "$diff" == "1" ] && {
config_foreach mapagent_apply_bssid_same_band bsta
(config_foreach mapagent_apply_bssid_same_band bsta)
#ubus call uci commit '{"config":"wireless"}'
#echo reloading wireless > /dev/console
}
}
brcm_teardown_iface() {
teardown_iface() {
config_load mapagent
local iface=$1
@@ -377,7 +377,7 @@ brcm_teardown_iface() {
[ "$ifname" != "$map_ifname" ] && return
uci -q set wireless.${section}.start_disabled="1"
uci -q set wireless.${section}.disabled="1"
uci -q set wireless.${section}.ssid="DISABLED-SSID"
uci -q set wireless.${section}.key="DISABLED-KEY"
uci -q delete wireless.${section}.multi_ap_backhaul_ssid
@@ -404,9 +404,10 @@ brcm_teardown_iface() {
uci -q set mapagent.${section}.enabled="0"
uci -q set mapagent.${section}.ssid="DISABLED-SSID"
uci -q set mapagent.${section}.key="DISABLED-KEY"
#uci -q del mapagent.${section}.vid
# subshell in hopes to maintain mapagent config loaded
$(mapagent_teardown_wireless $ifname)
(mapagent_teardown_wireless $ifname)
}
@@ -416,7 +417,7 @@ brcm_teardown_iface() {
uci commit mapagent
}
brcm_bsta_to_wireless() {
bsta_to_wireless() {
config_load mapagent
mapagent_find_lowest_prio_onboarded() {
@@ -488,10 +489,12 @@ brcm_bsta_to_wireless() {
mapagent_find_other_creds() {
#echo "trying to find other creds for $2" > /dev/console
local other_section="$2"
config_get band $1 band
config_get onboarded $1 onboarded "0"
[ "$3" != "$band" -o "$onboarded" = "0" ] && return
[ "$4" != "$band" -o "$onboarded" = "0" ] && return
config_get ssid $1 ssid
config_get key $1 key
@@ -499,7 +502,12 @@ brcm_bsta_to_wireless() {
config_get enabled $1 enabled "0"
config_get bssid $1 bssid
echo $(mapagent_apply_wl_bsta $2 "$ssid" "$key" $encryption $4 "$bssid")
uci -q set mapagent.${other_section}.ssid="$ssid"
uci -q set mapagent.${other_section}.key="$key"
uci -q set mapagent.${other_section}.encryption=$encryption
uci -q set mapagent.${other_section}.bssid="$bssid"
uci commit mapagent
(mapagent_apply_wl_bsta "$3" "$ssid" "$key" $encryption "$5" "$bssid")
}
config_get band $1 band
@@ -508,14 +516,14 @@ brcm_bsta_to_wireless() {
config_get enabled $1 enabled "0"
if [ "$onboarded" = "0" ]; then
config_foreach mapagent_find_other_creds bsta $ifname $band $enabled
config_foreach mapagent_find_other_creds bsta $1 $ifname $band $enabled
else
config_get ssid $1 ssid
config_get key $1 key
config_get encryption $1 encryption
config_get bssid $1 bssid
echo $(mapagent_apply_wl_bsta $ifname "$ssid" "$key" $encryption $enabled "$bssid")
(mapagent_apply_wl_bsta $ifname "$ssid" "$key" $encryption $enabled "$bssid")
fi
}
@@ -665,7 +673,7 @@ bsta_scan_on_enabled() {
bsta_enable_all() {
mapagent_enable_bk() {
config_get ifname $1 ifname "2"
config_get ifname $1 ifname
uci -q set mapagent.$1.enabled="1"
}
@@ -676,6 +684,68 @@ bsta_enable_all() {
bsta_scan_on_enabled
}
# arg = one interface to clear
# no arg = clear all interfaces
bsta_clear_bssid() {
local iface=$1
mapagent_remove_bssid() {
local iface=$2
config_get ifname $1 ifname
[ -n "$iface" -a "$iface" != "$ifname" ] && return
uci -q set mapagent.$1.enabled="1"
uci -q del mapagent.$1.bssid
}
wireless_remove_bssid() {
local iface=$2
config_get mode $1 mode
config_get ifname $1 ifname
[ "$mode" != "sta" ] && return
[ -n "$iface" -a "$iface" != "$ifname" ] && return
uci -q del wireless.$1.bssid
wpa_cli -i "$ifname" bssid 0 00:00:00:00:00:00 > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
config_load mapagent
config_foreach mapagent_remove_bssid bsta $iface
uci commit mapagent
config_load wireless
config_foreach wireless_remove_bssid wifi-iface $iface
uci commit wireless
}
# arg1 = ifname arg2 = bssid
bsta_blacklist_bssid_set() {
local ifname="$1"
shift
local bssid="$@"
wpa_cli -i "$ifname" set_network 0 bssid_ignore "$bssid" > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
bsta_blacklist_bssid_clear() {
mapagent_blacklist_by_band() {
config_get ifname $1 ifname
wpa_cli -i "$ifname" set_network 0 bssid_ignore "" > /dev/null 2>&1
wpa_cli -i "$ifname" save_config > /dev/null 2>&1
}
config_load mapagent
config_foreach mapagent_blacklist_by_band bsta
}
bsta_disable_lower_priority() {
config_load mapagent
@@ -723,9 +793,13 @@ bsta_disable_lower_priority() {
[ "$ifname" != "$2" -a "$priority" -gt "$3" ] && enabled="0"
# enable passed ifname explicitly
# don't explicitly enable other higher prio interfaces
[ "$ifname" != "$2" -a "$enabled" = "1" ] && return
uci -q set mapagent.$1.enabled="$enabled"
echo $(mapagent_apply_wl_bsta $ifname $enabled) > /dev/null
(mapagent_apply_wl_bsta $ifname $enabled) > /dev/null
}
local bsta=$1
@@ -759,6 +833,12 @@ bsta_use_link() {
local bsta=$1
config_foreach mapagent_disable_bk bsta $bsta
noht=$(iw $bsta info | grep "no HT")
[ -n "$noht" ] && {
logger -t multiap "no HT hit, issue reassoc $bsta"
wpa_cli -i $bsta reassoc
}
}
bsta_swap_to_link() {
@@ -774,11 +854,48 @@ set_uplink_backhaul_info() {
local ul_1905id=$1
local ul_mac=$2
json_load "$(cat $MAPFILE)"
json_add_string "backhaul_device_id" "$ul_1905id"
json_add_string "backhaul_macddr" "$ul_mac"
json_dump > "$MAPFILE"
json_cleanup
(
flock -x 200
json_load "$(cat $MAPFILE)"
json_add_string "backhaul_device_id" "$ul_1905id"
json_add_string "backhaul_macddr" "$ul_mac"
json_dump > "$MAPFILE"
json_cleanup
) 200>/var/lock/map.backhaul.lock
}
update_isolate_ebtables() {
parse_fh() {
local brcm_setup="$(uci -q get mapagent.agent.brcm_setup)"
local guest_isolate="$(uci -q get mapagent.agent.guest_isolation)"
local pvid="$(uci -q get mapagent.@policy[0].pvid)"
local section=$1
local prefix="TODO"
local action="del"
config_get vid $section vid
config_get band $section band
config_get ifname $section ifname
[ $vid -gt 4094 -o $vid -lt 1 ] && vid=$pvid
[ "$guest_isolate" = "1" -a "$vid" != "$pvid" ] && action="add"
if [ "$brcm_setup" = "1" ]; then
prefix="wds"
else
#todo
break;
fi
ts_sub "isolate" "$action" "$pvid" "$vid" "$band" "$ifname" "$prefix"
}
config_load mapagent
config_foreach parse_fh ap
}
set_uplink() {
@@ -792,31 +909,60 @@ set_uplink() {
json_add_string "type" "$type"
json_add_string "ifname" "$ifname"
json_add_string "macaddr" "$hwaddr"
json_dump > "$MAPFILE"
(
flock -x 200
json_dump > "$MAPFILE"
) 200>/var/lock/map.backhaul.lock
json_cleanup
update_isolate_ebtables
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
ubus call map.agent toggle_fh '{"enable":true, "prevent_island":true, "ifname":"all"}'
fi
}
unset_uplink() {
rm "$MAPFILE" > /dev/null 2>&1
local type=${1:-wifi}
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
fi
(
flock -x 200
json_load "$(cat $MAPFILE)"
json_get_var bk_type type
json_cleanup
[ "$type" = "$bk_type" ] && rm -f "$MAPFILE" > /dev/null 2>&1
) 200>/var/lock/map.backhaul.lock
}
func=$1
shift
case "$func" in
wireless_teardown) brcm_wireless_teardown;;
setup_network) brcm_setup_network;;
setup_wireless) brcm_setup_wireless;;
write_credentials) brcm_write_credentials;;
sync_credentials) brcm_sync_credentials;;
wireless_teardown) wireless_teardown;;
setup_network) setup_network;;
setup_wireless) setup_wireless;;
write_credentials) write_credentials;;
sync_credentials) sync_credentials;;
bsta_steer) bsta_steer $@;;
set_network) brcm_set_network $@;;
set_network) set_network $@;;
write_bsta_config) write_bsta_config $@;;
teardown_iface) brcm_teardown_iface $@;;
bsta_to_wireless) brcm_bsta_to_wireless $@;;
teardown_iface) teardown_iface $@;;
bsta_to_wireless) bsta_to_wireless $@;;
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
ts) ts_sub $@;;
bsta_enable_all) bsta_enable_all $@;;
bsta_clear_bssid) bsta_clear_bssid $@;;
bsta_blacklist_bssid_set) bsta_blacklist_bssid_set $@;;
bsta_blacklist_bssid_clear) bsta_blacklist_bssid_clear $@;;
bsta_disable_lower_priority) bsta_disable_lower_priority $@;;
bsta_scan_on_enabled) bsta_scan_on_enabled $@;;
bsta_use_link) bsta_use_link $@;;

View File

@@ -2,495 +2,528 @@
. /lib/functions.sh
AL_BRIDGE=${AL_BRIDGE-"br-lan"}
PRIMARY_VID=${PRIMARY_VID-1}
MAP_BH_FILE="/tmp/multiap.backhaul"
### Traffic Separation ###
dbg() {
ts_dbg() {
logger -t traffic_separation $@
}
ts_sub() {
ts_usage() {
cat <<EOF
Usage: $0 [create|delete|populate|primary|reload]
Usage: $0 [create|reload]
Traffic Separation related functions.
create fh <iface> <vid> - create vlan device and rules for wifi fronthaul
create bh <iface> <vid> <profile> - create vlan device and rules for wifi backhaul
create eth <iface> <vid> <pbits> - create vlan device and rules for logical ethernet interface
delete <iface> - delete vlan device
populate eth <iface> <vid> - add secondary network rules for logical ethernet interface
primary get <iface> - read primary VID for interface from driver (from Association Response frame IE)
reload - reload network with new configuration
create vid - create vlan configuration with vlan_id
reload - reload network with new configuration
EOF
exit 1
}
_get_bridge() {
local bridge=$(ip link show $1 | grep -o "master [^\s]*" | cut -d ' ' -f 2)
echo $bridge
_dhcp_cleanup() {
vid=$1
[ -n "$(uci -q get dhcp.guest${vid})" ] && {
uci -q delete dhcp.guest${vid}
uci commit dhcp
/etc/init.d/dnsmasq reload
}
}
set_wireless_bridge() {
config_load wireless
_firewall_cleanup() {
vid=$1
_set_network() {
local sec=$1
local iface=$2
local bridge=$3
guest_teardown() {
local section=$1
local config=$2
local val=$3
local option=$4
config_get ifname $sec ifname
[ "$iface" != "$ifname" ] && continue
config_get name "$section" "$option"
config_get mode $sec mode
config_get multi_ap $sec multi_ap "0"
[ "$mode" = "sta" -a "$multi_ap" = "1" ] && continue
[ "$val" != "$name" ] && continue
config_get network $sec network
local new_network=${bridge##br-}
if [ "$new_network" != "$network" ] ; then
uci -q set wireless.${sec}.network=${new_network}
uci commit wireless
fi
uci delete ${config}.${section}
uci commit ${config}
}
brctl addif $bridge $iface &> /dev/null
[ -n "$(uci -q get firewall.guest${vid}_dns)" ] && {
uci -q delete firewall.guest${vid}_dns
uci commit firewall
}
[ -n "$(uci -q get firewall.guest${vid}_dhcp)" ] && {
uci -q delete firewall.guest${vid}_dhcp
uci commit firewall
}
[ -n "$(uci -q get firewall.guest${vid}_ping)" ] && {
uci -q delete firewall.guest${vid}_ping
uci commit firewall
}
config_load firewall
config_foreach guest_teardown forwarding "firewall" guest${vid} "src" #delete firewall section with name = guest${vid}
config_load firewall
config_foreach guest_teardown zone "firewall" guest${vid} "name" #delete firewall section with name = guest${vid}
}
_network_cleanup() {
vid=$1
[ -n "$(uci -q get network.vlan${vid})" ] && {
uci -q delete network.vlan${vid}
uci commit network
}
config_foreach _set_network wifi-iface ${1} ${2}
[ -n "$(uci -q get network.guest${vid})" ] && {
uci -q delete network.guest${vid}
uci commit network
}
[ -n "$(uci -q get network.guest${vid}_8021q)" ] && {
uci -q delete network.guest${vid}_8021q
uci commit network
}
}
_guest_cleanup() {
vid=$1
_dhcp_cleanup $vid
_firewall_cleanup $vid
_network_cleanup $vid
}
ts_create() {
_dhcp_setup() {
local name=$1
_create_vlan_dev() {
iface=$1 # real iface
vid=$2 # Vlan ID
bridge=$3 # bridge iface should be connected
vlan_dev=$4
[ -n "$(uci -q get dhcp.${name})" ] && return
old_bridge="$(_get_bridge $iface)" # bridge iface is connected to
uci -q set dhcp.${name}=dhcp
uci -q set dhcp.${name}.interface="${name}"
uci -q set dhcp.${name}.start="100"
uci -q set dhcp.${name}.limit="150"
uci -q set dhcp.${name}.leasetime="1h"
uci -q set dhcp.${name}.dhcpv4="server"
uci -q set dhcp.${name}.dhcpv6="server"
uci -q set dhcp.${name}.ra="server"
uci -q set dhcp.${name}.ra_slaac="1"
uci -q add_list dhcp.${name}.ra_flags="managed-config"
uci -q add_list dhcp.${name}.ra_flags="other-config"
# remove interface from bridge if it is in one
[ -n "$old_bridge" ] && brctl delif $old_bridge $iface &> /dev/null
# (re)create vlan device
ip link show $vlan_dev && vlanctl --if-delete $vlan_dev
vlanctl --mcast --if-create-name $iface $vlan_dev --if $iface --set-if-mode-rg
vlanctl --if $iface --tx --tags 0 --default-miss-drop
vlanctl --if $iface --tx --tags 1 --default-miss-drop
vlanctl --if $iface --tx --tags 2 --default-miss-drop
vlanctl --if $iface --rx --tags 0 --default-miss-drop
vlanctl --if $iface --rx --tags 1 --default-miss-drop
vlanctl --if $iface --rx --tags 2 --default-miss-drop
# bring the vlan device up and add back to bridge if it was in one
brctl addif $bridge $vlan_dev &> /dev/null
uci -q commit dhcp
}
ts_create_fh() {
iface=$1 # fh iface
vid=$2 # SSID specific (secondary) or primary vid
bridge=$3
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
cat <<EOF
Adding FH device requires IFACE, VID and bridge
EOF
exit 1
_firewall_setup() {
local name=$1
local network=$1
local vid=$2
local exists=0
local diff=0
local subnet=$(($vid % 256))
local ipaddr="192.168.${subnet}.1"
config_load firewall
_process_zone() {
local section=$1
local new_name=$2
local val=$3
local name
config_get name $section $val
[ "$name" == "$new_name" ] && exists=1
}
# create vlan device
#set_wireless_bridge $iface $bridge
vlan_dev=${iface}_vlan${vid}
ip link set $vlan_dev down
_create_vlan_dev $iface $vid $bridge $vlan_dev
# add rules
# vlanctl --if $iface --rx --tags 0 --filter-ethertype 0x886c --set-rxif $vlan_dev --rule-append # incoming brcm
# EAPOL frames
vlanctl --if $iface --rx --tags 0 --filter-ethertype 34958 --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --rx --tags 1 --filter-ethertype 34958 --pop-tag --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --tx --tags 0 --filter-txif $vlan_dev --filter-ethertype 34958 --rule-append
# 8021q vlan id TAG/UNTAG
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --filter-vid $vid 0 --pop-tag --dscp2pbits 0 --rule-append
ip link set $iface up
ip link set $vlan_dev up
}
ts_create_bh() {
iface=$1 # bh iface
vid=$2 # primary vid
profile=$3 # agent profile (1 or 2)
bridge=$4 # bridge interface should be connected to
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || {
cat <<EOF
Adding BH device requires IFACE, VID and PROFILE (1 or 2).
EOF
exit 1
}
#[ -n "$bridge" ] && set_wireless_bridge $iface $bridge
old_vid=$(wl -i $1 map_8021q_settings)
old_vid=${old_vid##* }
old_profile=$(wl -i $1 map_profile | cut -d ' ' -f 3)
[ "$old_vid" = "$vid" -a "$old_profile" = "$profile" ] && return
wl vlan_mode 0 &> /dev/null # make sure this is OFF, else driver won't handle vlan
wl -i $iface down &> /dev/null
wl -i $iface map_profile $profile &> /dev/null # only has effect on profile 2
wl -i $iface map_8021q_settings $vid &> /dev/null # can only be set on bBSS (read-only on bSTA)
wl -i $iface up &> /dev/null
}
ts_create_lei() {
vid=$1 # primary vid
pbits=$2 # default pbits to apply
vlan_bridge=$3 # name of ts subsystem bridge
lan_bridge=$4 # name of node local bridge
[ -n "$vid" ] && [ -n "$pbits" ] && [ -n "$vlan_bridge" ] && [ -n "$lan_bridge" ] || {
cat <<EOF
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
EOF
exit 1
}
ip link show lei &> /dev/null || {
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
}
old_vid=$(ip -d link show lei_lan | sed -n 's/vlan.*id \([0-9][0-9]*\) .*/\1/p')
[ "$old_vid" != "$vid" ] && {
ip link del lei_lan
ip link add link lei name lei_lan type vlan id ${vid}
}
brctl addif ${lan_bridge} lei_lan &>/dev/null
brctl addif ${vlan_bridge} lei_map &>/dev/null
ip link set lei up
ip link set lei_map up
ip link set lei_lan up
}
_create_eth() {
iface=$1 # Multi-AP Logical Ethernet Interface
vid=$2 # primary vid
bridge=$3 # name of ts subsystem bridge
pbits=0
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
cat <<EOF
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
EOF
exit 1
}
dbg create $@
ip link set $iface down
vlan_dev=${iface}_vlan${vid}
ip link set $vlan_dev down
_create_vlan_dev $iface $vid $bridge $vlan_dev
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --set-pbits $pbits 0 --rule-append
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --pop-tag --rule-append
[ $# -le 3 ] && exit 0
shift 3
while [ -n "$1" ] ; do
vid=$1
vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append
shift
done
ip link set $iface up
ip link set $vlan_dev up
}
ts_create_eths() {
pvid=$1 # primary vid
bridge=$2 # name of ts subsystem bridge
shift 2
# TODO use ieee1905 bridge
for iface in $(uci get network.br_lan.ports) ; do
[ "$iface" = "lei_lan" ] && continue
_create_eth $iface $pvid $bridge $@
ubus call ieee1905 del_interface "{\"ifname\":\"$iface\"}"
done
}
ts_create_dhcp() {
local diff=""
_net_setup() {
local name=$1
local devname=$2
local vid=$3
[ -z "$(uci -q get network.${name})" ] && {
uci -q set network.${name}="interface"
uci -q set network.${name}.device="$devname"
uci -q set network.${name}.is_lan="1"
uci -q set network.${name}.proto="static"
# TODO vid > 255
local ip_addr="192.168.${vid}.1"
[ "${vid}" = "1" ] && ip_addr="192.168.${vid}.2"
uci -q set network.${name}.ipaddr="${ip_addr}"
uci -q set network.${name}.netmask="255.255.255.0"
diff="1"
}
[ "$diff" = "1" ] && uci -q commit network
}
_br_setup() {
local name=$1
local sinkname=$2
local vid=$3
[ -z "$(uci -q get network.${name}_dev)" ] && {
uci -q set network.${name}_dev="device"
uci -q set network.${name}_dev.name="br-${name}"
uci -q set network.${name}_dev.type="bridge"
uci -q set network.${name}_dev.bridge_empty="1"
uci -q add_list network.${name}_dev.ports="${sinkname}"
diff="1"
}
[ -z "$(uci -q get network.${name})" ] && {
uci -q set network.${name}="interface"
uci -q set network.${name}.device="br-${name}"
uci -q set network.${name}.is_lan="1"
uci -q set network.${name}.proto="static"
uci -q set network.${name}.ipaddr="192.168.${vid}.1"
uci -q set network.${name}.netmask="255.255.255.0"
diff="1"
}
[ "$diff" = "1" ] && uci -q commit network
}
_dhcp_setup() {
local name=$1
[ -n "$(uci -q get dhcp.${name})" ] && return
uci -q set dhcp.${name}=dhcp
uci -q set dhcp.${name}.interface="${name}"
uci -q set dhcp.${name}.start="100"
uci -q set dhcp.${name}.limit="150"
uci -q set dhcp.${name}.leasetime="1h"
uci -q set dhcp.${name}.dhcpv4="server"
uci -q set dhcp.${name}.dhcpv6="server"
uci -q set dhcp.${name}.ra="server"
uci -q set dhcp.${name}.ra_slaac="1"
uci -q add_list dhcp.${name}.ra_flags="managed-config"
uci -q add_list dhcp.${name}.ra_flags="other-config"
diff="1"
uci -q commit dhcp
}
_firewall_setup() {
local name=$1
local network=$2
local zone_exist=0
config_load firewall
_process_zone() {
local section=$1
local new_name=$2
local name
config_get name $section name
[ "$name" == "$new_name" ] && zone_exist=1
}
config_foreach _process_zone zone $name
[ "$zone_exist" != "0" ] && return
config_foreach _process_zone zone $name "name"
[ "$exists" == "0" ] && {
uci -q add firewall zone
uci -q set firewall.@zone[-1].name="$name"
uci -q add_list firewall.@zone[-1].network="$network"
uci -q set firewall.@zone[-1].input='ACCEPT'
uci -q set firewall.@zone[-1].input='DROP'
uci -q set firewall.@zone[-1].output='ACCEPT'
uci -q set firewall.@zone[-1].forward='ACCEPT'
uci -q set firewall.@zone[-1].forward='DROP'
diff=1
}
exists=0
config_foreach _process_zone forwarding $name "src"
[ "$exists" == "0" ] && {
uci -q add firewall forwarding
uci -q set firewall.@forwarding[-1].src="$name"
uci -q set firewall.@forwarding[-1].dest="wan"
diff="1"
uci -q commit firewall
diff=1
}
vid=$1 # primary vid
[ -n "$vid" ] || {
cat <<EOF
VID required to configure DHCP.
EOF
exit 1
[ -z "$(uci -q get firewall.${name}_dns)" ] && {
uci set firewall.${name}_dns=rule
uci set firewall.${name}_dns.name="Allow-DNS-${name}"
uci set firewall.${name}_dns.src="${name}"
uci set firewall.${name}_dns.dest_port="53"
uci set firewall.${name}_dns.proto="tcp udp"
uci set firewall.${name}_dns.target="ACCEPT"
diff=1
}
ip link show sink${vid} || {
ip link add sink${vid} type veth peer name sink${vid}_vlan
ip link add link sink${vid} name sink${vid}_peer type vlan id ${vid}
[ -z "$(uci -q get firewall.${name}_dhcp)" ] && {
uci set firewall.${name}_dhcp=rule
uci set firewall.${name}_dhcp.name="Allow-DHCP-${name}"
uci set firewall.${name}_dhcp.src="${name}"
uci set firewall.${name}_dhcp.src_port="68"
uci set firewall.${name}_dhcp.dest_port="67"
uci set firewall.${name}_dhcp.proto="udp"
uci set firewall.${name}_dhcp.family="ipv4"
uci set firewall.${name}_dhcp.target="ACCEPT"
diff=1
}
ip link set sink${vid} up
ip link set sink${vid}_peer up
ip link set sink${vid}_vlan up
diff=""
_net_setup sink${vid} sink${vid}_peer ${vid}
_dhcp_setup sink${vid}
_firewall_setup lan${vid} sink${vid}
[ "$diff" = "1" ] && {
ubus call network reload
ubus -t 5 wait_for network.interface.sink${vid}
[ -z "$(uci -q get firewall.${name}_ping)" ] && {
uci set firewall.${name}_ping=rule
uci set firewall.${name}_ping.name="Allow-Ping-${name}"
uci set firewall.${name}_ping.src="${name}"
uci set firewall.${name}_ping.dest_ip="${ipaddr}"
uci set firewall.${name}_ping.proto="icmp"
uci set firewall.${name}_ping.icmp_type="echo-request"
uci set firewall.${name}_ping.family="ipv4"
uci set firewall.${name}_ping.target="ACCEPT"
diff=1
}
brctl addif br-map sink${vid}_vlan &> /dev/null
[ $diff -eq 1 ] && uci -q commit firewall
}
local type=$1
shift
_net_setup() {
net_check_for_vlan() {
local section=$1
local vid=$2
case "$type" in
fh) ts_create_fh $@;;
bh) ts_create_bh $@;;
lei) ts_create_lei $@;;
eths) ts_create_eths $@;;
dhcp) ts_create_dhcp $@;;
--help|help) ts_usage;;
*) ts_usage; exit 1;;
esac
}
config_get vlan "$section" vlan
ts_delete() {
iface=$1
[ "$vid" = "$vlan" ] && {
echo "1"
break
}
}
path=$(ls -d /sys/class/net/${iface}/upper_*)
[ -z "$path" ] && exit 0
net_check_for_network() {
local section=$1
local vid=$2
vlan_dev=${path##*upper_}
bridge="$(_get_bridge $vlan_dev)"
config_get device "$section" device
[ -n "$bridge" ] && {
vlanctl --if-delete $vlan_dev # note: also removes rules and removes from bridge
brctl addif $bridge $iface &> /dev/null # needed to add again
}
[ "${AL_BRIDGE}.$vid" = "$device" ] && {
echo "1"
break
}
}
}
net_set_primary() {
local section=$1
local pvid=$2
ts_populate() {
local type=$1
shift
config_get device "$section" device
[ "$type" == "eth" ] || {
[ "${AL_BRIDGE}" = "$device" ] && {
uci -q set network.${section}.device="${AL_BRIDGE}.${pvid}"
uci -q commit network
diff="1"
break;
}
}
local vid=$1
diff=""
config_load network
#[ -x "/usr/sbin/mapcontroller" ] && config_foreach net_set_primary interface $PRIMARY_VID
exists=$(config_foreach net_check_for_vlan bridge-vlan $vid)
[ -z "$exists" ] && {
local name="vlan${vid}"
local br_dev="${AL_BRIDGE/-/_}"
local tag=":t"
local self_flags="untagged"
uci -q set network.${name}="bridge-vlan"
uci -q set network.${name}.name="${name}"
uci -q set network.${name}.device="$AL_BRIDGE"
uci -q set network.${name}.vlan="$vid"
[ "${vid}" = "${PRIMARY_VID}" ] && {
# self_flags="untagged pvid"
uci -q set network.${name}.flags="untagged pvid"
tag=":*"
}
# uci -q set network.${name}.flags="${self_flags}"
uci -q set network.${name}.local='1'
for port in $(uci -q get network.${br_dev}.ports) ; do
uci -q get network.${name}.ports | grep -q "${port}${tag}" && continue
uci -q add_list network.${name}.ports="${port}${tag}"
done
uci -q commit network
diff="1"
}
exists=$(config_foreach net_check_for_network interface $vid)
[ -z "$exists" -a "$PRIMARY_VID" != "$vid" -a -x "/usr/sbin/mapcontroller" ] && {
net_get_albridge_ip() {
local section=$1
config_get device "$section" device
[ "${AL_BRIDGE}" = "$device" -o "${AL_BRIDGE}.${PRIMARY_VID}" = "$device" ] && {
ipaddr="$(uci -q get network.${section}.ipaddr)"
netmask="$(uci -q get network.${section}.netmask)"
break;
}
}
local name="guest${vid}"
local br_dev="${AL_BRIDGE/-/_}"
local tag=":t"
local self_flags="untagged"
local subnet=$(($vid % 256))
netmask="255.255.255.0"
ipaddr="192.168.1.1"
config_load network
config_foreach net_get_albridge_ip interface $PRIMARY_VID
# replace third octet of the ip with $subnet
ipaddr=$(echo $ipaddr | sed "s/\(\([0-9]\{1,3\}\.\)\{2\}\)[0-9]\{1,3\}/\1${subnet}/")
uci -q set network.${name}="interface"
uci -q set network.${name}.device="${AL_BRIDGE}.$vid"
uci -q set network.${name}.ipaddr="$ipaddr"
uci -q set network.${name}.netmask="$netmask"
uci -q set network.${name}.proto="static"
uci -q commit network
diff="1"
}
[ -z "$(uci -q get network.guest${vid}_8021q)" -a $PRIMARY_VID != $vid ] && {
uci -q set network.guest${vid}_8021q="device"
uci -q set network.guest${vid}_8021q.ifname="${AL_BRIDGE}"
uci -q set network.guest${vid}_8021q.name="${AL_BRIDGE}.$vid"
uci -q set network.guest${vid}_8021q.type="8021q"
uci -q set network.guest${vid}_8021q.vid="$vid"
uci -q set network.guest${vid}_8021q.native="1"
}
}
vid=$1
[ -n "$vid" ] || {
cat <<EOF
Populating ETH rules requires IFACE and VID.
VID required to configure.
EOF
exit 1
}
iface=$1 # Multi-AP Logical Ethernet Interface
vid=$2 # secondary vid
logger -t vlan "setup ts vid $vid"
_net_setup ${vid}
path=$(ls -d /sys/class/net/${iface}/upper_*)
[ -z "$path" ] && exit 1
vlan_dev=${path##*upper_}
[ -x "/usr/sbin/mapcontroller" -a "$PRIMARY_VID" != "$vid" ] && {
_dhcp_setup guest${vid}
_firewall_setup guest${vid} $vid
}
# add rules
#vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids
#vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default
}
ts_primary() {
local func=$1
shift
case "$func" in
get) vid=$(wl -i $1 map_8021q_settings); echo ${vid##* };;
*) ts_usage; exit 1;;
esac
}
ts_unicast() {
local mac=$1
local iface=$2
# TODO: improve?
res=$(ebtables -t broute -L | grep -i "$mac" | grep "$iface")
[ -n "$res" ] && return
ebtables -t broute -D BROUTING -d "$mac" -p 0x893a -j DROP
ebtables -t broute -I BROUTING -i "$iface" -d "$mac" -p 0x893a -j DROP
}
ts_multicast() {
local iface=$1
# TODO: improve?
res=$(ebtables -t broute -L | grep -i "1:80:C2:00:00:13" | grep "$iface")
[ -n "$res" ] && return
ebtables -t broute -D BROUTING -d 01:80:C2:00:00:13 -p 0x893a -j DROP
ebtables -t broute -D BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP
ebtables -t broute -I BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP
# Disable pktfwd here and flush FlowCache rules
echo 0 > /proc/pktfwd_dhd/enable
echo 0 > /proc/pktfwd_wl/enable
fcctl flush
}
ts_reload() {
# TODO check it again
local dhcp_reload=$1
restart=""
# workaround for missing backhaul wifi.ap.* ubus obj's:
# iterate in config and setup bh
config_load wireless
bridge_verify_vid_mapping() {
local section=$1
_setup_bh_iface() {
local sec=$1
local iface=$2
local bridge=$3
check_port_vid() {
local port="$1"
local vlan="$2"
config_get ifname $sec ifname
config_get mode $sec mode
config_get multi_ap $sec multi_ap "0"
[ "$mode" = "ap" -a "$multi_ap" = "1" ] && {
ts_create bh $ifname 1 2 br-map
added=$(bridge vlan show dev $port | grep -w "$vlan")
if [ "$added" = "" ]; then
restart="1"
break
fi
}
config_get vlan "$section" vlan "0"
[ "$vlan" = "0" ] && continue
config_list_foreach "$section" "ports" check_port_vid "$vlan"
[ "$restart" = "1" ] && break
}
config_foreach _setup_bh_iface wifi-iface
config_load network
config_foreach bridge_verify_vid_mapping bridge-vlan
[ -n "dhcp_reload" ] && /etc/init.d/dnsmasq reload
if [ "$restart" = "1" ]; then
ts_dbg "trigger network restart"
/etc/init.d/network restart
else
ubus call uci commit '{"config":"network"}'
fi
/etc/init.d/firewall reload
# another workaround for netif? removed
# sink devices for br-map bridge
for sink in $(ubus list network.interface.sink*) ; do
local sink_vlan=${sink/network.interface./}_vlan
brctl addif br-map $sink_vlan &> /dev/null
#for sink in $(ubus list network.interface.sink*) ; do
# local sink_vlan=${sink/network.interface./}_vlan
#done
}
# maintain VIDs passed as args in network config, remove rest
ts_keep() {
local al_bridge=$(uci -q get mapagent.agent.al_bridge)
restart=""
[ "$al_bridge" = "" ] && al_bridge="br-lan"
bridge_vlan_teardown() {
local section=$1
shift
local bridge=$1
shift
local keep="$@"
config_get device "$section" device
[ "$bridge" != "$device" ] && continue
config_get vlan "$section" vlan
for i in $@; do
if [ "$i" -eq "$vlan" ] ; then
return
fi
done
restart="1"
_guest_cleanup $vlan
}
config_load network
config_foreach bridge_vlan_teardown bridge-vlan $al_bridge $@
if [ "$restart" = "1" ]; then
uci commit network
ts_dbg "trigger network restart"
/etc/init.d/network restart
fi
}
ts_cleanup() {
guest_teardown() {
local section=$1
local config=$2
local val=$3
local option=$4
config_get name "$section" "$option"
[ "$val" != "$name" ] && continue
uci delete ${config}.${section}
uci commit ${config}
restart="1"
}
local vid=$1
restart=""
_guest_cleanup $vid
# enable pktfwd again and flush FlowCache rules
echo 1 > /proc/pktfwd_dhd/enable
echo 1 > /proc/pktfwd_wl/enable
echo 0 > /proc/pktfwd_dhd/enable
echo 0 > /proc/pktfwd_wl/enable
echo 1 > /proc/pktfwd_dhd/enable
echo 1 > /proc/pktfwd_wl/enable
fcctl flush
}
ts_isolate() {
ts_isolate_radio() {
local section=$1
local action=$2
local band=$3
local vid=$4
local ifname=$5
config_get apband "$section" band
[ "$band" = "$apband" ] && continue
config_get apvid "$section" vid
[ "$vid" != "$apvid" ] && continue
config_get apifname "$section" ifname
[ "$ifname" = "$apifname" ] && continue # this should never happen
ebtables -D FORWARD -i $ifname --o $apifname -j DROP > /dev/null 2>&1
[ "$action" != "add" ] && continue
ebtables -A FORWARD -i $ifname --o $apifname -j DROP > /dev/null 2>&1
}
local action=$1
shift
local pvid=$1 # pvid
shift
local vid=$1 # vid
shift
local band=$1 # band
shift
local ifname=$1 # guest fbss name
shift
local ifprefix=$1 # 4addr mode ifname prefix
local br_dev="${AL_BRIDGE/-/_}"
[ -z "$pvid" -o -z "$ifprefix" -o -z "$ifname" ] && return
config_load mapagent
config_foreach ts_isolate_radio ap $action $band $vid $ifname
# must not drop traffic to upstream
json_load "$(cat $MAP_BH_FILE)"
json_get_var bk_ifname ifname
json_cleanup
for prefix in $@; do
ebtables -D FORWARD -i $ifname --o ${prefix}+ -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i ${prefix}+ --o $ifname -j DROP > /dev/null 2>&1
# isolate eth interfaces
for port in $(uci -q get network.${br_dev}.ports) ; do
ebtables -D FORWARD -i $ifname --o $port -j DROP > /dev/null 2>&1
ebtables -D FORWARD -i $port --o $ifname -j DROP > /dev/null 2>&1
[ "$action" != "add" -o "$port" = "$bk_ifname" ] && continue
ebtables -A FORWARD -i $ifname --o $port -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i $port --o $ifname -j DROP > /dev/null 2>&1
done
[ "$action" != "add" ] && continue
ebtables -A FORWARD -i $ifname --o ${prefix}+ -j DROP > /dev/null 2>&1
ebtables -A FORWARD -i ${prefix}+ --o $ifname -j DROP > /dev/null 2>&1
done
}
@@ -498,13 +531,11 @@ EOF
shift
case "$func" in
create) dbg "create $@"; ts_create $@;;
delete) dbg "delete $@"; ts_delete $@;;
populate) dbg "populate $@"; ts_populate $@;;
primary) dbg "primary $@"; ts_primary $@;;
unicast) dbg "unicast $@"; ts_unicast $@;;
multicast) dbg "multicast $@"; ts_multicast $@;;
reload) dbg "reload $@"; ts_reload $@;;
create) ts_dbg "create $@"; ts_create $@;;
keep) ts_dbg "keep $@"; ts_keep $@;;
reload) ts_dbg "reload $@"; ts_reload $@;;
cleanup) ts_dbg "cleanup $@"; ts_cleanup $@;;
isolate) ts_dbg "isolate $@"; ts_isolate $@;;
--help|help) ts_usage;;
*) ts_usage; exit 1;;
esac

View File

@@ -6,5 +6,21 @@ config CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
bool "Support Dynamic Controller configuration sync"
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
config CONTROLLER_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
default y
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
string
default "\\\\x11\\\\x22\\\\x33"
config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
default CONTROLLER_EASYMESH_VENDOR_EXT_OUI_DEFAULT
help
Extra features not covered by the base Easymesh specification can be
enabled through CONTROLLER_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
endmenu
endif

View File

@@ -1,16 +1,13 @@
#
# Copyright (C) 2020 IOPSYS Software Solutions AB
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.0.11
PKG_VERSION:=2.8.0.25
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ec686a5e8e667925dc69ac53554709e40c0c81fd
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_VERSION:=209ffb0bb4932e29e3d4d05f515b71985491abce
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
@@ -20,6 +17,9 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/map-controller
@@ -48,11 +48,18 @@ 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
$(INSTALL_DIR) $(1)/etc
$(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

@@ -1,67 +1,144 @@
config controller 'controller'
option enabled '1'
option registrar '5 2' #bands on which wps registrar supported
option debug '6'
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 primary_vid '1'
option primary_pcp '0'
config interface 'lan'
option 'dhcp'
config ap
option band '5'
option encryption 'sae-mixed'
option key '1234567890'
option ssid 'map-net5'
option vid '1'
option type 'fronthaul'
option network 'lan'
option enable_ts '0'
option allow_bgdfs '0'
option channel_plan '0'
config ap
option band '2'
option encryption 'sae-mixed'
option key '1234567890'
option ssid 'map-net2'
option vid '1'
option type 'fronthaul'
option network 'lan'
option ssid 'IOWRT-2.4GHz'
option encryption 'sae-mixed'
option key '1234567890'
config ap
option band '5'
option encryption 'sae'
option key '5555555555'
option ssid 'map-bkhaul-5'
option type 'backhaul'
option disallow_bsta '1' # bitmap, 1 for disallow p1, 2 to disallow p2, 3 to disallow both (probably never applicable)
option type 'fronthaul'
option vid '1'
option network 'lan'
option ssid 'IOWRT-5GHz'
option encryption 'sae-mixed'
option key '1234567890'
config ap
option band '2'
option encryption 'sae'
option key '2222222222'
option ssid 'map-bkhaul-2'
list disallow_bsta '0' # 0 or 1 profile-1 bSTA
option vid '1'
option type 'backhaul'
option network 'lan'
option vid '1'
list disallow_bsta '0'
option ssid 'MAP-BH-2.4GHz'
option encryption 'sae'
option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
config policy 'policy'
list steer_exclude '00:11:22:33:44:55'
list steer_exclude_btm '00:aa:bb:cc:dd:ee'
option steer_policy '2' # 0, 1, 2 - see MultiAP spec
option util_threshold '200' # channel-util as in BSS load
option rcpi_threshold '30' # 0 - 220 valid range
option report_scan '0' # 0 or 1 for independent scans
option report_sta_assocfails '1' # 0 or 1 - stas assoc failure
option report_sta_assocfails_rate '2' # reporting rate for STA assoc fails (attempts per minute)
option report_metric_periodic '0' # 0, or 1 - 255 in secs
option report_rcpi_threshold '0' # 0, or 1 - 220
option report_util_threshold '0' # 0, or channel-util value
option rcpi_hysteresis_margin '0' # 0, or > 0 - hysteresis margin
option include_sta_stats '0' # sta stats in AP metric resp
option include_sta_metric '0' # sta metric in AP metric resp
option disallow_bsta_p1 '0' # 0 or 1 profile-1 bSTA
option disallow_bsta_p2 '0' # 0 or 1 profile-2 bSTA
config ap
option band '5'
option type 'backhaul'
option vid '1'
list disallow_bsta '0'
option ssid 'MAP-BH-5GHz'
option encryption 'sae'
option key '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWZYZ0'
# node and radio sections (per node) are auto
# generated per Multi-AP Agent in the network
#
#config node 'node_0a1b2c3d4e50'
# option agent_id '0a:1b:2c:3d:4e:50'
# following values use default values after onboarding if not explicitly set
# option backhaul_ul_macaddr '00:00:00:00:00:00'
# option backhaul_dl_macaddr '00:00:00:00:00:00'
# option backhaul_type 'none'
# option primary_vid '1'
# option primary_pcp '0'
# option report_sta_assocfails '0'
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'
# option sta_steer '0'
#config radio 'radio_0a1b2c3d4e53'
# option agent_id '0a:1b:2c:3d:4e:50'
# option macaddr '0a:1b:2c:3d:4e:53'
# option band '2'
# following values use default values after onboarding if not explicitly set
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '70'
# option report_rcpi_threshold '80'
# option report_util_threshold '0'
# option report_rcpi_hysteresis_margin '0'
# option include_sta_stats '1'
# option include_sta_metric '1'
#config radio 'radio_0a1b2c3d4e54'
# option agent_id '0a:1b:2c:3d:4e:50'
# option macaddr '0a:1b:2c:3d:4e:54'
# option band '5'
# following values use default values after onboarding if not explicitly set
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '86'
# option report_rcpi_threshold '96'
# option report_util_threshold '0'
# option report_rcpi_hysteresis_margin '0'
# option include_sta_stats '1'
# option include_sta_metric '1'
#config node 'node_3fb1c2d3e460'
# option agent_id '3f:b1:c2:d3:e4:60'
# following values use default values after onboarding if not explicitly set
# option backhaul_ul_macaddr '00:00:00:00:00:00'
# option backhaul_dl_macaddr '00:00:00:00:00:00'
# option backhaul_type 'none'
# option primary_vid '1'
# option primary_pcp '0'
# option report_sta_assocfails '0'
# option report_sta_assocfails_rate '0'
# option report_metric_periodic '0'
# option report_scan '0'
# option steer_exclude '0'
# option steer_exclude_btm '0'
# option steer_disallow '0'
# option coordinated_cac '0'
# option traffic_separation '0'
# option sta_steer '0'
#config radio 'radio_3fb1c2d3e463'
# option agent_id '3f:b1:c2:d3:e4:60'
# option macaddr '3f:b1:c2:d3:e4:63'
# option band '2'
# following values use default values after onboarding if not explicitly set
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '70'
# option report_rcpi_threshold '80'
# option report_util_threshold '0'
# option report_rcpi_hysteresis_margin '0'
# option include_sta_stats '1'
# option include_sta_metric '1'
#config radio 'radio_3fb1c2d3e464'
# option agent_id '3f:b1:c2:d3:e4:60'
# option macaddr '3f:b1:c2:d3:e4:64'
# option band '5'
# following values use default values after onboarding if not explicitly set
# option steer_policy '0'
# option util_threshold '0'
# option rcpi_threshold '86'
# option report_rcpi_threshold '96'
# option report_util_threshold '0'
# option report_rcpi_hysteresis_margin '0'
# option include_sta_stats '1'
# option include_sta_metric '1'

View File

@@ -23,7 +23,14 @@ validate_controller_section() {
'enable_sta_steer:bool:false' \
'enable_bsta_steer:bool:false' \
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false'
'use_usta_metrics:bool:false' \
'allow_bgdfs:range(0,2629744)' \
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false' \
'rcpi_threshold_2g:range(0,220)' \
'rcpi_threshold_5g:range(0,220)' \
'report_rcpi_threshold_2g:range(0,220)' \
'report_rcpi_threshold_5g:range(0,220)'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of controller section failed"
@@ -40,7 +47,10 @@ validate_ap_section() {
'band:or("2", "5")' \
'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")' \

26
map-topology/Config.in Normal file
View File

@@ -0,0 +1,26 @@
if (PACKAGE_map-topology)
menu "Configurations"
config TOPOLOGYD_EASYMESH_VENDOR_EXT
bool "Enable extra features through Easymesh vendor extension"
default y
config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI_DEFAULT
string
default "\\\\x11\\\\x22\\\\x33"
config TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI
string "Vendor OUI in '\\\\xAB\\\\xCD\\\\xEF' format"
default TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI_DEFAULT
help
Extra features not covered by the base Easymesh specification can be
enabled through TOPOLOGYD_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK
bool "Support active connection fetch using netlink"
default n
endmenu
endif

View File

@@ -1,37 +1,44 @@
#
# Copyright (C) 2020 iopsys
# Copyright (C) 2020-22 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=map-topology
PKG_VERSION:=3.2.9
PKG_VERSION:=2.5.0.17
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=5d9b0bc94f8d01ecc7a2026ca1d6faf19ca0ede2
PKG_SOURCE_VERSION:=c8928b4364eab3762ae94ecbd471a98f20c47462
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
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_BUILD_DEPENDS:=ieee1905
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/map-topology
CATEGORY:=Utilities
DEPENDS:=+libubox +ubus +libpthread +libuci +libeasy \
+libieee1905 +map-plugin +libavahi-nodbus-support
+libavahi-nodbus-support +libnetfilter-conntrack +libnfnetlink +libmnl
TITLE:=Utility to build topology of a multi-AP network
endef
define Package/map-topology/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/libnetfilter_conntrack \
-D_GNU_SOURCE
define Package/map-topology/description
@@ -40,6 +47,15 @@ endef
MAKE_PATH:=src
ifeq ($(CONFIG_TOPOLOGYD_ACTIVE_CONN_LIBCONNTRACK),y)
TARGET_CFLAGS += -DACTIVE_CONN_LIBCONNTRACK
endif
ifeq ($(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT),y)
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=\\\"$(CONFIG_TOPOLOGYD_EASYMESH_VENDOR_EXT_OUI)\\\"
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/map-topology/* $(PKG_BUILD_DIR)/

View File

@@ -2,3 +2,4 @@
config global 'global'
option ageing_timer '1440'
option reboot_persistent '0'
option ifname 'br-lan'

View File

@@ -24,7 +24,8 @@ validate_topology_config() {
validate_global_section() {
uci_validate_section hosts global "global" \
'ageing_timer:uinteger' \
'reboot_persistent:bool'
'reboot_persistent:bool' \
'ifname:string'
[ "$?" -ne 0 ] && {
logger -s -t "hosts" "Validation of global section failed"
@@ -71,6 +72,9 @@ 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,45 @@
#
# Copyright (c) 2022 Genexis B.V.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Erik Karlsson - initial implementation
#
include $(TOPDIR)/rules.mk
PKG_NAME:=mosquitto-auth-shadow
PKG_VERSION:=1.0.0
PKG_MAINTAINER:=Erik Karlsson <erik.karlsson@genexis.eu>
PKG_LICENSE:=EPL-2.0
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/mosquitto-auth-shadow
SECTION:=net
CATEGORY:=Network
TITLE:=mosquitto - /etc/shadow authentication plugin
DEPENDS:=mosquitto
USERID:=mosquitto=200:mosquitto=200 mosquitto=200:shadow=11
endef
define Package/mosquitto-auth-shadow/description
Plugin for the mosquitto MQTT message broker that authenticates
users using /etc/shadow
endef
define Package/mosquitto-auth-shadow/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mosquitto_auth_shadow.so $(1)/usr/lib/
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,mosquitto-auth-shadow))

View File

@@ -0,0 +1 @@
chown root:shadow /etc/shadow && chmod 0640 /etc/shadow

View File

@@ -0,0 +1,25 @@
#
# Copyright (c) 2022 Genexis B.V.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# Contributors:
# Erik Karlsson - initial implementation
#
TARGETS = mosquitto_auth_shadow.so
all: $(TARGETS)
%.pic.o: %.c
$(CC) $(CFLAGS) -Wall -Werror -fPIC -c -o $@ $<
mosquitto_auth_shadow.so: mosquitto_auth_shadow.pic.o
$(CC) $(LDFLAGS) -shared -o $@ $^
clean:
rm -f *.o $(TARGETS)

View File

@@ -0,0 +1,80 @@
/*
* Copyright (c) 2022 Genexis B.V.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Erik Karlsson - initial implementation
*/
#include <string.h>
#include <shadow.h>
#include <crypt.h>
#include <mosquitto.h>
#include <mosquitto_broker.h>
#include <mosquitto_plugin.h>
static int basic_auth_callback(int event, void *event_data, void *userdata)
{
struct mosquitto_evt_basic_auth *ed = event_data;
struct spwd spbuf, *sp = NULL;
char buf[256];
struct crypt_data data;
char *hash;
/* Let other plugins or broker decide about anonymous login */
if (ed->username == NULL)
return MOSQ_ERR_PLUGIN_DEFER;
getspnam_r(ed->username, &spbuf, buf, sizeof(buf), &sp);
if (sp == NULL || sp->sp_pwdp == NULL)
return MOSQ_ERR_AUTH;
/* Empty string as hash means password is not required */
if (sp->sp_pwdp[0] == 0)
return MOSQ_ERR_SUCCESS;
if (ed->password == NULL)
return MOSQ_ERR_AUTH;
memset(&data, 0, sizeof(data));
hash = crypt_r(ed->password, sp->sp_pwdp, &data);
if (hash == NULL)
return MOSQ_ERR_AUTH;
if (strcmp(hash, sp->sp_pwdp) == 0)
return MOSQ_ERR_SUCCESS;
return MOSQ_ERR_AUTH;
}
int mosquitto_plugin_version(int supported_version_count,
const int *supported_versions)
{
return 5;
}
int mosquitto_plugin_init(mosquitto_plugin_id_t *identifier,
void **user_data,
struct mosquitto_opt *opts, int opt_count)
{
*user_data = identifier;
return mosquitto_callback_register(identifier, MOSQ_EVT_BASIC_AUTH,
basic_auth_callback, NULL, NULL);
}
int mosquitto_plugin_cleanup(void *user_data,
struct mosquitto_opt *opts, int opt_count)
{
mosquitto_plugin_id_t *identifier = user_data;
return mosquitto_callback_unregister(identifier, MOSQ_EVT_BASIC_AUTH,
basic_auth_callback, NULL);
}

View File

@@ -34,12 +34,13 @@ start_service() {
[ -n "$mode" ] || return
# Get the last saved mode
lastmode="$(cat /etc/netmodes/.last_mode 2>/dev/null)"
lastmode="$(cat $MODEDIR/.last_mode 2>/dev/null)"
# Return if desired mode is same as last saved mode
[ "$mode" == "$lastmode" ] && return
# Save mode as last mode
echo "$mode" > /etc/netmodes/.last_mode
[ -d $MODEDIR ] || mkdir -p $MODEDIR
echo "$mode" > $MODEDIR/.last_mode
logger -s -p user.info -t "netmode" "Switching to $mode Mode" >/dev/console

View File

@@ -21,5 +21,9 @@ config OBUSPA_MTP_ENABLE_STOMP
config OBUSPA_MTP_ENABLE_COAP
bool "Enable CoAP as mtp protocol"
default n
config OBUSPA_CONTROLLER_MTP_VERIFY
bool "Enable verification of MQTT response topic before processing the message"
default n
endmenu
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=5.0.0.3
PKG_VERSION:=5.0.0.16.7
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9d957848b9ac1d381149ce43b59775c21b1e24e0
PKG_SOURCE_VERSION:=6477337ec0d5dd6fa5586b42ba6423a892643106
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/obuspa.git
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
@@ -31,7 +31,7 @@ define Package/obuspa
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=USP agent
DEPENDS:=+libopenssl +libcurl +libsqlite3 +libubox +libubus +uspd +libmosquitto-ssl +libwebsockets-openssl
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl
endef
define Package/obuspa/description
@@ -43,11 +43,14 @@ define Package/obuspa/config
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-Wall \
-Werror
ifneq ($(CONFIG_OBUSPA_CONTROLLER_MTP_VERIFY),)
TARGET_CFLAGS += -DOBUSPA_CONTROLLER_MTP_VERIFY
endif
ifneq ($(CONFIG_OBUSPA_DB_PATH),)
CONFIGURE_ARGS += \
--localstatedir="$(CONFIG_OBUSPA_DB_PATH)"
@@ -88,6 +91,7 @@ endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
$(Build/Patch)
endef
endif
@@ -96,11 +100,14 @@ define Package/obuspa/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/obuspa
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
$(INSTALL_BIN) ./files/etc/init.d/obuspa $(1)/etc/init.d/
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
$(INSTALL_DATA) ./files/etc/obuspa/roles.json $(1)/etc/obuspa/roles.json
$(INSTALL_DATA) ./files/etc/obuspa/dmcaching_exclude.json $(1)/etc/obuspa/dmcaching_exclude.json
$(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
endef
$(eval $(call BuildPackage,obuspa))

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@ config obuspa 'global'
option enabled '1'
option interface 'loopback'
#option ifname 'lo'
option debug '1'
option debug '0'
option log_level '1'
option prototrace '0'
#option db_file '/etc/obuspa/usp.db'

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
START=99
STOP=2
STOP=02
USE_PROCD=1
PROG=/usr/sbin/obuspa
@@ -16,7 +16,6 @@ mqtt_num=0
subs_num=0
challenge_num=0
index=0
role_def_file=""
PROFILE="/root/.profile"
. /lib/functions/network.sh
@@ -35,7 +34,7 @@ log() {
}
db_set() {
if [ -n "${1}" ]; then
if [ -n "${1}" ] && [ -n "${2}" ]; then
echo "${1} \"${2}\"">>${PARAM_FILE}
else
echo >>${PARAM_FILE}
@@ -62,13 +61,15 @@ get_index() {
}
get_role_index_from_json() {
local role="$*"
local role="$1"
local role_def_file="$2"
local num=0
local roles_obj
# In case of role is empty or file not present
if [ -z "${role}" ] || [ ! -f "${role_def_file}" ]; then
return 0
echo "${num}"
return ${num}
fi
json_init
@@ -88,11 +89,12 @@ get_role_index_from_json() {
fi
if [ "${role}" = "${rname}" ]; then
echo "${num}"
return ${num}
fi
done
return 0
return ${num}
}
get_uci_ref_index() {
@@ -149,7 +151,7 @@ validate_controller_section()
'USPNotifRetryMinimumWaitInterval:uinteger:5' \
'USPNotifRetryIntervalMultiplier:uinteger:2000' \
'ControllerCode:string' \
'Protocol:or("STOMP","CoAP","MQTT")' \
'Protocol:or("STOMP","CoAP","MQTT", "WebSocket")' \
'Reference:string' \
'Destination:string:controller-notify-dest' \
'Topic:string' \
@@ -158,7 +160,14 @@ validate_controller_section()
'coap_path:string' \
'coap_port:port' \
'mqtt:string' \
'stomp:string'
'stomp:string' \
'Host:host' \
'Port:port' \
'Path:string' \
'EnableEncryption:bool' \
'KeepAliveInterval:uinteger' \
'SessionRetryIntervalMultiplier:uinteger' \
'SessionRetryMinimumWaitInterval:uinteger'
}
validate_subscription_section()
@@ -177,7 +186,7 @@ validate_mtp_section()
{
uci_validate_section ${CONFIGURATION} mtp "${1}" \
'Enable:bool:true' \
'Protocol:or("STOMP","CoAP","MQTT")' \
'Protocol:or("STOMP","CoAP","MQTT", "WebSocket")' \
'Reference:string' \
'ResponseTopicConfigured:string' \
'PublishQoS:uinteger' \
@@ -185,7 +194,12 @@ validate_mtp_section()
'coap_path:string' \
'coap_port:port' \
'mqtt:string' \
'stomp:string'
'stomp:string' \
'Path:string' \
'Port:port' \
'EnableEncryption:bool' \
'KeepAliveInterval:uinteger'
}
validate_stomp_connection_section()
@@ -303,6 +317,8 @@ configure_controller() {
local EndpointID Enable AssignedRole PeriodicNotifInterval PeriodicNotifTime USPNotifRetryMinimumWaitInterval
local USPNotifRetryIntervalMultiplier ControllerCode Protocol Destination coap_host coap_path coap_port
local Reference Topic mqtt stomp assigned_role_name ParameterName
local Host Port Path EnableEncryption KeepAliveInterval
local SessionRetryIntervalMultiplier SessionRetryMinimumWaitInterval
validate_controller_section "${1}" || {
log "Validation of controller section failed"
@@ -314,7 +330,20 @@ configure_controller() {
return 1;
fi
if [ -z "${stomp}" ] && [ -z "${Reference}" ] && [ -z "${mqtt}" ] && [ -z "${coap_path}" ]; then
# Support for backward compatibility for coap uci parameters
if [ -n "${coap_host}" ] && [ -z "${Host}" ]; then
Host="${coap_host}"
fi
if [ -n "${coap_path}" ] && [ -z "${Path}" ]; then
Path="${coap_path}"
fi
if [ -n "${coap_port}" ] && [ -z "${Port}" ]; then
Port="${coap_port}"
fi
if [ -z "${stomp}" ] && [ -z "${Reference}" ] && [ -z "${mqtt}" ] && [ -z "${Host}" ]; then
log "controller:: Invalid configuration"
return 1;
fi
@@ -372,9 +401,18 @@ configure_controller() {
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.STOMP.Reference "${Reference}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.STOMP.Destination "${Destination}"
elif [ "${Protocol}" = "CoAP" ]; then
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Host "${coap_host}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Path "${coap_path}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Port "${coap_port}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Host "${Host}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Path "${Path}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.Port "${Port}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.CoAP.EnableEncryption "${EnableEncryption}"
elif [ "${Protocol}" = "WebSocket" ]; then
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.Host "${Host}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.Port "${Port}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.Path "${Path}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.EnableEncryption "${EnableEncryption}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.KeepAliveInterval "${KeepAliveInterval}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.SessionRetryIntervalMultiplier "${SessionRetryIntervalMultiplier}"
db_set Device.LocalAgent.Controller.${controller_num}.MTP.1.WebSocket.SessionRetryMinimumWaitInterval "${SessionRetryMinimumWaitInterval}"
else
log "Unsupported Protocol ${Protocol}"
fi
@@ -425,11 +463,14 @@ configure_subscription(){
db_set Device.LocalAgent.Subscription.${subs_num}.ReferenceList "${ReferenceList}"
db_set Device.LocalAgent.Subscription.${subs_num}.Persistent "${Persistent}"
db_set Device.LocalAgent.Subscription.${subs_num}.Recipient "${Recipient}"
db_set Device.LocalAgent.Subscription.${subs_num}.CreationDate "$(date -I'seconds')"
}
check_json_load()
{
local ret=0
local ret
ret=0
if [ -f "${role_def_file}" ]; then
json_init
if json_load_file "${role_def_file}" 2>&1 |grep -q Failed; then
@@ -444,8 +485,10 @@ check_json_load()
get_role_index() {
local role="Device.LocalAgent.ControllerTrust.Role"
local idx=0
local role_name="$*"
local role_name="$1"
local role_def_file
role_def_file=$(uci -q get obuspa.global.role_file 2>/dev/null)
case "${role_name}" in
'full_access')
idx=1;
@@ -456,9 +499,9 @@ get_role_index() {
*)
local ji=0
ji=$(check_json_load)
if [ "${ji}" -eq 0 ]; then
get_role_index_from_json "${role_name}"
check_json_load
if [ "$?" -eq "0" ]; then
ji=$(get_role_index_from_json "${role_name}" "${role_def_file}")
fi
idx=$(( ji + 2 )) # Add predefined roles
esac
@@ -504,12 +547,21 @@ configure_challenges() {
configure_mtp() {
local Enable Protocol Reference ResponseTopicConfigured PublishQoS
local stomp mqtt
local Path Port EnableEncryption KeepAliveInterval
validate_mtp_section "${1}" || {
log "Validation of mtp section failed"
return 1;
}
if [ -n "${coap_path}" ] && [ -z "${Path}" ]; then
Path="${coap_path}"
fi
if [ -n "${coap_port}" ] && [ -z "${Port}" ]; then
Port="${coap_port}"
fi
if [ -z "${Reference}" ]; then
if [ "${Protocol}" = "STOMP" ]; then
val=$(get_uci_ref_index stomp "${stomp}")
@@ -542,8 +594,13 @@ configure_mtp() {
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Reference "${Reference}"
db_set Device.LocalAgent.MTP.${mtp_num}.STOMP.Destination "${Destination}"
elif [ "${Protocol}" = "CoAP" ]; then
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Path "${coap_path}"
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Port "${coap_port}"
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Path "${Path}"
db_set Device.LocalAgent.MTP.${mtp_num}.CoAP.Port "${Port}"
elif [ "${Protocol}" = "WebSocket" ]; then
db_set Device.LocalAgent.MTP.${mtp_num}.WebSocket.Path "${Path}"
db_set Device.LocalAgent.MTP.${mtp_num}.WebSocket.Port "${Port}"
db_set Device.LocalAgent.MTP.${mtp_num}.WebSocket.EnableEncryption "${EnableEncryption}"
db_set Device.LocalAgent.MTP.${mtp_num}.WebSocket.KeepAliveInterval "${KeepAliveInterval}"
else
log "Unsupported Protocol ${Protocol} in mtp"
fi
@@ -621,8 +678,6 @@ configure_obuspa() {
validate_obuspa_section "global"
role_def_file="${role_file}"
if [ "${debug}" -eq 1 ]; then
# Forward stdout of the command to logd
procd_set_param stdout 1
@@ -648,20 +703,16 @@ configure_obuspa() {
if [ -n "${ifname}" ]; then
procd_set_param env USP_BOARD_IFNAME="${ifname}"
# Set this variable for root user and obuspa -c tool
fi
if [ -z "${ifname}" ] || ! grep -F -q "export USP_BOARD_IFNAME=${ifname}" "${PROFILE}"; then
if [ -f "${PROFILE}" ]; then
if grep -q "export USP_BOARD_IFNAME=${ifname}" ${PROFILE}; then
if grep -q "export USP_BOARD_IFNAME" ${PROFILE}; then
sed -i "g/export USP_BOARD_IFNAME/d" ${PROFILE}
fi
fi
sed -i "/export USP_BOARD_IFNAME/d" "${PROFILE}"
fi
echo "export USP_BOARD_IFNAME=${ifname}" >> ${PROFILE}
else
if [ -f "$PROFILE" ]; then
if grep -q "export USP_BOARD_IFNAME" ${PROFILE}; then
sed -i "g/export USP_BOARD_IFNAME/d" ${PROFILE}
fi
if [ -n "${ifname}" ]; then
# Set this variable for root user and obuspa -c tool
echo "export USP_BOARD_IFNAME=${ifname}" >> "${PROFILE}"
fi
fi

View File

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

View File

@@ -0,0 +1,42 @@
--- a/src/core/cli_server.c
+++ b/src/core/cli_server.c
@@ -733,10 +733,6 @@ int ExecuteCli_Get(char *arg1, char *arg
USP_ASSERT(gge->value != NULL);
SendCliResponse("%s => %s\n", gge->path, gge->value);
}
- else
- {
- SendCliResponse("ERROR: %d retrieving %s (%s)\n", gge->err_code, gge->path, gge->err_msg);
- }
}
GROUP_GET_VECTOR_Destroy(&ggv);
--- a/src/core/handle_get.c
+++ b/src/core/handle_get.c
@@ -252,24 +252,14 @@ void FormPathExprResponse(int get_expr_i
return;
}
- // If there was an error in getting any of the parameters associated with the path expression,
- // then just add the first error, without any of the parameter values, for this path expression result
- for (i=0; i < gi->num_entries; i++)
- {
- gge = &ggv->vector[gi->index + i];
- if (gge->err_code != USP_ERR_OK)
- {
- (void)AddGetResp_ReqPathRes(resp, path_expr, gge->err_code, gge->err_msg);
- return;
- }
- }
-
// If the code gets here, then the value of all parameters were retrieved successfully, so add their values to the result_params
req_path_result = AddGetResp_ReqPathRes(resp, path_expr, USP_ERR_OK, "");
for (i=0; i < gi->num_entries; i++)
{
gge = &ggv->vector[gi->index + i];
+ if (gge->err_code != USP_ERR_OK)
+ continue;
#ifdef GET_RESPONSE_SIMPLE_FORMAT
// Simple format contains a resolved_path_result for every object (and sub object)
AddResolvedPathResult(req_path_result, gge->path, gge->value, 0);

View File

@@ -0,0 +1,20 @@
--- a/src/core/data_model.c
+++ b/src/core/data_model.c
@@ -1239,7 +1239,7 @@ int DATA_MODEL_NotifyInstanceAdded(char
// Exit if instance already exists - nothing to do
if (exists)
{
- USP_ERR_SetMessage("%s: Object (%s) already exists in the data model", __FUNCTION__, path);
+ // USP_ERR_SetMessage("%s: Object (%s) already exists in the data model", __FUNCTION__, path);
return USP_ERR_CREATION_FAILURE;
}
@@ -1324,7 +1324,7 @@ int DATA_MODEL_NotifyInstanceDeleted(cha
// Exit if instance does not exist - nothing to do
if (exists == false)
{
- USP_ERR_SetMessage("%s: Object (%s) does not exist in the data model", __FUNCTION__, path);
+ // USP_ERR_SetMessage("%s: Object (%s) does not exist in the data model", __FUNCTION__, path);
return USP_ERR_OBJECT_DOES_NOT_EXIST;
}

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.1.0
PKG_VERSION:=1.2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7426c7458f792cc66920c206d62869c5620f1400
PKG_SOURCE_VERSION:=6c68428405bc88a9990e855f911aecc86f07f4a8
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/periodicstats.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -20,13 +20,15 @@ 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/periodicstats
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Periodic Statistics Daemon
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbf_api
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
endef
define Package/periodicstats/description
@@ -35,7 +37,7 @@ endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./periodicstats/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/periodicstats/* $(PKG_BUILD_DIR)/
endef
endif

View File

@@ -11,9 +11,12 @@ service_running() {
}
start_service() {
enable=$(uci -q get periodicstats.globals.enable)
local enable
if [ "$(enable)" != "1" ]; then
config_load periodicstats
config_get_bool enable globals enable 1
if [ "${enable}" -ne "1" ]; then
return 0;
fi
@@ -24,7 +27,7 @@ start_service() {
}
service_triggers() {
procd_add_reload_trigger periodicstats uspd
procd_add_reload_trigger periodicstats
}
reload_service() {

View File

@@ -0,0 +1,62 @@
#!/bin/sh /etc/rc.common
START=20
USE_PROCD=1
setled() {
local enable
local brightness
config_get_bool enable $1 enable 1
config_get brightness $1 brightness 100
ubus call led.$1 set "{\"enable\":$enable,\"brightness\":$brightness}"
}
start_service() {
local enable
config_load leds
config_foreach setled led
config_get_bool enable leds enable 1
if [ "$enable" == "0" ]; then
ubus call leds set '{"state" : "alloff"}'
else
ubus call leds set '{"state" : "normal"}'
fi
}
boot() {
local led ledname
ubus list led* >/dev/null || sleep 1
ubus list led* >/dev/null || sleep 1
[ -f /etc/config/leds ] || touch /etc/config/leds
if ! uci -q get leds.leds >/dev/null; then
uci set leds.leds=leds
uci set leds.leds.enable=1
fi
for led in $(ubus list led.*); do
ledname=${led:4}
case $ledname in
*phy*) continue ;;
esac
if ! uci -q get leds.$ledname >/dev/null; then
uci set leds.$ledname=led
uci set leds.$ledname.enable=1
fi
done
uci commit leds
start
}
service_triggers()
{
procd_add_reload_trigger "leds"
}

View File

@@ -1,36 +0,0 @@
#!/bin/sh /etc/rc.common
START=98
STOP=10
USE_PROCD=1
NAME=ponmngr
PROG="/usr/sbin/omcid start"
include /lib/pon
start_service() {
if [ -f "/etc/config/pon" ]; then
procd_open_instance $NAME
procd_set_param command ${PROG}
procd_set_param respawn
procd_close_instance
start_gpon
fi
}
boot() {
start
}
stop_service() {
service_stop ${PROG}
stop_gpon
}
reload_service() {
stop
start
}

40
ponmngr/files/etc/init.d/xpon Executable file
View File

@@ -0,0 +1,40 @@
#!/bin/sh /etc/rc.common
START=19
STOP=91
USE_PROCD=1
. /lib/functions.sh
include /lib/xpon
configure_serial_number() {
# serial number generation is taken care in the uci defaults, so if
# serial number is not found here its a misconfig
serial_number="$(uci -q get xpon.ani.serial_number)"
if [ ${#serial_number} -eq 12 ]; then
vendor_id="${serial_number:0:4}"
vssn="${serial_number:4:8}"
else
logger -s -t "xpon" "Serial number not found in uci, ont will probably not be registered at the olt"
logger -s -t "xpon" "Please configure a valid serial number"
return
fi
set_serial_number $vendor_id $vssn
}
start_service() {
if [ "$(uci -q get xpon.ani.enable)" == "1" ]; then
configure_serial_number
init_xpon
fi
}
stop_service() {
deinit_xpon
}
service_triggers() {
procd_add_reload_trigger "xpon"
}

View File

@@ -1,27 +0,0 @@
#!/bin/sh
basemac="$(db -q get hw.board.basemac | tr -d ':')"
if [ -s "/etc/config/pon" ]; then
if uci -q get pon.globals >/dev/null; then
# return if there is any valid content
exit
else
rm -f /etc/config/pon
fi
fi
touch /etc/config/pon
mac=''
if [ -z "$basemac" ]; then
mac="12345678"
else
# read last 8 characters of basemac without :
mac=${basemac: -8}
fi
uci set pon.globals=globals
uci set pon.globals.enabled="1"
uci set pon.globals.serial_number="BRCM$mac"
uci commit pon

View File

@@ -0,0 +1,34 @@
#!/bin/sh
configure_serial_number() {
# check if serial number is present in the production data
production_sn="$(fw_printenv -n gponsn)"
if [ ${#production_sn} -eq 12 ]; then
uci set xpon.ani.serial_number=$production_sn
else
macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
vendor_id="IOPS"
vssn="${macaddr:4:8}"
uci set xpon.ani.serial_number=$vendor_id$vssn
fi
}
if [ -s "/etc/config/xpon" ]; then
if uci -q get xpon.ani >/dev/null; then
# generate serial number in case its not present and return
serial_number="$(uci -q get xpon.ani.serial_number)"
if [ ${#serial_number} -ne 12 ]; then
configure_serial_number
fi
exit
else
rm -f /etc/config/xpon
fi
fi
touch /etc/config/xpon
uci set xpon.ani=ani
uci set xpon.ani.enable="1"
configure_serial_number

View File

@@ -1,70 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
configure_snpwd() {
local serial_no password
serial_no="$1"
password="$2"
# serial number comprises of 2 parts, vendor id and vendor specific, the vendor id is
# a string while the vendor specific is a hex, so split the 2 and set accordingly
local vendor_id vendor_specific
vendor_id=${serial_no:0:4}
vendor_specific=${serial_no: -8}
# attempt to conver vendor_id from string to hex
vendor_id=$(echo $vendor_id | hexdump -e '4/1 "%02X" "\n"')
vendor_id=${vendor_id:0:8}
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure gpon onu_sn={vendor_id=$vendor_id,vendor_specific=$vendor_specific}
if [ -n "$password" ]; then
password=$(echo $password | hexdump -n ${#password} -e '16/1 "%02X""\n"')
bdmf_shell -c `cat /var/bdmf_sh_id` -cmd /b/configure gpon password=$password
fi
}
configure_gpon() {
local enabled serial_no password
config_load pon
config_get enabled globals "enabled"
if [ "$enabled" == "0" ]; then
exit
fi
config_get serial_no globals "serial_number"
config_get password globals "password"
configure_snpwd $serial_no $password
}
start_gpon() {
if [ -n "$(which gponctl)" ]; then
configure_gpon
gponctl start
fi
}
stop_gpon() {
if [ -n "$(which gponctl)" ]; then
gponctl stop
fi
}
get_gpon_status() {
json_init
status="$(gponctl getstate)"
admin_status="$(echo $status | head -n1 | awk '{print $8;}')"
json_add_string "admin_status" "$admin_status"
op_status="$(echo $status | head -n1 | awk '{print $12;}')"
case $op_status in
NUMBER)
op_status="$(echo $status | head -n1 | awk '{print $13;}')"
;;
esac
op_status=${op_status:1:2}
json_add_string "operational_status" "$op_status"
json_dump
}

View File

@@ -0,0 +1,30 @@
#!/bin/sh
. /lib/functions.sh
set_serial_number() {
vendor_id=$1
vssn=$2
vendor_id="$(echo $vendor_id | hexdump -e '4/1 "%02X" "\n"')"
vendor_id=${vendor_id:0:8}
bs /b/c gpon onu_sn={vendor_id=$vendor_id,vendor_specific=$vssn}
}
init_xpon() {
procd_open_instance pon_msgd
procd_set_param command bcm_msgd -c gpon
procd_close_instance
procd_open_instance pon_daemon
procd_set_param command omcid start -n
procd_set_param respawn
procd_close_instance
}
deinit_xpon() {
# stopping omcid does not bring down the pon link, which should happen
# if ANI is disabled or stopped (go to O1)
gponctl stop
}

View File

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

View File

@@ -1,16 +1,20 @@
#!/bin/sh
populate_config_from_db() {
. /lib/network/utils.sh
. /lib/functions.sh
include /lib/network
portorder="$(db -q get hw.board.ethernetPortOrder)"
for port in $portorder; do
speed="$(get_max_port_speed $port 2>/dev/null)"
speed="${speed:-1000}"
uci add ports ethport
uci rename ports.@ethport[-1]="$(get_port_name $port)"
uci set ports.@ethport[-1].enabled=1
uci set ports.@ethport[-1].name="$(get_port_name $port)"
uci set ports.@ethport[-1].ifname="$port"
uci set ports.@ethport[-1].speed=1000
uci set ports.@ethport[-1].speed="$speed"
uci set ports.@ethport[-1].duplex="full"
uci set ports.@ethport[-1].autoneg=1
uci set ports.@ethport[-1].eee=0

View File

@@ -4,23 +4,18 @@
IP_RULE=""
BR_RULE=""
BR6_RULE=""
POLICER_SKIP=0
POLICER_COUNT=0
INTF_NAME=""
Q_COUNT=0
ITER=0
PREV_ORDER=""
CURR_ORDER=""
MAX_ORDER=""
SP_Q_PRIO=7
# Function to handle a queue order and
# update total number of queues
handle_q_order() {
qid="$1" #queue section ID
local qid="$1" #queue section ID
config_get is_enable "$qid" "enable"
config_get is_enable "$qid" "enable" 1
# No need to configure disabled queues
if [ $is_enable == '0' ]; then
@@ -36,7 +31,7 @@ handle_q_order() {
# Create precedence file containing queue order per
# interface.
local precedence_file="/tmp/qos/$ifname/q_order"
local q_no=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
local q_no=$(cat /tmp/qos/$ifname/q_idx)
config_get precedence "$qid" "precedence"
value=${precedence}_q${q_no}
@@ -44,71 +39,32 @@ handle_q_order() {
# Update the number of queues per interface.
q_no=$((q_no + 1))
echo $q_no > /tmp/qos/queue_stats/$ifname/q_idx
echo $q_no > /tmp/qos/$ifname/q_idx
}
# Function to check if values are greater than (total number
# of queue -1) and map them to corresponding value.
configure_precedence_to_file() {
order="$1"
line="$2"
order_file="$3"
if [ $order == "$PREV_ORDER" ]; then
queue_id=${line#*_}
val=${CURR_ORDER}_${queue_id}
echo $val >> $order_file
else
PREV_ORDER=$order
queue_id=${line#*_}
val=${MAX_ORDER}_${queue_id}
echo $val >> $order_file
CURR_ORDER=$MAX_ORDER
MAX_ORDER=$((MAX_ORDER - 1))
fi
}
# Fucntion to map queue precedence per interface
# ranging from 1-X to 0-(no of queues -1)
map_queue_precedence() {
# Sort queue, lower value in uci means higher precedence, so this
# function sorts the precedence in decending order
sort_q_by_precedence() {
ifname="$1"
total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
q_no=`expr $total_q - 1`
MAX_ORDER=$q_no
local precedence_file="/tmp/qos/$ifname/q_precedence"
local order_file="/tmp/qos/$ifname/q_order"
local tmp_order_file="/tmp/qos/$ifname/q_order.tmp"
sort -n -r -k1 $order_file >> $precedence_file
rm $order_file
while read line
do
order=${line%_*}
if [ $order -gt $q_no ]; then
ITER=$((ITER + 1))
configure_precedence_to_file $order $line $order_file
else
if [ $ITER == '0' ]; then
echo $line >> $order_file
else
configure_precedence_to_file $order $line $order_file
fi
fi
done < $precedence_file
sort -n -k1 $order_file > $tmp_order_file
cp $tmp_order_file $order_file
rm -f $tmp_order_file
}
map_precedence() {
sort_by_precedence() {
for interf in $(db -q get hw.board.ethernetPortOrder); do
map_queue_precedence $interf
sort_q_by_precedence $interf
done
}
# function to handle a queue section
handle_queue() {
qid="$1" #queue section ID
local qid="$1" #queue section ID
local intf_name="$2"
config_get is_enable "$qid" "enable"
@@ -124,33 +80,35 @@ handle_queue() {
fi
# This is to get the qid per interface.
if [ "$INTF_NAME" == $ifname ]; then
Q_COUNT=$((Q_COUNT + 1))
else
Q_COUNT='0'
if [ "$intf_name" != "$ifname" ]; then
return
fi
INTF_NAME=$ifname
local precedence_file="/tmp/qos/$ifname/q_order"
local total_q=$(cat /tmp/qos/queue_stats/$ifname/q_idx)
q_no=`expr $total_q - 1` local
precedence_file="/tmp/qos/$ifname/q_order"
local temp_order=0
while read -r line; do
line_qid=${line: -1}
if [ "$line_qid" == "$Q_COUNT" ]; then
break
fi
temp_order=$((temp_order + 1))
done < "$precedence_file"
# TR181 suggests lower the precedence value higher the priority
# but in the chip its the opposite ie lower the value, lower
# the priority of queue on this chip. So we need to reverse the
# precedence value.
precedence="$(grep -i q${Q_COUNT} $precedence_file)"
precedence=${precedence%_*}
order=`expr $q_no - $precedence`
# for sp queue, no matter what the precedence value is configured in the uci file
# broadcom recommends that the highest precedence queue should have priority value
#7, the next priority q 6 and so on.
# Here, we have the index of the queue when sorted by precedence value in the file
# precedence_file so the order is calculated accordingly.
local order=`expr $SP_Q_PRIO - $temp_order`
config_get sc_alg "$qid" "scheduling"
config_get wgt "$qid" "weight"
config_get wgt "$qid" "weight" 1
config_get rate "$qid" "rate"
config_get bs "$qid" "burst_size"
config_get qsize "$qid" "queue_size" 1024
salg=1
local salg=1
case "$sc_alg" in
"SP") salg=1
@@ -163,31 +121,15 @@ handle_queue() {
;;
esac
# ignore precedence value in case of WRR
# ignore precedence value in case of WRR, broadcom recommends that WRR queue should
# always have precedence value set to 0
if [ $salg -eq 2 ]; then
order=0
fi
# Call tmctl which is a broadcomm command to configure queues on a port.
tmctl setqcfg --devtype 0 --if $ifname --qid $Q_COUNT --priority $order --qsize $qsize --weight $wgt --schedmode $salg --shapingrate $rate --burstsize $bs
# In BCM968 chips, the counters for queues are read, on other model, its read and reset. So, to maintain counter
# value and uniform behaviour, we are storing counter value for each queue in files
local d_name="/tmp/qos/queue_stats/${ifname}/q_${Q_COUNT}"
mkdir $d_name
local f_name="$d_name/txPackets"
touch $f_name
echo 0 > $f_name
f_name="$d_name/txBytes"
touch $f_name
echo 0 > $f_name
f_name="$d_name/droppedPackets"
touch $f_name
echo 0 > $f_name
f_name="$d_name/droppedBytes"
touch $f_name
echo 0 > $f_name
Q_COUNT=$((Q_COUNT + 1))
}
#function to handle a policer section
@@ -292,6 +234,7 @@ flush_chains() {
init_broute_rule() {
BR_RULE=""
BR6_RULE=""
}
broute_filter_on_src_if() {
@@ -327,6 +270,82 @@ broute_filter_on_ether_type() {
BR_RULE="$BR_RULE --proto $1"
}
broute_filter_on_ether_type6() {
BR6_RULE="$BR6_RULE --proto IPv6"
}
ebt_match_src_ip() {
BR_RULE="$BR_RULE --ip-src $1"
}
ebt_match_dst_ip() {
BR_RULE="$BR_RULE --ip-dst $1"
}
ebt_match_ipv6_src_ip() {
BR_RULE="$BR_RULE --ip6-src $1"
}
ebt_match_ipv6_dst_ip() {
BR_RULE="$BR_RULE --ip6-dst $1"
}
ebt_match_ip_src_port() {
BR_RULE="$BR_RULE --ip-source-port $1"
}
ebt_match_ip_dst_port() {
BR_RULE="$BR_RULE --ip-destination-port $1"
}
ebt_match_ipv6_src_port() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed so update BR6_RULE string as well otherwise
#update BR_RULE only for installation of ipv6 proto rule only.
if [ ! -z "$BR6_RULE" ]; then
BR6_RULE="$BR6_RULE --ip6-source-port $1"
else
BR_RULE="$BR_RULE --ip6-source-port $1"
fi
}
ebt_match_ipv6_dst_port() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed so update BR6_RULE string as well otherwise
#update BR_RULE only for installation of ipv6 proto rule only.
if [ ! -z "$BR6_RULE" ]; then
BR6_RULE="$BR6_RULE --ip6-destination-port $1"
else
BR_RULE="$BR_RULE --ip6-destination-port $1"
fi
}
ebt_match_ip_protocol() {
BR_RULE="$BR_RULE --ip-proto $1"
}
ebt_match_ipv6_protocol() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed so update BR6_RULE string as well otherwise
#update BR_RULE only for installation of ipv6 proto rule only.
if [ ! -z "$BR6_RULE" ]; then
BR6_RULE="$BR6_RULE --ip6-proto $1"
else
BR_RULE="$BR_RULE --ip6-proto $1"
fi
}
ebt_match_ipv6_dscp() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed so update BR6_RULE string as well otherwise
#update BR_RULE only for installation of ipv6 proto rule only.
if [ ! -z "$BR6_RULE" ]; then
BR6_RULE="$BR6_RULE --ip6-tclass $1"
else
BR_RULE="$BR_RULE --ip6-tclass $1"
fi
}
broute_filter_on_dscp() {
# The broadcom option --ip-dscp-extend actually accepts tos
# and not dscp and that too in hex, hence, perform the conversion
@@ -337,6 +356,11 @@ broute_filter_on_dscp() {
}
broute_filter_on_vid() {
if [ $1 -lt 0 ]; then
return
fi
case "$BR_RULE" in
*proto*)
BR_RULE="$BR_RULE --vlan-id $1"
@@ -348,11 +372,145 @@ broute_filter_on_vid() {
}
broute_rule_set_traffic_class() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed so update BR6_RULE string as well otherwise
#update BR_RULE only for installation of ipv6 proto rule only.
BR_RULE="$BR_RULE -j mark --mark-or 0x$1 --mark-target ACCEPT"
if [ ! -z "$BR6_RULE" ]; then
BR6_RULE="$BR6_RULE -j mark --mark-or 0x$1 --mark-target ACCEPT"
fi
}
broute_append_rule() {
#when ethertype is not configured by user then both proto rules of ipv4
#and ipv6 to be installed otherwise install ipv6 proto rule only.
echo "ebtables -t broute -A qos $BR_RULE" >> /tmp/qos/classify.ebtables
if [ -n "$BR6_RULE" ]; then
echo "ebtables -t broute -A qos $BR6_RULE" >> /tmp/qos/classify.ebtables
fi
}
set_ip_addr()
{
local cid=$1
local match_src_ip_func=$2
local match_dst_ip_func=$3
config_get src_ip "$cid" "src_ip"
config_get dst_ip "$cid" "dest_ip"
if [ ! -z "$src_ip" ]; then
$match_src_ip_func "$src_ip"
fi
if [ ! -z "$dst_ip" ]; then
$match_dst_ip_func "$dst_ip"
fi
}
set_ports()
{
local cid=$1
local match_src_port_func=$2
local match_dst_port_func=$3
local src_port=""
local dst_port=""
local src_port_range=""
local dst_port_range=""
config_get src_port "$cid" "src_port"
config_get dst_port "$cid" "dest_port"
config_get src_port_range "$cid" "src_port_range"
config_get dst_port_range "$cid" "dest_port_range"
if ! [ -z $src_port ] && ! [ -z $src_port_range ]; then
$match_src_port_func "$src_port:$src_port_range"
elif [ ! -z $src_port ]; then
$match_src_port_func $src_port
fi
if ! [ -z $dst_port ] && ! [ -z $dst_port_range ]; then
$match_dst_port_func "$dst_port:$dst_port_range"
elif [ ! -z $dst_port ]; then
$match_dst_port_func $dst_port
fi
}
protocol_string_to_num()
{
local value=-1
case "$1" in
*[0-9]*) value="$1"
;;
TCP|tcp) value=6
;;
UDP|udp) value=17
;;
ICMP|icmp) value=1
;;
ICMPv6|icmpv6) value=58
;;
IGMP|igmp) value=2
;;
SCTP|sctp) value=132
;;
*) value=-1
;;
esac
echo $value
}
broute_ipv4_rule_options()
{
local cid=$1
config_get protocol "$cid" "proto"
config_get dscp_filter "$cid" "dscp_filter"
set_ip_addr $cid ebt_match_src_ip ebt_match_dst_ip
if [ ! -z $dscp_filter ]; then
broute_filter_on_dscp "$dscp_filter"
fi
if [ ! -z $protocol ]; then
local proto_num=$(protocol_string_to_num "$protocol")
ebt_match_ip_protocol "$proto_num"
#port installation for protol tcp/udp/sctp
if [ $proto_num = "6" ] || [ $proto_num = "17" ] || [ $proto_num = "132" ] ; then
set_ports "$cid" ebt_match_ip_src_port ebt_match_ip_dst_port
fi
fi
}
broute_ipv6_rule_options()
{
local cid=$1
config_get protocol "$cid" "proto"
config_get dscp_filter "$cid" "dscp_filter"
set_ip_addr $cid ebt_match_ipv6_src_ip ebt_match_ipv6_dst_ip
if [ ! -z $dscp_filter ]; then
local tos_val
local tos_hex
tos_val=$(($dscp_filter<<2))
tos_hex=$(printf "%x" $tos_val)
ebt_match_ipv6_dscp "$tos_hex"
fi
if [ ! -z $protocol ]; then
local proto_num=$(protocol_string_to_num "$protocol")
ebt_match_ipv6_protocol "$proto_num"
#port installation for protol tcp/udp/sctp
if [ $proto_num = "6" ] || [ $proto_num = "17" ] || [ $proto_num = "132" ]; then
set_ports "$cid" ebt_match_ipv6_src_port ebt_match_ipv6_dst_port
fi
fi
}
handle_ebtables_rules() {
@@ -360,6 +518,8 @@ handle_ebtables_rules() {
local is_l2_rule=0
local src_dhcp_options=""
local dst_dhcp_options=""
local protocol=""
local ip_version=""
init_broute_rule
@@ -377,8 +537,9 @@ handle_ebtables_rules() {
config_get dst_clid "$sid" "dst_client_id" # dhcp option 61
config_get src_ucid "$sid" "src_user_class_id" # dhcp option 77
config_get dst_ucid "$sid" "dst_user_class_id" # dhcp option 77
config_get traffic_class "$sid" "traffic_class"
config_get protocol "$sid" "proto"
if [ -n "$src_if" ]; then
for interf in $(db -q get hw.board.ethernetPortOrder); do
@@ -405,13 +566,6 @@ handle_ebtables_rules() {
is_l2_rule=1
fi
if [ -n "$dscp_filter" ]; then
# filter on ethertype and proto is same thing
broute_filter_on_ether_type IPv4
broute_filter_on_dscp $dscp_filter
is_l2_rule=1
fi
if [ -n "$eth_type" ]; then
broute_filter_on_ether_type $eth_type
is_l2_rule=1
@@ -422,6 +576,47 @@ handle_ebtables_rules() {
is_l2_rule=1
fi
case $eth_type in
IPv4|IPV4|0800)
ip_version=4
;;
IPv6|IPV6|86DD)
ip_version=6
;;
*)
if [ -z "$eth_type" ]; then
case $src_ip$dest_ip in
*.*)
ip_version=4
broute_filter_on_ether_type "IPv4"
;;
*:*)
ip_version=6
broute_filter_on_ether_type "IPv6"
;;
*)
if [ -n "$protocol" ] || [ -n "$dscp_filter" ]; then
ip_version=1 #neither ether_type nor ip address used
#ethertype is not configured by user so install
#both proto ipv4 and ipv6 rule
BR6_RULE="$BR_RULE"
broute_filter_on_ether_type "IPv4"
broute_filter_on_ether_type6 "IPv6"
fi
esac
fi
esac
if [ $ip_version = "4" ] || [ $ip_version = "1" ]; then
broute_ipv4_rule_options "$sid"
is_l2_rule=1
fi
if [ $ip_version = "6" ] || [ $ip_version = "1" ]; then
broute_ipv6_rule_options "$sid"
is_l2_rule=1
fi
# first process options that will help figure our source mac address
# dhcp option for "vendor class id"
if [ -n "$src_vcid" ]; then
@@ -752,12 +947,7 @@ handle_policer_rules() {
return
fi
# The policer object is not available on non BCM968* chips
if [ $POLICER_SKIP -eq 1 ]; then
assign_policer_to_port $ifname $pindex
else
config_ingress_rate_limit $ifname $ingress_rate $in_burst_size
fi
config_ingress_rate_limit $ifname $ingress_rate $in_burst_size
}
@@ -844,23 +1034,20 @@ configure_classify() {
pre_configure_queue() {
# Delete queues
rm -rf /tmp/qos/queue_stats
for intf in $(db get hw.board.ethernetPortOrder); do
rm -rf /tmp/qos/$intf
mkdir -p /tmp/qos/queue_stats/$intf
touch /tmp/qos/queue_stats/$intf/q_idx
echo 0 > /tmp/qos/queue_stats/$intf/q_idx
mkdir -p /tmp/qos/$intf
touch /tmp/qos/$intf/q_order
touch /tmp/qos/$intf/q_idx
echo 0 > /tmp/qos/$intf/q_idx
tmctl porttminit --devtype 0 --if $intf --numqueues 8
i=0
for i in 0 1 2 3 4 5 6 7; do
tmctl delqcfg --devtype 0 --if $intf --qid $i &>/dev/null
done
tmctl porttminit --devtype 0 --if $intf --flag 0 --numqueues 8
mkdir -p /tmp/qos/$intf
touch /tmp/qos/$intf/q_order
touch /tmp/qos/$intf/q_precedence
done
}
@@ -868,24 +1055,29 @@ configure_queue() {
# Load UCI file
config_load qos
config_foreach handle_q_order queue
map_precedence
config_foreach handle_queue queue
sort_by_precedence
for interf in $(db -q get hw.board.ethernetPortOrder); do
Q_COUNT=0
# sp queue have max priority value = no. of queue configured on the port
# hence read and update SP_Q_PRIO here
local q_no=$(cat /tmp/qos/$interf/q_idx)
SP_Q_PRIO=`expr $q_no - 1`
config_foreach handle_queue queue $interf
done
}
configure_policer() {
# The policer object is not available on non BCM968* chips, just clean up
# the old config if any and return
if [ $POLICER_SKIP -eq 0 ]; then
for intf in $(db get hw.board.ethernetPortOrder); do
local unitport="$(get_port_number $intf)"
local unit=$(echo $unitport | cut -d ' ' -f 1)
local port=$(echo $unitport | cut -d ' ' -f 2)
# setting rate and burst size to 0 disables rate limiting
if [ $port != "" -a $unit != "" ]; then
ethswctl -c rxratectrl -n $unit -p $port -x 0 -y 0
fi
done
fi
for intf in $(db get hw.board.ethernetPortOrder); do
local unitport="$(get_port_number $intf)"
local unit=$(echo $unitport | cut -d ' ' -f 1)
local port=$(echo $unitport | cut -d ' ' -f 2)
# setting rate and burst size to 0 disables rate limiting
if [ $port != "" -a $unit != "" ]; then
ethswctl -c rxratectrl -n $unit -p $port -x 0 -y 0
fi
done
# Delete policer
local i=0
@@ -926,10 +1118,6 @@ reload_qos() {
local service_name="$1"
local cpu_model="$(cat /proc/socinfo | grep 'SoC Name' | cut -d':' -f2)"
case $cpu_model in
BCM68*|BCM6755) POLICER_SKIP=1 ;;
esac
if [ -z "$service_name" ]; then
configure_qos
elif [ "$service_name" == "shaper" ]; then

View File

@@ -1,21 +1,20 @@
#
# Copyright (C) 2013-2020 iopsys
# Copyright (C) 2013-2022 iopsys
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=5.2.3
PKG_VERSION:=5.2.4
PKG_SOURCE_VERSION:=cf54bd65ec821ac67f3aa1caeebcd3ea9aae07ad
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd
PKG_SOURCE_VERSION:=2ca3ae0c29dcbbf01282f6118eb8d5e5bc9a1c45
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
endif
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
@@ -23,8 +22,6 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
PKG_INSTALL:=
define Package/questd
CATEGORY:=Utilities
DEPENDS:=+libuci +libubox +ubus +libpthread
@@ -36,6 +33,13 @@ define Package/questd/description
this information via ubus
endef
ifeq ($(LOCAL_DEV),1)
CMAKE_OPTIONS:=-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
define Build/Prepare
$(CP) -rf ~/git/code/questd/* $(PKG_BUILD_DIR)/
endef
endif
define Package/questd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin

View File

@@ -1,23 +1,22 @@
#
# Copyright (C) 2018 iopsys
# Copyright (C) 2018-2022 iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=rulengd
PKG_VERSION:=1.2.6
PKG_VERSION:=1.2.7
PKG_RELEASE:=1
PKG_BUILD_PARALLEL:=1
PKG_INSTALL:=1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
PKG_SOURCE_VERSION:=e323bebe85cd7fb4eeb6cee535188227bc9b81e3
PKG_SOURCE_VERSION:=1f247e1afc845f47348febffa55fe40d8b552737
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1
endif
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
@@ -35,6 +34,14 @@ define Package/rulengd/description
rulengd listens for events and executes speficied methods if the incoming event arguments contain speficied ones.
endef
#CMAKE_OPTIONS:=-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/code/rulengd/* $(PKG_BUILD_DIR)/
endef
endif
define Package/rulengd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/bin

View File

@@ -1,51 +0,0 @@
#
# Copyright (C) 2012-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=shflags
PKG_VERSION:=2012-06-11
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/kward/shflags.git
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=c12b30cebb92b49c5edb6df255c0952c65b4ddc6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=LGPL-2.1
include $(INCLUDE_DIR)/package.mk
define Package/shflags
SECTION:=libs
CATEGORY:=Libraries
TITLE:=shflags
DEPENDS:=+getopt
URL:=http://code.google.com/p/shflags/
MAINTAINER:=Luka Perkov <luka@openwrt.org>
endef
define Package/shflags/description
command-line flags module for Unix shell scripts
endef
define Build/Configure
endef
define Build/Compile
endef
define Build/Install
endef
define Package/shflags/install
$(INSTALL_DIR) $(1)/usr/share/shflags
$(CP) $(PKG_BUILD_DIR)/source/1.0/src/shflags $(1)/usr/share/shflags/shflags.sh
endef
$(eval $(call BuildPackage,shflags))

View File

@@ -1,763 +0,0 @@
--- a/source/1.0/src/shflags
+++ b/source/1.0/src/shflags
@@ -1,91 +1,10 @@
-# $Id$
-# vim:et:ft=sh:sts=2:sw=2
-#
-# Copyright 2008 Kate Ward. All Rights Reserved.
-# Released under the LGPL (GNU Lesser General Public License)
-#
-# shFlags -- Advanced command-line flag library for Unix shell scripts.
-# http://code.google.com/p/shflags/
-#
-# Author: kate.ward@forestent.com (Kate Ward)
-#
-# This module implements something like the google-gflags library available
-# from http://code.google.com/p/google-gflags/.
-#
-# FLAG TYPES: This is a list of the DEFINE_*'s that you can do. All flags take
-# a name, default value, help-string, and optional 'short' name (one-letter
-# name). Some flags have other arguments, which are described with the flag.
-#
-# DEFINE_string: takes any input, and intreprets it as a string.
-#
-# DEFINE_boolean: typically does not take any argument: say --myflag to set
-# FLAGS_myflag to true, or --nomyflag to set FLAGS_myflag to false.
-# Alternately, you can say
-# --myflag=true or --myflag=t or --myflag=0 or
-# --myflag=false or --myflag=f or --myflag=1
-# Passing an option has the same affect as passing the option once.
-#
-# DEFINE_float: takes an input and intreprets it as a floating point number. As
-# shell does not support floats per-se, the input is merely validated as
-# being a valid floating point value.
-#
-# DEFINE_integer: takes an input and intreprets it as an integer.
-#
-# SPECIAL FLAGS: There are a few flags that have special meaning:
-# --help (or -?) prints a list of all the flags in a human-readable fashion
-# --flagfile=foo read flags from foo. (not implemented yet)
-# -- as in getopt(), terminates flag-processing
-#
-# EXAMPLE USAGE:
-#
-# -- begin hello.sh --
-# #! /bin/sh
-# . ./shflags
-# DEFINE_string name 'world' "somebody's name" n
-# FLAGS "$@" || exit $?
-# eval set -- "${FLAGS_ARGV}"
-# echo "Hello, ${FLAGS_name}."
-# -- end hello.sh --
-#
-# $ ./hello.sh -n Kate
-# Hello, Kate.
-#
-# NOTE: Not all systems include a getopt version that supports long flags. On
-# these systems, only short flags are recognized.
-
-#==============================================================================
-# shFlags
-#
-# Shared attributes:
-# flags_error: last error message
-# flags_return: last return value
-#
-# __flags_longNames: list of long names for all flags
-# __flags_shortNames: list of short names for all flags
-# __flags_boolNames: list of boolean flag names
-#
-# __flags_opts: options parsed by getopt
-#
-# Per-flag attributes:
-# FLAGS_<flag_name>: contains value of flag named 'flag_name'
-# __flags_<flag_name>_default: the default flag value
-# __flags_<flag_name>_help: the flag help string
-# __flags_<flag_name>_short: the flag short name
-# __flags_<flag_name>_type: the flag type
-#
-# Notes:
-# - lists of strings are space separated, and a null value is the '~' char.
-
-# return if FLAGS already loaded
[ -n "${FLAGS_VERSION:-}" ] && return 0
FLAGS_VERSION='1.0.3'
-# return values
FLAGS_TRUE=0
FLAGS_FALSE=1
FLAGS_ERROR=2
-# reserved flag names
FLAGS_RESERVED='ARGC ARGV ERROR FALSE HELP PARENT RESERVED TRUE VERSION'
_flags_debug() { echo "flags:DEBUG $@" >&2; }
@@ -93,7 +12,6 @@ _flags_warn() { echo "flags:WARN $@" >&2
_flags_error() { echo "flags:ERROR $@" >&2; }
_flags_fatal() { echo "flags:FATAL $@" >&2; }
-# specific shell checks
if [ -n "${ZSH_VERSION:-}" ]; then
setopt |grep "^shwordsplit$" >/dev/null
if [ $? -ne ${FLAGS_TRUE} ]; then
@@ -107,20 +25,15 @@ if [ -n "${ZSH_VERSION:-}" ]; then
fi
fi
-#
-# constants
-#
-# getopt version
__FLAGS_GETOPT_VERS_STD=0
__FLAGS_GETOPT_VERS_ENH=1
__FLAGS_GETOPT_VERS_BSD=2
getopt >/dev/null 2>&1
case $? in
- 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;; # bsd getopt
+ 0) __FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD} ;;
2)
- # TODO(kward): look into '-T' option to test the internal getopt() version
if [ "`getopt --version`" = '-- ' ]; then
__FLAGS_GETOPT_VERS=${__FLAGS_GETOPT_VERS_STD}
else
@@ -133,82 +46,49 @@ case $? in
;;
esac
-# getopt optstring lengths
__FLAGS_OPTSTR_SHORT=0
__FLAGS_OPTSTR_LONG=1
__FLAGS_NULL='~'
-# flag info strings
__FLAGS_INFO_DEFAULT='default'
__FLAGS_INFO_HELP='help'
__FLAGS_INFO_SHORT='short'
__FLAGS_INFO_TYPE='type'
-# flag lengths
__FLAGS_LEN_SHORT=0
__FLAGS_LEN_LONG=1
-# flag types
__FLAGS_TYPE_NONE=0
__FLAGS_TYPE_BOOLEAN=1
__FLAGS_TYPE_FLOAT=2
__FLAGS_TYPE_INTEGER=3
__FLAGS_TYPE_STRING=4
-# set the constants readonly
__flags_constants=`set |awk -F= '/^FLAGS_/ || /^__FLAGS_/ {print $1}'`
for __flags_const in ${__flags_constants}; do
- # skip certain flags
case ${__flags_const} in
FLAGS_HELP) continue ;;
FLAGS_PARENT) continue ;;
esac
- # set flag readonly
if [ -z "${ZSH_VERSION:-}" ]; then
readonly ${__flags_const}
- else # handle zsh
+ else
case ${ZSH_VERSION} in
[123].*) readonly ${__flags_const} ;;
- *) readonly -g ${__flags_const} ;; # declare readonly constants globally
+ *) readonly -g ${__flags_const} ;;
esac
fi
done
unset __flags_const __flags_constants
-#
-# internal variables
-#
-
-__flags_boolNames=' ' # space separated list of boolean flag names
-__flags_longNames=' ' # space separated list of long flag names
-__flags_shortNames=' ' # space separated list of short flag names
-
-__flags_columns='' # screen width in columns
-__flags_opts='' # temporary storage for parsed getopt flags
-
-#------------------------------------------------------------------------------
-# private functions
-#
-
-# Define a flag.
-#
-# Calling this function will define the following info variables for the
-# specified flag:
-# FLAGS_flagname - the name for this flag (based upon the long flag name)
-# __flags_<flag_name>_default - the default value
-# __flags_flagname_help - the help string
-# __flags_flagname_short - the single letter alias
-# __flags_flagname_type - the type of flag (one of __FLAGS_TYPE_*)
-#
-# Args:
-# _flags__type: integer: internal type of flag (__FLAGS_TYPE_*)
-# _flags__name: string: long flag name
-# _flags__default: default flag value
-# _flags__help: string: help string
-# _flags__short: string: (optional) short flag name
-# Returns:
-# integer: success of operation, or error
+
+__flags_boolNames=' '
+__flags_longNames=' '
+__flags_shortNames=' '
+__flags_columns=''
+__flags_opts=''
+
_flags_define()
{
if [ $# -lt 4 ]; then
@@ -226,16 +106,13 @@ _flags_define()
_flags_return_=${FLAGS_TRUE}
- # TODO(kward): check for validity of the flag name (e.g. dashes)
- # check whether the flag name is reserved
echo " ${FLAGS_RESERVED} " |grep " ${_flags_name_} " >/dev/null
if [ $? -eq 0 ]; then
flags_error="flag name (${_flags_name_}) is reserved"
_flags_return_=${FLAGS_ERROR}
fi
- # require short option for getopt that don't support long options
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
-a ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} \
-a "${_flags_short_}" = "${__FLAGS_NULL}" ]
@@ -244,7 +121,6 @@ _flags_define()
_flags_return_=${FLAGS_ERROR}
fi
- # check for existing long name definition
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
if _flags_itemInList "${_flags_name_}" \
${__flags_longNames} ${__flags_boolNames}
@@ -255,7 +131,6 @@ _flags_define()
fi
fi
- # check for existing short name definition
if [ ${_flags_return_} -eq ${FLAGS_TRUE} \
-a "${_flags_short_}" != "${__FLAGS_NULL}" ]
then
@@ -266,9 +141,6 @@ _flags_define()
fi
fi
- # handle default value. note, on several occasions the 'if' portion of an
- # if/then/else contains just a ':' which does nothing. a binary reversal via
- # '!' is not done because it does not work on all shells.
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
case ${_flags_type_} in
${__FLAGS_TYPE_BOOLEAN})
@@ -301,7 +173,7 @@ _flags_define()
fi
;;
- ${__FLAGS_TYPE_STRING}) ;; # everything in shell is a valid string
+ ${__FLAGS_TYPE_STRING}) ;;
*)
flags_error="unrecognized flag type '${_flags_type_}'"
@@ -311,7 +183,6 @@ _flags_define()
fi
if [ ${_flags_return_} -eq ${FLAGS_TRUE} ]; then
- # store flag information
eval "FLAGS_${_flags_name_}='${_flags_default_}'"
eval "__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}=${_flags_type_}"
eval "__flags_${_flags_name_}_${__FLAGS_INFO_DEFAULT}=\
@@ -319,7 +190,6 @@ _flags_define()
eval "__flags_${_flags_name_}_${__FLAGS_INFO_HELP}=\"${_flags_help_}\""
eval "__flags_${_flags_name_}_${__FLAGS_INFO_SHORT}='${_flags_short_}'"
- # append flag name(s) to list of names
__flags_longNames="${__flags_longNames}${_flags_name_} "
__flags_shortNames="${__flags_shortNames}${_flags_short_} "
[ ${_flags_type_} -eq ${__FLAGS_TYPE_BOOLEAN} ] && \
@@ -333,17 +203,6 @@ _flags_define()
return ${flags_return}
}
-# Return valid getopt options using currently defined list of long options.
-#
-# This function builds a proper getopt option string for short (and long)
-# options, using the current list of long options for reference.
-#
-# Args:
-# _flags_optStr: integer: option string type (__FLAGS_OPTSTR_*)
-# Output:
-# string: generated option string for getopt
-# Returns:
-# boolean: success of operation (always returns True)
_flags_genOptStr()
{
_flags_optStrType_=$1
@@ -358,7 +217,6 @@ _flags_genOptStr()
${_flags_flag_} ${__FLAGS_INFO_SHORT}`
if [ "${_flags_shortName_}" != "${__FLAGS_NULL}" ]; then
_flags_opts_="${_flags_opts_}${_flags_shortName_}"
- # getopt needs a trailing ':' to indicate a required argument
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
_flags_opts_="${_flags_opts_}:"
fi
@@ -366,7 +224,6 @@ _flags_genOptStr()
${__FLAGS_OPTSTR_LONG})
_flags_opts_="${_flags_opts_:+${_flags_opts_},}${_flags_flag_}"
- # getopt needs a trailing ':' to indicate a required argument
[ ${_flags_type_} -ne ${__FLAGS_TYPE_BOOLEAN} ] && \
_flags_opts_="${_flags_opts_}:"
;;
@@ -379,15 +236,6 @@ _flags_genOptStr()
return ${FLAGS_TRUE}
}
-# Returns flag details based on a flag name and flag info.
-#
-# Args:
-# string: long flag name
-# string: flag info (see the _flags_define function for valid info types)
-# Output:
-# string: value of dereferenced flag variable
-# Returns:
-# integer: one of FLAGS_{TRUE|FALSE|ERROR}
_flags_getFlagInfo()
{
_flags_name_=$1
@@ -399,13 +247,6 @@ _flags_getFlagInfo()
if [ -n "${_flags_value_}" ]; then
flags_return=${FLAGS_TRUE}
else
- # see if the _flags_name_ variable is a string as strings can be empty...
- # note: the DRY principle would say to have this function call itself for
- # the next three lines, but doing so results in an infinite loop as an
- # invalid _flags_name_ will also not have the associated _type variable.
- # Because it doesn't (it will evaluate to an empty string) the logic will
- # try to find the _type variable of the _type variable, and so on. Not so
- # good ;-)
_flags_typeVar_="__flags_${_flags_name_}_${__FLAGS_INFO_TYPE}"
_flags_strToEval_="_flags_type_=\"\${${_flags_typeVar_}:-}\""
eval "${_flags_strToEval_}"
@@ -424,15 +265,6 @@ _flags_getFlagInfo()
return ${flags_return}
}
-# check for presense of item in a list. passed a string (e.g. 'abc'), this
-# function will determine if the string is present in the list of strings (e.g.
-# ' foo bar abc ').
-#
-# Args:
-# _flags__str: string: string to search for in a list of strings
-# unnamed: list: list of strings
-# Returns:
-# boolean: true if item is in the list
_flags_itemInList()
{
_flags_str_=$1
@@ -449,34 +281,22 @@ _flags_itemInList()
return ${flags_return}
}
-# Returns the width of the current screen.
-#
-# Output:
-# integer: width in columns of the current screen.
_flags_columns()
{
if [ -z "${__flags_columns}" ]; then
- # determine the value and store it
if eval stty size >/dev/null 2>&1; then
- # stty size worked :-)
set -- `stty size`
__flags_columns=$2
elif eval tput cols >/dev/null 2>&1; then
set -- `tput cols`
__flags_columns=$1
else
- __flags_columns=80 # default terminal width
+ __flags_columns=80
fi
fi
echo ${__flags_columns}
}
-# Validate a boolean.
-#
-# Args:
-# _flags__bool: boolean: value to validate
-# Returns:
-# bool: true if the value is a valid boolean
_flags_validateBoolean()
{
_flags_bool_=$1
@@ -492,12 +312,6 @@ _flags_validateBoolean()
return ${flags_return}
}
-# Validate a float.
-#
-# Args:
-# _flags__float: float: value to validate
-# Returns:
-# bool: true if the value is a valid float
_flags_validateFloat()
{
_flags_float_=$1
@@ -507,10 +321,10 @@ _flags_validateFloat()
else
flags_return=${FLAGS_TRUE}
case ${_flags_float_} in
- -*) # negative floats
+ -*)
_flags_test_=`expr "${_flags_float_}" : '\(-[0-9][0-9]*\.[0-9][0-9]*\)'`
;;
- *) # positive floats
+ *)
_flags_test_=`expr "${_flags_float_}" : '\([0-9][0-9]*\.[0-9][0-9]*\)'`
;;
esac
@@ -521,22 +335,16 @@ _flags_validateFloat()
return ${flags_return}
}
-# Validate an integer.
-#
-# Args:
-# _flags__integer: interger: value to validate
-# Returns:
-# bool: true if the value is a valid integer
_flags_validateInteger()
{
_flags_int_=$1
flags_return=${FLAGS_TRUE}
case ${_flags_int_} in
- -*) # negative ints
+ -*)
_flags_test_=`expr "${_flags_int_}" : '\(-[0-9][0-9]*\)'`
;;
- *) # positive ints
+ *)
_flags_test_=`expr "${_flags_int_}" : '\([0-9][0-9]*\)'`
;;
esac
@@ -546,23 +354,12 @@ _flags_validateInteger()
return ${flags_return}
}
-# Parse command-line options using the standard getopt.
-#
-# Note: the flag options are passed around in the global __flags_opts so that
-# the formatting is not lost due to shell parsing and such.
-#
-# Args:
-# @: varies: command-line options to parse
-# Returns:
-# integer: a FLAGS success condition
_flags_getoptStandard()
{
flags_return=${FLAGS_TRUE}
_flags_shortOpts_=`_flags_genOptStr ${__FLAGS_OPTSTR_SHORT}`
- # check for spaces in passed options
for _flags_opt_ in "$@"; do
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
_flags_match_=`echo "x${_flags_opt_}x" |sed 's/ //g'`
if [ "${_flags_match_}" != "x${_flags_opt_}x" ]; then
flags_error='the available getopt does not support spaces in options'
@@ -585,15 +382,6 @@ _flags_getoptStandard()
return ${flags_return}
}
-# Parse command-line options using the enhanced getopt.
-#
-# Note: the flag options are passed around in the global __flags_opts so that
-# the formatting is not lost due to shell parsing and such.
-#
-# Args:
-# @: varies: command-line options to parse
-# Returns:
-# integer: a FLAGS success condition
_flags_getoptEnhanced()
{
flags_return=${FLAGS_TRUE}
@@ -617,17 +405,6 @@ _flags_getoptEnhanced()
return ${flags_return}
}
-# Dynamically parse a getopt result and set appropriate variables.
-#
-# This function does the actual conversion of getopt output and runs it through
-# the standard case structure for parsing. The case structure is actually quite
-# dynamic to support any number of flags.
-#
-# Args:
-# argc: int: original command-line argument count
-# @: varies: output from getopt parsing
-# Returns:
-# integer: a FLAGS success condition
_flags_parseGetopt()
{
_flags_argc_=$1
@@ -638,35 +415,26 @@ _flags_parseGetopt()
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
set -- $@
else
- # note the quotes around the `$@' -- they are essential!
eval set -- "$@"
fi
- # provide user with number of arguments to shift by later
- # NOTE: the FLAGS_ARGC variable is obsolete as of 1.0.3 because it does not
- # properly give user access to non-flag arguments mixed in between flag
- # arguments. Its usage was replaced by FLAGS_ARGV, and it is being kept only
- # for backwards compatibility reasons.
FLAGS_ARGC=`expr $# - 1 - ${_flags_argc_}`
- # handle options. note options with values must do an additional shift
while true; do
_flags_opt_=$1
_flags_arg_=${2:-}
_flags_type_=${__FLAGS_TYPE_NONE}
_flags_name_=''
- # determine long flag name
case "${_flags_opt_}" in
- --) shift; break ;; # discontinue option parsing
+ --) shift; break ;;
- --*) # long option
+ --*)
_flags_opt_=`expr "${_flags_opt_}" : '--\(.*\)'`
_flags_len_=${__FLAGS_LEN_LONG}
if _flags_itemInList "${_flags_opt_}" ${__flags_longNames}; then
_flags_name_=${_flags_opt_}
else
- # check for negated long boolean version
if _flags_itemInList "${_flags_opt_}" ${__flags_boolNames}; then
_flags_name_=`expr "${_flags_opt_}" : 'no\(.*\)'`
_flags_type_=${__FLAGS_TYPE_BOOLEAN}
@@ -675,12 +443,10 @@ _flags_parseGetopt()
fi
;;
- -*) # short option
+ -*)
_flags_opt_=`expr "${_flags_opt_}" : '-\(.*\)'`
_flags_len_=${__FLAGS_LEN_SHORT}
if _flags_itemInList "${_flags_opt_}" ${__flags_shortNames}; then
- # yes. match short name to long name. note purposeful off-by-one
- # (too high) with awk calculations.
_flags_pos_=`echo "${__flags_shortNames}" \
|awk 'BEGIN{RS=" ";rn=0}$0==e{rn=NR}END{print rn}' \
e=${_flags_opt_}`
@@ -690,14 +456,12 @@ _flags_parseGetopt()
;;
esac
- # die if the flag was unrecognized
if [ -z "${_flags_name_}" ]; then
flags_error="unrecognized option (${_flags_opt_})"
flags_return=${FLAGS_ERROR}
break
fi
- # set new flag value
[ ${_flags_type_} -eq ${__FLAGS_TYPE_NONE} ] && \
_flags_type_=`_flags_getFlagInfo \
"${_flags_name_}" ${__FLAGS_INFO_TYPE}`
@@ -746,7 +510,6 @@ _flags_parseGetopt()
;;
esac
- # handle special case help flag
if [ "${_flags_name_}" = 'help' ]; then
if [ ${FLAGS_help} -eq ${FLAGS_TRUE} ]; then
flags_help
@@ -756,12 +519,10 @@ _flags_parseGetopt()
fi
fi
- # shift the option and non-boolean arguements out.
shift
[ ${_flags_type_} != ${__FLAGS_TYPE_BOOLEAN} ] && shift
done
- # give user back non-flag arguments
FLAGS_ARGV=''
while [ $# -gt 0 ]; do
FLAGS_ARGV="${FLAGS_ARGV:+${FLAGS_ARGV} }'$1'"
@@ -773,43 +534,18 @@ _flags_parseGetopt()
return ${flags_return}
}
-#------------------------------------------------------------------------------
-# public functions
-#
-
-# A basic boolean flag. Boolean flags do not take any arguments, and their
-# value is either 1 (false) or 0 (true). For long flags, the false value is
-# specified on the command line by prepending the word 'no'. With short flags,
-# the presense of the flag toggles the current value between true and false.
-# Specifying a short boolean flag twice on the command results in returning the
-# value back to the default value.
-#
-# A default value is required for boolean flags.
-#
-# For example, lets say a Boolean flag was created whose long name was 'update'
-# and whose short name was 'x', and the default value was 'false'. This flag
-# could be explicitly set to 'true' with '--update' or by '-x', and it could be
-# explicitly set to 'false' with '--noupdate'.
+
DEFINE_boolean() { _flags_define ${__FLAGS_TYPE_BOOLEAN} "$@"; }
-# Other basic flags.
DEFINE_float() { _flags_define ${__FLAGS_TYPE_FLOAT} "$@"; }
DEFINE_integer() { _flags_define ${__FLAGS_TYPE_INTEGER} "$@"; }
DEFINE_string() { _flags_define ${__FLAGS_TYPE_STRING} "$@"; }
-# Parse the flags.
-#
-# Args:
-# unnamed: list: command-line flags to parse
-# Returns:
-# integer: success of operation, or error
FLAGS()
{
- # define a standard 'help' flag if one isn't already defined
[ -z "${__flags_help_type:-}" ] && \
DEFINE_boolean 'help' false 'show this help' 'h'
- # parse options
if [ $# -gt 0 ]; then
if [ ${__FLAGS_GETOPT_VERS} -ne ${__FLAGS_GETOPT_VERS_ENH} ]; then
_flags_getoptStandard "$@"
@@ -818,7 +554,6 @@ FLAGS()
fi
flags_return=$?
else
- # nothing passed; won't bother running getopt
__flags_opts='--'
flags_return=${FLAGS_TRUE}
fi
@@ -832,23 +567,11 @@ FLAGS()
return ${flags_return}
}
-# This is a helper function for determining the `getopt` version for platforms
-# where the detection isn't working. It simply outputs debug information that
-# can be included in a bug report.
-#
-# Args:
-# none
-# Output:
-# debug info that can be included in a bug report
-# Returns:
-# nothing
flags_getoptInfo()
{
- # platform info
_flags_debug "uname -a: `uname -a`"
_flags_debug "PATH: ${PATH}"
- # shell info
if [ -n "${BASH_VERSION:-}" ]; then
_flags_debug 'shell: bash'
_flags_debug "BASH_VERSION: ${BASH_VERSION}"
@@ -857,7 +580,6 @@ flags_getoptInfo()
_flags_debug "ZSH_VERSION: ${ZSH_VERSION}"
fi
- # getopt info
getopt >/dev/null
_flags_getoptReturn=$?
_flags_debug "getopt return: ${_flags_getoptReturn}"
@@ -866,39 +588,16 @@ flags_getoptInfo()
unset _flags_getoptReturn
}
-# Returns whether the detected getopt version is the enhanced version.
-#
-# Args:
-# none
-# Output:
-# none
-# Returns:
-# bool: true if getopt is the enhanced version
flags_getoptIsEnh()
{
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_ENH}
}
-# Returns whether the detected getopt version is the standard version.
-#
-# Args:
-# none
-# Returns:
-# bool: true if getopt is the standard version
flags_getoptIsStd()
{
test ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD}
}
-# This is effectively a 'usage()' function. It prints usage information and
-# exits the program with ${FLAGS_FALSE} if it is ever found in the command line
-# arguments. Note this function can be overridden so other apps can define
-# their own --help flag, replacing this one, if they want.
-#
-# Args:
-# none
-# Returns:
-# integer: success of operation (always returns true)
flags_help()
{
if [ -n "${FLAGS_HELP:-}" ]; then
@@ -953,19 +652,14 @@ flags_help()
echo "${flags_helpStr_}" >&2
else
echo " ${flags_flagStr_} ${flags_help_}" >&2
- # note: the silliness with the x's is purely for ksh93 on Ubuntu 6.06
- # because it doesn't like empty strings when used in this manner.
flags_emptyStr_="`echo \"x${flags_flagStr_}x\" \
|awk '{printf "%"length($0)-2"s", ""}'`"
flags_helpStr_=" ${flags_emptyStr_} ${flags_defaultStr_}"
flags_helpStrLen_=`expr "${flags_helpStr_}" : '.*'`
if [ ${__FLAGS_GETOPT_VERS} -eq ${__FLAGS_GETOPT_VERS_STD} \
-o ${flags_helpStrLen_} -lt ${flags_columns_} ]; then
- # indented to match help string
echo "${flags_helpStr_}" >&2
else
- # indented four from left to allow for longer defaults as long flag
- # names might be used too, making things too long
echo " ${flags_defaultStr_}" >&2
fi
fi
@@ -978,12 +672,6 @@ flags_help()
return ${FLAGS_TRUE}
}
-# Reset shflags back to an uninitialized state.
-#
-# Args:
-# none
-# Returns:
-# nothing
flags_reset()
{
for flags_name_ in ${__flags_longNames}; do
@@ -1000,7 +688,6 @@ flags_reset()
eval ${flags_strToEval_}
done
- # reset internal variables
__flags_boolNames=' '
__flags_longNames=' '
__flags_shortNames=' '

56
ssdpd/Makefile Normal file
View File

@@ -0,0 +1,56 @@
#
# Copyright (C) 2022 OpenWrt.org
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ssdpd
PKG_VERSION:=1.0.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/miniupnp/miniupnp.git
PKG_SOURCE_VERSION:=207cf440a22c075cb55fb067a850be4f9c204e6e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/ssdpd
SECTION:=net
CATEGORY:=Network
DEPENDS:=+libnfnetlink +libpthread +libubox +libubus +libblobmsg-json +libcurl +mxml
TITLE:=MiniSSDPd - SSDP daemon
URL:=https://miniupnp.tuxfamily.org/minissdpd.html
endef
MAKE_PATH:=minissdpd
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Wextra -Werror
TARGET_LDFLAGS += \
-lpthread -lubox -lubus -lblobmsg_json -lcurl -lmxml
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/sspd/* $(PKG_BUILD_DIR)/
endef
endif
define Package/ssdpd/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_CONF) ./files/etc/config/ssdpd $(1)/etc/config/ssdpd
$(INSTALL_BIN) ./files/etc/init.d/ssdpd $(1)/etc/init.d/ssdpd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/minissdpd/minissdpd $(1)/usr/sbin/ssdpd
endef
$(eval $(call BuildPackage,ssdpd))

View File

@@ -0,0 +1,9 @@
config ssdpd 'ssdp'
option enabled '1'
option ipv6_enabled '0'
option socket_path '/var/run/minissdpd.sock'
option ttl '2'
option interface 'br-lan'
option debug '0'

76
ssdpd/files/etc/init.d/ssdpd Executable file
View File

@@ -0,0 +1,76 @@
#!/bin/sh /etc/rc.common
START=99
STOP=02
USE_PROCD=1
PROG=/usr/sbin/ssdpd
log() {
echo "${@}"|logger -t ssdpd.init -p info
}
validate_ssdpd_ssdp_section()
{
uci_validate_section ssdpd ssdpd "ssdp" \
'enabled:bool:true' \
'debug:bool:false' \
'ipv6_enabled:bool:false' \
'socket_path:string' \
'ttl:uinteger' \
'interface:string'
}
configure_ssdp()
{
local enabled ipv6_enabled socket_path ttl interface
config_load ssdpd
validate_ssdpd_ssdp_section || {
log "Validation of ssdp section failed"
return 1;
}
[ ${enabled} -eq 0 ] && return 0
mkdir -p /tmp/ssdp/description/
procd_set_param command ${PROG}
if [ ${ipv6_enabled} -eq 1 ]; then
procd_append_param command -6
fi
if [ ${debug} -eq 1 ]; then
procd_append_param command -d
fi
if [ -n "${socket_path}" ]; then
procd_append_param command -s ${socket_path}
fi
if [ -n "${ttl}" ]; then
procd_append_param command -t ${ttl}
fi
# If no interface is given defaults for br-lan
procd_append_param command -i ${interface:-br-lan}
}
start_service() {
procd_open_instance ssdp
configure_ssdp
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers()
{
procd_add_reload_trigger "ssdpd"
}

View File

@@ -0,0 +1,20 @@
--- a/minissdpd/openssdpsocket.c
+++ b/minissdpd/openssdpsocket.c
@@ -11,6 +11,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <net/if.h>
--- a/minissdpd/ifacewatch.c
+++ b/minissdpd/ifacewatch.c
@@ -130,6 +130,7 @@ ProcessInterfaceWatch(int s, int s_ssdp,
/* case RTM_DELLINK: */
case RTM_DELADDR:
is_del = 1;
+ // fall through
case RTM_NEWADDR:
/* http://linux-hacks.blogspot.fr/2009/01/sample-code-to-learn-netlink.html */
ifa = (struct ifaddrmsg *)NLMSG_DATA(nlhdr);

View File

@@ -0,0 +1,11 @@
--- a/minissdpd/Makefile
+++ b/minissdpd/Makefile
@@ -41,7 +41,7 @@ endif
EXECUTABLES = minissdpd testminissdpd testcodelength \
showminissdpdnotif
MINISSDPDOBJS = minissdpd.o openssdpsocket.o daemonize.o upnputils.o \
- ifacewatch.o getroute.o getifaddr.o asyncsendto.o
+ ifacewatch.o getroute.o getifaddr.o asyncsendto.o ssdpd.o
TESTMINISSDPDOBJS = testminissdpd.o printresponse.o
SHOWMINISSDPDNOTIFOBJS = showminissdpdnotif.o printresponse.o

View File

@@ -0,0 +1,629 @@
--- /dev/null
+++ b/minissdpd/ssdpd.c
@@ -0,0 +1,626 @@
+/*
+ * Copyright (C) 2022 iopsys Software Solutions AB
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation
+ *
+ * Author: Amin Ben Romdhane <amin.benromdhane@iopsys.eu>
+ */
+
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdbool.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <net/if.h>
+#include <syslog.h>
+
+#include <curl/curl.h>
+#include <libubox/uloop.h>
+#include <libubox/blobmsg_json.h>
+#include <libubox/list.h>
+#include <libubus.h>
+#include <mxml.h>
+
+#include "codelength.h"
+
+struct UPNPDev {
+ struct list_head list;
+ char *descURL;
+ char *st;
+ char *usn;
+};
+
+struct desc_list_elt {
+ struct list_head list;
+ char *url;
+ char *desc_path;
+ bool is_device_desc;
+};
+
+#define UPNP_DESC_PATH "/etc/upnp/description"
+#define UPNP_DISCOVER_TIMEOUT (30 * 1000)
+
+#ifndef MIN
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif /* MIN */
+
+/* macros used to read from unix socket */
+#define READ_BYTE_BUFFER(c) \
+ if ((int)bufferindex >= n) { \
+ n = read(s, buffer, sizeof(buffer)); \
+ if (n <= 0) break; \
+ bufferindex = 0; \
+ } \
+ c = buffer[bufferindex++];
+
+#define READ_COPY_BUFFER(dst, len) \
+ for (l = len, p = (unsigned char *)dst; l > 0; ) { \
+ unsigned int lcopy; \
+ if ((int)bufferindex >= n) { \
+ n = read(s, buffer, sizeof(buffer)); \
+ if ( n<= 0) break; \
+ bufferindex = 0; \
+ } \
+ lcopy = MIN(l, (n - bufferindex)); \
+ memcpy(p, buffer + bufferindex, lcopy); \
+ l -= lcopy; \
+ p += lcopy; \
+ bufferindex += lcopy; \
+ }
+
+LIST_HEAD(dev_list);
+LIST_HEAD(desc_list);
+
+char *ssdp_sockpath = NULL;
+
+static void upnp_discover_devices(struct uloop_timeout *timeout);
+static struct uloop_timeout upnpdiscover_timer = { .cb = upnp_discover_devices };
+
+static void add_dev_to_dev_list(char *descURL, char *st, char *usn)
+{
+ struct UPNPDev *dev = NULL;
+
+ dev = calloc(1, sizeof(struct UPNPDev));
+ list_add_tail(&dev->list, &dev_list);
+
+ dev->descURL = descURL;
+ dev->st = st;
+ dev->usn = usn;
+}
+
+void free_all_dev_list(void)
+{
+ struct UPNPDev *dev = NULL;
+
+ while (dev_list.next != &dev_list) {
+ dev = list_entry(dev_list.next, struct UPNPDev, list);
+ free(dev->descURL);
+ free(dev->st);
+ free(dev->usn);
+ free(dev);
+ list_del(&dev->list);
+ }
+}
+
+static int connectToMiniSSDPD(void)
+{
+ int s = 0;
+ struct sockaddr_un addr;
+
+ s = socket(AF_UNIX, SOCK_STREAM, 0);
+ if(s < 0)
+ return -1;
+
+ char *ssdp_s = ssdp_sockpath ? ssdp_sockpath : "/var/run/minissdpd.sock";
+
+ memset(&addr, 0, sizeof(addr));
+ addr.sun_family = AF_UNIX;
+
+ strncpy(addr.sun_path, ssdp_s, sizeof(addr.sun_path));
+
+ if(connect(s, (struct sockaddr *)&addr, sizeof(struct sockaddr_un)) < 0) {
+ close(s);
+ return -1;
+ }
+
+ return s;
+}
+
+static int disconnectFromMiniSSDPD(int s)
+{
+ if (close(s) < 0)
+ return -1;
+ return 0;
+}
+
+static int requestDevicesFromMiniSSDPD(int s)
+{
+ unsigned char buffer[256];
+ unsigned char *p = NULL;
+ unsigned int stsize = 0, l = 0;
+ char *devtype = "ssdp:all";
+
+ buffer[0] = 3; /* request type 3 : everything */
+ stsize = strlen(devtype);
+
+ p = buffer + 1;
+ l = stsize; CODELENGTH(l, p);
+ if (p + stsize > buffer + sizeof(buffer))
+ return -1;
+
+ memcpy(p, devtype, stsize);
+ p += stsize;
+ if (write(s, buffer, p - buffer) < 0)
+ return -1;
+
+ return 0;
+}
+
+static int receiveDevicesFromMiniSSDPD(int s)
+{
+ unsigned char buffer[256];
+ ssize_t n;
+ unsigned char *p;
+ unsigned int bufferindex;
+ unsigned int i, ndev;
+ unsigned int urlsize, stsize, usnsize, l;
+ char *url, *st, *usn;
+
+ n = read(s, buffer, sizeof(buffer));
+ if (n <= 0)
+ return -1;
+
+ ndev = buffer[0];
+ bufferindex = 1;
+ for (i = 0; i < ndev; i++) {
+ DECODELENGTH_READ(urlsize, READ_BYTE_BUFFER);
+ if (n <= 0)
+ return -1;
+
+ url = (char *)malloc(urlsize);
+ if (url == NULL)
+ return -1;
+
+ READ_COPY_BUFFER(url, urlsize);
+ if (n <= 0)
+ return -1;
+
+ DECODELENGTH_READ(stsize, READ_BYTE_BUFFER);
+ if (n <= 0)
+ goto free_url_and_return;
+
+ st = (char *)malloc(stsize);
+ if (st == NULL)
+ goto free_url_and_return;
+
+ READ_COPY_BUFFER(st, stsize);
+ if (n <= 0)
+ goto free_url_and_st_and_return;
+
+ DECODELENGTH_READ(usnsize, READ_BYTE_BUFFER);
+ if (n <= 0)
+ goto free_url_and_st_and_return;
+
+ usn = (char *)malloc(usnsize);
+ if (usn == NULL)
+ goto free_url_and_st_and_return;
+
+ READ_COPY_BUFFER(usn, usnsize);
+ if (n <= 0)
+ goto free_url_and_st_and_usn_and_return;
+
+ add_dev_to_dev_list(url, st, usn);
+ }
+
+ return 0;
+
+free_url_and_st_and_usn_and_return:
+ free(usn);
+free_url_and_st_and_return:
+ free(st);
+free_url_and_return:
+ free(url);
+ return -1;
+}
+
+static int getDevicesFromMiniSSDPD(void)
+{
+ int s = 0;
+ int res = 0;
+
+ s = connectToMiniSSDPD();
+ if (s < 0)
+ return -1;
+
+ res = requestDevicesFromMiniSSDPD(s);
+ if (res < 0)
+ goto close_socket_and_return;
+
+ res = receiveDevicesFromMiniSSDPD(s);
+
+close_socket_and_return:
+ disconnectFromMiniSSDPD(s);
+
+ return res;
+}
+
+static void download_file(char *file_path, const char *url)
+{
+ CURL *curl = curl_easy_init();
+ if (curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, url);
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 500);
+
+ FILE *fp = fopen(file_path, "wb");
+ if (fp) {
+ curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp);
+ curl_easy_perform(curl);
+ fclose(fp);
+ }
+
+ curl_easy_cleanup(curl);
+ }
+}
+
+static bool is_desc_exist(const char *desc_url)
+{
+ struct desc_list_elt *desc_elt = NULL;
+
+ if (!desc_url)
+ return false;
+
+ list_for_each_entry(desc_elt, &desc_list, list) {
+ if (strcmp(desc_elt->url, desc_url) == 0)
+ return true;
+ }
+
+ return false;
+}
+
+static void get_desc_name(const char *desc_url, char *str, size_t len)
+{
+ if (!desc_url || !str || len == 0)
+ return;
+
+ char *p = strstr(desc_url, "://");
+
+ snprintf(str, len, "%s", p ? p + 3 : desc_url);
+
+ for (int i = 0; str[i]; i++) {
+ if (str[i] == '/')
+ str[i] = '_';
+ }
+}
+
+static void add_desc_to_desc_list(const char *desc_path, const char *url, int is_device_desc)
+{
+ struct desc_list_elt *desc_elt;
+
+ desc_elt = calloc(1, sizeof(struct desc_list_elt));
+ list_add_tail(&desc_elt->list, &desc_list);
+
+ desc_elt->desc_path = strdup(desc_path);
+ desc_elt->url = strdup(url);
+ desc_elt->is_device_desc = is_device_desc;
+}
+
+static void free_all_desc_list(void)
+{
+ struct desc_list_elt *desc_elt = NULL;
+
+ while (desc_list.next != &desc_list) {
+ desc_elt = list_entry(desc_list.next, struct desc_list_elt, list);
+ free(desc_elt->desc_path);
+ free(desc_elt->url);
+ free(desc_elt);
+ list_del(&desc_elt->list);
+ }
+}
+
+static void __upnp_discover_devices(void)
+{
+ struct UPNPDev *dev = NULL;
+ char desc_name[128] = {0};
+ char file_path[256] = {0};
+ int res = 0, is_device_desc = 0;
+
+ /*
+ * Discover devices
+ */
+ if (!list_empty(&dev_list))
+ free_all_dev_list();
+
+ res = getDevicesFromMiniSSDPD();
+ if (res)
+ goto end;
+
+ /*
+ * Download description files
+ */
+ list_for_each_entry_reverse(dev, &dev_list, list) {
+
+ if (is_desc_exist(dev->descURL))
+ continue;
+
+ get_desc_name(dev->descURL, desc_name, sizeof(desc_name));
+ snprintf(file_path, sizeof(file_path), "%s/%s", UPNP_DESC_PATH, desc_name);
+ is_device_desc = (dev->usn && strstr(dev->usn, ":service:")) ? 0 : 1;
+
+ // Download Description
+ download_file(file_path, dev->descURL);
+
+ // Add description to descriptions list
+ add_desc_to_desc_list(file_path, dev->descURL, is_device_desc);
+ }
+
+end:
+ uloop_timeout_set(&upnpdiscover_timer, UPNP_DISCOVER_TIMEOUT);
+}
+
+static int upnp_discovery_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
+ struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
+{
+ struct blob_buf bb = {0};
+ struct UPNPDev *dev = NULL;
+
+ memset(&bb,0,sizeof(struct blob_buf));
+ blob_buf_init(&bb, 0);
+
+ void *devices_array = blobmsg_open_array(&bb, "devices");
+ list_for_each_entry_reverse(dev, &dev_list, list) {
+ // Parse Root device and devices
+ if ((dev->st && strstr(dev->st, ":rootdevice") != NULL) || (dev->usn && strstr(dev->usn, ":device:") != NULL)) {
+ void *device_obj = blobmsg_open_table(&bb, NULL);
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
+ blobmsg_add_string(&bb, "st", dev->st);
+ blobmsg_add_string(&bb, "usn", dev->usn);
+ blobmsg_add_string(&bb, "is_root_device", dev->st && strstr(dev->st, ":rootdevice") ? "1" : "0");
+ blobmsg_close_table(&bb, device_obj);
+ }
+ }
+ blobmsg_close_array(&bb, devices_array);
+
+ void *services_array = blobmsg_open_array(&bb, "services");
+ list_for_each_entry_reverse(dev, &dev_list, list) {
+ // Parse Services
+ if (dev->usn && strstr(dev->usn, ":service:") != NULL) {
+ void *service_obj = blobmsg_open_table(&bb, NULL);
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
+ blobmsg_add_string(&bb, "st", dev->st);
+ blobmsg_add_string(&bb, "usn", dev->usn);
+ blobmsg_close_table(&bb, service_obj);
+ }
+ }
+ blobmsg_close_array(&bb, services_array);
+
+ ubus_send_reply(ctx, req, bb.head);
+ blob_buf_free(&bb);
+ return 0;
+}
+
+static void fill_device_instances(struct blob_buf *bb, mxml_node_t *device)
+{
+ void *device_obj = NULL;
+ mxml_node_t *b = device;
+ char buf[64] = {0};
+ bool new_device_discovery = false;
+
+ while (b) {
+
+ if (mxmlGetType(b) != MXML_ELEMENT) {
+ b = mxmlWalkNext(b, device, MXML_DESCEND);
+ continue;
+ }
+
+ const char *elm_name = mxmlGetElement(b);
+ const char *elm_val = mxmlGetOpaque(b);
+
+ if (elm_name && strcmp(elm_name, "device") == 0) {
+
+ if (new_device_discovery && device_obj)
+ blobmsg_close_table(bb, device_obj);
+
+ device_obj = blobmsg_open_table(bb, NULL);
+ blobmsg_add_string(bb, "parent_dev", buf);
+ new_device_discovery = true;
+ }
+
+ if (elm_name && strcmp(elm_name, "deviceType") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "deviceType", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "friendlyName") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "friendlyName", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "manufacturer") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "manufacturer", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "manufacturerURL") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "manufacturerURL", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "modelDescription") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "modelDescription", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "modelName") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "modelName", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "modelNumber") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "modelNumber", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "modelURL") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "modelURL", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "serialNumber") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "serialNumber", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "UDN") == 0 && new_device_discovery) {
+ snprintf(buf, sizeof(buf), "%s", elm_val ? elm_val : "");
+ blobmsg_add_string(bb, "UDN", buf);
+ }
+
+ if (elm_name && strcmp(elm_name, "UPC") == 0 && new_device_discovery)
+ blobmsg_add_string(bb, "UPC", elm_val ? elm_val : "");
+
+ b = mxmlWalkNext(b, device, MXML_DESCEND);
+ }
+
+ if (new_device_discovery && device_obj)
+ blobmsg_close_table(bb, device_obj);
+}
+
+static void fill_service_element(struct blob_buf *bb, mxml_node_t *service)
+{
+ mxml_node_t *b = service;
+ void *service_obj = NULL;
+ char buf[64] = {0};
+ bool new_srv_discovery = false;
+
+ while (b) {
+
+ if (mxmlGetType(b) != MXML_ELEMENT) {
+ b = mxmlWalkNext(b, service, MXML_DESCEND);
+ continue;
+ }
+
+ const char *elm_name = mxmlGetElement(b);
+ const char *elm_val = mxmlGetOpaque(b);
+
+ if (elm_name && strcmp(elm_name, "UDN") == 0)
+ snprintf(buf, sizeof(buf), "%s", elm_val ? elm_val : "");
+
+
+ if (elm_name && strcmp(elm_name, "service") == 0) {
+
+ if (new_srv_discovery && service_obj)
+ blobmsg_close_table(bb, service_obj);
+
+ service_obj = blobmsg_open_table(bb, NULL);
+ blobmsg_add_string(bb, "parent_dev", buf);
+ new_srv_discovery = true;
+ }
+
+ if (elm_name && strcmp(elm_name, "serviceType") == 0 && new_srv_discovery)
+ blobmsg_add_string(bb, "serviceType", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "serviceId") == 0 && new_srv_discovery)
+ blobmsg_add_string(bb, "serviceId", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "SCPDURL") == 0 && new_srv_discovery)
+ blobmsg_add_string(bb, "SCPDURL", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "controlURL") == 0 && new_srv_discovery)
+ blobmsg_add_string(bb, "controlURL", elm_val ? elm_val : "");
+
+ if (elm_name && strcmp(elm_name, "eventSubURL") == 0 && new_srv_discovery)
+ blobmsg_add_string(bb, "eventSubURL", elm_val ? elm_val : "");
+
+ b = mxmlWalkNext(b, service, MXML_DESCEND);
+ }
+
+ if (new_srv_discovery && service_obj)
+ blobmsg_close_table(bb, service_obj);
+}
+
+static int upnp_description_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
+ struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
+{
+ struct desc_list_elt *desc_elt = NULL;
+ struct blob_buf bb = {0};
+
+ memset(&bb,0,sizeof(struct blob_buf));
+ blob_buf_init(&bb, 0);
+
+ void *desc_array = blobmsg_open_array(&bb, "descriptions");
+ list_for_each_entry(desc_elt, &desc_list, list) {
+ void *device_obj = blobmsg_open_table(&bb, NULL);
+ blobmsg_add_string(&bb, "desc_url", desc_elt->url);
+ blobmsg_add_u32(&bb, "is_device_desc", desc_elt->is_device_desc);
+ blobmsg_close_table(&bb, device_obj);
+
+ }
+ blobmsg_close_array(&bb, desc_array);
+
+ list_for_each_entry(desc_elt, &desc_list, list) {
+
+ FILE *fp = fopen(desc_elt->desc_path, "r");
+ if (!fp)
+ continue;
+
+ mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
+ fclose(fp);
+
+ if (tree) {
+ void *devices_array = blobmsg_open_array(&bb, "devices");
+ mxml_node_t *device = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
+ fill_device_instances(&bb, device);
+ blobmsg_close_array(&bb, devices_array);
+
+ void *services_array = blobmsg_open_array(&bb, "services");
+ mxml_node_t *service = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
+ fill_service_element(&bb, service);
+ blobmsg_close_array(&bb, services_array);
+
+ mxmlDelete(tree);
+ }
+ }
+
+ ubus_send_reply(ctx, req, bb.head);
+ blob_buf_free(&bb);
+ return 0;
+}
+
+static struct ubus_method upnp_methods[] = {
+ UBUS_METHOD_NOARG("discovery", upnp_discovery_res),
+ UBUS_METHOD_NOARG("description", upnp_description_res),
+};
+
+static struct ubus_object_type upnp_type = UBUS_OBJECT_TYPE("upnp", upnp_methods);
+
+static void upnp_discover_devices(struct uloop_timeout *timeout __attribute__((unused)))
+{
+ __upnp_discover_devices();
+}
+
+static struct ubus_object upnp_object = {
+ .name = "upnp",
+ .type = &upnp_type,
+ .methods = upnp_methods,
+ .n_methods = ARRAY_SIZE(upnp_methods),
+};
+
+void upnp_thread_discover_devices(void)
+{
+ struct ubus_context *ctx = NULL;
+ const char *ubus_socket = NULL;
+ int ret = 0;
+
+ uloop_init();
+
+ ctx = ubus_connect(ubus_socket);
+ if (!ctx) {
+ syslog(LOG_ERR, "Failed to connect to ubus\n");
+ return;
+ }
+
+ ubus_add_uloop(ctx);
+
+ __upnp_discover_devices();
+
+ ret = ubus_add_object(ctx, &upnp_object);
+ if (ret) {
+ syslog(LOG_ERR, "Failed to add 'upnp' ubus object: %s\n", ubus_strerror(ret));
+ goto end;
+ }
+
+ uloop_run();
+
+end:
+ free_all_desc_list();
+ free_all_dev_list();
+ uloop_done();
+ ubus_free(ctx);
+}

View File

@@ -0,0 +1,420 @@
--- a/minissdpd/minissdpd.c
+++ b/minissdpd/minissdpd.c
@@ -32,6 +32,8 @@
#include <pwd.h>
#include <grp.h>
#endif
+/* for uloop thread */
+#include <pthread.h>
/* LOG_PERROR does not exist on Solaris */
#ifndef LOG_PERROR
@@ -52,6 +54,10 @@
#define MIN(x,y) (((x)<(y))?(x):(y))
#endif
+extern char *ssdp_sockpath;
+void upnp_thread_discover_devices(void);
+void ssdpd_ubus_stop(void);
+
/* current request management structure */
struct reqelem {
int socket;
@@ -1220,6 +1226,12 @@ static void ssdpDiscover(int s, int ipv6
}
}
+static void *thread_discover_devices(void *args __attribute__((unused)))
+{
+ upnp_thread_discover_devices();
+ return NULL;
+}
+
/* main(): program entry point */
int main(int argc, char * * argv)
{
@@ -1264,6 +1276,7 @@ int main(int argc, char * * argv)
unsigned char ttl = 2; /* UDA says it should default to 2 */
const char * searched_device = NULL; /* if not NULL, search/filter a specific device type */
int opt;
+ pthread_t upnp_thread;
LIST_INIT(&reqlisthead);
LIST_INIT(&servicelisthead);
@@ -1309,6 +1322,7 @@ int main(int argc, char * * argv)
break;
case 's':
sockpath = optarg;
+ ssdp_sockpath = optarg;
break;
#ifndef NO_BACKGROUND_NO_PIDFILE
case 'p':
@@ -1496,6 +1510,11 @@ int main(int argc, char * * argv)
if(s_ssdp6 >= 0)
ssdpDiscover(s_ssdp6, 1, searched_device);
+ int err = pthread_create(&upnp_thread, NULL, &thread_discover_devices, NULL);
+ if (err < 0) {
+ syslog(LOG_ERR, "Error when creating upnp thread");
+ }
+
/* Main loop */
while(!quitting) {
/* fill readfds fd_set */
@@ -1704,6 +1723,8 @@ quit:
if(unlink(pidfilename) < 0)
syslog(LOG_ERR, "unlink(%s): %m", pidfilename);
#endif
+ ssdpd_ubus_stop();
+ pthread_join(upnp_thread, NULL);
closelog();
return ret;
}
--- a/minissdpd/ssdpd.c
+++ b/minissdpd/ssdpd.c
@@ -39,10 +39,9 @@ struct desc_list_elt {
struct list_head list;
char *url;
char *desc_path;
- bool is_device_desc;
};
-#define UPNP_DESC_PATH "/etc/upnp/description"
+#define UPNP_DESC_PATH "/tmp/ssdp/description"
#define UPNP_DISCOVER_TIMEOUT (30 * 1000)
#ifndef MIN
@@ -93,17 +92,41 @@ static void add_dev_to_dev_list(char *de
dev->usn = usn;
}
-void free_all_dev_list(void)
+static void free_all_dev_list(void)
{
struct UPNPDev *dev = NULL;
+ struct UPNPDev *dev_tmp = NULL;
- while (dev_list.next != &dev_list) {
- dev = list_entry(dev_list.next, struct UPNPDev, list);
+ list_for_each_entry_safe(dev, dev_tmp, &dev_list, list) {
+ list_del(&dev->list);
free(dev->descURL);
free(dev->st);
free(dev->usn);
free(dev);
- list_del(&dev->list);
+ }
+}
+
+static void add_desc_to_desc_list(const char *desc_path, const char *url)
+{
+ struct desc_list_elt *desc_elt;
+
+ desc_elt = calloc(1, sizeof(struct desc_list_elt));
+ list_add_tail(&desc_elt->list, &desc_list);
+
+ desc_elt->desc_path = strdup(desc_path);
+ desc_elt->url = strdup(url);
+}
+
+static void free_all_desc_list(void)
+{
+ struct desc_list_elt *desc_elt = NULL;
+ struct desc_list_elt *desc_elt_tmp = NULL;
+
+ list_for_each_entry_safe(desc_elt, desc_elt_tmp, &desc_list, list) {
+ list_del(&desc_elt->list);
+ free(desc_elt->desc_path);
+ free(desc_elt->url);
+ free(desc_elt);
}
}
@@ -167,8 +190,8 @@ static int receiveDevicesFromMiniSSDPD(i
ssize_t n;
unsigned char *p;
unsigned int bufferindex;
- unsigned int i, ndev;
- unsigned int urlsize, stsize, usnsize, l;
+ unsigned int i = 0, ndev = 0;
+ unsigned int urlsize = 0, stsize = 0, usnsize = 0, l = 0;
char *url, *st, *usn;
n = read(s, buffer, sizeof(buffer));
@@ -182,11 +205,12 @@ static int receiveDevicesFromMiniSSDPD(i
if (n <= 0)
return -1;
- url = (char *)malloc(urlsize);
+ url = (char *)calloc(urlsize + 1, sizeof(char));
if (url == NULL)
return -1;
READ_COPY_BUFFER(url, urlsize);
+ url[urlsize] = 0;
if (n <= 0)
return -1;
@@ -194,11 +218,12 @@ static int receiveDevicesFromMiniSSDPD(i
if (n <= 0)
goto free_url_and_return;
- st = (char *)malloc(stsize);
+ st = (char *)calloc(stsize + 1, sizeof(char));
if (st == NULL)
goto free_url_and_return;
READ_COPY_BUFFER(st, stsize);
+ st[stsize] = 0;
if (n <= 0)
goto free_url_and_st_and_return;
@@ -206,11 +231,12 @@ static int receiveDevicesFromMiniSSDPD(i
if (n <= 0)
goto free_url_and_st_and_return;
- usn = (char *)malloc(usnsize);
+ usn = (char *)calloc(usnsize + 1, sizeof(char));
if (usn == NULL)
goto free_url_and_st_and_return;
READ_COPY_BUFFER(usn, usnsize);
+ usn[usnsize] = 0;
if (n <= 0)
goto free_url_and_st_and_usn_and_return;
@@ -282,6 +308,21 @@ static bool is_desc_exist(const char *de
return false;
}
+static bool is_device_exist(const char *dev_url)
+{
+ struct UPNPDev *dev = NULL;
+
+ if (!dev_url)
+ return false;
+
+ list_for_each_entry(dev, &dev_list, list) {
+ if (strcmp(dev->descURL, dev_url) == 0)
+ return true;
+ }
+
+ return false;
+}
+
static void get_desc_name(const char *desc_url, char *str, size_t len)
{
if (!desc_url || !str || len == 0)
@@ -297,37 +338,14 @@ static void get_desc_name(const char *de
}
}
-static void add_desc_to_desc_list(const char *desc_path, const char *url, int is_device_desc)
-{
- struct desc_list_elt *desc_elt;
-
- desc_elt = calloc(1, sizeof(struct desc_list_elt));
- list_add_tail(&desc_elt->list, &desc_list);
-
- desc_elt->desc_path = strdup(desc_path);
- desc_elt->url = strdup(url);
- desc_elt->is_device_desc = is_device_desc;
-}
-
-static void free_all_desc_list(void)
-{
- struct desc_list_elt *desc_elt = NULL;
-
- while (desc_list.next != &desc_list) {
- desc_elt = list_entry(desc_list.next, struct desc_list_elt, list);
- free(desc_elt->desc_path);
- free(desc_elt->url);
- free(desc_elt);
- list_del(&desc_elt->list);
- }
-}
-
static void __upnp_discover_devices(void)
{
+ struct desc_list_elt *desc_elt = NULL;
+ struct desc_list_elt *desc_elt_tmp = NULL;
struct UPNPDev *dev = NULL;
char desc_name[128] = {0};
char file_path[256] = {0};
- int res = 0, is_device_desc = 0;
+ int res = 0;
/*
* Discover devices
@@ -349,13 +367,26 @@ static void __upnp_discover_devices(void
get_desc_name(dev->descURL, desc_name, sizeof(desc_name));
snprintf(file_path, sizeof(file_path), "%s/%s", UPNP_DESC_PATH, desc_name);
- is_device_desc = (dev->usn && strstr(dev->usn, ":service:")) ? 0 : 1;
// Download Description
download_file(file_path, dev->descURL);
// Add description to descriptions list
- add_desc_to_desc_list(file_path, dev->descURL, is_device_desc);
+ add_desc_to_desc_list(file_path, dev->descURL);
+ }
+
+ /*
+ * Remove unused descriptions
+ */
+ list_for_each_entry_safe(desc_elt, desc_elt_tmp, &desc_list, list) {
+
+ if (is_device_exist(desc_elt->url))
+ continue;
+
+ list_del(&desc_elt->list);
+ free(desc_elt->desc_path);
+ free(desc_elt->url);
+ free(desc_elt);
}
end:
@@ -371,15 +402,27 @@ static int upnp_discovery_res(struct ubu
memset(&bb,0,sizeof(struct blob_buf));
blob_buf_init(&bb, 0);
+ void *root_devices_array = blobmsg_open_array(&bb, "root_devices");
+ list_for_each_entry_reverse(dev, &dev_list, list) {
+ // Parse root device
+ if (dev->st && strstr(dev->st, ":rootdevice") != NULL) {
+ void *device_obj = blobmsg_open_table(&bb, NULL);
+ blobmsg_add_string(&bb, "descurl", dev->descURL);
+ blobmsg_add_string(&bb, "st", dev->st);
+ blobmsg_add_string(&bb, "usn", dev->usn);
+ blobmsg_close_table(&bb, device_obj);
+ }
+ }
+ blobmsg_close_array(&bb, root_devices_array);
+
void *devices_array = blobmsg_open_array(&bb, "devices");
list_for_each_entry_reverse(dev, &dev_list, list) {
- // Parse Root device and devices
- if ((dev->st && strstr(dev->st, ":rootdevice") != NULL) || (dev->usn && strstr(dev->usn, ":device:") != NULL)) {
+ // Parse devices
+ if (dev->usn && strstr(dev->usn, ":device:") != NULL) {
void *device_obj = blobmsg_open_table(&bb, NULL);
blobmsg_add_string(&bb, "descurl", dev->descURL);
blobmsg_add_string(&bb, "st", dev->st);
blobmsg_add_string(&bb, "usn", dev->usn);
- blobmsg_add_string(&bb, "is_root_device", dev->st && strstr(dev->st, ":rootdevice") ? "1" : "0");
blobmsg_close_table(&bb, device_obj);
}
}
@@ -472,7 +515,7 @@ static void fill_device_instances(struct
blobmsg_close_table(bb, device_obj);
}
-static void fill_service_element(struct blob_buf *bb, mxml_node_t *service)
+static void fill_service_instances(struct blob_buf *bb, mxml_node_t *service)
{
mxml_node_t *b = service;
void *service_obj = NULL;
@@ -525,6 +568,32 @@ static void fill_service_element(struct
blobmsg_close_table(bb, service_obj);
}
+static void fill_device_service_instances(struct blob_buf *bb, bool is_device)
+{
+ struct desc_list_elt *desc_elt = NULL;
+
+ list_for_each_entry(desc_elt, &desc_list, list) {
+
+ FILE *fp = fopen(desc_elt->desc_path, "r");
+ if (!fp)
+ continue;
+
+ mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
+ fclose(fp);
+
+ if (tree) {
+ mxml_node_t *node = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
+
+ if (is_device)
+ fill_device_instances(bb, node);
+ else
+ fill_service_instances(bb, node);
+
+ mxmlDelete(tree);
+ }
+ }
+}
+
static int upnp_description_res(struct ubus_context *ctx, struct ubus_object *obj __attribute__((unused)),
struct ubus_request_data *req, const char *method __attribute__((unused)), struct blob_attr *msg __attribute__((unused)))
{
@@ -534,39 +603,25 @@ static int upnp_description_res(struct u
memset(&bb,0,sizeof(struct blob_buf));
blob_buf_init(&bb, 0);
+ // Descriptions Array
void *desc_array = blobmsg_open_array(&bb, "descriptions");
list_for_each_entry(desc_elt, &desc_list, list) {
void *device_obj = blobmsg_open_table(&bb, NULL);
blobmsg_add_string(&bb, "desc_url", desc_elt->url);
- blobmsg_add_u32(&bb, "is_device_desc", desc_elt->is_device_desc);
blobmsg_close_table(&bb, device_obj);
}
blobmsg_close_array(&bb, desc_array);
- list_for_each_entry(desc_elt, &desc_list, list) {
-
- FILE *fp = fopen(desc_elt->desc_path, "r");
- if (!fp)
- continue;
-
- mxml_node_t *tree = mxmlLoadFile(NULL, fp, MXML_OPAQUE_CALLBACK);
- fclose(fp);
-
- if (tree) {
- void *devices_array = blobmsg_open_array(&bb, "devices");
- mxml_node_t *device = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
- fill_device_instances(&bb, device);
- blobmsg_close_array(&bb, devices_array);
-
- void *services_array = blobmsg_open_array(&bb, "services");
- mxml_node_t *service = mxmlFindElement(tree, tree, "device", NULL, NULL, MXML_DESCEND);
- fill_service_element(&bb, service);
- blobmsg_close_array(&bb, services_array);
+ // Devices Array
+ void *devices_array = blobmsg_open_array(&bb, "devices");
+ fill_device_service_instances(&bb, true);
+ blobmsg_close_array(&bb, devices_array);
- mxmlDelete(tree);
- }
- }
+ // Services Array
+ void *services_array = blobmsg_open_array(&bb, "services");
+ fill_device_service_instances(&bb, false);
+ blobmsg_close_array(&bb, services_array);
ubus_send_reply(ctx, req, bb.head);
blob_buf_free(&bb);
@@ -624,3 +679,9 @@ end:
uloop_done();
ubus_free(ctx);
}
+
+void ssdpd_ubus_stop(void)
+{
+ uloop_end();
+}
+
--- a/minissdpd/config.h
+++ b/minissdpd/config.h
@@ -32,7 +32,7 @@
/* When NO_BACKGROUND_NO_PIDFILE is defined, minissdpd does not go to
* background and does not create any pidfile */
-/*#define NO_BACKGROUND_NO_PIDFILE*/
+#define NO_BACKGROUND_NO_PIDFILE
/* define HAVE_IP_MREQN to use struct ip_mreqn instead of struct ip_mreq
* for setsockopt(IP_MULTICAST_IF). Available with Linux 2.4+,

View File

@@ -1,16 +0,0 @@
if PACKAGE_stunc
choice
prompt "Select SSL utility"
default STUNC_USE_WOLFSSL
config STUNC_USE_WOLFSSL
bool "Use WolfSSL for ssl utilities"
select CONFIG_PACKAGE_libwolfssl
config STUNC_USE_OPENSSL
bool "Use OpenSSL for ssl utilities"
select CONFIG_PACKAGE_libopenssl
endchoice
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
# Copyright (C) 2020-2022 IOPSYS Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,49 +8,74 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=stunc
PKG_VERSION:=1.1.2
PKG_RELEASE:=1
PKG_VERSION:=1.1.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=fbd3cb0f101d115744ecf927516c2268c10cf3a0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git
PKG_SOURCE_VERSION:=5b65364709a921db0956bf74a4f126217cfb1775
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
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)
define Package/stunc/default
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF STUN Client
DEPENDS:=+libubus +libuci +libubox +libjson-c +libwolfssl +libblobmsg-json +libbbf_api +libopenssl
MENU := 1
DEPENDS:=+libubus +libuci +libubox +libjson-c +libblobmsg-json
endef
define Package/$(PKG_NAME)/description
BBF STUN Client
define Package/stunc-mbedtls
$(Package/stunc/default)
TITLE += (mbedtls)
DEPENDS += +PACKAGE_stunc-mbedtls:libmbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
define Package/$(PKG_NAME)/config
source "$(SOURCE)/Config.in"
define Package/stunc-openssl
$(Package/stunc/default)
TITLE += (openssl)
DEPENDS += +PACKAGE_stunc-openssl:libopenssl
CONFLICTS := stunc-mbedtls
VARIANT:=openssl
endef
define Package/stunc-wolfssl
$(Package/stunc/default)
TITLE += (wolfssl)
DEPENDS += +PACKAGE_stunc-wolfssl:libwolfssl
CONFLICTS := stunc-mbedtls stunc-openssl
VARIANT:=wolfssl
endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror
ifeq ($(CONFIG_STUNC_USE_WOLFSSL), y)
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
TARGET_LDFLAGS += -lwolfssl
ifeq ($(BUILD_VARIANT),wolfssl)
MAKE_FLAGS += \
USE_WOLFSSL="yes"
endif
ifeq ($(BUILD_VARIANT),mbedtls)
MAKE_FLAGS += \
USE_MBEDTLS="yes"
endif
ifeq ($(BUILD_VARIANT),openssl)
MAKE_FLAGS += \
USE_OPENSSL="yes"
endif
ifeq ($(LOCAL_DEV),1)
@@ -59,7 +84,7 @@ define Build/Prepare
endef
endif
define Package/$(PKG_NAME)/install
define Package/stunc/default/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/init.d
@@ -70,4 +95,10 @@ define Package/$(PKG_NAME)/install
$(INSTALL_DATA) ./files/etc/config/stunc $(1)/etc/config/stunc
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
Package/stunc-openssl/install = $(Package/stunc/default/install)
Package/stunc-wolfssl/install = $(Package/stunc/default/install)
Package/stunc-mbedtls/install = $(Package/stunc/default/install)
$(eval $(call BuildPackage,stunc-openssl))
$(eval $(call BuildPackage,stunc-wolfssl))
$(eval $(call BuildPackage,stunc-mbedtls))

View File

@@ -8,5 +8,5 @@ config stunc 'stunc'
option min_keepalive '30'
option max_keepalive '3600'
# option client_port 7547
option log_level '0'
option log_level '1'

View File

@@ -36,11 +36,6 @@ start_service() {
return 0;
fi
if [ -z "${server_address}" ]; then
log "Stun server address not defined or invalid"
return 0;
fi
procd_open_instance stunc
procd_set_param command ${PROG}
procd_set_param respawn "3" "7" "0"

View File

@@ -1,15 +1,15 @@
#
# Copyright (C) 2021 IOPSYS
# Copyright (C) 2021-2022 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu
PKG_VERSION:=0.2.31
PKG_VERSION:=1.3.26
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/sulu.git
PKG_SOURCE_VERSION:=0c51dc71506d8e67fe8c924e2a8009b969ef8cf9
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=6d6848119bffdbe0ec9b8116caf6375749299dc0
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -26,9 +26,8 @@ include $(INCLUDE_DIR)/package.mk
define Package/sulu
SECTION:=sulu
CATEGORY:=Utilities
MENU=1
TITLE:=SULU-CE ReactJS based Web UI Package
DEPENDS:=+nginx
DEPENDS:=+nginx +mosquitto-auth-shadow
endef
define Package/sulu/description
@@ -38,9 +37,16 @@ endef
define Package/sulu/install
$(INSTALL_DIR) $(1)/sulu
$(INSTALL_DIR) $(1)/sulu/config
$(INSTALL_DIR) $(1)/sulu/config/widgets
$(INSTALL_DIR) $(1)/etc/nginx/
$(INSTALL_DIR) $(1)/etc/mosquitto/conf.d/
$(CP) $(PKG_BUILD_DIR)/dist/* $(1)/sulu
$(CP) $(PKG_BUILD_DIR)/config/* $(1)/sulu/config
$(CP) $(PKG_BUILD_DIR)/config/*.json $(1)/sulu/config
$(CP) $(PKG_BUILD_DIR)/config/widgets/diagnostics.json $(1)/sulu/config/widgets/
$(CP) $(PKG_BUILD_DIR)/config/widgets/wan.json $(1)/sulu/config/widgets/
ifeq ($(CONFIG_PACKAGE_skopeo)$(CONFIG_PACKAGE_umoci),yy)
$(CP) $(PKG_BUILD_DIR)/config/widgets/lcm-store.json $(1)/sulu/config/widgets/
endif
$(CP) ./files/* $(1)/
endef

View File

@@ -0,0 +1,3 @@
listener 1883 127.0.0.1
allow_anonymous true

View File

@@ -0,0 +1,5 @@
listener 9001
protocol websockets
plugin /usr/lib/mosquitto_auth_shadow.so
require_certificate false
allow_anonymous false

View File

@@ -6,18 +6,22 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=swmodd
PKG_VERSION:=2.1.2
PKG_VERSION:=2.1.5.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e484557ea7ede6d8ff439081deebd763d4952851
PKG_SOURCE_VERSION:=2f953ea76b5779a73a540777dfb450982802e4f8
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/swmodd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DEPENDS:=bbf
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
@@ -26,9 +30,10 @@ define Package/swmodd
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:= Software Modules Daemon
DEPENDS:=+libuci +libubox +ubus +libuuid +libbbf_api +opkg +libcurl \
+PACKAGE_liblxc:liblxc +PACKAGE_liblxc:cgroupfs-mount \
+@BUSYBOX_CONFIG_BUSYBOX +@BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT
DEPENDS:=+libuci +libubox +ubus +libuuid +opkg +libcurl \
+PACKAGE_liblxc:liblxc +@BUSYBOX_CONFIG_BUSYBOX \
+@BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT +@BUSYBOX_CONFIG_SCRIPT \
+swmodd-cgroup
endef
define Package/swmodd/description
@@ -39,6 +44,14 @@ define Package/swmodd/config
source "$(SOURCE)/Config.in"
endef
define Package/swmodd-cgroup
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:= Cgroup mount handler for Software modules daemon
DEPENDS:=+@CONFIG_KERNEL_CGROUPS
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
@@ -78,4 +91,10 @@ ifeq ($(CONFIG_PACKAGE_liblxc),y)
endif
endef
define Package/swmodd-cgroup/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/swmodd_cgroup $(1)/etc/init.d/swmodd_cgroup
endef
$(eval $(call BuildPackage,swmodd-cgroup))
$(eval $(call BuildPackage,swmodd))

View File

@@ -1,7 +1,7 @@
#!/bin/sh /etc/rc.common
START=94
STOP=10
START=99
STOP=01
USE_PROCD=1
PROG=/usr/sbin/swmodd

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