Compare commits

...

169 Commits

Author SHA1 Message Date
Janusz Dziedzic
e45d31d437 map-agent: ts: disable pktfwd when TS
This is required while we add tags on bridge.
With pktfwd we can skip bridge and pass packet
directly (without tag) to wds0.x.x or bsta.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-08-02 14:20:59 +02:00
Janusz Dziedzic
850f00c318 map-agent: ts: use br-lan as a sink
Don't change current br-lan configuration.
Simple create bridge-vlans and use br-lan
for NAT and DHCP server.

config bridge-vlan 'vlan10'
        option name 'vlan10'
        option device 'br-lan'
        option vlan '10'
        option flags 'untagged'
        option local '1'
        list ports 'eth2:t'
        list ports 'eth3:t'
        list ports 'eth4:t'

config bridge-vlan 'vlan1'
        option name 'vlan1'
        option device 'br-lan'
        option vlan '1'
        option flags 'untagged pvid'
        option local '1'
        list ports 'eth2:t'
        list ports 'eth3:t'
        list ports 'eth4:t'

TODO, check ts reload also ...

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2022-08-01 10:33:51 +00:00
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
58 changed files with 1225 additions and 1800 deletions

View File

@@ -25,3 +25,7 @@ config BBFDM_ENABLE_JSON_PLUGIN
config BBFDM_ENABLE_DOTSO_PLUGIN
bool "Enable shared library plugin to extend datamodel"
default y
config BBF_MAX_OBJECT_INSTANCES
int "Maximum number of instances per object"
default 255

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.6.36
PKG_VERSION:=6.8.9.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_VERSION:=180119192418dbac64713c3e5efe761a1f8e871e
PKG_SOURCE_VERSION:=38399ab501195c9585b46fcdbf47871c483fba29
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -18,8 +18,8 @@ PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libbbf_api
SECTION:=utils
@@ -85,56 +85,50 @@ define Build/Prepare
endef
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-Wall -Werror \
CONFIGURE_ARGS += \
--enable-tr181
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 ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
CMAKE_OPTIONS += -DWITH_WOLFSSL=ON
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
define Package/libbbf_api/install
@@ -148,7 +142,7 @@ define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.so* $(1)/lib/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/lib/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/scripts/* $(1)/usr/share/bbfdm
endef
@@ -174,7 +168,7 @@ 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/
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libbbfdm.so $(1)/usr/lib/
touch $(1)/usr/lib/libbbf_api.so
endef

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.4
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8c94908eb230dc453dd2f5575be6c06b086b2e7d
PKG_SOURCE_VERSION:=54ebb54162fae9fdd6e327e430cf57aa217c176d
PKG_MIRROR_HASH:=skip
endif

View File

@@ -7,13 +7,13 @@
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:=c099d6b0438f945d91bf3c9718da730a8a52ff27
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -12,19 +12,3 @@ config CWMP_ACS_MULTI
config CWMP_ACS_HDM
bool "Select HDM as ACS server"
endchoice
config CWMP_DEBUG
bool "Compile with debug options"
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
default y
config CWMP_DEVEL_DEBUG
bool "Compile with development debug options (deprecated)"
depends on PACKAGE_icwmp || \
PACKAGE_icwmp-openssl || \
PACKAGE_icwmp-wolfssl || \
PACKAGE_icwmp-mbedtls
default n

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.4.8
PKG_VERSION:=8.4.25.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_VERSION:=00d037ce851495aca6365f2189849c6030f305df
PKG_SOURCE_VERSION:=cbfff1b644efceca0b5c72d062535bc766ca1e54
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -78,20 +78,14 @@ endef
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --enable-libopenssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lssl"
endif
ifeq ($(BUILD_VARIANT),wolfssl)
CONFIGURE_ARGS += --enable-libwolfssl
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
TARGET_LDFLAGS += "-lwolfssl"
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --enable-libmbedtls
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
TARGET_LDFLAGS += "-lmbedtls"
endif
ifeq ($(CONFIG_CWMP_ACS_MULTI),y)
@@ -104,16 +98,6 @@ 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
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
@@ -128,15 +112,16 @@ define Package/icwmp/default/install
$(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_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/
endef
Package/icwmp-openssl/install = $(Package/icwmp/default/install)

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

@@ -15,6 +15,7 @@ config acs 'acs'
option ip_version '4'
config cpe 'cpe'
option enable '1'
option default_wan_interface 'wan'
option log_to_console 'disable'
option log_to_file 'disable'

View File

@@ -1,98 +1,27 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "$@" |logger -t cwmp.update -p info
}
handle_icwmp_update() {
local defwan vendorspecinf update
local fallback_restart
local cwmp_enable
config_load cwmp
fallback_restart="${1:-0}"
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
}
# In case of update restart icwmp
if [ "${update}" -eq "1" ]; then
log "CWMP uci changes, reload cwmp with uci commit"
ubus call uci commit '{"config":"cwmp"}'
else
status="$(ubus call tr069 status |jsonfilter -qe '@.last_session.status')"
if [ "$status" = "failure" ]; 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
if [ "$?" -eq 7 ]; then
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
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
}

View File

@@ -15,6 +15,34 @@ 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}"
@@ -145,18 +173,16 @@ validate_defaults() {
return 1;
}
ssl_capath="${ssl_capath%/}"
# Put the cert pem file in keep list
if [ -d "${ssl_capath}" ]; then
if ! grep "${ssl_capath}" /lib/upgrade/keep.d/icwmp; 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
[ -z "${url}" ] && [ -z "${dhcp_url}" ] && {
log "ACS url is empty can't start"
return 1;
}
validate_cpe_section || {
log "Validation of cpe section failed"
return 1;
@@ -165,39 +191,41 @@ validate_defaults() {
return 0;
}
boot() {
local dhcp_discovery="0"
config_load cwmp
config_get dhcp_discovery acs dhcp_discovery "0"
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
# Set dhcp option 43 if not already configured
config_get wan_interface cpe default_wan_interface "wan"
enable_dhcp_option43 "${wan_interface}"
fi
config_get ssl_capath acs ssl_capath
if [ -n "${ssl_capath}" ]; then
regenerate_ssl_link "${ssl_capath}"
fi
start
}
start_service() {
local enable_cwmp
local wan_interface
local dhcp_discovery
local dhcp_url
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get dhcp_discovery acs dhcp_discovery "0"
config_get dhcp_url acs dhcp_url ''
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
if [ "${dhcp_discovery}" == "enable" ] || [ "${dhcp_discovery}" == "1" ]; then
if [ -z "${dhcp_url}" ]; then
log "Empty dhcp url, running update script"
/etc/icwmpd/update.sh
fi
fi
validate_defaults || {
log "Validation of defaults failed"
return 1;
@@ -223,9 +251,25 @@ service_stopped()
}
reload_service() {
log "Reloading CWMP client"
ubus -t 1 call tr069 command '{"command":"reload"}'
if [ "$?" -ne "0" ]; then
local ret
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
ret="0"
if [ "$enable_cwmp" = "0" ]; then
stop
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
@@ -242,7 +286,6 @@ service_triggers() {
json_add_array
json_add_string "" "run_script"
json_add_string "" "/etc/icwmpd/update.sh"
json_add_string "" "1"
json_close_array
json_close_array
json_add_int "" "2000"

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,38 +0,0 @@
#!/bin/sh
. /lib/functions.sh
regenerate_ssl_link_path()
{
local cert_dir all_file rehash
cert_dir="${1}"
all_file=$(ls $cert_dir/*.pem 2>/dev/null)
[ ! -d "${cert_dir}" ] && return 0;
[ ! -f "${all_file}" ] && return 0;
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
}
regenerate_ssl_link()
{
local cwmp_ca_path
regenerate_ssl_link_path "/etc/ssl/certs"
cwmp_ca_path=$(uci -q get cwmp.acs.ssl_capath)
if [[ "${cwmp_ca_path}" != "/etc/ssl/certs"* ]]; then
if [ -n "${cwmp_ca_path}" ]; then
regenerate_ssl_link_path "${cwmp_ca_path}"
fi
fi
}
regenerate_ssl_link

View File

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

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.9.0
PKG_VERSION:=4.10.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=69b27e3e1509b9192c529fbba6a329cc0532cfbb
PKG_SOURCE_VERSION:=287aeb7120b9904d4c481ceb6ba2fa6c73d4f8a2
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

@@ -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

@@ -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

@@ -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

@@ -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,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.2.2
PKG_VERSION:=2.9.0.5
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=8168d68c118d0dde0ff798fd0c8ed1d6a18bc99d
PKG_SOURCE_VERSION:=10f6f6dc3c149ed5de375b971c685f37554c3a64
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
LOCAL_DEV=0

View File

@@ -10,6 +10,7 @@ config agent 'agent'
config dynamic_backhaul
option missing_bh_timer '60'
option missing_bh_reconfig_timer '1800'
config controller_select
option id 'auto'

View File

@@ -187,6 +187,8 @@ validate_dyn_bh_section() {
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"

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

@@ -356,7 +356,7 @@ 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
}
@@ -488,10 +488,12 @@ 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 +501,12 @@ bsta_to_wireless() {
config_get enabled $1 enabled "0"
config_get bssid $1 bssid
(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,7 +515,7 @@ 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
@@ -665,7 +672,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 +683,54 @@ bsta_enable_all() {
bsta_scan_on_enabled
}
bsta_clear_all_bssid() {
mapagent_remove_bssid() {
uci -q set mapagent.$1.enabled="1"
uci -q del mapagent.$1.bssid
}
wireless_remove_bssid() {
config_get mode $1 mode
config_get ifname $1 ifname
[ "$mode" != "sta" ] && 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
uci commit mapagent
config_load wireless
config_foreach wireless_remove_bssid wifi-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
@@ -759,6 +814,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 +835,14 @@ 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
}
set_uplink() {
@@ -792,7 +856,10 @@ 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
config_load mapagent
@@ -816,7 +883,14 @@ unset_uplink() {
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
fi
rm -f "$MAPFILE" > /dev/null 2>&1
(
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
@@ -836,6 +910,9 @@ case "$func" in
sync_mapcontroller_from_wireless) sync_mapcontroller_from_wireless $@;;
ts) ts_sub $@;;
bsta_enable_all) bsta_enable_all $@;;
bsta_clear_all_bssid) bsta_clear_all_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,6 +2,9 @@
. /lib/functions.sh
AL_BRIDGE=${AL_BRIDGE-"br-lan"}
PRIMARY_VID=${PRIMARY_VID-1}
### Traffic Separation ###
dbg() {
@@ -9,489 +12,126 @@ dbg() {
}
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
}
set_wireless_bridge() {
config_load wireless
_set_network() {
local sec=$1
local iface=$2
local bridge=$3
config_get ifname $sec ifname
[ "$iface" != "$ifname" ] && continue
config_get mode $sec mode
config_get multi_ap $sec multi_ap "0"
[ "$mode" = "sta" -a "$multi_ap" = "1" ] && 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
brctl addif $bridge $iface &> /dev/null
}
config_foreach _set_network wifi-iface ${1} ${2}
}
ts_create() {
_net_setup() {
local vid=$1
local name="vlan${vid}"
local br_dev="${AL_BRIDGE/-/_}"
local tag=":t"
local self_flags="untagged"
_create_vlan_dev() {
iface=$1 # real iface
vid=$2 # Vlan ID
bridge=$3 # bridge iface should be connected
vlan_dev=$4
[ -z "$(uci -q get network.${name})" ] || return
old_bridge="$(_get_bridge $iface)" # bridge iface is connected to
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"
# remove interface from bridge if it is in one
[ -n "$old_bridge" ] && brctl delif $old_bridge $iface &> /dev/null
[ "${vid}" = "${PRIMARY_VID}" ] && self_flags="untagged pvid"
uci -q set network.${name}.flags="${self_flags}"
uci -q set network.${name}.local='1'
# (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
}
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
}
# 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
for port in $(uci -q get network.${br_dev}.ports) ; do
echo $port | grep -q eth || continue
uci -q get network.${name}.ports | grep -q "${port}${tag}" && continue
uci -q add_list network.${name}.ports="${port}${tag}"
done
ip link set $iface up
ip link set $vlan_dev up
uci -q commit network
}
ts_create_eths() {
pvid=$1 # primary vid
bridge=$2 # name of ts subsystem bridge
vid=$1
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
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].output='ACCEPT'
uci -q set firewall.@zone[-1].forward='ACCEPT'
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
}
vid=$1 # primary vid
[ -n "$vid" ] || {
cat <<EOF
VID required to configure DHCP.
EOF
exit 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}
}
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}
}
brctl addif br-map sink${vid}_vlan &> /dev/null
}
local type=$1
shift
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
}
ts_delete() {
iface=$1
path=$(ls -d /sys/class/net/${iface}/upper_*)
[ -z "$path" ] && exit 0
vlan_dev=${path##*upper_}
bridge="$(_get_bridge $vlan_dev)"
[ -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
}
}
ts_populate() {
local type=$1
shift
[ "$type" == "eth" ] || {
[ -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_}
# 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
echo 0 > /proc/pktfwd_dhd/enable
echo 0 > /proc/pktfwd_wl/enable
}
ts_reload() {
local dhcp_reload=$1
restart=""
logger -t vlan "reload ts"
# workaround for missing backhaul wifi.ap.* ubus obj's:
# iterate in config and setup bh
config_load wireless
# config_load wireless
_setup_bh_iface() {
local sec=$1
local iface=$2
local bridge=$3
# _setup_bh_iface() {
# local sec=$1
# local iface=$2
# local bridge=$3
config_get ifname $sec ifname
# 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
# 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
# }
#}
# config_foreach _setup_bh_iface wifi-iface
bridge_verify_vid_mapping() {
local section=$1
check__port_vid() {
local port="$1"
local vlan="$2"
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
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
done
#for sink in $(ubus list network.interface.sink*) ; do
# local sink_vlan=${sink/network.interface./}_vlan
#done
}
local func=$1
@@ -499,11 +139,6 @@ EOF
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 $@;;
--help|help) ts_usage;;
*) ts_usage; exit 1;;

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.21
PKG_VERSION:=2.8.0.6
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a388472887744d404825ee5602ab906bf1fc225c
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_VERSION:=93caf3a7e69e14929d7e99d197a2b0f9e25c78bc
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

View File

@@ -8,6 +8,7 @@ config controller 'controller'
option use_usta_metrics '0'
option primary_vid '1'
option primary_pcp '0'
option enable_ts '0'
option allow_bgdfs '0'
option channel_plan '0'

View File

@@ -25,7 +25,8 @@ validate_controller_section() {
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false' \
'allow_bgdfs:range(0,2629744)' \
'channel_plan:range(0,2629744)'
'channel_plan:range(0,2629744)' \
'enable_ts:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of controller section failed"

View File

@@ -1,38 +1,40 @@
#
# 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:=4.0.1
PKG_VERSION:=2.5.0.8
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=f0c36d13b19c100639a8f657a6a027bbfd74b802
PKG_SOURCE_VERSION:=8fedad83542c451c6dd74da30668edc6f50eafe8
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_BUILD_DEPENDS:=ieee1905
PKG_LICENSE:=PROPRIETARY IOPSYS
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 \
+libavahi-nodbus-support
+libavahi-nodbus-support +libnetfilter-conntrack +libnfnetlink +libmnl
TITLE:=Utility to build topology of a multi-AP network
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

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"

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.11
PKG_VERSION:=5.0.0.16
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b8bc6a70f07b40c8512e8894461602f47981df97
PKG_SOURCE_VERSION:=cd47bcaf1cc82dfd5c10ea76491fd0dae4436cc6
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
@@ -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)"
@@ -103,6 +106,7 @@ define Package/obuspa/install
$(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))

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.1.2
PKG_VERSION:=1.2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=2779815d2b87e5966e27cfafe88070d0a8970a25
PKG_SOURCE_VERSION:=6c68428405bc88a9990e855f911aecc86f07f4a8
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/periodicstats.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -15,8 +15,6 @@ start_service() {
}
stop_service() {
# stopping omcid does not bring down the pon link, which should happen
# if ANI is disabled or stopped (go to O1)
deinit_xpon
}

View File

@@ -10,11 +10,13 @@ init_xpon() {
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

@@ -4,6 +4,7 @@
IP_RULE=""
BR_RULE=""
BR6_RULE=""
POLICER_COUNT=0
INTF_NAME=""
@@ -291,6 +292,7 @@ flush_chains() {
init_broute_rule() {
BR_RULE=""
BR6_RULE=""
}
broute_filter_on_src_if() {
@@ -326,6 +328,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
@@ -352,11 +430,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() {
@@ -364,6 +576,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
@@ -381,8 +595,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
@@ -409,13 +624,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
@@ -426,6 +634,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
@@ -851,11 +1100,16 @@ pre_configure_queue() {
mkdir -p /tmp/qos/queue_stats/$intf
touch /tmp/qos/queue_stats/$intf/q_idx
echo 0 > /tmp/qos/queue_stats/$intf/q_idx
# tm initialization pushing ahead of delcfg as
# porttminit bydefault configures all queue as SP configuration.
# that was causing WRR queue configuration failure.
tmctl porttminit --devtype 0 --if $intf --flag 0 --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

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=' '

View File

@@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=stunc
PKG_RELEASE:=1
PKG_VERSION:=1.1.8
PKG_VERSION:=1.1.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git
PKG_SOURCE_VERSION:=2628f2c9e0b99064a703a1ad069f0f298bc36076
PKG_SOURCE_VERSION:=5b65364709a921db0956bf74a4f126217cfb1775
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -64,19 +64,16 @@ TARGET_CFLAGS += \
-Wall -Werror
ifeq ($(BUILD_VARIANT),wolfssl)
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/wolfssl
MAKE_FLAGS += \
USE_WOLFSSL="yes"
endif
ifeq ($(BUILD_VARIANT),mbedtls)
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/mbedtls
MAKE_FLAGS += \
USE_MBEDTLS="yes"
endif
ifeq ($(BUILD_VARIANT),openssl)
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/
MAKE_FLAGS += \
USE_OPENSSL="yes"
endif

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

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu
PKG_VERSION:=1.0.4
PKG_VERSION:=1.0.12
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=222030dd934438c2340ce751b23840fa4e4848b3
PKG_SOURCE_VERSION:=fc82a32ab3cdcb18dc3aa7b907c62d8bed29b4ff
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=swmodd
PKG_VERSION:=2.1.3
PKG_VERSION:=2.1.5
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
@@ -20,6 +20,9 @@ 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
define Package/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

View File

@@ -1,26 +1,22 @@
#
# Copyright (C) 2020 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# Copyright (C) 2020-2022 iopsys Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=twamp
PKG_VERSION:=1.1.2
PKG_VERSION:=1.2.0
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/twamp.git
PKG_SOURCE_VERSION:=c9b6b0fe35e137e967ccef63a9e1253155a59078
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/twamp-light.git
PKG_SOURCE_VERSION:=4dfc8609fb0cefaaf9e86b559b1e10488117cf07
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
@@ -31,12 +27,12 @@ define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=BBF TWAMP/TWAMP Light feature
TITLE:=TWAMP Light Client(TR-390)
DEPENDS:=+libuci +ubox +libubus
endef
define Package/$(PKG_NAME)/description
BBF TWAMP/TWAMP Light feature
TWAMP Client for Performance Measurement from IP Edge to Customer Equipment using TWAMP Light Protocol
endef
TARGET_CFLAGS += \

View File

@@ -1,13 +1,11 @@
config twamp 'twamp'
option enable '1'
option twamp_light '1'
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
option log_level '3'
option enable '0'
#Log levels: Critical=0, Error=1, Warning=2, Notice=3, Info=4, Debug=5
option log_level '4'
config twamp_reflector 'reflector_1'
option enable '0'
option interface 'wan'
option port '862'
option max_ttl '1'

View File

@@ -14,7 +14,7 @@ function configure_firewall()
{
local enable port interface
config_get enable ${1} enable "0"
config_get enable ${1} enable "1"
config_get port ${1} port
config_get interface ${1} interface
if [ "$enable" -eq 0 -o -z "${port}" -o -z "${interface}" ]; then
@@ -27,5 +27,21 @@ function configure_firewall()
fi
}
function delete_rule()
{
while iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" > /dev/null; do
iptables -w 1 -D zone_${1}_input $(iptables -w 1 -L zone_${1}_input --line-numbers | grep "TWAMP reflector port" | head -1|awk '{print $1}');
done
}
# Loop through all interfaces and delete the twamp reflector rule from interface's input chain
config_load network
config_foreach delete_rule interface
config_load twamp
config_get twamp_enable twamp enable "0"
if [ "${twamp_enable}" -eq "0" ]; then
exit 0;
fi
config_foreach configure_firewall twamp_reflector

View File

@@ -22,6 +22,9 @@ start_service() {
reload_service() {
stop
start
[ -f /etc/firewall.twamp ] && {
sh /etc/firewall.twamp
}
}
service_triggers() {

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=udpecho
PKG_VERSION:=2.0.0
PKG_VERSION:=2.0.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/udpecho.git
PKG_SOURCE_VERSION:=aeaf8f5862fff7133e6299ac30ab02c8fbb1ff61
PKG_SOURCE_VERSION:=19a555c2d460db6bdfcfa53742011fbb6a4ca6af
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -6,18 +6,17 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=urlfilter
PKG_VERSION:=1.1.1
PKG_VERSION:=1.1.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a64642ac33e629151788b3ff1de920776bcd2ed
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/urlfilter.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=5a64642ac33e629151788b3ff1de920776bcd2ed
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_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
@@ -35,7 +34,6 @@ define Package/urlfilter/description
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
ifeq ($(LOCAL_DEV),1)

View File

@@ -0,0 +1,419 @@
{
"json_plugin_version": 1,
"Device.{BBF_VENDOR_PREFIX}URLFilter.": {
"type": "object",
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"Enable": {
"type": "boolean",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"name": "globals"
},
"option": {
"name": "enable"
}
}
}
]
},
"GlobalBlacklist": {
"type": "boolean",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"name": "globals"
},
"option": {
"name": "global_blacklist"
}
}
}
]
},
"BlacklistURL": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string"
},
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"name": "globals"
},
"list": {
"name": "blacklist_url"
}
}
}
]
},
"ProfileNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "profile"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.{BBF_VENDOR_PREFIX}URLFilter.Profile.{i}.": {
"type": "object",
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"uniqueKeys": [
"Name"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "profile"
},
"dmmapfile": "dmmap_urlfilter"
}
}
],
"Name": {
"type": "string",
"read": true,
"write": true,
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"datatype": "string",
"range": [
{
"max": 64
}
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "profile"
},
"option": {
"name": "@Name"
}
}
}
]
},
"WhitelistURL": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string"
},
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "profile"
},
"list": {
"name": "whitelist_url"
}
}
}
]
},
"BlacklistURL": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string"
},
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "profile"
},
"list": {
"name": "blacklist_url"
}
}
}
]
}
},
"FilterNumberOfEntries": {
"type": "unsignedInt",
"read": true,
"write": false,
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"option": {
"name": "@Count"
}
}
}
]
},
"Device.{BBF_VENDOR_PREFIX}URLFilter.Filter.{i}.": {
"type": "object",
"version": "2.14",
"protocols": [
"cwmp",
"usp"
],
"access": true,
"array": true,
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"dmmapfile": "dmmap_urlfilter"
}
}
],
"Enable": {
"type": "boolean",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"option": {
"name": "enable"
}
}
}
]
},
"Profile": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"option": {
"name": "profile"
}
},
"linker_obj": "Device.{BBF_VENDOR_PREFIX}URLFilter.Profile."
}
]
},
"MACAddress": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string"
},
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"list": {
"name": "macaddr"
}
}
}
]
},
"Day": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"list": {
"datatype": "string"
},
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"list": {
"name": "day"
}
}
}
]
},
"StartTime": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"option": {
"name": "start_time"
}
}
}
]
},
"Duration": {
"type": "string",
"version": "2.14",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"mapping": [
{
"type": "uci",
"uci": {
"file": "urlfilter",
"section": {
"type": "filter"
},
"option": {
"name": "duration"
}
}
}
]
}
}
}
}

View File

@@ -1,3 +1,8 @@
#
# Copyright (C) 2022 IOPSYS
#
#
include $(TOPDIR)/rules.mk
PKG_NAME:=usp-js
@@ -9,6 +14,9 @@ PKG_SOURCE_VERSION:=7e285eb006414f230a3c17acf1b6f4c31c987447
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/usp-js

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=uspd
PKG_VERSION:=2.2.7
PKG_VERSION:=2.2.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/uspd.git
PKG_SOURCE_VERSION:=ff39170a3e0595a67763a61ac81b2f99b5bf11d7
PKG_SOURCE_VERSION:=b18e7cbad2c295a1dcea64fca42439f0c9cd73a2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -26,14 +26,14 @@ define Package/uspd/default
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend
DEPENDS:=+libubox +ubus +@BBFDM_ENABLE_JSON_PLUGIN +@BBFDM_ENABLE_DOTSO_PLUGIN \
DEPENDS:=+USE_GLIBC:librt +libubox +ubus +@BBFDM_ENABLE_JSON_PLUGIN +@BBFDM_ENABLE_DOTSO_PLUGIN \
+@BBF_TR181 +@BBF_TR104 +@BBF_TR143
endef
define Package/uspd-mbedtls
$(Package/uspd/default)
TITLE += (mbedtls)
DEPENDS += +libbbfdm-mbedtls
DEPENDS += +PACKAGE_uspd-mbedtls:libbbfdm-mbedtls
VARIANT:=mbedtls
DEFAULT_VARIANT:=1
endef
@@ -41,7 +41,7 @@ endef
define Package/uspd-openssl
$(Package/uspd/default)
TITLE += (openssl)
DEPENDS += +libbbfdm-openssl
DEPENDS += +PACKAGE_uspd-openssl:libbbfdm-openssl
CONFLICTS := uspd-mbedtls
VARIANT:=openssl
endef
@@ -49,17 +49,29 @@ endef
define Package/uspd-wolfssl
$(Package/uspd/default)
TITLE += (wolfssl)
DEPENDS += +libbbfdm-wolfssl
DEPENDS += +PACKAGE_uspd-wolfssl:libbbfdm-wolfssl
CONFLICTS := uspd-mbedtls uspd-openssl
VARIANT:=wolfssl
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-Wall -Werror \
-DUSPD_MAX_MSG_LEN="10485760"
TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lrt)
ifeq ($(BUILD_VARIANT),openssl)
MAKE_FLAGS += USE_OPENSSL="yes"
endif
ifeq ($(BUILD_VARIANT),wolfssl)
MAKE_FLAGS += USE_WOLFSSL="yes"
endif
ifeq ($(BUILD_VARIANT),mbedtls)
MAKE_FLAGS += USE_MBEDTLS="yes"
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/uspd/* $(PKG_BUILD_DIR)/
@@ -69,10 +81,8 @@ endif
define Package/uspd/default/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm/json/
$(INSTALL_BIN) ./files/etc/init.d/uspd $(1)/etc/init.d/uspd
$(INSTALL_CONF) ./files/etc/config/uspd $(1)/etc/config/uspd
$(INSTALL_DATA) ./files/etc/bbfdm/json/transferComplete.json $(1)/etc/bbfdm/json/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/uspd $(1)/usr/sbin/
endef

View File

@@ -1,23 +1,23 @@
#
# Copyright (C) 2021 IOPSYS Software Solutions AB
# Copyright (C) 2021-2022 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=wfadatad
PKG_VERSION:=7.0.5
PKG_VERSION:=2.8.0.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=6548ed2d6aaf957d799188d4ff43894c2dd575cb
PKG_SOURCE_VERSION:=01fd303670eef525e35c5337c4cf15418588273f
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk