Compare commits

...

589 Commits

Author SHA1 Message Date
Janusz Dziedzic
106ae13535 libwifi: 7.4.16.17 2024-11-15 11:42:22 +00:00
Anjan Chanda
6dfd9bc6e9 ieee1905: 8.3.4.14 2024-11-15 11:27:07 +01:00
Anjan Chanda
b5f9792a6d ieee1905: 8.3.4.13 2024-11-15 09:24:19 +01:00
arbala
ec9f11cdb9 ieee1905: update_neighbor_queue 2024-11-14 16:10:57 +01:00
Jakob Olsson
18b7370941 decollector: 4.2.1.1.6 2024-11-06 15:36:40 +01:00
Erik Karlsson
33b9620b5f ethmngr: fix memory leaks and potential read outside of buffer 2024-10-31 16:58:14 +01:00
Janusz Dziedzic
3b33257502 libwifi: skip probe-req events by default 2024-10-30 16:04:14 +01:00
Rahul Thakur
f4c1cd7596 mcastmngr: remove unnecessary log 2024-10-29 08:44:16 +00:00
Filip Matusiak
bce1c004fb map-controller: 4.5.0.22 2024-10-25 13:56:45 +02:00
Vivek Kumar Dutta
88c81945b5 icwmp: Fix loop in rpc list 2024-10-25 16:38:59 +05:30
Jakob Olsson
45c6d20b9e map-controller: 4.5.0.21 2024-10-24 17:26:03 +02:00
Vivek Kumar Dutta
0740877068 icwmp: Fix missing TransferComplete after reboot 2024-10-24 17:27:49 +05:30
Jakob Olsson
0016db38b7 map-controller: 4.5.0.20 2024-10-23 16:11:58 +02:00
Vivek Kumar Dutta
1f7e25ad18 icwmp: 9.5.29.16 2024-10-23 16:23:22 +05:30
Mohd Husaam Mehdi
c034b97513 urlfilter: fix crash on cleanup of dns answer struct 2024-10-23 10:14:48 +00:00
Jakob Olsson
cd34ac6acd map-controller: 4.5.0.19 2024-10-23 11:50:06 +02:00
Jakob Olsson
b1578f02b2 map-controller: 4.5.0.18 2024-10-21 17:14:45 +02:00
Jakob Olsson
1c2e38d1cf map-controller: 4.5.0.17 2024-10-18 15:15:11 +02:00
Jakob Olsson
b6ec722a3c map-agent: 4.5.0.33 2024-10-18 13:50:39 +02:00
Jakob Olsson
d655076bb7 map-controller: 4.5.0.16 2024-10-18 13:50:07 +02:00
Jakob Olsson
cf4f7a5ee9 map-controller: add config option to enable probe requests on ubus 2024-10-18 13:49:37 +02:00
Janusz Dziedzic
415243d9d5 libwifi: 7.4.16.16 2024-10-18 11:34:30 +00:00
Marina Maslova
4eb60b1199 libvoice-airoha: 1.0.13 2024-10-17 20:15:08 +04:00
Jakob Olsson
42f85f02ef map-controller: 4.5.0.15 2024-10-17 16:53:40 +02:00
Filip Matusiak
9fa333f811 map-controller: 4.5.0.14 2024-10-17 15:26:37 +02:00
Filip Matusiak
a1936766f4 map-agent: 4.5.0.32 2024-10-17 15:18:06 +02:00
Jakob Olsson
d7903e3912 map-agent: 4.5.0.31 2024-10-16 16:53:42 +02:00
Mohd Husaam Mehdi
07ab390f89 urfilter: support global enable/disable in data model and rework 2024-10-16 11:56:55 +00:00
Jakob Olsson
bdace90039 map-controller: 4.5.0.13 2024-10-16 13:55:55 +02:00
Vivek Kumar Dutta
9bbb12eae1 bbfdm: Updated schedule parameters 2024-10-16 11:44:43 +05:30
Mohd Husaam Mehdi
e5f08d801b urlfilter: add support for bedtime and internet_access schedules 2024-10-16 04:32:01 +00:00
Vivek Kumar Dutta
68f17cf1e8 obuspa: acl for ParentalControl and Schedules 2024-10-16 04:32:01 +00:00
Suvendhu Hansa
972613399d urlfilter: Added C plugin 2024-10-16 04:32:01 +00:00
Suvendhu Hansa
ca8409e74e Added param in plugin 2024-10-16 04:32:01 +00:00
Vivek Kumar Dutta
820aba6359 urlfilter: ParentalControl datamodel 2024-10-16 04:32:01 +00:00
Jakob Olsson
3871de8453 map-controller: 4.5.0.12 2024-10-15 18:01:32 +02:00
Jakob Olsson
cec6165f25 map-agent: 4.5.0.30 2024-10-15 11:21:40 +02:00
Jakob Olsson
5e7b84c27e wifimngr: 16.2.1.7 2024-10-15 11:20:55 +02:00
Jakob Olsson
65d05cc880 libwifi: 7.4.16.15 2024-10-15 11:20:21 +02:00
Jakob Olsson
4de38e786e map-agent: 4.5.0.29 2024-10-14 13:47:27 +02:00
Vivek Kumar Dutta
6254930f2d icwmp: Fix empty ConnectionReqURL in Inform 2024-10-10 13:53:22 +05:30
Jakob Olsson
b849a95c5a map-agent: 4.5.0.28 2024-10-01 15:56:22 +02:00
Vivek Kumar Dutta
ea991cb4f9 obuspa: Fix AssignedRole with reboot 2024-09-27 17:46:35 +05:30
Jakob Olsson
fbfcb9276f map-controller: 4.5.0.11 2024-09-26 16:04:48 +02:00
Jakob Olsson
6b1cd1bde6 map-agent: 4.5.0.27 2024-09-26 16:04:16 +02:00
Xiaofeng Meng
b1f5afaca8 xmppc: Fix reconnection interval calculation 2024-09-26 08:23:10 +02:00
Janusz Dziedzic
ee2ba5a572 map-agent: 4.5.0.26 2024-09-20 10:54:31 +00:00
Vivek Kumar Dutta
91504ce01d bbfdm: failsafe input.json generation 2024-09-20 10:52:35 +05:30
Vivek Kumar Dutta
ab92c8ce5e icwmp: Skip Inform if ConnectionRequestURL is empty 2024-09-20 10:13:27 +05:30
Vivek Kumar Dutta
161cd68c3c xmppc: Support for re-connect when max_keepalive_fails 2024-09-17 12:46:40 +05:30
Suvendhu Hansa
eb675d1193 bbfdm: cherry-pick Device.Schedules DM 2024-09-16 06:55:35 +00:00
Vivek Kumar Dutta
1d4dbc59b4 icwmp: Fix memory leak 2024-09-06 22:14:06 +05:30
Rahul Thakur
3cb3a657d8 mcastmngr: handle multiple filters for mcproxy
the library script that converts uci to mcproxy config is generating
incorrect config for filtering ip addresses which leads to mcproxy
not even starting when multiple filters are defined.

this commit fixes the above described issue.
2024-09-06 16:21:22 +05:30
Mohd Husaam Mehdi
7f1898a0cc bbfdm: fix IP.ActivePort specific instance cannot be fetched 2024-09-06 12:46:51 +05:30
Jakob Olsson
cee142b761 map-agent: 4.5.0.25 2024-09-05 11:35:32 +02:00
Rahul Thakur
c1d70ea983 update package libethernet
* 3853c55 libethernet: Improve counter logic for Airoha.
2024-08-27 17:07:24 +05:30
Markus Gothe
385bf86e99 update package libethernet
* libethernet: Improve counter logic for Airoha.
2024-08-23 16:47:54 +02:00
Rahul Thakur
31645bc7fa update package libethernet
* d94e302 libethernet: removed unwanted code in rmon stats
* a82181d libethernet: corrected bcm rmonstats
* be00aa9 econet: Handle unbound HSGMII LAN interfaces.
2024-08-23 16:47:46 +02:00
Rahul Thakur
f1a355b7b8 urlfilter: update regex
* update regex handling
* simplify iptables rules to setup nfq into single rule
* update makefile to not compile urlfilter as a kernel module
2024-08-20 11:57:54 +00:00
Vivek Kumar Dutta
fb245c8279 bbfdm: Fix setting empty values with json plugins 2024-08-19 17:25:14 +05:30
Jakob Olsson
e0e2ed34ab map-controller: 4.5.0.10 2024-08-09 16:22:25 +02:00
Jakob Olsson
303d26a12e Revert "map-agent: 4.5.0.25"
This reverts commit f7ec53c0a1.
2024-08-09 16:20:50 +02:00
Jakob Olsson
f7ec53c0a1 map-agent: 4.5.0.25 2024-08-09 16:07:44 +02:00
Vivek Kumar Dutta
b390b46c07 obuspa: enabled dm_caching_exclude in default config 2024-08-02 18:52:33 +05:30
Mohd Husaam Mehdi
ac19369e3e bbfdm: move Device.IP.ActivePort. implementation to libbbfdm
the implementation has been merged with ip.c
2024-07-31 11:52:44 +05:30
Mohd Husaam Mehdi
4565208573 bbfdm: remove active port package
Support for Device.IP.ActivePort has been added directly in
libbbfdm, so separate package is not needed.
* Removed from bbfdm
* Removed from iop/config
2024-07-29 12:22:41 +05:30
Amit Kumar
f174cd5e12 urlfilter: updated ebtables command
* used concurrent option with ebatables
2024-07-26 16:17:34 +05:30
Amit Kumar
b1aa6341a2 urlfilter: iptables rule handled for dns over tcp
* changes taken from devel for handling DNS over tcp
2024-07-26 12:20:27 +05:30
Vivek Kumar Dutta
bf6af55ba6 hostmngr: remove host instances from dmmap 2024-07-25 19:35:57 +05:30
Mohd Husaam Mehdi
ad0d093b23 iop: enable active-port package
This package provides support for Device.IP.ActivePort. datamodel
object.
2024-07-22 10:44:23 +05:30
Mohd Husaam Mehdi
bcf799389d bbfdm: add support for Device.IP.ActivePort
A package is added in bbfdm Makefile, which installs:

* json file for ActivePort data model object mapped to ubus call
* daemon that implements active-port ubus call
2024-07-16 12:04:04 +05:30
Vivek Kumar Dutta
950023a786 obuspa: Updated Hosts ACL for user 2024-07-08 16:43:55 +05:30
Vivek Kumar Dutta
73246e703a obuspa: fix crash in reboot/reset 2024-07-05 14:04:58 +05:30
Suvendhu Hansa
0e59720ad9 obuspa: new MQTT client connection at runtime 2024-07-01 08:54:14 +00:00
Suvendhu Hansa
79e91c2458 obuspa: mqtt retry params change at runtime 2024-07-01 08:52:43 +00:00
Filip Matusiak
43b5cdf816 wifimngr: 16.2.1.6 2024-06-21 13:57:24 +02:00
Vivek Kumar Dutta
f48cf5a3ab swmodd: 2.5.3.2
Update default bundle root to '/container', swmodd only starts if '/container'
mounted and accessible. Mounting of persistent storage to '/container' is
out of scope of swmodd.

Sharing host network added with config.json
2024-06-17 18:35:22 +05:30
Erik Karlsson
0924ffc34a usp-js: depend on OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
This avoids the need for duplicating local MQTT broker setup.
2024-06-14 14:48:07 +02:00
Erik Karlsson
ee38bf37d9 obuspa: split up OBUSPA_ENABLE_TEST_CONTROLLER configuration
A separate OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL configuration is added
which can be used by for example usp-js to accomplish local MQTT
broker setup but without compromising security by enabling remote
access. Appropriate dependencies are also added. In addition
unnecessary uci_load commands and misspelled and unnecessary
require_certificates mosquitto option are removed.
2024-06-14 14:48:07 +02:00
Filip Matusiak
853ae1f351 ieee1905: 8.3.4.11 2024-06-14 13:17:31 +02:00
Marina Maslova
1e5effb7fb map-agent: 4.5.0.24 2024-06-13 14:59:26 +04:00
Marek Puzyniak
c1a83b94f3 map-controller: 4.5.0.9 2024-06-12 11:59:18 +00:00
Marek Puzyniak
d68aee3e75 libwifi: 7.4.16.14 2024-06-11 15:17:21 +00:00
Amit Kumar
1d5b6f239f mcastmngr: Handled max multicast snoop entry
* removed +2 logic as multicast snoop entry handled in mcproxy
 with logic to exclude count of reserve mcast ip address subnet
2024-06-10 14:49:37 +05:30
Marek Puzyniak
952e789c6d decollector: 4.2.1.1.5 2024-06-10 07:45:39 +00:00
Vivek Kumar Dutta
4ae6af4322 bbfdm: config options for core TR181 datamodels 2024-06-07 23:21:09 +05:30
Vivek Kumar Dutta
cf3309e0e5 obuspa: 7.0.5.6.6 2024-06-07 14:01:47 +05:30
Vivek Kumar Dutta
3affc786d4 obuspa: Fix dhcp onboarding 2024-06-07 12:49:33 +05:30
Vivek Kumar Dutta
7c23220712 hostmngr: define datamodel plugin dir 2024-06-06 18:47:53 +05:30
Vivek Kumar Dutta
73ce886e9a obuspa: configure instance refresh timer 2024-06-06 15:21:36 +05:30
Vivek Kumar Dutta
b9e84a8679 bbfdm: optimize instance refresh handler 2024-06-06 15:20:14 +05:30
Marina Maslova
e9eae90cef map-agent: 4.5.0.23 2024-06-05 17:50:30 +04:00
Vivek Kumar Dutta
b02190065a bbfdm: config option to include (Dis)Association table 2024-06-05 15:18:19 +05:30
nevadita.chatterjee
bf6b547783 decollector: 4.2.1.1.4 2024-06-05 14:06:32 +05:30
Filip Matusiak
c42779c963 map-controller: 4.5.0.8 2024-06-05 10:10:08 +02:00
Marek Puzyniak
951a880017 decollector: 4.2.1.1.3 2024-06-04 12:23:20 +00:00
Jakob Olsson
de4b7fca62 map-agent: introduce config option that passes PERSIST_CONTROLLER CLFLAG 2024-06-04 13:48:40 +02:00
Jakob Olsson
a78540790d map-agent: 4.5.0.22 2024-06-04 13:48:37 +02:00
Jakob Olsson
9c6c25bf4b map-controller: 4.5.0.7 2024-06-04 13:48:03 +02:00
Jakob Olsson
cbdad382a2 map-agent: map_genconfig: don't modify mapcontroller enabled unconditionally 2024-06-04 13:48:03 +02:00
Filip Matusiak
482c1a1a81 map-agent: 4.5.0.21 2024-06-03 16:25:21 +02:00
Janusz Dziedzic
324280cf8f libwifi: 7.4.16.13 2024-06-03 11:16:59 +00:00
Vivek Kumar Dutta
49874bc3ef obuspa: host AccessControl access for user role 2024-05-30 18:56:56 +05:30
Vivek Kumar Dutta
8820fc7d73 swmodd: 2.5.3.1 2024-05-30 14:35:49 +05:30
Vivek Kumar Dutta
018c6ef9c4 icwmp: retries in deviceID get 2024-05-29 17:12:38 +05:30
Filip Matusiak
da51891a58 map-controller: 4.5.0.6 2024-05-24 10:52:10 +02:00
Amit Kumar
c794673a8a Update package urlfilter
* ebf8afb Allow setting URL in Blacklist/Whitelist URL
* 7507725 urlfilter: do not populate list if global blacklisting is disabled
* 9142ba3 urlfilter: fix building with glibc
* 898c4a9 filter: don't allocate UCI context and don't get UCI package more than once
2024-05-24 06:41:37 +00:00
Janusz Dziedzic
cae61fd18b libwifi: 7.4.16.12 2024-05-20 10:40:05 +00:00
Vivek Kumar Dutta
7e5b565190 bbfdm: Support PeriodicStats Push event 2024-05-16 15:47:09 +05:30
Vivek Kumar Dutta
4ca088bea5 periodicstats: Add support for push event 2024-05-16 14:23:14 +05:30
Marek Puzyniak
b1bbb6e056 decollector: 4.2.1.1.2 2024-05-15 14:35:47 +00:00
Marek Puzyniak
daca8e977f libwifi: 7.4.16.11 2024-05-15 14:34:03 +00:00
Markus Gothe
061bede64d mcastmngr: Airoha multicast snooping needs to be toggled to work.
We need to flush the mdb entries when configuring multicast
snooping on Airoha.

This commit fixes a bug where blocking multicast snooping doesn't
work.
2024-05-15 11:14:09 +00:00
Janusz Dziedzic
177dab28d1 csmngr: 1.0.1 2024-05-15 07:35:17 +00:00
Anjan Chanda
ae769b4dee csmngr: 0.0.5 2024-05-15 07:09:05 +00:00
Anjan Chanda
0ef82d3d0f csmngr: 0.0.4 2024-05-15 07:09:05 +00:00
Anjan Chanda
fdbe5689e2 csmngr: 0.0.2 2024-05-15 07:09:05 +00:00
Anjan Chanda
30cafc9b45 csmngr: 0.0.1 2024-05-15 07:09:05 +00:00
Janusz Dziedzic
e8a683a8ac libwifi: 7.4.16.10 2024-05-15 06:52:45 +00:00
Vivek Kumar Dutta
502dec56b3 obuspa: optimised uci update on reload 2024-05-14 10:48:37 +05:30
Filip Matusiak
3f5a3cb200 map-controller: 4.5.0.5 2024-05-13 14:28:26 +02:00
Jakob Olsson
fea1da3b53 map-agent: 4.5.0.20 2024-05-08 11:37:36 +02:00
Marina Maslova
7405571200 libwifi: 7.4.16.9, wifimngr: 16.2.1.5 2024-05-08 11:48:29 +04:00
Vivek Kumar Dutta
21a1a32f27 bbfdm: optimised wifi key handling 2024-05-07 16:33:20 +05:30
Janusz Dziedzic
fa402fdb2e libwifi: 7.4.16.8 2024-05-06 10:49:57 +00:00
Vivek Kumar Dutta
6f85fbd7ca bbfdm: Fix PossibleChannels with radio down 2024-05-06 16:00:13 +05:30
Markus Gothe
058bfb4c8a hostmngr: Don't try to resolve IP-adresses in firewall.
Using iptables --list without -n takes a long time
on some configurations during boot up which is a problem.

This commit resolves this by not trying resolve hostnames
as it is not necessary for the functionality.

It also splits up the check in two: one for IPv4 and one
for IPv6 to make the logic more robust and fail-safe.
2024-05-03 07:04:36 +00:00
Mohd Husaam Mehdi
3003cb98f4 bbfdm: add udhcpc.user.d script to store dhcp lease start time
DCHP lease start time is needed to calculate remaining lease time
which is needed for Device.DHCPv4.Client.{i}.LeaseTimeRemaining.

Earlier this was being provided via interface.status, but that was
leading to unnecessary hotplug events for interface data update so
it had to be removed from there.

Add the logic in udhcpc.user.d script separate from netifd as
there does not seem to be a need in netifd for this information.
2024-05-02 19:20:28 +05:30
Vivek Kumar Dutta
762835179d obuspa: disable E2ESession 2024-04-27 11:12:44 +05:30
Vivek Kumar Dutta
29beb2dd33 periodicstats: CalculationMode and bug fixes 2024-04-26 18:13:15 +05:30
Amin Ben Romdhane
1a20be1c9d obuspa: 7.0.5.6.0 2024-04-26 00:42:33 +02:00
Amin Ben Romdhane
52b92afac7 icwmp: 9.5.29.11 2024-04-26 00:40:31 +02:00
Amin Ben Romdhane
edff254a69 bbfdm: 1.4.23.15 2024-04-26 00:39:11 +02:00
Erik Karlsson
58cc602f8f mcastmngr: handle multiple upstream interface sections
Do not overwrite mcast configuration if there are multiple interface
sections referring to the same upstream device such as wan/wan6

(cherry picked from commit 2214fd99e8)
2024-04-25 11:09:15 +02:00
Janusz Dziedzic
1f4e445894 wifimngr: 16.2.1.4 2024-04-24 15:53:36 +00:00
Janusz Dziedzic
3460ddd956 libwifi: 7.4.16.7 2024-04-24 15:52:54 +00:00
Jakob Olsson
b6f0dc71e4 map-controller: 4.5.0.4 2024-04-23 16:18:41 +02:00
Jakob Olsson
74a1470463 map-agent: 4.5.0.19 2024-04-23 15:47:22 +02:00
Jakob Olsson
d31a9abd2f wifimngr: 16.2.1.3 2024-04-23 15:44:11 +02:00
Jakob Olsson
ee74a4a06b libwifi: 7.4.16.6 2024-04-23 15:41:13 +02:00
Markus Gothe
5ec644e052 qosmngr: Fix filtering on TOS field for non-Broadcom platforms. 2024-04-22 14:17:48 +00:00
Vivek Kumar Dutta
0787af4769 rulengd: enabled extended regex for pattern matching
(cherry picked from commit 016dbef779)
2024-04-22 12:50:30 +00:00
Vivek Kumar Dutta
66aa4bf8de tr104: fix alias for sip client 2024-04-20 13:33:01 +05:30
Vivek Kumar Dutta
98d0c9b490 bbfdm: Fix IP and Bridge alias 2024-04-20 13:28:17 +05:30
Anjan Chanda
b853cc5bfb ieee1905: 8.3.4.10 2024-04-16 19:34:48 +02:00
Janusz Dziedzic
458938d614 libwifi: 7.4.16.5 2024-04-12 07:20:43 +00:00
Vivek Kumar Dutta
d6514f0128 periodicstats: 1.5.5 2024-04-11 13:53:52 +05:30
Jakob Olsson
3bab7956a3 map-agent: config: disable dynamic controller sync by default 2024-04-11 10:23:24 +02:00
Vivek Kumar Dutta
5e19d4aa13 icwmp: fix uci commit issue 2024-04-11 10:35:09 +05:30
Vivek Kumar Dutta
49b4528cc9 periodicstats: Fix service reloadwq 2024-04-11 10:25:16 +05:30
Jakob Olsson
60b009b24c map-agent: config: enable island prevention 2024-04-10 14:12:22 +02:00
Markus Gothe
8ee4951532 mcastmngr: Fix typo in Broadcom snooping.
(cherry picked from commit 65fbf9958d)
2024-04-09 12:18:54 +02:00
Vivek Kumar Dutta
9c93a7157e obuspa: workaround for mqtt unreachable hosts 2024-04-04 12:49:32 +05:30
Marek Puzyniak
46f4f18888 decollector: 4.2.1.1.1 2024-04-02 12:49:53 +00:00
Sukru Senli
8da087908c map-agent: remove unused include 2024-03-27 11:40:25 +01:00
Rahul Thakur
3094ca245f mcastmgr: remove outdated comment 2024-03-27 11:35:47 +01:00
Sukru Senli
0b2321a306 map-agent: map-dynamic-backhaul: replace deprecated get_network_of function usage 2024-03-27 11:33:03 +01:00
Vivek Kumar Dutta
fe03fe073f icwmp: align with bbfdm 2024-03-27 15:51:22 +05:30
Vivek Kumar Dutta
815ddf9f7a bbfdm: Support Cancelled diagnostics state 2024-03-27 15:47:38 +05:30
Vivek Kumar Dutta
bb47ceff49 bbfdm: fix refresh instances 2024-03-27 11:01:11 +05:30
Jakob Olsson
e57a60bab3 map-agent: config: set enabled '1' as default 2024-03-26 14:13:40 +01:00
Sukru Senli
ad4869ac85 map-agent: map_genconfig: set full as default multiap_mode 2024-03-26 10:33:14 +01:00
Rahul Thakur
16034d1c98 Update package libethernet
* cc72f5a libethernet: fix log spam
2024-03-26 12:56:01 +05:30
Erik Karlsson
caae5d92f4 testnet: avoid potential race condition
Instead of running a second instance of testnet once and in parallel
with the background task on interface up/down, the background task is
woken up. The avoids the potential for a race where under certain
circumstances a ubus event for internet up or down may never be sent.

Also remove unused include and add missing quotation.

(cherry picked from commit ec7ba74900)
2024-03-25 15:55:13 +00:00
Sukru Senli
e64cfa29e4 testnet: remove unused include
(cherry picked from commit 9cdba3b3e0)
2024-03-25 15:55:13 +00:00
Vivek Kumar Dutta
d358cf56bd rulengd: execute action when no match expression defined
(cherry picked from commit bc0e021b3c)
2024-03-25 15:55:13 +00:00
Jakob Olsson
b86902dcbd libeasy: 7.4.3 2024-03-25 16:54:20 +01:00
Jakob Olsson
ed7bf0fab1 map-agent: 4.5.0.18 2024-03-25 15:37:31 +01:00
George Yang
8e5bf24ab0 libvoice-broadcom: Support Poland by adding VRG_COUNTRY_POLAND 2024-03-25 11:55:36 +01:00
Markus Gothe
9e518aa011 ponmngr: Refactor code.
Cleanup code and make sure we can use whitespace
in passwords.

(cherry picked from commit b8b2dcb6fe)
2024-03-20 20:41:24 +04:00
Markus Gothe
f654b5c350 ponmngr: Fix LOID password on Airoha.
The LOID password can never have worked on
Airoha since the syntax is wrong.

(cherry picked from commit 504d124486)
2024-03-20 20:41:15 +04:00
Marina Maslova
cb4620da03 libwifi: 7.4.16.4 2024-03-19 11:45:41 +04:00
Vivek Kumar Dutta
2a4594b30c obuspa: fix operate response within session 2024-03-18 17:38:37 +05:30
Erik Karlsson
df87055d04 bbfdm: fix shell injection in /etc/firewall.portmap
Rework the script to use iptables-restore instead of eval


(cherry picked from commit cf8350b6b365429aa68f0f957f79eb31bb43e2db)
2024-03-16 05:18:08 +00:00
Erik Karlsson
32848d7f69 bbfdm: fix shell injection in /etc/firewall.service
Avoid use of eval


(cherry picked from commit 53167364863ef4afc249045fe5dcb510e3ec164d)
2024-03-16 05:17:35 +00:00
Yalu Zhang
fd842a5638 voicemngr-1.1.8: Support K-break 2024-03-15 16:36:24 +01:00
George Yang
0acfc03ce7 Fix voicemngr crash if no extension exists in asterisk config 2024-03-15 14:20:58 +01:00
George Yang
715ac12974 mcastmngr: Set the "igmp" as the default protocol for mcast proxy/snooping config
For example, in the current LUCI iptv page, option "proto" is not provided, and IGMP is assumed.

(cherry picked from commit 8b39953242)
2024-03-15 10:30:31 +01:00
Erik Karlsson
22f0aa3ea7 hostmngr: avoid creating /scripts directory in the root
(cherry picked from commit 356c6c76d2)
2024-03-13 12:00:42 +00:00
Rahul Thakur
01e4ff2c8b netmode: disable firewall for l2 netmode
since the intent for l2 netmode is to accept all traffic, hence,
disable firewall on top of zone lan's input/output/forward being
ACCEPT/ACCEPT/ACCEPT

Please note: when firewall is disabled, it esentially set's input
to ACCEPT, it does not stop or disable fw3.
2024-03-13 17:24:43 +05:30
Vivek Kumar Dutta
2aa679f209 icwmp: 9.5.29.8 2024-03-13 11:56:02 +05:30
Vivek Kumar Dutta
2a2ce30792 stunc: 1.3.3.1 2024-03-13 11:54:49 +05:30
George Yang
d5eb8f6335 libvoice-broadcom: asterisk uci-defaults
Create voice extensions base on product data base
2024-03-12 10:44:42 +01:00
Marek Puzyniak
0c09c1044c map-controller: 4.5.0.3 2024-03-11 21:20:39 +00:00
Marek Puzyniak
34670fb071 map-agent: 4.5.0.17 2024-03-11 20:37:52 +00:00
Marek Puzyniak
d7c9fdf574 ieee1905: 8.3.4.3 2024-03-11 20:24:43 +00:00
Jakob Olsson
61e6d6e6d0 map-agent: config: remove deprecated netdev option from default config 2024-03-11 11:01:23 +01:00
Janusz Dziedzic
07d3d98709 libwifi: 7.4.16.3 2024-03-07 19:22:26 +00:00
Jakob Olsson
ea3805e531 map-agent: 4.5.0.16 2024-03-07 15:22:53 +01:00
Jakob Olsson
712e05fbeb wifimngr: 16.2.1.2 2024-03-07 15:21:59 +01:00
Jakob Olsson
bfb51eb501 libwifi: 7.4.16.2 2024-03-07 15:21:21 +01:00
Rahul Thakur
7ccc61effe ethmngr: fix pause stats appearing twice in ubus output 2024-03-07 10:17:38 +05:30
Rahul Thakur
3a85319a74 ethmngr: add pause frame support
* e96775c Add pause packets for rmon statistics
* f11bdbe ethmngr: Add support for representing pause frames over UBUS.
2024-03-06 17:02:17 +05:30
Rahul Thakur
95c50f0808 libethernet: add pause frame support
df0181a Add rudimentary support for pause frames.
797a2b1 Add pause packets counters and get it for airoha
99d02dc linux: pause frame stats increment
2024-03-06 16:59:46 +05:30
Yalu Zhang
fda7416852 libvoice-broadcom-1.0.9: Do not use 'latency' DSP parameter for averageRoundTripDelay 2024-03-05 17:07:14 +01:00
Vivek Kumar Dutta
f25274d726 usp-js: use usp-1.2 spec for qjs 2024-03-04 19:22:57 +05:30
Vivek Kumar Dutta
6ba197ce98 bbfdm: Fix usp session revert operate command 2024-03-04 17:49:43 +05:30
Vivek Kumar Dutta
0e2dc2f81c obuspa: 7.0.5.5.7 2024-03-01 19:46:28 +05:30
Vivek Kumar Dutta
34a285bc6b bbfdm: 1.4.23.10 2024-03-01 16:03:31 +05:30
Vivek Kumar Dutta
da455c0808 obuspa: 7.0.5.5.6 2024-03-01 16:02:15 +05:30
Vivek Kumar Dutta
07ac62e428 bbfdm: Fix open network issue with SetSSID 2024-02-29 20:01:40 +05:30
Jakob Olsson
ccf5a26c17 map-agent: 4.5.0.15 2024-02-28 14:02:08 +01:00
Jakob Olsson
f9e1decc9a map-agent: map-dynamic-backhaul: use brctl delif to remove bsta from bridge
Map-agent now uses libeasy rather than netifd
2024-02-28 14:01:27 +01:00
George Yang
21170ae143 voicemngr: 1.1.7
Do not delete extensions in asterisk UCI config even if they are not used
2024-02-23 12:45:02 +01:00
Amin Ben Romdhane
9dbf0bc0e5 bbfdm: 1.4.23.8 2024-02-23 12:39:58 +01:00
Jakob Olsson
b5707298be map-agent: 4.5.0.14 2024-02-23 12:23:05 +01:00
Mohd Husaam Mehdi
a73b9b1dec mcastmngr: do not hard code snooping_mode to 1 for proxy sections 2024-02-21 08:37:11 +00:00
Vivek Kumar Dutta
bd830ca37b bbfdm: Updated dhcp options parsing 2024-02-20 16:14:26 +05:30
Wenpeng Song
014f35b7ab dectmngr: 3.6.5
* 192e74db: Simulate flash hook when answering the second calls for call waiting  
* dd5288df: Fix a crash on incoming calls sometimes  
* f970cd28: Fix UART communication issue in RDK  
* 804678ba: Make UCI configuration path configurable
2024-02-20 10:41:33 +00:00
Wenpeng Song
0a9f5c30c9 voicemngr: 1.1.6
Do not close the connection if DECT accepts the second call for call waiting
2024-02-20 10:37:31 +00:00
Erik Karlsson
c05e258ceb genconfig: set 0700/0600 on /etc/ssl/private
This is needed so that private keys provided via default/customer
configuration do not become world readable.

Change-Id: I0e5d1b22730c7a44c82c34611412085fd500ce3a
2024-02-19 17:56:56 +00:00
Fredrik Eriksson
b318a5b6f2 RM#33371 - /etc/shadow globally readable ...
When this file is provided/overridden through customerconfigs it may get
too promiscous file permissions, so that any system user could read it
and someone could more easily extract a copy to run a password cracker
on.  Here we make sure access is limited to the root user only.

Change-Id: I74d15487639f94a7d10ce4fc609225632ce2971f
2024-02-19 17:56:56 +00:00
Arne Jonsson
1070248a0d iopsys: fix issues related to updated genconfig
(cherry picked from commit 01c1899208)
2024-02-19 17:46:49 +00:00
Arne Jonsson
9d3f965e62 iopsys: fix issue in feeds_update.sh in order to handle multiple custom feeds
(cherry picked from commit bec7eeaa33)
2024-02-19 17:46:49 +00:00
Vivek Kumar Dutta
ed690caaf1 sulu: 3.1.53 2024-02-19 19:34:14 +05:30
Vivek Kumar Dutta
ae5af97107 tr104: 1.0.13.3 2024-02-19 19:29:10 +05:30
Vivek Kumar Dutta
60b474355b obuspa: Fix fault in transaction retry 2024-02-19 17:43:13 +05:30
Vivek Kumar Dutta
1faed9afbd bbfdm: Use keep_settings for firmware download 2024-02-15 18:50:33 +05:30
George Yang
e6f090c9e6 Fine tune the default asterisk config 2024-02-15 10:49:29 +00:00
Vivek Kumar Dutta
532da477d9 icwmp: Use fw_upgrade_keep_settings in 6 Stored Images 2024-02-15 15:43:51 +05:30
Sukru Senli
ef281267db iop: deselect unusued atftp package 2024-02-13 15:03:25 +01:00
Vivek Kumar Dutta
51f19923c0 bbfdm: 1.4.23.5 2024-02-13 17:37:52 +05:30
Vivek Kumar Dutta
6cf78059d7 wifimngr: 16.2.1.1 2024-02-13 17:32:24 +05:30
Vivek Kumar Dutta
a913f05342 libwifi: 7.4.16.1 2024-02-13 17:31:57 +05:30
Jakob Olsson
83fb8b879b map-agent: 4.5.0.13 2024-02-12 11:04:49 +01:00
Vivek Kumar Dutta
af3cbff6d1 tr104: JSON and DotSO plugin override whole tree 2024-02-10 09:24:35 +05:30
Erik Karlsson
45dcdc7783 ieee1905: 8.3.4.2 2024-02-09 15:49:59 +01:00
Vivek Kumar Dutta
8997c156d9 icwmp: 9.5.29.6 2024-02-09 18:17:35 +05:30
Rohit Topno
25e01248c5 mcastmngr: fixed uci syntax error in init script
Problem description:
Multiple device section name fetched due
to wild card grep command.

Fix: modified grep command which gets exact device
section name based on device name.
2024-02-09 14:36:30 +05:30
Yalu Zhang
2e70d12fd7 Update packages voicemngr and libvoice-airoha
Support syslog levels and make it configurable.
2024-02-07 14:35:11 +01:00
Vivek Kumar Dutta
e47d128902 bbfdm: Fix overriding of core tree from plugins 2024-02-07 11:05:00 +05:30
Vivek Kumar Dutta
bb755d5774 sulu: 3.1.49 2024-02-07 10:45:19 +05:30
Vivek Kumar Dutta
250a89ca1d obuspa: Support for session and fix bulk event updater 2024-02-07 10:29:26 +05:30
Erik Karlsson
f139834fc7 testnet: start from init script and add missing dependency 2024-02-06 12:46:52 +01:00
Jakob Olsson
0a8fb82fa8 map-agent: 4.5.0.12 2024-02-01 16:34:59 +01:00
Vivek Kumar Dutta
0c8626ef5e icwmp: Fix inform parameters 2024-02-01 17:16:18 +05:30
Vivek Kumar Dutta
dbd0fc3e17 bbfdm: Fix gpn issues with datamodel micro-services 2024-02-01 17:14:55 +05:30
Jakob Olsson
267a855faf hostmngr: 1.1.7 2024-02-01 11:32:38 +01:00
Jakob Olsson
cea30db473 ieee1905: 8.3.5 2024-02-01 11:31:30 +01:00
Sukru Senli
532aab72ee testnet: move it to its own package, out of netmode 2024-01-30 11:32:43 +01:00
Sukru Senli
1a6a42b0ca netmode: move l2mode from eval profile to here 2024-01-30 11:30:33 +01:00
Jakob Olsson
2d21fa7e95 map-agent: 4.5.0.11 2024-01-29 17:47:19 +01:00
Jakob Olsson
8a120f056a hostmngr: 1.1.6 2024-01-26 12:14:45 +01:00
Jakob Olsson
6e2083e30e hostmngr: 1.1.5 2024-01-25 15:04:41 +01:00
Vivek Kumar Dutta
9c50c4c41b sulu: 3.1.48 2024-01-24 18:58:02 +05:30
Vivek Kumar Dutta
689905913c obuspa: option to define max controller 2024-01-23 18:03:19 +05:30
Rahul Thakur
c17d03ef56 qosmngr: fix lan traffic limited to 1G always
Problem description:
Two problems seen,
1. The queues on a port are by default setup to handle maximum rate
   of 1G
2. The default qos uci config for ipq and brcm platforms is different

Fix:
1. Update queue setup to not impose rate limit, by setting the maximum
   rate as the maximum rate supported by the port.
2. Update uci default script to generate same config for both platforms
2024-01-23 15:32:22 +05:30
Vivek Kumar Dutta
0c65d03dca bbfdm: Fix ipping unreachable host error 2024-01-23 10:06:42 +05:30
Wenpeng Song
aeca33ecae voicemnr: 1.1.4
Add support for single or multiple call mode
2024-01-19 07:28:27 +00:00
Vivek Kumar Dutta
150730e3e2 tr104: Add support for VoiceService.{i}.SIP.Client.{i}.Network. 2024-01-19 11:03:07 +05:30
Rahul Thakur
bc5d99459d inbd: remove package
remove deprecated package
2024-01-16 17:39:59 +05:30
Rahul Thakur
2e4b1c84ac iop: deprecate inbd
The package inbd is deprecated with the logic for generation of
hotplug events for dsl and ethernet ports having been moved to
dslmngr and ethmngr respectively.
2024-01-16 17:28:12 +05:30
Rahul Thakur
49a823a046 dslmngr: add support for hotplug event
Changes done:
1. Add support for hotplug event generation
2. Fix pipeline and static code analysis error/warnings
3. Rectify package source URL.
2024-01-16 17:28:07 +05:30
Rahul Thakur
7ba428e4b2 ethmngr: add support for generation hotplug event
Changes:
1. Add support for generating hotplug event
2. Update makefile to have prepare section for local development.
3. Update URL to point to updated location for ethmngr
2024-01-16 17:27:59 +05:30
Vivek Kumar Dutta
f215dd2fb8 sulu: 3.1.45 2024-01-15 12:12:08 +05:30
Elena Vengerova
e9f91b465f voicemngr 1.1.3 2024-01-12 20:28:42 +04:00
Elena Vengerova
6f4e3daffb libvoice_airoha 1.0.11 2024-01-12 14:34:33 +04:00
Elena Vengerova
9ecc88fc72 Airoha: set the default transmit and receive gain in the UCI config 2024-01-12 09:00:53 +00:00
Vivek Kumar Dutta
a9a44c2b13 tr104: 1.0.13 2024-01-09 20:20:58 +05:30
Sukru Senli
71316b37e3 iop: config: switch to using iputils arping and ping
instead of busybox arping and ping
2024-01-09 15:28:32 +01:00
Vivek Kumar Dutta
bb3267649f sulu: 3.1.44 2024-01-09 15:19:51 +05:30
Vivek Kumar Dutta
ae630fc142 icwmp: Fix setting empty parameterkey 2023-12-29 18:08:48 +05:30
Vivek Kumar Dutta
9f71023857 icwmp: Fix logging and acs_changed detection 2023-12-27 21:16:48 +05:30
Vivek Kumar Dutta
8a86868513 obuspa: Fix admin/user datamodel permissions 2023-12-27 17:11:37 +05:30
Vivek Kumar Dutta
91edc0fc99 icwmp: 9.5.29.2 2023-12-26 23:26:18 +05:30
Vivek Kumar Dutta
a2bbe00934 bbfdm: Top down config DHCPv4 Server Pool 2023-12-26 16:11:49 +05:30
Vivek Kumar Dutta
3861cb8714 icwmp: Fix random failures in UploadRPC 2023-12-26 13:07:06 +05:30
Vivek Kumar Dutta
c94232f071 sulu: Use multipart download for local fw 2023-12-25 20:37:34 +05:30
Vivek Kumar Dutta
9cdc3e8265 obuspa: Support multipart download 2023-12-25 20:37:10 +05:30
Vivek Kumar Dutta
d943a0e0d1 icwmp: 9.5.29 2023-12-20 12:33:35 +05:30
Vivek Kumar Dutta
c25c241008 icwmp: workaround for uci stuck in varstate 2023-12-19 20:38:07 +05:30
Jakob Olsson
59aad46280 map-agent: remove airoha hotplug script workaround for genconf 2023-12-18 18:07:59 +01:00
Amin Ben Romdhane
65a754935e bbfdm: 1.4.23 2023-12-18 16:59:25 +01:00
Vivek Kumar Dutta
99f0cc9a01 sulu: 3.1.42 2023-12-18 10:51:45 +05:30
Janusz Dziedzic
371e27e92e wifimngr: 16.2.1 2023-12-14 12:54:06 +00:00
Janusz Dziedzic
724c62684f libwifi: 7.4.16 2023-12-14 12:52:04 +00:00
Vivek Kumar Dutta
040123d2b1 tr104: 1.0.12 2023-12-14 15:49:05 +05:30
Marina Maslova
c5f26d1217 libqos: use proc file for airoha, fix pipeline 2023-12-14 11:00:10 +04:00
Rahul Thakur
55e87e47f1 mcastmngr: fix uci-default script to not overwrite on upgrade
This commit fixes the bug in the uci-default script due to which
the upstream interface in the proxy section was getting overwritten
on sysupgrades.

The uci-default scripts now validates that if the interface that
is set as the upstream_interface is a valid interface in the network
uci file, then config does not need to be updated.
2023-12-14 06:37:04 +00:00
Amin Ben Romdhane
bb9b397caa bbfdm: 1.4.22 2023-12-13 18:05:55 +01:00
Janusz Dziedzic
e1c9006b2d mapagent: mediatek, generate MAP WiFi config
Do similar workaround we have for airoha extender.
2023-12-13 15:46:49 +00:00
Vivek Kumar Dutta
b7a95f200f bbfdm: 1.4.21
- Minimized tools dependency
- Fix Ethernet link FlowControl uci options
2023-12-13 20:50:00 +05:30
Vivek Kumar Dutta
fb15ed7deb icwmp: 9.5.27 2023-12-13 20:43:19 +05:30
Vivek Kumar Dutta
9535b226ce timemngr: fix status parameter 2023-12-13 19:40:12 +05:30
Vivek Kumar Dutta
48e6c149a6 sulu: 3.1.41 2023-12-13 19:04:05 +05:30
Vivek Kumar Dutta
068307171c sulu: 3.1.40 2023-12-13 18:51:38 +05:30
Vivek Kumar Dutta
b7957f5dd4 obuspa: 7.0.5.5 2023-12-13 18:50:26 +05:30
Vivek Kumar Dutta
4c40999c71 timemngr: Fix random crashes 2023-12-13 18:09:33 +05:30
Vivek Kumar Dutta
ff786da6a2 self-diagnostics: Added datamodel schema get 2023-12-13 16:32:10 +05:30
Vivek Kumar Dutta
25955bfeca obuspa: 7.0.5.4 2023-12-13 16:27:33 +05:30
Jakob Olsson
b9f25bcd90 hostmngr: 1.1.4 2023-12-13 11:26:20 +01:00
Vivek Kumar Dutta
b8dfa5eebe sulu: 3.1.39 2023-12-13 09:28:09 +05:30
Janusz Dziedzic
10719b6c92 wifimngr: 16.2.0 2023-12-12 13:40:50 +00:00
Janusz Dziedzic
cdb029dcb8 libwifi: 7.4.15 2023-12-12 13:40:50 +00:00
Andreas Gnau
55fa399ea6 iop: config: Fix GPIO tools package name
Fixes: 1c68b9bba0 ("iop: Add gpiotool package")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-12-12 14:29:43 +01:00
Vivek Kumar Dutta
c0bdff6a1c timemngr: 1.0.11 2023-12-12 18:46:45 +05:30
Vivek Kumar Dutta
48d35004d4 sulu: 3.1.38 2023-12-12 15:16:06 +05:30
Andreas Gnau
e95cc9a39d iop: config: Disable UBIFS and ext4 rootfs build by default
UBIFS and ext4 can still be re-enabled by interested developers, when it
is required for development. All production images should use squashfs
only. Produce only one image (squashfs) in all cases to reduce
confusion. Previously, this had also already been set for some targets,
but setting it here globally ensures, this applies to all targets.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-12-12 09:28:06 +00:00
Amit Kumar
c260fb4c61 mcastmngr: disable snooping when proxy instance is disabled
* snooping on bridge interfaces should be changed to disable when
igmp proxy has been disabled.
* updated the function __device_is_bridge() that read the device
section of network config. "grep name=.*$device" was resulting into
matching of ifname option as well that was resulting in a two line
output and causing error while using the output in uci command later.
2023-12-12 05:53:42 +00:00
Vivek Kumar Dutta
4b279a83a9 icwmp: Support 2 web content filetype 2023-12-12 09:58:53 +05:30
Vivek Kumar Dutta
3cebc8aee5 stunc: 1.3.3 2023-12-12 09:45:22 +05:30
Marek Puzyniak
58035970a4 wifimngr: 16.1.9 2023-12-11 21:42:05 +00:00
Janusz Dziedzic
707a62b678 libwifi: 7.4.14 2023-12-11 16:31:59 +00:00
Vivek Kumar Dutta
2c738bb96c sulu: 3.1.37 2023-12-11 19:23:10 +05:30
Janusz Dziedzic
fa24932e7c wifimngr: 16.1.8 2023-12-11 13:00:21 +00:00
Janusz Dziedzic
b8fc416fed libwifi: 7.4.13 2023-12-11 12:22:55 +00:00
Janusz Dziedzic
7ad065a756 map-agent: 4.5.0.10 2023-12-11 08:59:14 +00:00
Vivek Kumar Dutta
54a54d048c tr104: 1.0.11 2023-12-11 10:03:13 +05:30
Amin Ben Romdhane
28fef8f5ea bulkdata: 2.1.3 2023-12-10 19:24:59 +01:00
Amin Ben Romdhane
92a1c1e25d bbfdm: 1.4.20 2023-12-10 19:22:43 +01:00
Vivek Kumar Dutta
34c5ae9c71 obuspa: 7.0.5.3 2023-12-10 21:20:33 +05:30
Andreas Gnau
1c68b9bba0 iop: Add gpiotool package
This can be useful for troubleshooting and debugging GPIOs.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-12-08 15:05:23 +01:00
Vivek Kumar Dutta
6b7d2d7c69 usermngr: 1.2.10 2023-12-08 18:40:35 +05:30
Erik Karlsson
3482a3e94f iop: use SHA512 as the default password hash in busybox
The default in OpenWRT is MD5 which is unacceptably insecure.
2023-12-08 13:03:40 +00:00
Michael Polyntsov
b96d6a5a1b mosquitto-auth-shadow: Define _GNU_SOURCE before using crypt_r
In glibc crypt_r is available only if _GNU_SOURCE is defined,
so defining it since we're going to compile with glibc
2023-12-08 10:16:16 +00:00
Vivek Kumar Dutta
01625e3382 sulu: 3.1.36 2023-12-07 21:55:22 +05:30
Vivek Kumar Dutta
8243861c49 hostmngr: 1.1.3 2023-12-07 20:17:58 +05:30
Vivek Kumar Dutta
744c5828a5 sulu: 3.1.35 2023-12-07 20:12:17 +05:30
Vivek Kumar Dutta
a33b438ddc bbfdm: 1.4.19 2023-12-07 19:16:41 +05:30
Piotr Kubik
445e50f011 libvoice-broadcom: Update src hash (get rid of CONFIG_BCM_CHIP_ID) 2023-12-07 12:40:50 +01:00
Piotr Kubik
e845aa2a51 libvoice-broadcom: remove CONFIG_BCM_CHIP_ID
Use SUBTARGET variable that already contains CHIP_ID.
2023-12-07 11:38:11 +00:00
Piotr Kubik
39aebfc782 libqos: remove CONFIG_BCM_CHIP_ID
Use SUBTARGET variable that already contains CHIP_ID.
2023-12-07 10:45:22 +00:00
Piotr Kubik
6441d2fd01 libwifi: remove CONFIG_BCM_CHIP_ID
Use SUBTARGET variable that already contains CHIP_ID.
2023-12-07 10:44:33 +00:00
Piotr Kubik
36f02fa5f8 libethernet: remove CONFIG_BCM_CHIP_ID
Use SUBTARGET variable that already contains CHIP_ID.
2023-12-07 10:43:53 +00:00
Piotr Kubik
e80ca4319b libdsl: fix remove CONFIG_BCM_CHIP_ID
Pass down "original" CHIP_6xxx value.
Improve CHIP_ID substitution.
2023-12-07 10:43:20 +00:00
Amin Ben Romdhane
350186614e icwmp: Rename 'keep_settings' to 'fw_upgrade_keep_settings' 2023-12-07 11:23:36 +01:00
Vivek Kumar Dutta
6caec3ea06 urlfilter: 1.1.8 2023-12-07 12:42:40 +05:30
Vivek Kumar Dutta
f45ec2b32b sulu: 3.1.34 2023-12-07 09:06:05 +05:30
Vivek Kumar Dutta
c361b4e589 bbfdm: 1.4.18 2023-12-06 19:59:06 +05:30
Vivek Kumar Dutta
ef4e5fbef6 timemngr: 1.0.10 2023-12-06 19:56:37 +05:30
Amin Ben Romdhane
d9fe7d6927 icwmp: Option to keep config with '1 Firmware Upgrade Image' 2023-12-06 09:15:55 +05:30
Jakob Olsson
920832c5c7 hostmngr: 1.1.2 2023-12-05 15:52:19 +01:00
nevadita.chatterjee
a1a1dafb2f decollector: 4.2.1.1 2023-12-05 18:01:16 +05:30
Piotr Kubik
45eda81ccc libdsl: remove CONFIG_BCM_CHIP_ID
Use CONFIG_TARGET_SUBTARGET variable that already contains CHIP_ID.

This change will have no effect until following workaround
is not fixed:
69f40124fa40 ("libdsl: define CONFIG_VDSL_SUPPORTED explicitly")
2023-12-04 16:35:12 +01:00
Marina Maslova
83db5d1e2d libethernet: get hsgmii index dynamically, support ae_wan counters 2023-12-04 14:50:08 +04:00
Elena Vengerova
71e7a8121f airoha: generate MAP WiFi config in advance to prevent creation of interfaces in AP mode on extender 2023-12-01 13:35:39 +00:00
Jakob Olsson
0368ef0498 hostmngr: 1.1.1 2023-12-01 14:29:14 +01:00
Yalu Zhang
34b8267b03 libvoice-d2_1.1.2: add pipeline for static code analysis and fix warnings 2023-12-01 13:40:23 +01:00
Amit Kumar
13e8f80a5d hostmngr: openwrt way handling of host_acl script 2023-12-01 11:10:30 +05:30
Andreas Gnau
f9bbd87b5d iop: config: Include build config in image
Include build config and feed-versions in image. This is useful for
troubleshooting and support.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-11-30 15:12:01 +01:00
Janusz Dziedzic
b5150eb926 map-agent: 4.5.0.9 2023-11-30 13:47:46 +00:00
Vivek Kumar Dutta
ab078ad644 timemngr: 1.0.9 2023-11-30 18:18:29 +05:30
Janusz Dziedzic
676244b0c7 map-agent: 4.5.0.8 2023-11-30 12:37:04 +00:00
Jakob Olsson
c1b990837d hostmngr: 1.1.0 2023-11-30 13:18:00 +01:00
Vivek Kumar Dutta
7dc38d0a4a usermngr: 1.2.9 2023-11-30 17:00:36 +05:30
suvendhu
6fdb0e1e4c swmodd: fix DUStateChange event for lxc 2023-11-30 10:42:31 +00:00
Vivek Kumar Dutta
4712d9be73 swmodd: 2.5.3 2023-11-30 14:38:25 +05:30
Andreas Gnau
724c060372 iop: config: Generate Cyclone DX SBOM by default
Generate Cyclone DX Software bill of materials (SBOM) by default.
This will enable easier license and CVE checking.

https://cyclonedx.org/

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-11-30 08:38:34 +00:00
Amin Ben Romdhane
45e996e2fa bbfdm: 1.4.17 2023-11-29 18:41:39 +01:00
Amin Ben Romdhane
66f4780410 bbfdm: 1.4.16 2023-11-29 16:46:17 +01:00
Vivek Kumar Dutta
f2b3838451 swmodd: 2.5.2 2023-11-29 18:20:15 +05:30
suvendhu
17e67528cc swmodd: fix lxc uninstallation 2023-11-29 18:18:34 +05:30
Vivek Kumar Dutta
6dfd959020 sulu: 3.1.33 2023-11-29 18:01:40 +05:30
Vivek Kumar Dutta
65d4d6538d swmodd: 2.5.1 2023-11-29 17:48:14 +05:30
subramanian c
63efd921ed qosmngr: Improvements on SP and policer cases 2023-11-29 11:58:49 +00:00
Jakob Olsson
2bbe7b1eef map-agent: map_genconfig: fix return of is_qualcomm() 2023-11-29 11:30:49 +01:00
Marek Puzyniak
9c6f6acf6c map-agent: 4.5.0.7 2023-11-29 09:57:30 +00:00
Vivek Kumar Dutta
6bc1456655 icwmp: 9.5.23
Use default random periodic inform time if not already set
2023-11-29 14:02:20 +05:30
Janusz Dziedzic
663412be0b wifimngr: 16.1.7 2023-11-29 07:36:27 +01:00
Vivek Kumar Dutta
272d4defc0 icwmp: 9.5.22
- Added uci option skip_dhcp_boot_options to skip setting option 43, option 60
  from cwmp init script
- Added uci ioption disable_gatewayinfo to skip setting dhcp option 125
2023-11-29 11:25:42 +05:30
Amin Ben Romdhane
c7f81e4ad8 bbfdm: 1.4.15 2023-11-28 15:48:33 +01:00
Vivek Kumar Dutta
03ec0f2964 sulu: 3.1.32 2023-11-28 19:57:42 +05:30
Vivek Kumar Dutta
53d76aaa4d obuspa: support vendor extn in role file 2023-11-28 19:53:49 +05:30
Amin Ben Romdhane
43a68cb1ed bbfdm: 1.4.14 2023-11-28 14:25:15 +01:00
Janusz Dziedzic
8f8c6405ea libwifi: 7.4.12 2023-11-28 12:46:21 +01:00
Vivek Kumar Dutta
1efa6ec0aa usermngr: 1.2.8 2023-11-28 14:46:54 +05:30
Yalu Zhang
13bbdaa1e8 Update packages dectmngr, libvoice-d2 and voicemngr
Simulate the flash hook for DECT handset explicitly
2023-11-28 09:57:17 +01:00
Vivek Kumar Dutta
feeed40395 sulu: 3.1.31 2023-11-28 13:04:21 +05:30
Vivek Kumar Dutta
f8022eb73b icwmp: 9.5.21 2023-11-28 13:00:00 +05:30
Suvendhu Hansa
07e1c78029 swmodd: lxc containers as DU 2023-11-28 07:27:33 +00:00
Reidar Cederqvist
d1ea18952f sulu-builder: sulu.sh run script through linter, and minor readability changes 2023-11-28 03:59:31 +00:00
Anjan Chanda
3b0097078d libeasy: 7.4.2 2023-11-27 17:04:44 +01:00
Jakob Olsson
9b4c941cd4 map-agent: map_genconfig: check for ath12k to identify qca 2023-11-27 14:08:45 +01:00
Sukru Senli
50bee657ba map-controller: capitalize basemacaddr for wifi ssid 2023-11-27 13:24:58 +01:00
Anjan Chanda
8412f5d2d6 libeasy: 7.4.1 2023-11-27 12:23:09 +01:00
Vivek Kumar Dutta
eabf5b6e8f obuspa: merge v7.0.5.1 2023-11-27 12:32:33 +05:30
Vivek Kumar Dutta
3dd525d5ff obuspa: define granular permission for admin 2023-11-25 17:51:42 +05:30
Vivek Kumar Dutta
a828671570 bbfdm: optimize uci handling 2023-11-25 11:36:19 +05:30
Amin Ben Romdhane
084cb9742a bbfdm: 1.4.12 2023-11-24 16:43:52 +01:00
Amin Ben Romdhane
f3e4a9717c hostmngr: 1.0.13 2023-11-24 16:42:03 +01:00
Jakob Olsson
b63033eeab map-agent: 4.5.0.6 2023-11-24 15:21:23 +01:00
Anjan Chanda
c52754d80e decollector: 4.2.1.0 2023-11-24 14:56:29 +01:00
Yalu Zhang
6adb45d944 libvoice-broadcom_1.0.8: Little improvement in DECT handset keypad event simulation 2023-11-24 14:53:36 +01:00
Vivek Kumar Dutta
2478ca8fd9 sulu: 3.1.30
sulu:
  - a6653de add documentation for connection config, lint files
  - 3f2c5d8 add support for port: "auto" and protocol: "autoWs"
  - be73c12 allow hosting sulu in sub-directory
  - 5d625dd if visibilityControl=force only show widget when parent matches
  - 154313a fix labels for firmware submit buttons when in queue mode
  - cb5cdd2 add visibilityControl field to widgetinfo, add documentation, normalize widget filtering function
  - 7702142 better users widget ui
config:
  - Switch port to auto
  - Switch protocol to autoWS
  - Removed config option to disable RBAC
  - Use 8000 as redirect to https
2023-11-24 15:13:59 +05:30
Vivek Kumar Dutta
c6492dfeee tr104: 1.0.10
- Added an option CONFIG_RUNAS_BBFDM_MICROSERVICE, to choose bbfdmd to load
  tr104 specific datamodel
2023-11-23 19:56:55 +05:30
Amin Ben Romdhane
5fcd32a7e8 icwmp: 9.5.20 2023-11-23 10:54:00 +01:00
Vivek Kumar Dutta
73e7efddae usermngr: 1.2.7 2023-11-23 10:55:13 +05:30
Vivek Kumar Dutta
a934358614 tr104: 1.0.9 2023-11-22 13:08:58 +05:30
Vivek Kumar Dutta
620ba60f2e usermngr: 1.2.6 2023-11-22 12:53:51 +05:30
Vivek Kumar Dutta
f89b0b1797 icwmp: descriptive fault messages on error 2023-11-22 12:48:46 +05:30
Vivek Kumar Dutta
bafb6f304c sulu: 3.1.29 2023-11-22 12:39:20 +05:30
Vivek Kumar Dutta
20e5110ac5 hostmngr: 1.0.12 2023-11-22 12:25:35 +05:30
Michael Polyntsov
083ffd8a3f obuspa: Return the error when XSI-compliant strerror_r() fails 2023-11-22 04:00:30 +00:00
Michael Polyntsov
cf8c202d01 obuspa: Use non failing version of asprintf
Suppresses warning about unchecked return value of asprintf when
built with glibc
2023-11-22 04:00:30 +00:00
Vivek Kumar Dutta
71bbb8281c bbfdm: 1.4.11 2023-11-21 19:19:19 +05:30
Jakob Olsson
3b3d7150bd libdpp: add libwifiutils dependency 2023-11-21 09:25:36 +01:00
Jakob Olsson
130e5c567d Revert "libdpp: add libwifi dep"
This reverts commit 4a049cfecd.
2023-11-21 09:21:15 +01:00
Janusz Dziedzic
ba61b6c8dd libwifi: 7.4.11 2023-11-21 08:00:06 +00:00
Rahul Thakur
b3715aee80 ethmngr: fix pipeline and update documentation 2023-11-21 12:49:41 +05:30
Elena Vengerova
4064c9b98c decollector: 4.2.0.9 2023-11-20 20:01:12 +04:00
Amin Ben Romdhane
fea576c258 bbfdm: 1.4.10 2023-11-20 14:44:26 +01:00
Janusz Dziedzic
189bfe4013 libwifi: 7.4.10 2023-11-20 13:11:05 +00:00
Jakob Olsson
2370c6e82e map-agent: 4.5.0.5 2023-11-20 13:32:31 +01:00
Jakob Olsson
bfda6d619e map-controller: 4.5.0.2 2023-11-20 13:31:58 +01:00
Rahul Thakur
930d777931 libethernet: add support for clear stats, fix pipeline 2023-11-20 12:27:21 +05:30
Grzegorz Sluja
9565fa70d2 libvoice-airoha: 1.0.10
e6ba6fc Fix warnings found in static code analysis job
9cbd9bc Support the API to get RTP statistics from Mtek DSP
a4c54e7 Add pipeline support in libvoice-airoha
a5aa4f1 Remove ipToStr() and use inet_ntoa() system API instead
2023-11-16 14:38:42 +01:00
Janusz Dziedzic
add4061e7f libwifi: 7.4.9 2023-11-16 13:17:10 +00:00
Jakob Olsson
15e0d8e40d wifimngr: 16.1.6 2023-11-16 13:34:07 +01:00
Amin Ben Romdhane
a1309b2552 urlfilter: Align with new bbfdm linker design 2023-11-16 12:40:31 +01:00
Vivek Kumar Dutta
283f148f74 icwmp: 9.5.18 2023-11-16 14:47:06 +05:30
Vivek Kumar Dutta
21292de648 ieee1905: start early at 60 2023-11-16 13:02:43 +05:30
Vivek Kumar Dutta
628872d2fd hostmngr: start early at 65 2023-11-16 13:02:18 +05:30
Vivek Kumar Dutta
6608a10538 sulu: Add support to set env options 2023-11-16 11:49:53 +05:30
Vivek Kumar Dutta
7eaf58237a sulu: 3.1.27 2023-11-16 11:23:35 +05:30
Vivek Kumar Dutta
f952712b5e tr104: 1.0.8 2023-11-16 11:04:12 +05:30
Janusz Dziedzic
03d5798ea0 remove uci-defaults/gen_wifi_json.sh
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-11-15 12:27:58 +00:00
Jakob Olsson
4a049cfecd libdpp: add libwifi dep 2023-11-15 12:43:36 +01:00
nevadita.chatterjee
d36c76f4de ieee1905: 8.3.3 add exclude tagging option 2023-11-15 11:24:37 +00:00
Wenpeng Song
fb04949dc3 dectmngr: 3.6.3
Add time sync along with DECT handset presence check
2023-11-15 10:28:58 +00:00
subramanianc
0969cc7a24 qosmngr: Improvements on qcm shaper 2023-11-15 09:57:58 +00:00
Amin Ben Romdhane
12dff011cc hostmngr: 1.0.10 2023-11-15 09:48:04 +01:00
Yalu Zhang
5572cc2ede libvoice-d2_1.1.0: Fix the bug that ringback tone is not displayed on DECT handset 2023-11-14 15:46:10 +01:00
Jakob Olsson
91f5827a4f map-agent: 4.5.0.4 2023-11-14 14:52:15 +01:00
Vivek Kumar Dutta
aec92583ea hostmngr: 1.0.9 2023-11-14 18:12:40 +05:30
Vivek Kumar Dutta
63f4adcc97 icwmp: 9.5.17 2023-11-14 18:07:29 +05:30
Grzegorz Sluja
82df16a8c4 libvoice-airoha: 1.0.9
5a41deb fixup! Add country specific tones for Slovakia
49f00d9 Add country specific tones for Slovakia
2023-11-14 10:54:41 +01:00
Roman Azarenko
237f30c3f7 self-diagnostics: substitute possible slashes in report names 2023-11-14 09:10:49 +00:00
Amin Ben Romdhane
2dac7741d4 hostmngr: 1.0.8 2023-11-14 09:53:39 +01:00
Amin Ben Romdhane
0cff7d0e94 bbfdm: 1.4.9 2023-11-14 09:52:29 +01:00
Amin Ben Romdhane
5e5abdfd21 timemngr: 1.0.8 2023-11-13 18:18:30 +01:00
Erik Karlsson
0a755e5ea5 iop: genconfig: add option for ignoring dirty tree
Add -D option which ignores dirty tree when determining version.
2023-11-13 14:56:10 +00:00
Erik Karlsson
792e3ad20d iop: feeds_update: add option for hard failure
Add -F option for hard failure on unsuccessful clone/fetch of feed.
2023-11-13 14:56:10 +00:00
Grzegorz Sluja
336c5047c6 voicemngr: 1.1.1
Extend ubus call to dectmngr with caller name
2023-11-13 15:20:02 +01:00
Grzegorz Sluja
9c999de243 libvoice-broadcom: 1.0.7
Convert local and remote lossRate to percentage as per TR-104
2023-11-13 15:18:13 +01:00
Vivek Kumar Dutta
9a71a0bc84 icwmp: Support custom forced inform parameters 2023-11-10 11:49:22 +05:30
Janusz Dziedzic
7fb76b6dcd map-agent: 4.5.0.3 2023-11-09 17:39:27 +00:00
Yalu Zhang
4f924bec0e dectmngr-3.6.2: Extend the ubus call with caller name
Send reply to ubus call from voicemngr that informs the outgoing call is answered
2023-11-09 15:19:24 +01:00
Yalu Zhang
ea4301bf28 voicemngr-1.1.0: Fix a bug that always caused ubus call release from dectmngr replying error 2023-11-09 13:38:18 +01:00
Lukasz Kotasa
99fcfcfa7e voicemngr/dectmgr: revert "Prevent wrong FLASH detection"
voicemngr: 1.0.13
dectmngr: 3.6.1
2023-11-09 10:21:43 +01:00
Yalu Zhang
81218bc62d dectmngr-3.6.0: Remove wrong free() call to avoid crash 2023-11-09 09:48:47 +01:00
Jakob Olsson
a71a0d4036 libdpp: 2.0.0 2023-11-09 09:40:10 +01:00
Janusz Dziedzic
db578ec144 mapagent: activate ap_follow_sta_dfs for QCA
Signed-off-by: Janusz Dziedzic <janusz.dziedzic@iopsys.eu>
2023-11-09 06:40:05 +00:00
Andreas Gnau
9410758de0 iop: config: Remove disabling CONFIG_BUSYBOX_CONFIG_DEVMEM
CONFIG_BUSYBOX_CONFIG_DEVMEM is disabled by default, so there is no need
to explicitly disable it.

(This is probably true for a few others of those options as well and is
to be investigated later).

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-11-09 06:35:14 +00:00
Jakob Olsson
7b05468390 decollector: 4.2.0.8 2023-11-08 15:15:00 +01:00
Jakob Olsson
6d43b68d0b map-controller: 4.5.0.1 2023-11-08 15:15:00 +01:00
Jakob Olsson
ae1fb54a3c map-agent: 4.5.0.2 2023-11-08 15:15:00 +01:00
Jakob Olsson
313462e3ab ieee1905: 8.3.2 2023-11-08 15:15:00 +01:00
Jakob Olsson
be56713329 wifimngr: 16.1.5 2023-11-08 15:15:00 +01:00
Jakob Olsson
caae6916ae libeasy: 7.4.0 2023-11-08 15:15:00 +01:00
Vivek Kumar Dutta
4e1db4f14f xmppc: 2.2.3 2023-11-08 19:44:29 +05:30
Janusz Dziedzic
d2298b6097 libwifi: 7.4.8 2023-11-08 13:40:10 +00:00
Vivek Kumar Dutta
8b1ef3cd74 sulu: 3.1.26 2023-11-08 18:15:47 +05:30
Sukru Senli
05da8b4210 self-diagnostics: add hosts show and dump 2023-11-07 11:46:14 +01:00
Vivek Kumar Dutta
33cd29a47d self-diagnostics: 1.0.2 2023-11-07 14:18:34 +05:30
Anjan Chanda
f35b198c05 decollector: 4.2.0.7 2023-11-07 09:05:43 +01:00
Anjan Chanda
2bba5ad425 ieee1905: 8.3.1 2023-11-07 08:44:39 +01:00
Anjan Chanda
cbcb5278db libeasy: 7.3.1 2023-11-07 08:40:41 +01:00
Amin Ben Romdhane
be032908b0 bbfdm: 1.4.8 2023-11-03 18:16:57 +01:00
Amin Ben Romdhane
e4d7967cd5 timemngr: 1.0.7 2023-11-03 18:16:03 +01:00
Amin Ben Romdhane
2fd0e37395 usermngr: 1.2.5 2023-11-03 18:15:17 +01:00
Vivek Kumar Dutta
155ed6e0e1 sulu: 3.1.25 2023-11-03 18:39:50 +05:30
Vivek Kumar Dutta
4f70901a8c self-diagnostics: added documentation 2023-11-03 17:01:27 +05:30
Amin Ben Romdhane
faf81a70fd bbfdm: 1.4.7 2023-11-02 15:31:24 +01:00
Jakob Olsson
680f324a34 map-agent: 4.5.0.1 2023-11-02 15:11:28 +01:00
Vivek Kumar Dutta
718c2bdd81 sulu: 3.1.24 2023-11-02 18:52:52 +05:30
Jakob Olsson
d5ef59f028 ieee1905: dont use fragmentation at tlv boundry as default 2023-11-02 13:17:42 +01:00
Jakob Olsson
881b8edaa9 map-agent: 4.5.0.0 2023-11-02 13:17:42 +01:00
Jakob Olsson
2b5c30f203 map-controller: 4.5.0.0 2023-11-02 13:17:30 +01:00
Jakob Olsson
1e5ff3a2fd libdpp: 1.0.0 2023-11-02 13:16:59 +01:00
Vivek Kumar Dutta
7604786437 icwmp: Support for SelfTestDiagnostics 2023-11-02 14:12:09 +05:30
Vivek Kumar Dutta
be752464bc bbfdm: 1.4.6
- e5171a3 Added SelfTestDiagnostics()
- 44d1755 Add remove SSID object
- e33535e doc: how to migrate deprecated APIs
2023-11-02 14:06:50 +05:30
Vivek Kumar Dutta
fe47e30520 iop: Select self-diagnostics 2023-11-02 14:00:05 +05:30
Vivek Kumar Dutta
1623fb6559 self-diagnostics: Self diagnostics report 2023-11-02 14:00:04 +05:30
Amit Kumar
002dceac35 hostmngr: access control handling for disabled 2023-11-02 06:59:23 +00:00
Vivek Kumar Dutta
b0b2874fdf sulu: 3.1.23 2023-11-02 09:30:11 +05:30
Anjan Chanda
378ef51ea8 decollector: 4.2.0.3 2023-10-31 17:29:33 +01:00
Jakob Olsson
241fd05d5c map-agent: 4.4.0.1 2023-10-31 16:57:41 +01:00
Vivek Kumar Dutta
3267082ac3 sulu: 3.1.22 2023-10-31 18:59:21 +05:30
Vivek Kumar Dutta
fbc67e547c icwmp: 9.5.14 2023-10-31 18:16:48 +05:30
Jakob Olsson
57b0cde173 map-controller: config: use profile 3 2023-10-31 13:08:57 +01:00
Jakob Olsson
222116d122 map-agent: config: use profile 3 2023-10-31 13:08:47 +01:00
Jakob Olsson
4e51f87eb0 libeasy: 7.2.101 2023-10-31 10:15:01 +01:00
Jakob Olsson
a0fa00fd93 ieee1905: 8.3.0 2023-10-31 10:05:58 +01:00
Jakob Olsson
60989716fb map-agent: 4.4.0.0 2023-10-31 09:11:17 +01:00
Jakob Olsson
a50f99634e map-controller: 4.4.0.0 2023-10-31 09:10:33 +01:00
Marina Maslova
822a6ff7a1 libwifi: 7.4.7 2023-10-30 19:36:43 +03:00
Vivek Kumar Dutta
110da023b1 obuspa: 7.0.4.13 2023-10-30 20:03:49 +05:30
Elena Vengerova
03fcf31e97 map-controller: 4.3.3.2 2023-10-30 15:46:30 +04:00
Vivek Kumar Dutta
96e990ad3e obuspa: support binary encoding in upload 2023-10-30 14:58:44 +05:30
Amin Ben Romdhane
6709beee6c bbfdm: 1.4.5 2023-10-30 09:30:33 +01:00
Vivek Kumar Dutta
644856890b bbfdm: 1.4.4 2023-10-30 11:28:46 +05:30
Vivek Kumar Dutta
208ebe92a8 sulu: 3.1.21 2023-10-27 19:28:05 +05:30
Vivek Kumar Dutta
752648d604 bbfdm: Updated NeighboringWiFiDiagnostic parameters 2023-10-27 09:32:06 +05:30
Ratish
8f5e73321f bbfdm: handled X_IOPSYS_EU_IGMP.Proxy.{i}.Interface set 2023-10-26 16:42:43 +05:30
Jakob Olsson
5c83a98cb3 wifimngr: uci-defaults: generate wifi.json 2023-10-26 12:46:59 +02:00
Amit Kumar
8711c64ff6 qosmngr: handling linux platform qos shaper 2023-10-26 07:25:52 +00:00
Anatoly Mirin
b6477e8b84 mcastmngr: add snooping configuration support for linux targets
l2 snooping mode implements on the linux kernel multicast bridge level.
If snooping mode is enabled, mcastmngr configure kernel multicast bridge
with the appropriate uci mcast params.
2023-10-26 05:17:14 +00:00
Vivek Kumar Dutta
6f24ad440c sulu: 3.1.20 2023-10-26 08:41:59 +05:30
Yalu Zhang
640d24ea66 libvoice-airoha_1.0.8: Support type II caller ID presentation 2023-10-25 15:54:16 +02:00
Mikhail Kshevetskiy
60b06dd739 libwifi: fix mediatek module building with gcc-10 2023-10-25 13:57:05 +03:00
Vivek Kumar Dutta
501966b150 tr104: micro-service support 2023-10-24 17:07:36 +00:00
Amin Ben Romdhane
32e6e38103 bbfdm: 1.4.2 2023-10-24 17:28:00 +02:00
Lukasz Kotasa
adce72980b voicemngr: 1.0.12, dectmngr: 3.5.19
dectmngr can now tell if FLASH should be simulated
or not in the explicit way.
2023-10-24 11:03:47 +02:00
Yalu Zhang
695351633d libvoice-broadcom: Support type II caller ID presentation 2023-10-20 17:27:10 +02:00
Mikhail Kshevetskiy
a2b4aedce5 libwifi: fix building with 64-bit airoha board 2023-10-20 13:27:11 +03:00
Vivek Kumar Dutta
37dd1361b0 hostmngr: 1.0.7 2023-10-19 20:59:12 +05:30
Andreas Gnau
68042169ff voicemngr: Update LD_LIBRARY_PATH for BCM
Update the LD_LIBRARY_PATH after all BCM libraries have moved to a
separate sub-directory.

In the future, we should probably set the RUNPATH accordingly already at
build time.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-10-19 14:54:27 +02:00
Vivek Kumar Dutta
f110bdbe68 sulu: 3.1.19 2023-10-19 18:21:12 +05:30
Rahul Thakur
923e714017 libqos: fix stats for linux 2023-10-19 18:20:31 +05:30
subramanianc
81dd8f8afa qosmngr: Fix port shaping for qcm 2023-10-19 12:32:09 +00:00
Vivek Kumar Dutta
73d855e682 obuspa: 7.0.4.11 2023-10-19 17:54:59 +05:30
Vivek Kumar Dutta
a5606ed518 hostmngr: 1.0.6 2023-10-19 17:10:41 +05:30
Vivek Kumar Dutta
ca2a495790 sulu: 3.1.18 2023-10-19 16:57:16 +05:30
Elena Vengerova
695b7374bc libwifi: 7.4.6 2023-10-19 13:24:11 +03:00
Grzegorz Sluja
f9df86feec dectmngr-3.5.18
8aa0a3f Show contact's name on DECT handset for incoming call
3fe7209 Force outgoing calls to use WB when remote answered
2023-10-19 08:53:28 +02:00
Jani Juvan
8686249557 iop: feeds_update: let qualcomm feed override openwrt packages 2023-10-18 18:06:39 +02:00
Piotr Kubik
a8d529f9ea iop: genconfig: Rename armvirt to armsr
With openwrt 23.05 uplift armvirt target was renamed to armsr.
2023-10-18 18:06:39 +02:00
Vivek Kumar Dutta
4715de6308 sulu: 3.1.17 2023-10-18 16:40:46 +05:30
Amit Kumar
b41ec4ff65 hostmngr: handled host access control timing 2023-10-18 13:39:56 +05:30
Vivek Kumar Dutta
b3de88d2c4 obuspa: 7.0.4.10 2023-10-18 13:35:49 +05:30
Padmalochan Mohapatra
063314c91d qosmngr : Incorporating all interfaces option in classify 2023-10-18 06:38:00 +00:00
Vivek Kumar Dutta
e72b600326 xmppc: fix inform event 2023-10-18 08:39:01 +05:30
Vivek Kumar Dutta
594b13f5f9 bbfdm: link plugins from old path 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
fdb1dbbba0 xmppc: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
d89055f64b usermngr: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
13ffeac51b udpecho: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
d94c6e9995 twamp: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
639694c0fb swmodd: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
6f629b7393 stunc: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
d4af4ca030 ponmngr: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
237cead03b obuspc: 1.0.1.6 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
d440af07b1 obuspa: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
a09346bfc0 icwmp: Align with bbfdm plugins 2023-10-18 02:56:03 +00:00
Vivek Kumar Dutta
c9f90a6cf5 bbfdm: 1.4.0
- Load plugins from micro-services
- Unified path for core datamodel plugins(JSON and DotSO)
- Helper function to install plugin in core
- Manage plugins based on input.json
- Removed CONFIG_BBFDM_ENABLE_JSON_PLUGIN
- Removed CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN
2023-10-18 02:56:03 +00:00
Anjan Chanda
e0d07b5205 hostmngr: 1.0.5 2023-10-17 14:19:58 +02:00
Anjan Chanda
1c035c5523 decollector: 4.2.0.1 2023-10-17 10:38:40 +02:00
Jakob Olsson
38e49fc09f map-controller: 4.3.3.1 2023-10-17 09:48:34 +02:00
Jakob Olsson
1ff2a366fa map-agent: 4.3.7.2 2023-10-17 09:48:17 +02:00
Jakob Olsson
263b785fcb ieee1905: 8.2.22 2023-10-17 09:40:03 +02:00
Vivek Kumar Dutta
c1475dd5f1 sulu: 3.1.16 2023-10-17 11:35:18 +05:30
Amin Ben Romdhane
3411ece8a8 icwmp: 9.5.12 2023-10-16 19:03:55 +02:00
Amin Ben Romdhane
5912c00a4b bbfdm: 1.3.39 2023-10-16 19:02:49 +02:00
Amin Ben Romdhane
e39acfeeae bbfdm: 1.3.38 2023-10-13 16:18:41 +02:00
Vivek Kumar Dutta
b0ddc52e97 obsupa: register TransferComplete event 2023-10-13 19:19:10 +05:30
Suvendhu Hansa
b7ea6fdfcf bbfdmd: added support of Device.Firewall.Service. 2023-10-13 13:02:44 +00:00
Vivek Kumar Dutta
28fdf33411 obuspa: 7.0.4.7 2023-10-13 16:10:28 +05:30
Janusz Dziedzic
96b753c367 libwifi: 7.4.5 2023-10-13 07:41:24 +00:00
Grzegorz Sluja
e34ed69b9b dectmngr-3.5.17
Update documentation after phonebook modifications
2023-10-13 07:47:41 +02:00
Amin Ben Romdhane
d75d44795c bbfdm: 1.3.36 2023-10-12 18:04:22 +02:00
Yalu Zhang
97ce9d60e0 libvoice-d2_1.0.15: Support type II caller ID presentation 2023-10-11 16:51:15 +02:00
Janusz Dziedzic
391dbe06cc libwifi: 7.4.4 2023-10-11 14:32:33 +00:00
Vivek Kumar Dutta
81ae6221ac sulu: 3.1.15 2023-10-11 19:12:46 +05:30
Vivek Kumar Dutta
a96302230c obuspa: Use vendor extension prefix 2023-10-11 18:48:59 +05:30
Vivek Kumar Dutta
a5b5b160e2 sulu: 3.1.14 2023-10-11 10:15:44 +05:30
Andreas Gnau
21d327d4fe iop: config: Remove nping
Nping is only used as a convenience util. Due to restrictions imposed by
nmap's license (NPSL 0.95) distributing it in official images becomes
questionable. Remove it. Users can still enable it, if needed.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2023-10-10 12:01:26 +00:00
Vivek Kumar Dutta
2241f360b4 icwmp: Allow empty set from cli 2023-10-10 11:59:07 +05:30
Vivek Kumar Dutta
3d951f5453 sulu: 3.1.13 2023-10-10 10:14:36 +05:30
Janusz Dziedzic
9db96d7296 wifimngr: 16.1.4 2023-10-09 08:56:29 +00:00
Vivek Kumar Dutta
7a8b81f261 sulu: 3.1.12 2023-10-07 13:09:34 +05:30
Amin Ben Romdhane
edd2f92dae bbfdm: 1.3.35 2023-10-06 15:59:04 +02:00
Vivek Kumar Dutta
f9fbb07f0a bbfdm: 1.3.34 2023-10-06 12:02:06 +05:30
Yalu Zhang
29418e36d8 dectmngr-3.5.16: Modifications for phone book operations 2023-10-05 15:07:10 +02:00
Vivek Kumar Dutta
2420391455 obuspa: updated user role for events 2023-10-05 17:39:16 +05:30
Vivek Kumar Dutta
5221858e30 sulu: 3.1.11 2023-10-05 17:36:33 +05:30
Janusz Dziedzic
1a40a6e747 wifimngr: 16.1.3 2023-10-05 11:22:52 +00:00
Amin Ben Romdhane
85715416a5 bbfdm: 1.3.33 2023-10-05 12:43:39 +02:00
Jakob Olsson
2133c53a5c ieee1905: 8.2.21 2023-10-05 12:29:57 +02:00
Jakob Olsson
f2a5d2987d map-agent: 4.3.7.1 2023-10-05 12:13:21 +02:00
Amin Ben Romdhane
cef675a672 bbfdm: 1.3.32 2023-10-04 17:49:45 +02:00
Amin Ben Romdhane
78cf48518c usermngr: 1.2.3 2023-10-04 17:41:08 +02:00
Amin Ben Romdhane
10d36df0b6 swmodd: 2.4.1 2023-10-04 17:39:57 +02:00
Amin Ben Romdhane
b2e5e5ee8d timemngr: 1.0.6 2023-10-04 17:39:06 +02:00
Amin Ben Romdhane
14cb91a952 hostmngr: 1.0.4 2023-10-04 17:38:01 +02:00
Amin Ben Romdhane
aba3bcbe99 periodicstats: 1.5.3 2023-10-04 17:36:23 +02:00
Amin Ben Romdhane
95691b3de6 icwmp: 9.5.10 2023-10-04 17:34:49 +02:00
Vivek Kumar Dutta
c6abc34868 sulu: 3.1.10 2023-10-04 19:11:23 +05:30
Vivek Kumar Dutta
e9e50f7402 sulu: 3.1.9 2023-10-04 16:54:34 +05:30
Yalu Zhang
ec66d57a7a libvocie-d2_1.0.14: Store FXS hook status each time when on-hook or off-hook event is received 2023-10-04 11:02:19 +02:00
Vivek Kumar Dutta
8eb1f7b729 sulu: 3.1.8 2023-10-04 08:58:08 +05:30
Wenpeng Song
4d1fe3c052 voicemngr: 1.0.11 ,dectmngr:3.5.15
voicemngr: Add congestion tone play from DECT  
dectmngr: Add busy tone playing via ubus call
2023-10-03 15:53:06 +00:00
suvendhu
93a42e1cb9 icwmpd: Optimised icwmpd startup 2023-10-03 12:43:15 +00:00
Vivek Kumar Dutta
93cffa2d20 usp-js: 1.2.3 2023-10-03 18:12:33 +05:30
Vivek Kumar Dutta
14a32ff704 timemngr: Fix ubus cleanup 2023-10-03 12:29:54 +05:30
Amin Ben Romdhane
1d1318dad2 bbfdm: 1.3.31 2023-10-02 17:30:55 +02:00
Yalu Zhang
cacf1e9610 libvocie-d2_1.0.13: Fix a regression that causes caller ID not being displayed 2023-10-02 16:46:55 +02:00
Vivek Kumar Dutta
cd80edc69d timemngr: 1.0.4 2023-10-02 14:32:34 +05:30
Jakob Olsson
778bd98197 ieee1905: 8.2.20 2023-10-02 08:41:09 +02:00
Jakob Olsson
2c0e2a559f decollector: 4.1.0.5 2023-10-02 08:39:55 +02:00
Amit Kumar
f76e8eb150 hostmngr: access schedule stop time calculation
stop time calculation has been corrected now to add duration
to utc converted start time.
2023-09-29 08:04:57 +00:00
183 changed files with 5783 additions and 2459 deletions

View File

@@ -10,22 +10,168 @@ config BBF_VENDOR_PREFIX
string "Vendor Prefix"
default "X_IOPSYS_EU_"
config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBF_TR471
bool "Enable TR-471 Data Model Support"
default y
config BBFDM_ENABLE_JSON_PLUGIN
bool "Enable json plugin to extend datamodel"
default y
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
menu "TR181 Datamodels"
depends on PACKAGE_libbbfdm
config BBF_TR143
bool "Enable TR-143 Data Model Support"
default y
config BBF_TR471
bool "Enable TR-471 Data Model Support"
default y
config BBFDM_TR181_ATM
bool "Include Device.ATM."
default y
config BBFDM_TR181_BRIDGING
bool "Include Device.Bridging."
default y
config BBFDM_TR181_DDNS
bool "Include Device.DynamicDNS."
default y
config BBFDM_TR181_DEVICEINFO
bool "Include Device.DeviceInfo."
default y
config BBFDM_TR181_DEVICEINFO_PROCESSSTATUS
bool "Include Device.DeviceInfo.ProcessStatus."
default y
config BBFDM_TR181_DHCPv4
bool "Include Device.DHCPv4."
default y
config BBFDM_TR181_DHCPv6
bool "Include Device.DHCPv6."
default y
config BBFDM_TR181_DNS
bool "Include Device.DNS."
default y
config BBFDM_TR181_DSL
bool "Include Device.DSL."
default y
config BBFDM_TR181_ETHERNET
bool "Include Device.Ethenet."
default y
config BBFDM_TR181_FAST
bool "Include Device.FAST."
default y
config BBFDM_TR181_FIREWALL
bool "Include Device.Firewall."
default y
config BBFDM_TR181_GATEWAYINFO
bool "Include Device.GatewayInfo."
default y
config BBFDM_TR181_GRE
bool "Include Device.GRE."
default y
config BBFDM_TR181_IEEE1905
bool "Include Device.IEEE1905."
default y
config BBFDM_TR181_INTERFACESTACK
bool "Include Device.InterfaceStack."
default y
config BBFDM_TR181_IP
bool "Include Device.IP."
default y
config BBFDM_TR181_LANCONFSEC
bool "Include Device.LANonfigSecurity."
default y
config BBFDM_TR181_MQTT
bool "Include Device.MQTT."
default y
config BBFDM_TR181_NAT
bool "Include Device.NAT."
default y
config BBFDM_TR181_PACKETCAPTURE
bool "Include Device.PacketCaptureDiagnostics."
default y
config BBFDM_TR181_PPP
bool "Include Device.PPP."
default y
config BBFDM_TR181_PTM
bool "Include Device.PTM."
default y
config BBFDM_TR181_QOS
bool "Include Device.QoS."
default y
config BBFDM_TR181_ROUTERADVERTISEMENT
bool "Include Device.RouterAdvertisement."
default y
config BBFDM_TR181_ROUTING
bool "Include Device.Routing."
default y
config BBFDM_TR181_SECURITY
bool "Include Device.Security."
default y
config BBFDM_TR181_SELFTEST
bool "Include Device.SelfTestDiagnostics."
default y
config BBFDM_TR181_SSH
bool "Include Device.SSH."
default y
config BBFDM_TR181_TIME
bool "Include Device.Time."
default y
config BBFDM_TR181_UPNP
bool "Include Device.UPnP."
default y
config BBFDM_TR181_USB
bool "Include Device.USB."
default y
config BBFDM_TR181_USERINTERFACE
bool "Include Device.UserInterface."
default y
config BBFDM_TR181_WIFI
bool "Include Device.WiFi."
default y
config BBFDM_TR181_WIFI_DATAELEMENTS
bool "Include Device.WiFi.DataElements."
default y
config BBFDM_TR181_WIFI_DATAELEMENTS_ASSOCEVENTS
bool "Include deprecated AssociationEventData/DisassociationEventData tables"
default n
help
TR181-2.17 deprecates below dataelements tables
- Device.WiFi.DataElements.AssociationEvent.AssociationEventData.{i}.
- Device.WiFi.DataElements.DisassociationEvent.DisassociationEventData.{i}.
If this option is selected, above mentioned tables shall be added in datamodel.
endmenu

View File

@@ -5,13 +5,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.3.30
PKG_VERSION:=1.4.23.29
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=60171c88176bd0e8d8cb67ddea3cb4f40b834f17
PKG_SOURCE_VERSION:=2f1dac5686f54219fc7706c677905816b650dd1c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
@@ -35,6 +38,7 @@ define Package/libbbfdm/default
TITLE:=Library for broadband forum data model support
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libcurl +libbbfdm-api \
+BBF_TR471:obudpst
MENU:=1
endef
define Package/libbbfdm
@@ -102,16 +106,160 @@ define Package/libbbfdm/description
Library contains the data model tree. It includes TR181, TR143 data models
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
ifeq ($(USE_LOCAL),1)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
$(CP) ~/git/bbfdm/* $(PKG_BUILD_DIR)/
endef
endif
CMAKE_OPTIONS += \
-DBBF_TR181=ON
-DBBF_WIFI_DATAELEMENTS=ON
-DBBF_TR181=ON \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
ifeq ($(CONFIG_BBFDM_TR181_ATM),y)
TARGET_CFLAGS += -DBBFDM_TR181_ATM
endif
ifeq ($(CONFIG_BBFDM_TR181_BRIDGING),y)
TARGET_CFLAGS += -DBBFDM_TR181_BRIDGING
endif
ifeq ($(CONFIG_BBFDM_TR181_DDNS),y)
TARGET_CFLAGS += -DBBFDM_TR181_DDNS
endif
ifeq ($(CONFIG_BBFDM_TR181_DEVICEINFO),y)
TARGET_CFLAGS += -DBBFDM_TR181_DEVICEINFO
endif
ifeq ($(CONFIG_BBFDM_TR181_DEVICEINFO_PROCESSSTATUS),y)
TARGET_CFLAGS += -DBBFDM_TR181_DEVICEINFO_PROCESSSTATUS
endif
ifeq ($(CONFIG_BBFDM_TR181_DHCPv4),y)
TARGET_CFLAGS += -DBBFDM_TR181_DHCPv4
endif
ifeq ($(CONFIG_BBFDM_TR181_DHCPv6),y)
TARGET_CFLAGS += -DBBFDM_TR181_DHCPv6
endif
ifeq ($(CONFIG_BBFDM_TR181_DNS),y)
TARGET_CFLAGS += -DBBFDM_TR181_DNS
endif
ifeq ($(CONFIG_BBFDM_TR181_DSL),y)
TARGET_CFLAGS += -DBBFDM_TR181_DSL
endif
ifeq ($(CONFIG_BBFDM_TR181_ETHERNET),y)
TARGET_CFLAGS += -DBBFDM_TR181_ETHERNET
endif
ifeq ($(CONFIG_BBFDM_TR181_FAST),y)
TARGET_CFLAGS += -DBBFDM_TR181_FAST
endif
ifeq ($(CONFIG_BBFDM_TR181_FIREWALL),y)
TARGET_CFLAGS += -DBBFDM_TR181_FIREWALL
endif
ifeq ($(CONFIG_BBFDM_TR181_GATEWAYINFO),y)
TARGET_CFLAGS += -DBBFDM_TR181_GATEWAYINFO
endif
ifeq ($(CONFIG_BBFDM_TR181_GRE),y)
TARGET_CFLAGS += -DBBFDM_TR181_GRE
endif
ifeq ($(CONFIG_BBFDM_TR181_IEEE1905),y)
TARGET_CFLAGS += -DBBFDM_TR181_IEEE1905
endif
ifeq ($(CONFIG_BBFDM_TR181_INTERFACESTACK),y)
TARGET_CFLAGS += -DBBFDM_TR181_INTERFACESTACK
endif
ifeq ($(CONFIG_BBFDM_TR181_IP),y)
TARGET_CFLAGS += -DBBFDM_TR181_IP
endif
ifeq ($(CONFIG_BBFDM_TR181_LANCONFSEC),y)
TARGET_CFLAGS += -DBBFDM_TR181_LANCONFSEC
endif
ifeq ($(CONFIG_BBFDM_TR181_MQTT),y)
TARGET_CFLAGS += -DBBFDM_TR181_MQTT
endif
ifeq ($(CONFIG_BBFDM_TR181_NAT),y)
TARGET_CFLAGS += -DBBFDM_TR181_NAT
endif
ifeq ($(CONFIG_BBFDM_TR181_PACKETCAPTURE),y)
TARGET_CFLAGS += -DBBFDM_TR181_PACKETCAPTURE
endif
ifeq ($(CONFIG_BBFDM_TR181_PPP),y)
TARGET_CFLAGS += -DBBFDM_TR181_PPP
endif
ifeq ($(CONFIG_BBFDM_TR181_PTM),y)
TARGET_CFLAGS += -DBBFDM_TR181_PTM
endif
ifeq ($(CONFIG_BBFDM_TR181_QOS),y)
TARGET_CFLAGS += -DBBFDM_TR181_QOS
endif
ifeq ($(CONFIG_BBFDM_TR181_ROUTERADVERTISEMENT),y)
TARGET_CFLAGS += -DBBFDM_TR181_ROUTERADVERTISEMENT
endif
ifeq ($(CONFIG_BBFDM_TR181_ROUTING),y)
TARGET_CFLAGS += -DBBFDM_TR181_ROUTING
endif
ifeq ($(CONFIG_BBFDM_TR181_SECURITY),y)
TARGET_CFLAGS += -DBBFDM_TR181_SECURITY
endif
ifeq ($(CONFIG_BBFDM_TR181_SELFTEST),y)
TARGET_CFLAGS += -DBBFDM_TR181_SELFTEST
endif
ifeq ($(CONFIG_BBFDM_TR181_SSH),y)
TARGET_CFLAGS += -DBBFDM_TR181_SSH
endif
ifeq ($(CONFIG_BBFDM_TR181_TIME),y)
TARGET_CFLAGS += -DBBFDM_TR181_TIME
endif
ifeq ($(CONFIG_BBFDM_TR181_UPNP),y)
TARGET_CFLAGS += -DBBFDM_TR181_UPNP
endif
ifeq ($(CONFIG_BBFDM_TR181_USB),y)
TARGET_CFLAGS += -DBBFDM_TR181_USB
endif
ifeq ($(CONFIG_BBFDM_TR181_USERINTERFACE),y)
TARGET_CFLAGS += -DBBFDM_TR181_USERINTERFACE
endif
ifeq ($(CONFIG_BBFDM_TR181_WIFI),y)
TARGET_CFLAGS += -DBBFDM_TR181_WIFI
endif
ifeq ($(CONFIG_BBFDM_TR181_WIFI_DATAELEMENTS),y)
TARGET_CFLAGS += -DBBFDM_TR181_WIFI_DATAELEMENTS
endif
ifeq ($(CONFIG_BBFDM_TR181_WIFI_DATAELEMENTS_ASSOCEVENTS),y)
TARGET_CFLAGS += -DBBFDM_TR181_WIFI_DATAELEMENTS_ASSOCEVENTS
endif
ifeq ($(CONFIG_BBF_TR143),y)
CMAKE_OPTIONS += \
@@ -134,16 +282,6 @@ CMAKE_OPTIONS += \
endif ##CONFIG_BBF_VENDOR_EXTENSION
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_JSON_PLUGIN=ON
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
CMAKE_OPTIONS += \
-DBBF_DOTSO_PLUGIN=ON
endif
ifeq ($(BUILD_VARIANT),default)
CMAKE_OPTIONS += -DWITH_OPENSSL=ON
endif
@@ -168,27 +306,29 @@ endif
define Package/libbbfdm-api/install
$(INSTALL_DIR) $(1)/lib
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/libbbfdm-api.so $(1)/lib/
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(CP) $(PKG_BUILD_DIR)/libbbfdm-api/scripts/bbf.config $(1)/usr/libexec/rpcd/bbf.config
endef
define Package/libbbfdm/default/install
$(INSTALL_DIR) $(1)/lib
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/etc/bbfdm/dmmap
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
$(CP) $(PKG_BUILD_DIR)/libbbfdm/libbbfdm.so $(1)/lib/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/bbf $(1)/lib/upgrade/keep.d/bbf
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/97-firewall-service $(1)/etc/uci-defaults/97-firewall-service
$(INSTALL_BIN) ./files/etc/uci-defaults/99-link-core-plugins $(1)/etc/uci-defaults/99-link-core-plugins
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
$(INSTALL_BIN) ./files/etc/firewall.service $(1)/etc/firewall.service
ifeq ($(CONFIG_BBF_TR143),y)
$(INSTALL_DIR) $(1)/usr/share/bbfdm
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libbbfdm/scripts/* $(1)/usr/share/bbfdm
$(LN) /usr/share/bbfdm/bbf.diag $(1)/usr/libexec/rpcd/bbf.diag
endif
ifeq ($(CONFIG_BBFDM_ENABLE_JSON_PLUGIN),y)
$(INSTALL_DIR) $(1)/etc/bbfdm/json
endif
ifeq ($(CONFIG_BBFDM_ENABLE_DOTSO_PLUGIN),y)
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
endif
endef
define Package/libbbfdm/default/prerm
@@ -203,12 +343,15 @@ define Package/bbfdmd/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bbfdmd/ubus/bbfdmd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/json/input.json $(1)/etc/bbfdm/
$(INSTALL_DATA) ./files/etc/bbfdm/input.json $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/init.d/bbfdmd $(1)/etc/init.d/bbfdmd
$(INSTALL_CONF) ./files/etc/config/bbfdm $(1)/etc/config/bbfdm
$(INSTALL_CONF) ./files/etc/config/schedules $(1)/etc/config/schedules
$(INSTALL_BIN) ./files/etc/bbfdm/bbfdm_services.sh $(1)/etc/bbfdm/
$(INSTALL_BIN) ./files/etc/hotplug.d/iface/85-bbfdm-sysctl $(1)/etc/hotplug.d/iface/85-bbfdm-sysctl
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_lease_start_time.user $(1)/etc/udhcpc.user.d/udhcpc_lease_start_time.user
endef
define Package/userinterface/install
@@ -221,9 +364,7 @@ define Package/userinterface/install
$(INSTALL_BIN) ./files/etc/init.d/userinterface $(1)/etc/init.d/userinterface
$(INSTALL_BIN) ./files/etc/uci-defaults/93-userinterface-firewall $(1)/etc/uci-defaults/93-userinterface-firewall
$(INSTALL_BIN) ./files/etc/uci-defaults/94-userinterface-json $(1)/etc/uci-defaults/94-userinterface-json
$(INSTALL_BIN) ./files/etc/uci-defaults/95-portmap-firewall $(1)/etc/uci-defaults/95-portmap-firewall
$(INSTALL_BIN) ./files/etc/firewall.userinterface $(1)/etc/firewall.userinterface
$(INSTALL_BIN) ./files/etc/firewall.portmap $(1)/etc/firewall.portmap
endef
Package/libbbfdm/prerm = $(Package/libbbfdm/default/prerm)

9
bbfdm/bbfdm.mk Normal file
View File

@@ -0,0 +1,9 @@
#
# Copyright (C) 2023 IOPSYS
#
define BbfdmInstallPlugin
$(INSTALL_DIR) $(1)/etc/bbfdm/plugins
$(INSTALL_DATA) $(2) $(1)/etc/bbfdm/plugins/
endef

View File

@@ -13,5 +13,35 @@ bbfdm_add_service()
return 0;
fi
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path'], 'respawn': [0]}}}"
ubus call service add "{'name':'bbfdm.services','instances':{'$name':{'command':['$BBFDMD','-m','$path']}}}"
}
bbfdm_stop_service()
{
local name
name="${1}"
if [ -z "${name}" ]; then
return 0;
fi
if ubus call service list '{"name":"bbfdm.services"}' |grep -q "bbfdm.$name"; then
ubus call service delete "{'name':'bbfdm.services','instance':'bbfdm.$name'}"
fi
}
usages()
{
echo "Usages $0: <OPTIONS>..."
echo
echo " -h show help"
echo " -k micro-service name to stop"
echo
}
while getopts "s:k:h" opts; do
case "$opts" in
h) usages; exit 0;;
k) bbfdm_stop_service "${OPTARG}";;
esac
done

View File

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

View File

@@ -2,6 +2,7 @@
config bbfdmd 'bbfdmd'
option enabled '1'
option loglevel '1'
option refresh_time '10'
option refresh_time '120'
option transaction_timeout '30'
option subprocess_level '2'

View File

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

View File

@@ -2,71 +2,40 @@
. /lib/functions.sh
log() {
echo "${@}"|logger -t firewall.dnat -p info
}
exec_cmd() {
if ! eval "$*"; then
log "Failed to run [$*]"
fi
}
reorder_dnat_rules() {
nat_chains=$(iptables -t nat -S | grep -E "^-N zone[a-zA-Z0-9_]+prerouting$" | cut -d' ' -f 2)
for chain in ${nat_chains}; do
# Collect empty remote host & empty dport rules
EMPTY_HOST_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect empty remote host but non empty dport rules
EMPTY_HOST=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep "\-\-dport" | grep -v "\-s ")
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Collect non empty remote host but empty dport rules
EMPTY_PORT=$(iptables -t nat -S ${chain} | grep -E "REDIRECT|DNAT" | grep -v "\-\-dport" | grep "\-s ")
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd | sed 's/-A /-D /g')"
exec_cmd $cmd1
done
fi
# Now add rules as per datamodel precedence shown below
## Non empty remote host, empty dport
## empty remote host, non empty dport
## empty remote host, empty dport
if [ -n "${EMPTY_PORT}" ]; then
echo "${EMPTY_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
# Skip this chain if no matching rules were found
[ -n "${EMPTY_HOST_PORT}" -o -n "${EMPTY_HOST}" -o -n "${EMPTY_PORT}" ] || continue
if [ -n "${EMPTY_HOST}" ]; then
echo "${EMPTY_HOST}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
(
echo '*nat'
if [ -n "${EMPTY_HOST_PORT}" ]; then
echo "${EMPTY_HOST_PORT}" | while read cmd; do
cmd1="iptables -t nat $(echo $cmd)"
exec_cmd $cmd1
done
fi
# Delete collected rules
[ -n "${EMPTY_HOST_PORT}" ] && echo "${EMPTY_HOST_PORT}" | sed 's/^-A /-D /'
[ -n "${EMPTY_HOST}" ] && echo "${EMPTY_HOST}" | sed 's/^-A /-D /'
[ -n "${EMPTY_PORT}" ] && echo "${EMPTY_PORT}" | sed 's/^-A /-D /'
# Now add rules as per datamodel precedence shown below
## Non empty remote host, empty dport
## empty remote host, non empty dport
## empty remote host, empty dport
[ -n "${EMPTY_PORT}" ] && echo "${EMPTY_PORT}"
[ -n "${EMPTY_HOST}" ] && echo "${EMPTY_HOST}"
[ -n "${EMPTY_HOST_PORT}" ] && echo "${EMPTY_HOST_PORT}"
echo 'COMMIT'
) | iptables-restore -w -n
done
}

163
bbfdm/files/etc/firewall.service Executable file
View File

@@ -0,0 +1,163 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "${@}"|logger -t firewall.service -p info
}
exec_cmd() {
if ! "$@"; then
log "Failed to run [$*]"
echo "-1"
return 0
fi
echo "0"
return 0
}
add_iptable_rule() {
chain_name=$1
protocol=$2
dest_port=$3
icmp_type=$4
family=$5
src_prefix=$6
action=$7
res=-1
cmd="-I ${chain_name}"
if [ -n "${protocol}" ]; then
cmd="${cmd} -p $protocol"
if [ "${protocol}" -eq 41 ] || [ "${protocol}" -eq 43 ] || [ "${protocol}" -eq 44 ] ||
[ "${protocol}" -eq 58 ] || [ "${protocol}" -eq 59 ] || [ "${protocol}" -eq 60 ]; then
# Explicit v6 protocols
if [ "${family}" = "ipv4" ]; then
echo $res
return 0
else
family="ipv6"
fi
elif [ "${protocol}" -eq 1 ]; then
# Explicit v4 protocols
if [ "${family}" = "ipv6" ]; then
echo $res
return 0
else
family="ipv4"
fi
fi
# Limitation:: iptables do not accept dport without specific protocol
count=$(echo "${dest_port}" | sed -n "/-1/p" | wc -l)
if [ "${count}" -eq 0 ]; then
# dest_port not contains -1 so need to have this match criteria
count=$(echo "${dest_port}" | wc -w)
if [ "${count}" -gt 1 ]; then
# multiple ports present
port=$(echo "${dest_port}" | sed "s/ /,/g")
cmd="${cmd} -m multiport --dports ${port}"
else
cmd="${cmd} --dport ${dest_port}"
fi
fi
fi
if [ "${family}" = "ipv4" ] || [ "${family}" = "-1" ]; then
if [ "${protocol}" -eq 1 ] && [ "${icmp_type}" -ge 0 ]; then
cmd="${cmd} --icmp-type ${icmp_type}"
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd iptables -w ${cmd} -m comment --comment IPtables_service_rule -j "${action}")
else
#Add ipv4 sources if any
src_list=""
for src in $src_prefix; do
ret=$(echo $src | grep ":" | wc -l)
if [ "${ret}" -eq 0 ]; then
src_list="$src,$src_list"
fi
done
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd iptables -w -s "$src_list" ${cmd} -m comment --comment IPtables_service_rule -j "${action}")
fi
fi
fi
if [ "${family}" = "ipv6" ] || [ "${family}" = "-1" ]; then
if [ "${protocol}" -eq 58 ] && [ "${icmp_type}" -ge 0 ]; then
cmd="${cmd} --icmpv6-type ${icmp_type}"
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd ip6tables -w ${cmd} -m comment --comment IP6tables_service_rule -j "${action}")
else
#Add ipv6 sources if any
src_list=""
for src in $src_prefix; do
ret=$(echo $src | grep ":" | wc -l)
if [ "${ret}" -eq 1 ]; then
src_list="$src,$src_list"
fi
done
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd ip6tables -w -s "$src_list" ${cmd} -m comment --comment IP6tables_service_rule -j "${action}")
fi
fi
fi
echo $res
}
add_service() {
local enable proto family dest_port interface target icmp_type
config_get enable "$1" enable "0"
config_get icmp_type "$1" icmp_type "-1"
config_get target "$1" target "Accept"
config_get interface "$1" interface ""
config_get family "$1" family "-1"
config_get dest_port "$1" dest_port "-1"
config_get proto "$1" proto "-1"
config_get src_prefix "$1" src_prefix ""
if [ "${enable}" -eq 0 ] || [ -z "${interface}" ]; then
return 0
fi
action=$(echo "${target}" | tr a-z A-Z)
chain_name="zone_${interface}_input"
res=0
count=$(echo "${proto}" | sed -n "/-1/p" | wc -l)
if [ "${count}" -eq 0 ]; then
# proto not contains -1 so need to have this match criteria
for protocol in $proto; do
res=$(add_iptable_rule "$chain_name" "$protocol" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
done
else
# proto contains -1 so no need to have this match criteria
res=$(add_iptable_rule "$chain_name" "" "$dest_port" "$icmp_type" "$family" "$src_prefix" "$action")
fi
if [ "${res}" -ne 0 ]; then
uci -q set firewall."${1}".status="Error"
else
uci -q set firewall."${1}".status=""
fi
uci commit firewall
}
config_load firewall
config_foreach add_service "service"

View File

@@ -7,7 +7,7 @@ USE_PROCD=1
PROG=/usr/sbin/bbfdmd
BBFDM_JSON_INPUT="/etc/bbfdm/input.json"
BBFDM_TEMP_JSON="/tmp/bbfdm.json"
BBFDM_TEMP_JSON="/tmp/bbfdm/input.json"
log() {
echo "${@}"|logger -t bbfdmd.init -p info
@@ -28,7 +28,7 @@ validate_bbfdm_bbfdmd_section()
configure_bbfdmd()
{
local enabled debug sock update
local jlog jrefresh jtimeout
local jlog jrefresh jtimeout jlevel
update=0
config_load bbfdm
@@ -38,26 +38,14 @@ configure_bbfdmd()
}
[ "${enabled}" -eq 0 ] && return 0
[ ! -f "${BBFDM_JSON_INPUT}" ] && return 0
jlog="$(jq '.daemon.config.loglevel' ${BBFDM_JSON_INPUT})"
if [ "\"${loglevel}\"" != "${jlog}" ]; then
update=1
fi
jrefresh="$(jq '.daemon.config.refresh_time' ${BBFDM_JSON_INPUT})"
if [ "\"${refresh_time}\"" != "${jrefresh}" ]; then
update=1
fi
jtimeout="$(jq '.daemon.config.transaction_timeout' ${BBFDM_JSON_INPUT})"
if [ "\"${transaction_timeout}\"" != "${jtimeout}" ]; then
update=1
fi
if [ "${update}" -eq "1" ]; then
echo "$(jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran}' ${BBFDM_JSON_INPUT})" > ${BBFDM_TEMP_JSON}
mv ${BBFDM_TEMP_JSON} ${BBFDM_JSON_INPUT}
if [ -f "${BBFDM_JSON_INPUT}" ]; then
cat ${BBFDM_JSON_INPUT} |jq --arg log ${loglevel} --arg tran ${transaction_timeout} --arg refresh ${refresh_time} --arg level ${subprocess_level} '.daemon.config += {"loglevel": $log, "refresh_time": $refresh, "transaction_timeout": $tran, "subprocess_level": $level}' > ${BBFDM_TEMP_JSON}
val="$(jq -r '.daemon.input // empty' ${BBFDM_TEMP_JSON})"
if [ -z "${val}" ]; then
log "Failed to generate temp input json, uci changes not applied"
cp ${BBFDM_JSON_INPUT} ${BBFDM_TEMP_JSON}
fi
fi
procd_set_param command ${PROG}
@@ -73,6 +61,7 @@ configure_bbfdmd()
start_service()
{
mkdir -p /tmp/bbfdm
procd_open_instance "bbfdm"
configure_bbfdmd
procd_set_param respawn

View File

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

View File

@@ -0,0 +1,18 @@
#!/bin/sh
UNIFIED_PATH="/etc/bbfdm/plugins/"
# Link JSON plugins
for f in `ls -1 /etc/bbfdm/json/*.json`; do
echo "# BBFDM JSON plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
# Link DotSo plugins
for f in `ls -1 /usr/lib/bbfdm/*.so`; do
echo "# BBFDM DotSO plugin ${f} not aligned #"
ln -s ${f} "${UNIFIED_PATH}"
done
exit 0

View File

@@ -0,0 +1,14 @@
#!/bin/sh
leasestarttime="$(awk -F'.' '{print $1}' /proc/uptime 2> /dev/null)"
target_file=/tmp/dhcp_client_info
target_str="$INTERFACE $lease $leasestarttime"
# if this interface is present in file, then replace it
if grep -q "$INTERFACE" "$target_file" 2> /dev/null; then
# replace the whole line if pattern matches
sed -i "/${INTERFACE}/c\\${target_str}" "$target_file"
else
# interface info was not present, append it to the file
echo "$target_str" >> "$target_file"
fi

View File

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

64
csmngr/Makefile Normal file
View File

@@ -0,0 +1,64 @@
#
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=csmngr
PKG_VERSION:=1.0.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=92c62f8df86066bd1718a6a6036195b113e74032
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/csmngr.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_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_libwifiutils \
CONFIG_PACKAGE_libwifi
PKG_BUILD_DEPENDS := libwifi
include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=src
define Package/csmngr
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi channel selection manager
DEPENDS:=+libwifiutils +libwifi +libuci +libubox +ubus +libnl-genl
endef
define Package/csmngr/description
WiFi Auto Channel Selection manager.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/csmngr/ $(PKG_BUILD_DIR)/
endef
endif
define Package/csmngr/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/csmngr $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,csmngr))

21
csmngr/files/etc/init.d/csmngr Executable file
View File

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

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.1.0.4
PKG_VERSION:=4.2.1.1.6
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=566f0b7d148c0ece72f311c4f4b6b5f8e11d6f97
PKG_SOURCE_VERSION:=9fae736fa6c4ee39e7775964c7f84b105196c034
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -7,7 +7,7 @@ USE_PROCD=1
PROG=/usr/sbin/decollector
service_running() {
ubus -t 2 wait_for ieee1905 ieee1905.map topology
ubus -t 2 wait_for ieee1905 ieee1905.map
}
start_service() {

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.5.14
PKG_VERSION:=3.6.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4f16755f8ac09d373234565f050832c049bdf543
PKG_SOURCE_VERSION:=192e74db2082e3f89f6defe9d752d752b0b09079
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,5 +1,5 @@
#
# Copyright (C) 2018 iopsys Software Solutions AB
# Copyright (C) 2018-2024 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -8,14 +8,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dslmngr
PKG_VERSION:=1.2.0
PKG_VERSION:=1.2.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=43dec92b1c86be7859521da337e7bd1168848b26
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dslmngr.git
PKG_SOURCE_VERSION:=cb8b8fd2549751bcd38808391b76a1a9a908c4de
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip
endif
@@ -59,7 +60,7 @@ MAKE_FLAGS += \
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/dslmngr/ $(PKG_BUILD_DIR)/
rsync -r --exclude=.* ./dslmngr/ $(PKG_BUILD_DIR)/
endef
endif

View File

@@ -1,18 +1,21 @@
#
# Copyright (C) 2020 Iopsys
# Copyright (C) 2020-2024 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=2.1.0
PKG_VERSION:=2.1.3.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5a0ff3bc7c49dcb05129f423ef8e0c4929f6aa03
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE_VERSION:=847a94cee530d60bfd10ceaee4185d64fb6397d0
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
@@ -32,6 +35,12 @@ define Package/ethmngr/description
It uses APIs from the libethernet.so library.
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ./ethmngr/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.0.3
PKG_VERSION:=1.1.8
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=bfb9098121d665a324c86a2a9ee0971871d6c22e
PKG_SOURCE_VERSION:=993336a09137451758f38d7ebc643dc590ba0227
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -57,12 +57,14 @@ endif
MAKE_PATH:=src
define Package/hostmngr/install
$(CP) ./files/* $(1)/
$(CP) ./files/etc $(1)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/hostmngr/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/hostmngr $(1)/usr/sbin/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1)/etc/hostmngr/
$(INSTALL_DATA) ./files/etc/hostmngr/input.json $(1)/etc/hostmngr/
$(INSTALL_DIR) $(1)/usr/share/hostmngr
$(INSTALL_DATA) ./files/scripts/hosts_acl.sh $(1)/usr/share/hostmngr/
endef
ifeq ($(LOCAL_DEV),1)

View File

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

View File

@@ -2,7 +2,8 @@
"daemon": {
"input": {
"type": "DotSo",
"name": "/etc/hostmngr/libhostmngr.so"
"name": "/etc/hostmngr/libhostmngr.so",
"plugin_dir": "/etc/hostmngr/plugins/"
},
"output": {
"type": "UBUS",

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=97
START=65
STOP=20
. /etc/bbfdm/bbfdm_services.sh
@@ -19,6 +19,7 @@ start_service() {
procd_close_instance
bbfdm_add_service "bbfdm.hosts" "${HOSTS_JSON_INPUT}"
sh /usr/share/hostmngr/hosts_acl.sh
}
service_triggers()

View File

@@ -0,0 +1,237 @@
#!/bin/sh
. /lib/functions.sh
day=""
next_days=""
prev_days=""
IP_RULE=""
IP_RULE1=""
get_next_day() {
local weekday="$1"
case "$weekday" in
"Mon"|"Monday") echo "Tuesday"
;;
"Tue"|"Tuesday") echo "Wednesday"
;;
"Wed"|"Wednesday") echo "Thursday"
;;
"Thu"|"Thursday") echo "Friday"
;;
"Fri"|"Friday") echo "Saturday"
;;
"Sat"|"Saturday") echo "Sunday"
;;
"Sun"|"Sunday") echo "Monday"
;;
esac
}
get_previous_day() {
local weekday="$1"
case "$weekday" in
"Mon"|"Monday") echo "Sunday"
;;
"Tue"|"Tuesday") echo "Monday"
;;
"Wed"|"Wednesday") echo "Tuesday"
;;
"Thu"|"Thursday") echo "Wednesday"
;;
"Fri"|"Friday") echo "Thursday"
;;
"Sat"|"Saturday") echo "Friday"
;;
"Sun"|"Sunday") echo "Saturday"
;;
esac
}
ip_rule_west_zone() {
local utc_start_t_h="$1"
local utc_stop_t_h="$2"
local local_start_t_h="$3"
local local_stop_t_h="$4"
local utc_start_time="$5"
local utc_stop_time="$6"
if [ "$utc_start_t_h" -lt "$local_start_t_h" ]; then
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
if [ -n "$next_days" ]; then
IP_RULE="$IP_RULE --weekdays $next_days"
fi
else
if [ "$utc_stop_t_h" -lt "$local_stop_t_h" ]; then
IP_RULE1="$IP_RULE"
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop 23:59"
IP_RULE1="$IP_RULE1 -m time --timestart 00:00 --timestop $utc_stop_time"
if [ -n "$next_days" ]; then
IP_RULE1="$IP_RULE1 --weekdays $next_days"
fi
else
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
fi
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
fi
}
ip_rule_east_zone() {
local utc_start_t_h="$1"
local utc_stop_t_h="$2"
local local_start_t_h="$3"
local local_stop_t_h="$4"
local utc_start_time="$5"
local utc_stop_time="$6"
if [ "$utc_start_t_h" -lt "$local_start_t_h" ]; then
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
else
if [ "$utc_stop_t_h" -lt "$local_stop_t_h" ]; then
IP_RULE1="$IP_RULE"
IP_RULE="$IP_RULE -m time --timestart 00:00 --timestop $utc_stop_time"
IP_RULE1="$IP_RULE1 -m time --timestart $utc_start_time --timestop 23:59"
if [ -n "$prev_days" ]; then
IP_RULE1="$IP_RULE1 --weekdays $prev_days"
fi
else
IP_RULE="$IP_RULE -m time --timestart $utc_start_time --timestop $utc_stop_time"
fi
if [ -n "$day" ]; then
IP_RULE="$IP_RULE --weekdays $day"
fi
fi
}
process_ac_schedule() {
local acs_id="$1"
local is_enabled
local access_control
local start_time=""
local mac=""
handle_day_list() {
local value=$1
val=$(echo $value | cut -c 1-3)
next_day_val=$(get_next_day $val)
prev_day_val=$(get_previous_day $val)
if [ -z $day ]; then
day="$val"
next_days="$next_day_val"
prev_days="$prev_day_val"
else
day="$day,$val"
next_days="$next_days,$next_day_val"
prev_days="$prev_days,$prev_day_val"
fi
}
config_list_foreach "$acs_id" "day" handle_day_list
config_get is_enabled "$acs_id" "enable" 1
config_get access_control "$acs_id" "dm_parent"
if [ "$is_enabled" == "0" ] || [ -z "$access_control" ]; then
return
fi
IP_RULE=""
IP_RULE1=""
config_get is_enabled "$access_control" "enable" 1
if [ "$is_enabled" == "0" ]; then
return
fi
mac=$(uci -q get hosts.$access_control.macaddr)
access_policy=$(uci -q get hosts.$access_control.access_policy)
config_get start_time "$acs_id" "start_time"
config_get duration "$acs_id" "duration"
if [ -z "$mac" ] && [ -z "$start_time" ] && [ -z "$duration" ] && [ -z "$day" ] && [ -z "$access_policy" ]; then
return
fi
if [ -n "$mac" ]; then
IP_RULE="$IP_RULE -m mac --mac-source $mac"
fi
zone=$(date +%z | cut -c 1)
local_start_time=$start_time
if [ -n "$duration" ]; then
hh=$(echo $local_start_time | awk -F: '{ print $1 }')
mm=$(echo $local_start_time | awk -F: '{ print $2 }')
hh_s=`expr $hh \* 3600`
mm_s=`expr $mm \* 60`
ss=$(( hh_s + mm_s ))
local_start_hh=$hh
stop_ss=$(( ss + duration ))
hh=$(( stop_ss / 3600 ))
rem_ss=$(( stop_ss % 3600 ))
mm=$(( rem_ss / 60 ))
ss=$(( rem_ss % 60 ))
local_stop_time="$hh:$mm:$ss"
local_stop_hh=$hh
fi
utc_start_time=$(date -u -d @$(date "+%s" -d "$local_start_time") +%H:%M)
utc_stop_time=$(date -u -d @$(date "+%s" -d "$local_stop_time") +%H:%M)
utc_start_hh=$(echo $utc_start_time | awk -F: '{ print $1 }')
utc_stop_hh=$(echo $utc_stop_time | awk -F: '{ print $1 }')
if [ "$zone" == "-" ]; then
ip_rule_west_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
else
ip_rule_east_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
fi
if [ "$access_policy" == "Deny" ]; then
IP_RULE="$IP_RULE -j DROP"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j DROP"
fi
else
IP_RULE="$IP_RULE -j ACCEPT"
if [ -n "$IP_RULE1" ]; then
IP_RULE1="$IP_RULE1 -j ACCEPT"
fi
fi
iptables -w -A hosts_forward ${IP_RULE}
ip6tables -w -A hosts_forward ${IP_RULE}
if [ -n "$IP_RULE1" ]; then
iptables -w -A hosts_forward ${IP_RULE1}
ip6tables -w -A hosts_forward ${IP_RULE1}
fi
day=""
next_days=""
prev_days=""
}
iptables -w -F hosts_forward
ip6tables -w -F hosts_forward
hosts_ipv4_forward=$(iptables -t filter --list -n | grep hosts_forward)
if [ -z "$hosts_ipv4_forward" ]; then
iptables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && iptables -w -t filter -I FORWARD -j hosts_forward
fi
hosts_ipv6_forward=$(ip6tables -t filter --list -n | grep hosts_forward)
if [ -z "$hosts_ipv6_forward" ]; then
ip6tables -w -t filter -N hosts_forward
ret=$?
[ $ret -eq 0 ] && ip6tables -w -t filter -I FORWARD -j hosts_forward
fi
# Load /etc/config/hosts UCI file
config_load hosts
config_foreach process_ac_schedule ac_schedule

View File

@@ -8,21 +8,23 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.5.8
PKG_VERSION:=9.5.29.18
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=79871c5365cf89ce718b922b0863c8a68c09a771
PKG_SOURCE_VERSION:=816033a14672e8e9c3566ce06fa19fb422eeb546
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_RELEASE=$(PKG_SOURCE_VERSION)
endif
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ../bbfdm/bbfdm.mk
define Package/icwmp/default
SECTION:=utils
@@ -79,10 +81,9 @@ ifeq ($(BUILD_VARIANT),mbedtls)
CMAKE_OPTIONS += -DWITH_MBEDTLS=ON
endif
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
endef
endif
@@ -93,21 +94,19 @@ 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_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libcwmpdm.so $(1)/usr/lib/bbfdm/libcwmpdm.so
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(INSTALL_BIN) ./files/etc/icwmpd/update.sh $(1)/etc/icwmpd/update.sh
$(INSTALL_DATA) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1)/etc/bbfdm/json/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) $(PKG_BUILD_DIR)/files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/CWMPManagementServer.json)
$(call BbfdmInstallPlugin,$(1),$(PKG_BUILD_DIR)/libcwmpdm.so)
endef
Package/icwmp/install = $(Package/icwmp/default/install)

View File

@@ -11,6 +11,7 @@ config acs 'acs'
option retry_min_wait_interval '5'
#­ possible configs interval :[1000:65535]
option retry_interval_multiplier '2000'
option skip_dhcp_boot_options '0'
config cpe 'cpe'
option enable '1'
@@ -20,7 +21,7 @@ config cpe 'cpe'
option log_to_file 'disable'
# log_severity: INFO (Default)
# log_severity possible configs: EMERG, ALERT, CRITIC ,ERROR, WARNING, NOTICE, INFO, DEBUG
option log_severity 'INFO'
option log_severity 'ERROR'
option log_file_name '/var/log/icwmpd.log'
option log_max_size '102400'
option userid '' #$OUI-$SER
@@ -37,6 +38,8 @@ config cpe 'cpe'
option periodic_notify_interval '10'
option incoming_rule 'Port_Only'
option active_notif_throttle '0'
option disable_gatewayinfo '0'
option fw_upgrade_keep_settings '1'
config lwn 'lwn'
option enable '0'

View File

@@ -1,27 +0,0 @@
#!/bin/sh
. /lib/functions.sh
log() {
echo "$@" |logger -t cwmp.update -p info
}
handle_icwmp_update() {
local cwmp_enable
config_load cwmp
config_get_bool cwmp_enable cpe enable 1
if [ "$cwmp_enable" = "0" ]; then
return 0
fi
# wait for some time to avoid interface fluctuation
sleep 10
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" != "true" ]; then
log "Restarting icwmp tr069 object"
/etc/init.d/icwmpd restart
fi
}
handle_icwmp_update "$@"

View File

@@ -407,6 +407,7 @@ validate_acs_section()
'periodic_inform_time:string' \
'url:string' \
'dhcp_discovery:string' \
'skip_dhcp_boot_options:bool:0' \
'dhcp_url:string' \
'compression:or("GZIP","Deflate","Disabled")' \
'retry_min_wait_interval:range(1, 65535)' \
@@ -436,7 +437,8 @@ validate_cpe_section()
'exec_download:bool' \
'periodic_notify_enable:bool' \
'enable:bool' \
'periodic_notify_interval:uinteger'
'periodic_notify_interval:uinteger' \
'fw_upgrade_keep_settings:bool'
}
validate_defaults() {
@@ -467,33 +469,32 @@ validate_defaults() {
}
boot() {
local enable_cwmp="0"
local dhcp_discovery="0"
local dhcp_discovery wan_interface skip_dhcp_boot_options disable_gatewayinfo
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
local wan_interface=""
config_get wan_interface cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
config_get disable_gatewayinfo cpe disable_gatewayinfo "0"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get skip_dhcp_boot_options acs skip_dhcp_boot_options "0"
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
if [ "${skip_dhcp_boot_options}" -ne 1 ]; then
# Set dhcp option 43 if not already configured
enable_dhcp_option43 "${wan_interface}"
# Set dhcp option 60
set_vendor_id "${wan_interface}"
fi
fi
config_get lan_interface cpe default_lan_interface ""
if [ -n "${lan_interface}" ]; then
# Set dhcp_option 125 if not already configured
enable_dhcp_option125 "${wan_interface}"
enable_dnsmasq_option125 "${lan_interface}"
if [ "${disable_gatewayinfo}" -ne 1 ]; then
# Set dhcp_option 125 if not already configured
enable_dhcp_option125 "${wan_interface}"
enable_dnsmasq_option125 "${lan_interface}"
fi
fi
config_get ssl_capath acs ssl_capath
@@ -511,32 +512,35 @@ boot() {
}
start_service() {
local enable_cwmp
local enable_cwmp url dhcp_url
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get url acs url ""
config_get dhcp_url acs dhcp_url ""
procd_open_instance icwmp
if [ "$enable_cwmp" = "0" ]; then
procd_close_instance
return 0
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
validate_defaults || {
log "Validation of defaults failed"
procd_close_instance
return 1;
}
procd_open_instance icwmp
procd_set_param command "$PROG"
procd_append_param command -b
if [ -n "${url}" ] || [ -n "${dhcp_url}" ]; then
procd_set_param command "$PROG"
procd_append_param command -b
fi
procd_set_param respawn \
"${respawn_threshold:-5}" \
"${respawn_timeout:-10}" "${respawn_retry:-3}"
procd_set_param watch network.interface
procd_close_instance
}
@@ -551,6 +555,7 @@ reload_service() {
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
log "Reload service $ret"
ret="0"
if [ "$enable_cwmp" = "0" ]; then
stop
@@ -558,10 +563,19 @@ reload_service() {
return 0
fi
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
if [ "$ret" != "true" ]; then
log "Reloading cwmp service ..."
stop
start
return 0
fi
tr069_status="$(ubus -t 1 call tr069 status)"
ret="$?"
if [ "$ret" = "7" ]; then
# ubus timed out may be due to uloop is busy in some task so returning
# ubus timed out may be due to uloop is busy in some task so return
log "Skipping ubus reload due to ubus timeout"
return 0
fi
@@ -571,17 +585,7 @@ reload_service() {
fi
}
add_interface_trigger() {
procd_add_interface_trigger "interface.update" "$1" /etc/icwmpd/update.sh
}
service_triggers() {
local wan_interface
config_load cwmp
config_get wan_interface cpe default_wan_interface "wan"
procd_add_reload_trigger "cwmp"
add_interface_trigger ${wan_interface}
}

View File

@@ -0,0 +1,20 @@
#!/bin/sh
. /lib/functions.sh
set_inform_time()
{
local sec inform_time value
config_load cwmp
config_get inform_time acs periodic_inform_time '0001-01-01T00:00:00Z'
if [ "${inform_time}" == "0001-01-01T00:00:00Z" ]; then
sec=$(date +%s)
value="$(date -d @$(($sec-$RANDOM)) +%Y-%m-%dT%H:%M:%SZ)"
uci_set cwmp acs periodic_inform_time "$value"
fi
}
set_inform_time

View File

@@ -0,0 +1,139 @@
#!/bin/sh
. /lib/functions.sh
CLASS=""
OUI=""
SERIAL=""
get_vivsoi() {
# opt125 environment variable has data in below format
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | enterprise-number1 |
# | |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
# | data-len1 | |
# +-+-+-+-+-+-+-+-+ option-data1 |
# / /
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----
# | enterprise-number2 | ^
# | | |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
# | data-len2 | | optional
# +-+-+-+-+-+-+-+-+ option-data2 | |
# / / |
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
# ~ ... ~ V
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ -----
# Enterprise Id Len Sub Op SLen Data Sub Op SLen Data Sub Op SLen Data
# +-------------+-----+------+------+----+------+-----+----+-----+------+-----+----+
# | id | n | 1 | n1 | D1 | 2 | n2 | D2 | ... | 6 | n6 | D6 |
# +-------------+-----+------+------+----+------+-----+----+-----+------+-----+----+
local opt125="$1"
local len="$2"
local ent_id
#hex-string 2 character=1 Byte
# length in hex string will be twice of actual Byte length
[ "$len" -gt "8" ] || return
data="${opt125}"
rem_len="${len}"
while [ $rem_len -gt 0 ]; do
ent_id=${data:0:8}
ent_id=$(printf "%d\n" "0x$ent_id")
if [ $ent_id -ne 3561 ]; then
len_val=${data:8:2}
data_len=$(printf "%d\n" "0x$len_val")
# add 4 byte for ent_id and 1 byte for len
data_len=$(( data_len * 2 + 10 ))
# move ahead data to next enterprise id
data=${data:"${data_len}":"${rem_len}"}
rem_len=$(( rem_len - $data_len ))
continue
fi
# read the length of enterprise data
len_val=${data:8:2}
data_len=$(printf "%d\n" "0x$len_val")
# add 4 byte for ent_id and 1 byte for len
data_len=$(( data_len * 2 + 10 ))
opt_len=$(printf "%d\n" "0x$len_val")
[ $opt_len -eq 0 ] && return
# populate the option data of enterprise id
sub_data_len=$(( opt_len * 2))
# starting 10 means ahead of length field
sub_data=${data:10:"${sub_data_len}"}
# parsing of suboption of option 125
while [ $sub_data_len -gt 0 ]; do
# get the suboption id
sub_opt_id=${sub_data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
# get the length of suboption
sub_opt_len=${sub_data:2:2}
sub_opt_len=$(printf "%d\n" "0x$sub_opt_len")
sub_opt_len=$(( sub_opt_len * 2 ))
# get the value of sub option starting 4 means starting after length
sub_opt_val=${sub_data:4:${sub_opt_len}}
# assign the value found in sub option
case "${sub_opt_id}" in
"4") OUI=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"5") SERIAL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"6") CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
esac
# add 2 bytes for sub_opt id and sub_opt len field
sub_opt_end=$(( sub_opt_len + 4 ))
# update the remaining sub option hex string length
sub_data_len=$((sub_data_len - sub_opt_end))
# fetch next sub option hex string
sub_data=${sub_data:${sub_opt_end}:${sub_data_len}}
done
# move ahead data to next enterprise id
data=${data:"${data_len}":"${rem_len}"}
rem_len=$(( rem_len - data_len ))
done
}
config_load cwmp
config_get_bool enable_cwmp cpe enable 1
config_get wan_intf cpe default_wan_interface "wan"
if [ "$enable_cwmp" = "0" ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt125" ]; then
len=$(printf "$opt125"|wc -c)
get_vivsoi "$opt125" "$len"
fi
mkdir -p /var/state
touch /var/state/icwmp
sec=$(uci -q -c /var/state get icwmp.gatewayinfo)
if [ -z "${sec}" ]; then
sec=$(uci -q -c /var/state add icwmp gatewayinfo)
uci -q -c /var/state rename icwmp."${sec}"="gatewayinfo"
fi
uci -q -c /var/state set icwmp.gatewayinfo.class="$CLASS"
uci -q -c /var/state set icwmp.gatewayinfo.oui="$OUI"
uci -q -c /var/state set icwmp.gatewayinfo.serial="$SERIAL"
uci -q -c /var/state commit icwmp
fi

View File

@@ -0,0 +1,141 @@
#!/bin/sh
. /lib/functions.sh
DHCP_ACS_URL=""
DHCP_PROV_CODE=""
MIN_WAIT_INVL=""
INVL_MULTIPLIER=""
log() {
echo "$@" |logger -t cwmp.update -p info
}
get_opt43() {
# Check if option value is in encapsulated form
local opt43="$1"
local len="$2"
[ "$len" -gt "2" ] || return
first_byte=${opt43:0:2}
first_byte=$(printf "%d\n" "0x$first_byte")
if [ $len -ge 4 ] && [ $first_byte -ge 1 ] && [ $first_byte -le 4 ]; then
# it is in encapsulated form
# opt43 encapsulated vendor-specific option has data in below format
# Code Len Data item Code Len Data item Code
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
# | T1 | n | d1 | d2 | ... | T2 | n | D1 | D2 | ... | ... |
# +-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
#hex-string 2 character=1 Byte
# length in hex string will be twice of actual Byte length
data="${opt43}"
rem_len="${len}"
# parsing of suboption of option 43
while [ $rem_len -gt 0 ]; do
# get the suboption id
sub_opt_id=${data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
# get the length of suboption
sub_opt_len=${data:2:2}
sub_opt_len=$(printf "%d\n" "0x$sub_opt_len")
sub_opt_len=$(( sub_opt_len * 2 ))
# get the value of sub option starting 4 means starting after length
sub_opt_val=${data:4:${sub_opt_len}}
# assign the value found in sub option
case "${sub_opt_id}" in
"1") DHCP_ACS_URL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"2") DHCP_PROV_CODE=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"3") MIN_WAIT_INVL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"4") INVL_MULTIPLIER=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
esac
# add 2 bytes for sub_opt id and sub_opt len field
sub_opt_end=$(( sub_opt_len + 4 ))
# fetch next sub option hex string
data=${data:${sub_opt_end}:${len}}
# update the remaining sub option hex string length
rem_len=$((rem_len - sub_opt_end))
done
else
DHCP_ACS_URL=$(echo -n $opt43 | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
fi
}
config_load cwmp
config_get wan_intf cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get dhcp_url acs dhcp_url ""
config_get min_wait_intvl acs dhcp_retry_min_wait_interval "0"
config_get intvl_multi acs dhcp_retry_interval_multiplier "0"
config_change=0
discovery_enable=0
if [ "$dhcp_discovery" = "1" ] || [ "$dhcp_discovery" = "true" ] || [ "$dhcp_discovery" = "enable" ]; then
discovery_enable=1
fi
if [ "$discovery_enable" = "0" ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt43" ]; then
len=$(printf "$opt43"|wc -c)
get_opt43 "$opt43" "$len"
fi
if [ -z "$DHCP_ACS_URL" ]; then
return 0
fi
sec=$(uci -q get cwmp.acs)
if [ -z "${sec}" ]; then
return 0
fi
if [ "${dhcp_url}" != "${DHCP_ACS_URL}" ]; then
uci -q set cwmp.acs.dhcp_url="$DHCP_ACS_URL"
config_change=1
fi
if [ -n "$MIN_WAIT_INVL" ] && [ "${MIN_WAIT_INVL}" != "${min_wait_intvl}" ]; then
uci -q set cwmp.acs.dhcp_retry_min_wait_interval="$MIN_WAIT_INVL"
config_change=1
fi
if [ -n "$INVL_MULTIPLIER" ] && [ "${INVL_MULTIPLIER}" != "${intvl_multi}" ]; then
uci -q set cwmp.acs.dhcp_retry_interval_multiplier="$INVL_MULTIPLIER"
config_change=1
fi
sec=$(uci -q get cwmp.cpe)
if [ -n "${sec}" ] && [ -n "$DHCP_PROV_CODE" ]; then
uci -q set cwmp.cpe.dhcp_provisioning_code="$DHCP_PROV_CODE"
config_change=1
fi
if [ $config_change -eq 0 ]; then
return 0
fi
# ACS url has been set, inform icwmpd to reload new configuration
sleep 10 # wait for some time to avoid interface fluctuation
ubus call uci commit '{"config":"cwmp"}'
fi

View File

@@ -20,7 +20,6 @@ config IEEE1905_WIFI_EASYMESH
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
default y
endmenu

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.2.19
PKG_VERSION:=8.3.4.14
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=3d175485a7461ce567e3bee47e1c760e15434367
PKG_SOURCE_VERSION:=f625abe854742f7f07d4121c9f6302a7db9b48e2
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -123,7 +123,6 @@ define Build/InstallDev/libieee1905
$(CP) $(PKG_BUILD_DIR)/src/cmdu_ackq.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/1905_tlvs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/i1905_wsc.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/bufutil.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/timer_impl.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/i1905_extension.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/src/libmidgen.so $(1)/usr/lib/

View File

@@ -4,6 +4,7 @@ config ieee1905 'ieee1905'
list extmodule 'map'
list extmodule 'topology'
option registrar '2 5 6'
list exclude_tagging '/eth.*'
# option macaddress '0a:1b:2c:3d:4e:50'
config al-iface

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=96
START=60
STOP=21
USE_PROCD=1

View File

@@ -1,56 +0,0 @@
#
# Copyright (C) 2016 iopsys
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=inbd
PKG_VERSION:=1.2.3
PKG_RELEASE:=1
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
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
# support parallel build
PKG_BUILD_PARALLEL:=1
#re create configure scripts if not present.
PKG_FIXUP:=autoreconf
# run install target when cross compiling. basically, make install DESTDIR=$(PKG_INSTALL_DIR)
# this way we don't need to pick out the resulting files from the build dir.
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk
define Package/inbd
CATEGORY:=Utilities
TITLE:=iopsys Netlink Bridge Daemon
URL:=
DEPENDS:=+libuci +libubus +libblobmsg-json +libnl-genl
endef
define Package/inbd/description
Application handling netlink messages from kernel and sending them out on ubus.
endef
define Package/inbd/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_DIR) $(1)/etc/init.d/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/inbd $(1)/usr/bin/
cp $(PKG_BUILD_DIR)/files/etc/init.d/inbd $(1)/etc/init.d/
endef
$(eval $(call BuildPackage,inbd))

View File

@@ -11,10 +11,19 @@ CONFIG_DEVEL=y
CONFIG_USE_STRIP=y
# CONFIG_SIGNED_PACKAGES is not set
CONFIG_JSON_CYCLONEDX_SBOM=y
CONFIG_INCLUDE_CONFIG=y
# Image #
CONFIG_TARGET_CUSTOMER="IOPSYS"
CONFIG_TARGET_ROOTFS_TARGZ=y
# Although UBIFS and EXT4 images work on all non-secure-boot devices,
# squashfs is the only officially supported rootfs filesystem.
# A writable rootfs is useful for developping an debugging preinit code.
# CONFIG_TARGET_ROOTFS_UBIFS is not set
# CONFIG_TARGET_ROOTFS_EXT4FS is not set
# /etc/banner and /etc/device_info #
CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
@@ -55,7 +64,6 @@ CONFIG_LOCALMIRROR="https://download.iopsys.eu/iopsys/mirror/"
################
# EasySoC HAL #
CONFIG_PACKAGE_inbd=y
CONFIG_PACKAGE_qosmngr=y
CONFIG_PACKAGE_libwifiutils=y
CONFIG_PACKAGE_wifimngr=y
@@ -71,6 +79,7 @@ CONFIG_PACKAGE_map-controller=y
# Network #
CONFIG_PACKAGE_hostmngr=y
CONFIG_PACKAGE_netmode=y
CONFIG_PACKAGE_testnet=y
CONFIG_PACKAGE_urlfilter=y
# System #
@@ -94,6 +103,7 @@ CONFIG_PACKAGE_udpecho-server=y
CONFIG_PACKAGE_userinterface=y
CONFIG_PACKAGE_xmppc=y
CONFIG_PACKAGE_timemngr=y
CONFIG_PACKAGE_self-diagnostics=y
# WebGUI #
CONFIG_PACKAGE_sulu=y
@@ -133,7 +143,6 @@ CONFIG_PACKAGE_wwan=y
CONFIG_PACKAGE_xl2tpd=y
# Services #
CONFIG_PACKAGE_atftp=y
CONFIG_PACKAGE_atftpd=y
CONFIG_PACKAGE_ddns-scripts=y
CONFIG_PACKAGE_dnsmasq=y
@@ -169,8 +178,9 @@ CONFIG_PACKAGE_iptables-mod-ipmark=y
CONFIG_PACKAGE_iptables-mod-ipopt=y
CONFIG_PACKAGE_iptables-mod-nflog=y
CONFIG_PACKAGE_iptables-mod-nfqueue=y
CONFIG_PACKAGE_iputils-arping=y
CONFIG_PACKAGE_iputils-ping=y
CONFIG_PACKAGE_ndisc6=y
CONFIG_PACKAGE_nping=y
CONFIG_PACKAGE_rdisc6=y
CONFIG_PACKAGE_resolveip=y
CONFIG_PACKAGE_socat=y
@@ -186,6 +196,7 @@ CONFIG_PACKAGE_at=y
CONFIG_PACKAGE_ca-certificates=y
CONFIG_PACKAGE_crun=y
CONFIG_PACKAGE_getopt=y
CONFIG_PACKAGE_gpiod-tools=y
# CONFIG_PACKAGE_iwatchdog is not set
CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_libcap-bin=y
@@ -238,12 +249,10 @@ CONFIG_PACKAGE_nginx-mod-luci=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_ADDUSER=y
CONFIG_BUSYBOX_CONFIG_ARPING=y
CONFIG_BUSYBOX_CONFIG_ASH_IDLE_TIMEOUT=y
CONFIG_BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_BUSYBOX_CONFIG_CTTYHACK=y
CONFIG_BUSYBOX_CONFIG_DELUSER=y
# CONFIG_BUSYBOX_CONFIG_DEVMEM is not set
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_BUSYBOX_CONFIG_FIRST_SYSTEM_ID=100
# CONFIG_BUSYBOX_CONFIG_HTTPD is not set
@@ -320,3 +329,8 @@ CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_SQUASHFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VOLUMEID_UBIFS=y
CONFIG_BUSYBOX_CONFIG_TIMEOUT=y
CONFIG_BUSYBOX_CONFIG_NOHUP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="sha512"
# CONFIG_BUSYBOX_CONFIG_ARPING is not set
# CONFIG_BUSYBOX_CONFIG_PING is not set
# CONFIG_BUSYBOX_CONFIG_PING6 is not set
# CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_PING is not set

View File

@@ -4,7 +4,18 @@ function feeds_update {
heads=1
developer=0
override=1
while getopts "inh" opt; do
force=1
function update_failure {
if [ $force == 1 ]; then
echo "WARNING: Failed to update feed(s). Forced update, proceeding anyway." >&2
else
echo "ERROR: Failed to update feed(s). Omit -F to proceed anyway." >&2
exit 1
fi
}
while getopts "inFh" opt; do
case $opt in
i)
heads=0
@@ -12,12 +23,16 @@ function feeds_update {
n)
override=0
;;
F)
force=0
;;
h|\?)
echo "Usage: ./iop feeds_update [-i] [-n] [-h]"
echo "Usage: ./iop feeds_update [-i] [-n] [-F] [-h]"
echo
echo "OPTIONS:"
echo " -i - Only update index. Do not change HEAD in feeds."
echo " -n - Do not replace core packages with iopsys versions."
echo " -F - Do not force update if there are inaccessible feeds."
echo " -h - Display this help message and exit."
exit 1
;;
@@ -30,9 +45,9 @@ function feeds_update {
if [ $heads == 1 ]; then
if [ $developer == 1 ]; then
./scripts/feeds update -g
./scripts/feeds update -g || update_failure
else
./scripts/feeds update
./scripts/feeds update || update_failure
fi
fi
./scripts/feeds update -ai || exit 1
@@ -40,12 +55,13 @@ function feeds_update {
# replace core packages with iopsys versions
if [ $override == 1 ]; then
./scripts/feeds install -f -p openwrt_core -a || exit 1
./scripts/feeds install -f -p qualcomm -a || exit 1
fi
(
echo '# DO NOT EDIT. Autogenerated file by ./iop feeds_update'
echo 'FEED_DEVICES_DIRS:='
find feeds -type f -name .is-feed-devices-dir -printf 'FEED_DEVICES_DIRS+=$(TOPDIR)/%h'
find feeds -type f -name .is-feed-devices-dir -printf 'FEED_DEVICES_DIRS+=$(TOPDIR)/%h\n'
) > target/linux/feed-devices/feed-devices-list.mk || exit 1
# targets need to be installed explicitly

View File

@@ -2,6 +2,7 @@
function genconfig {
export CLEAN=0
export DIRTY="--dirty"
export IMPORT=1
export SRCTREEOVERR=0
export FILEDIR="files/"
@@ -16,7 +17,7 @@ function genconfig {
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
armsr_feed="target/linux/feeds/armsr"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
@@ -108,8 +109,8 @@ function genconfig {
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $armsr_feed/genconfig ] &&
armsr=$(cd $armsr_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
@@ -118,7 +119,7 @@ function genconfig {
ipq53xx=$(cd $qualcomm_ipq53xx_feed; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
for list in brcmbca airoha x86 armsr mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
@@ -144,10 +145,10 @@ function genconfig {
fi
done
for p in $armvirt; do
for p in $armsr; do
if [ $p == $profile ]; then
target="armvirt"
target_config_path="$armvirt_feed/config"
target="armsr"
target_config_path="$armsr_feed/config"
return
fi
done
@@ -198,6 +199,7 @@ function genconfig {
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -D|--no-dirty\t\tIgnore dirty tree"
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
@@ -363,11 +365,27 @@ function genconfig {
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
local custom_found=false
local used_config_file
for config_file in feeds/*/devices/$target/config/$BOARDTYPE/config; do
if [ "$custom_found" = "true" ]; then
echo
echo "Error was found!"
echo "Please use only one path."
echo "Two instances of $target/config/$BOARDTYPE exists:"
echo "Path 1: $used_config_file"
echo "Path 2: $config_file"
return 1
fi
if [ -f "$config_file" ]; then
cat "$config_file" >> .config
echo "" >> .config
custom_found=true
used_config_file=$config_file
fi
done
# Special handling for targets which use TARGET_DEVICES
case "$target" in
airoha | mediatek | brcmbca | ipq95xx | ipq53xx)
@@ -413,10 +431,19 @@ function genconfig {
fi
done
fi
# Ensure strict file permissions, for when provided through the above
if [ -f "$FILEDIR/etc/shadow" ]; then
v "chmod 0600 $FILEDIR/etc/shadow"
chmod 0600 "$FILEDIR/etc/shadow"
fi
if [ -d "$FILEDIR/etc/ssl/private" ]; then
v "find $FILEDIR/etc/ssl/private -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'"
find "$FILEDIR/etc/ssl/private" -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'
fi
# Set target version
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
if ! git_version="$(git describe --always $DIRTY --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
@@ -483,6 +510,7 @@ function genconfig {
case "$1" in
-c|--clean) export CLEAN=1;;
-D|--no-dirty) export DIRTY="";;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;

View File

@@ -2,6 +2,7 @@
function genconfig_min {
export CLEAN=0
export DIRTY="--dirty"
export SRCTREEOVERR=0
export FILEDIR="files/"
CURRENT_CONFIG_FILE=".current_config_file"
@@ -15,7 +16,7 @@ function genconfig_min {
brcmbca_feed="target/linux/feeds/brcmbca"
airoha_feed="target/linux/feeds/airoha"
x86_feed="target/linux/feeds/x86"
armvirt_feed="target/linux/feeds/armvirt"
armsr_feed="target/linux/feeds/armsr"
mediatek_feed="target/linux/feeds/mediatek"
qualcomm_ipq95xx_feed="target/linux/feeds/ipq95xx"
qualcomm_ipq53xx_feed="target/linux/feeds/ipq53xx"
@@ -107,8 +108,8 @@ function genconfig_min {
airoha=$(cd $airoha_feed; ./genconfig)
[ -e $x86_feed/genconfig ] &&
x86=$(cd $x86_feed; ./genconfig)
[ -e $armvirt_feed/genconfig ] &&
armvirt=$(cd $armvirt_feed; ./genconfig)
[ -e $armsr_feed/genconfig ] &&
armsr=$(cd $armsr_feed; ./genconfig)
[ -e $mediatek_feed/genconfig ] &&
mediatek=$(cd $mediatek_feed; ./genconfig)
[ -e $qualcomm_ipq95xx_feed/genconfig ] &&
@@ -117,7 +118,7 @@ function genconfig_min {
ipq53xx=$(cd $qualcomm_ipq53xx_feed; ./genconfig)
if [ "$profile" == "LIST" ]; then
for list in brcmbca airoha x86 armvirt mediatek ipq95xx ipq53xx; do
for list in brcmbca airoha x86 armsr mediatek ipq95xx ipq53xx; do
echo "$list based boards:"
a=$(echo "${!list}" | sort)
for b in $a; do
@@ -143,10 +144,10 @@ function genconfig_min {
fi
done
for p in $armvirt; do
for p in $armsr; do
if [ $p == $profile ]; then
target="armvirt"
target_config_path="$armvirt_feed/config"
target="armsr"
target_config_path="$armsr_feed/config"
return
fi
done
@@ -197,6 +198,7 @@ function genconfig_min {
echo 1>&2 "Usage: $0 [ OPTIONS ] < Board_Type > [ Customer [customer2 ]...]"
echo
echo -e " -c|--clean\t\tRemove all files under ./files and import from config "
echo -e " -D|--no-dirty\t\tIgnore dirty tree"
echo -e " -v|--verbose\t\tVerbose"
echo -e " -n|--no-update\tDo NOT! Update customer config before applying"
echo -e " -t|--target\t\tExplicitly specify the linux target to build the board profile from"
@@ -337,10 +339,26 @@ function genconfig_min {
echo "" >> .config
fi
# hack to support custom-devices until we have deprecated this genconfig-script...
if [ -f "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" ]; then
cat "feeds/custom_devices/devices/$target/config/$BOARDTYPE/config" >> .config
echo "" >> .config
fi
local custom_found=false
local used_config_file
for config_file in feeds/*/devices/$target/config/$BOARDTYPE/config; do
if [ "$custom_found" = "true" ]; then
echo
echo "Error was found!"
echo "Please use only one path."
echo "Two instances of $target/config/$BOARDTYPE exists:"
echo "Path 1: $used_config_file"
echo "Path 2: $config_file"
return 1
fi
if [ -f "$config_file" ]; then
cat "$config_file" >> .config
echo "" >> .config
custom_found=true
used_config_file=$config_file
fi
done
# Special handling for targets which use TARGET_DEVICES
case "$target" in
@@ -387,10 +405,19 @@ function genconfig_min {
fi
done
fi
# Ensure strict file permissions, for when provided through the above
if [ -f "$FILEDIR/etc/shadow" ]; then
v "chmod 0600 $FILEDIR/etc/shadow"
chmod 0600 "$FILEDIR/etc/shadow"
fi
if [ -d "$FILEDIR/etc/ssl/private" ]; then
v "find $FILEDIR/etc/ssl/private -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'"
find "$FILEDIR/etc/ssl/private" -type d -exec chmod 0700 '{}' ';' -o -type f -exec chmod 0600 '{}' ';'
fi
# Set target version
local git_version
if ! git_version="$(git describe --always --dirty --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
if ! git_version="$(git describe --always $DIRTY --tags --match '[0-9].*.*' --match '[0-9][0-9].*.*')"; then
echo "ERROR: Failed getting version via git describe, exiting." >&2
return 1
fi
@@ -451,6 +478,7 @@ function genconfig_min {
case "$1" in
-c|--clean) export CLEAN=1;;
-D|--no-dirty) export DIRTY="";;
-n|--no-update) export IMPORT=0;;
-v|--verbose) export VERBOSE="$(($VERBOSE + 1))";;
-t|--target) export TARGET="$2"; shift;;

57
libdpp/Makefile Normal file
View File

@@ -0,0 +1,57 @@
#
# Copyright (C) 2020-2023 Iopsys
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libdpp
PKG_VERSION:=2.0.0
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=f22959b107a8bf443d04d6261d00074b5514dfe8
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/libdpp.git
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/libdpp/description
Library providing APIs for DPP EasyConnect frame generation and handling
endef
define Package/libdpp
TITLE:= DPP EasyConnect library (libdpp)
DEPENDS:= +libeasy +libopenssl +libgcrypt +libubox +libwifiutils
endef
MAKE_PATH:=lib
define Build/InstallDev/libdpp
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/dpp_api.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/lib/dpputils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/lib/libdpp.so* $(1)/usr/lib/
endef
define Build/InstallDev
$(call Build/InstallDev/libdpp,$(1),$(2))
endef
define Package/libdpp/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/lib/libdpp.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libdpp))

View File

@@ -24,8 +24,9 @@ include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
CONFIG_ID=$(SUBTARGET:bcm%=BCM%)
CHIP_ID=$(CONFIG_ID:BCM9%=%)
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_$(CONFIG_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libeasy
PKG_VERSION:=7.2.100
PKG_VERSION:=7.4.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=32db1b79bd88eba85a3e7518dbbbd1e29f4b06d9
PKG_SOURCE_VERSION:=0f16f1bd7d995427f0c4601b4e1e595224321df2
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libeasy.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -50,6 +50,9 @@ define Build/InstallDev/libeasy
$(CP) $(PKG_BUILD_DIR)/easy.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/event.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/bufutil.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/cryptutil.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/ecc_cryptutil.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/if_utils.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/debug.h $(1)/usr/include/easy/
$(CP) $(PKG_BUILD_DIR)/hlist.h $(1)/usr/include/easy/

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.105
PKG_VERSION:=7.2.112
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4a363a699c4a8024054ca095f1b7818f8bd56ded
PKG_SOURCE_VERSION:=3853c55573fda0a21abdb9572d0315552520262b
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libethernet.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -24,8 +24,9 @@ include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
CONFIG_ID=$(SUBTARGET:bcm%=BCM%)
CHIP_ID=$(CONFIG_ID:BCM9%=%)
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_$(CONFIG_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/shared/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libqos
PKG_VERSION:=7.2.105
PKG_VERSION:=7.2.106
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=78cc1481feff7adc09749e73a3513fae4d9ded28
PKG_SOURCE_VERSION:=02dba6571fddd9b4c5b4b671270604b4c0faf9ae
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -24,8 +24,9 @@ include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
CONFIG_ID=$(SUBTARGET:bcm%=BCM%)
CHIP_ID=$(CONFIG_ID:BCM9%=%)
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_$(CONFIG_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.0.7
PKG_VERSION:=1.0.13
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=5e1befd02c6734ee8b94b7ef54d6171ba1086042
PKG_SOURCE_VERSION:=529581176d0e82f928230bc047b842326b340365
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -0,0 +1,21 @@
#!/bin/sh
hasVoice=$(db -q get hw.board.hasVoice)
[ "$hasVoice" = "1" ] || { rm -f "/etc/config/asterisk"; return; }
source /lib/voice/config_asterisk.sh
default_asterisk_config
SLIC=`cat /proc/device-tree/airoha-voice/slic-type`
[ "${SLIC#pef}" != "${SLIC}" ] || return
echo Configure TxGain and RxGain for MXL SLIC $SLIC
ports=$(db -q get hw.board.VoicePorts)
for p in $(seq 0 $((ports-1))); do
uci set asterisk.extension${p}.txgain='10'
uci set asterisk.extension${p}.rxgain='-15'
done
uci commit asterisk

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-broadcom
PKG_RELEASE:=1
PKG_VERSION:=1.0.5
PKG_VERSION:=1.0.9
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=8c8fa2b70e2bd570deb291478b31fa81a4ab3c1a
PKG_SOURCE_VERSION:=99ed0ea5ef83cebb444d135909573ccb2b37fe45
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -28,7 +28,7 @@ PKG_CONFIG_DEPENDS:=CONFIG_TARGET_BOARD
LIBVOICE_PKG_BUILD_DIR := $(PKG_BUILD_DIR)
export CONFIG_BCM_CHIP_ID
export BCM_CHIP_ID:=$(SUBTARGET)
include $(INCLUDE_DIR)/package.mk

View File

@@ -0,0 +1,10 @@
#!/bin/sh
hasVoice=$(db -q get hw.board.hasVoice)
[ "$hasVoice" = "1" ] || { rm -f "/etc/config/asterisk"; return; }
source /lib/voice/config_asterisk.sh
default_asterisk_config

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-d2
PKG_RELEASE:=1
PKG_VERSION:=1.0.12
PKG_VERSION:=1.1.2
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,7 +17,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=e60fdaa93e1385bbea08751dcd392cddffdf3345
PKG_SOURCE_VERSION:=e6d689334000bc57498d9a3f203a8933160e1ef4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.4.3
PKG_VERSION:=7.4.16.17
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=66cd6a376308ab28b0650883e6ba7bb1952ce6fc
PKG_SOURCE_VERSION:=05406d9ece1b3288beabf5986305cb9929a59f75
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -26,8 +26,9 @@ include $(INCLUDE_DIR)/package.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
TARGET_WIFI_TYPE=BROADCOM
CHIP_ID=$(patsubst "%",%,$(CONFIG_BCM_CHIP_ID))
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_BCM9$(CHIP_ID) \
CONFIG_ID=$(SUBTARGET:bcm%=BCM%)
CHIP_ID=$(CONFIG_ID:BCM9%=%)
TARGET_CFLAGS +=-DIOPSYS_BROADCOM -DCHIP_$(CHIP_ID) -DCONFIG_$(CONFIG_ID) \
-I$(STAGING_DIR)/usr/include/bcm963xx/bcmdrivers/opensource/include/bcm963xx \
-I$(STAGING_DIR)/usr/include/bcm963xx/userspace/public/include
else ifeq ($(CONFIG_TARGET_x86),y)
@@ -75,6 +76,10 @@ ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
endif
ifeq ($(CONFIG_LIBWIFI_SKIP_PROBES),y)
TARGET_CFLAGS +=-DLIBWIFI_BRCM_SKIP_PROBES
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
@@ -143,6 +148,11 @@ define Package/libwifi/config
config LIBWIFI_USE_CTRL_IFACE
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
default n
config LIBWIFI_SKIP_PROBES
bool "Don't create probe-req events"
default y
endif
endef

View File

@@ -52,5 +52,11 @@ config AGENT_OPER_CHANNEL_CHANGE_RELAY_MCAST
bool "Use config opt to determine if Oper Channel Report CMDU is send as relayed multicast or directly to controller"
default y
config AGENT_USE_LIBDPP
bool "Depend on libdpp for DPP EasyConnect"
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.3.7.0
PKG_VERSION:=4.5.0.33
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=03a85b04d10c08dccd96381ef6f2ece91d16dc52
PKG_SOURCE_VERSION:=4d18c2b1921e9c239a938f23cba516cf867baba4
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -28,9 +28,12 @@ define Package/map-agent
CATEGORY:=Utilities
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+map-plugin +ip-bridge
+map-plugin +ip-bridge +AGENT_USE_LIBDPP:libdpp
endef
ifeq ($(CONFIG_AGENT_USE_LIBDPP),y)
TARGET_CFLAGS += -DUSE_LIBDPP
endif
define Package/dynbhd
SECTION:=utils
@@ -102,6 +105,10 @@ ifeq ($(CONFIG_AGENT_OPER_CHANNEL_CHANGE_RELAY_MCAST),y)
TARGET_CFLAGS += -DOPER_CHAN_CHANGE_RELAY_MCAST
endif
ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif
MAKE_PATH:=src
define Package/map-agent/install

View File

@@ -1,14 +1,14 @@
config agent 'agent'
option enabled '0'
option enabled '1'
option debug '0'
option profile '4'
option profile '3'
option al_bridge 'br-lan'
option netdev 'wlan'
option island_prevention '0'
option island_prevention '1'
option eth_onboards_wifi_bhs '1'
option scan_on_boot_only '0'
option chan_ch_relay_mcast '1'
option guest_isolation '1'
option dyn_cntlr_sync '0'
list map_port 'all'
# option controller_macaddr '0a:1b:2c:3d:4e:50'

View File

@@ -1,17 +1,19 @@
#!/bin/sh
. /lib/network/utils.sh
conn_ports_file="/var/run/multiap/map.connected.ports"
map_bh_file="/var/run/multiap/multiap.backhaul"
# Exit if AL Bridge is not configured to be a bridge device
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
[ "${al_bridge:0:3}" = "br-" ] || exit 0
al_brnet="${al_bridge:3}"
# Exit if the PORT is not member of the AL Bridge
[ "$(get_network_of $PORT)" = "$al_brnet" ] || exit 0
port_bridge_sec="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
# Exit if the device is not operating in extender/repeater mode
al_brnet="${al_bridge:3}"
[ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ] || exit 0
############## Dynamic Backhaul Daemon ##############
@@ -69,7 +71,7 @@ fi
remove_from_bridge() {
config_get ifname "$section" ifname
[ -n "$ifname" ] && ubus call network.interface.${al_brnet} remove_device '{"name":"$ifname"}'
[ -n "$ifname" ] && brctl delif ${al_bridge} ${ifname}
}
update_bstas() {

View File

@@ -5,8 +5,8 @@
generate_mapagent_config=0
generate_wireless_sta_config=0
network_mode="$(fw_printenv -n netmode)"
multiap_mode="$(fw_printenv -n multiap_mode)"
network_mode="$(fw_printenv -n netmode)" # default is layer3
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
is_airoha() {
[ -f /proc/device-tree/compatible ] || return
@@ -19,8 +19,8 @@ is_broadcom() {
}
is_qualcomm() {
[ -f /proc/device-tree/compatible ] || return
strings /proc/device-tree/compatible | grep -qE '^(qcom,|ipq,)'; return
[ -d /sys/module/ath12k ] && return 0
return 1
}
generate_multiap_config() {
@@ -80,6 +80,7 @@ generate_multiap_config() {
ifprefix="wlan0%-"
ifname="wlan${devidx}"
ifname_bh="wlan${devidx}-1"
ap_follow_sta_dfs="1"
else
ifprefix="wlan%-"
ifname="wlan$devidx"
@@ -89,6 +90,7 @@ generate_multiap_config() {
if [ $generate_mapagent_config -eq 1 ]; then
uci set mapagent.agent.ifprefix="$ifprefix"
uci set mapagent.agent.brcm_setup="$brcm_setup"
uci set mapagent.agent.ap_follow_sta_dfs="$ap_follow_sta_dfs"
uci add mapagent radio
uci set mapagent.@radio[-1].device="$device"
uci set mapagent.@radio[-1].band="$mode_band"
@@ -179,20 +181,19 @@ map_genconf () {
elif [ "$multiap_mode" == "auto" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=0
elif [ "$multiap_mode" == "full" ]; then
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
elif [ "$multiap_mode" == "none" ]; then
uci set mapagent.agent.enabled="0"
else # default to full
uci -q set mapagent.@controller_select[0].autostart=1
uci -q set mapagent.@controller_select[0].local=1
fi
uci -q commit mapagent
fi
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
if [ "$multiap_mode" == "agent" -o "$multiap_mode" == "none" ]; then
uci set mapcontroller.controller.enabled="0"
else
uci set mapcontroller.controller.enabled="1"
fi
uci -q commit mapcontroller
fi
uci -q commit mapcontroller
}

View File

@@ -26,5 +26,13 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
enabled through CONTROLLER_EASYMESH_VENDOR_EXT. Please provide the Vendor's OUI
through which such features would be exposed.
config CONTROLLER_USE_LIBDPP
bool "Depend on libdpp for DPP EasyConnect"
config CONTROLLER_PROPAGATE_PROBE_REQ
depends on CONTROLLER_EASYMESH_VENDOR_EXT
bool "Enable publishing probe requests vendor specific messages as UBUS events"
default y
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.3.3.0
PKG_VERSION:=4.5.0.22
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=cc50001914d500655ffdb8eede3c38f650417209
PKG_SOURCE_VERSION:=e023f06cb637fec289db4a17a929dc047655ad33
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0
@@ -27,9 +27,15 @@ define Package/map-controller
SECTION:=utils
CATEGORY:=Utilities
TITLE:=WiFi Multi-AP Controller (EasyMesh R2)
DEPENDS:=+libuci +libubox +ubus +libeasy +libwifiutils +libieee1905 +ieee1905 +map-plugin
DEPENDS:=+libuci +libubox +ubus +libeasy +libwifiutils +libieee1905 +ieee1905 +map-plugin \
+CONTROLLER_USE_LIBDPP:libdpp
endef
ifeq ($(CONFIG_CONTROLLER_USE_LIBDPP),y)
TARGET_CFLAGS += -DUSE_LIBDPP
endif
define Package/map-controller/description
This package provides WiFi MultiAP Controller as per the EasyMesh-R2 specs.
endef
@@ -57,6 +63,10 @@ TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT_OUI=$(CONFIG_CONTROLLER_EASYMESH_VENDOR_E
TARGET_CFLAGS += -DEASYMESH_VENDOR_EXT
endif
ifeq ($(CONFIG_CONTROLLER_PROPAGATE_PROBE_REQ),y)
TARGET_CFLAGS += -DPROPAGATE_PROBE_REQ
endif
define Package/map-controller/install
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/

View File

@@ -1,6 +1,6 @@
config controller 'controller'
option enabled '1' # may be modified by other package start-up scripts (i.e. map-agent)
option profile '4'
option profile '3'
option registrar '2 5 6'
option debug '0'
option bcn_metrics_max_num '10'

View File

@@ -5,7 +5,7 @@
WIFI_BH_KEY=$(openssl rand -rand /dev/urandom -hex 64 2>/dev/null | openssl dgst -hex -sha256 | cut -d " " -f 2)
WIFI_BH_KEY=${WIFI_BH_KEY::-1}
BASEMAC_ADDR="$(fw_printenv -n ethaddr | tr -d ':')"
BASEMAC_ADDR="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
[ ${#BASEMAC_ADDR} -eq 12 ] || BASEMAC_ADDR="$(db -q get device.deviceinfo.BaseMACAddress | tr -d ':')"
WIFI_FH_KEY="$(db get hw.board.wpa_key)"

View File

@@ -39,7 +39,6 @@ config_snooping_upstream_interface() {
local snooping_upstream_intf=""
json_load "$(devstatus $1)"
logger -t "mcastconf" "$(devstatus $1)"
itr=1
json_select bridge-members
@@ -49,7 +48,7 @@ config_snooping_upstream_interface() {
*.*)
port="$(echo "$dev" | cut -d'.' -f 1)"
if [ $port == $ethwan ]; then
ifconfig $dev | grep RUNNING >/dev/null && $snooping_upstream_intf="$dev" && break
ifconfig $dev | grep RUNNING >/dev/null && snooping_upstream_intf="$dev" && break
fi
;;
esac

View File

@@ -89,15 +89,24 @@ interfaces_ok(){
# check if upstream untagged
IFS=" "
for itf in $up_interf; do
# check if there exist a device section for this upstream interface, if yes the
# do nothing, if no then split the it at . and use the native interface as
# upstream interface
dev_section=$(ubus call uci get '{"config":"network", "type":"device", "match":{"name":"'"$itf"'"}}' | jsonfilter -e @.values | jq keys[])
# check if there exist a interface section for this upstream interface, if yes the
# do nothing, if no then generate config as mcast config is outdated
local dev_section=$(uci show network | grep -E "\.device=\'$itf\'" | head -n 1 | cut -d'.' -f2)
# mcast config is outdated, simply generate as per new logic
if [ -z "$dev_section" ]; then
# check if the itf is a native interface && return 1
[ -f "/proc/net/vlan/$itf" ] || return 1
return 1
else
section_type=$(uci get network.$dev_section)
if [ "$section_type" == "interface" ]; then
# interface section exits, hence, sync has already happened
# nothing to do further, just return
return 0
else
# mcast config is outdated
return 1
fi
fi
done
return 0

View File

@@ -62,7 +62,7 @@ read_snooping() {
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
config_get proto "$config" proto "igmp"
if [ "$sec_enable" == "0" ]; then
return
@@ -103,7 +103,7 @@ read_proxy() {
local proto
config_get sec_enable "$config" enable 0
config_get proto "$config" proto
config_get proto "$config" proto "igmp"
if [ "$sec_enable" == "0" ]; then
return

View File

@@ -10,10 +10,12 @@ PROG_EXE=/usr/sbin/mcproxy
PROG_PARAMS=
PROG_PARAMS_SEPARATOR=:
snooping_bridges=
__device_is_bridge() {
local device="$2"
local devsec__="$(uci show network | grep name=.*$device | cut -d'.' -f2)"
local devsec__="$(uci show network | grep -F ".name='$device'" | cut -d'.' -f2)"
local sectype="$(uci -q get network.$devsec__)"
local devtype="$(uci -q get network.$devsec__.type)"
[ "$sectype" != "device" -o "$devtype" != "bridge" ] && return 1
@@ -44,9 +46,6 @@ device_has_ip() {
# Read the openwrt interface for the device.
# Device can have multiple logical interfaces like wan and wan6
# but same l3 device
# NB. Don't use 'get_network_of' here.
# This function fails in some uci configurations for interfaces that refer
# to a device indirectly.
local ifaces=$(ubus call network.interface dump | jsonfilter -e "@.interface[@.device='$device'].interface")
for iface in $ifaces; do
local ip=
@@ -86,9 +85,8 @@ config_mcproxy_interfaces() {
echo -e "pinstance main:$str_up ==>$str_down;\n" >> $CONFFILE
local filter=""
for excp in $exceptions; do
local filter=""
case $excp in
*/*)
ip_start="$(ipcalc.sh $excp | grep IP | awk '{print substr($0,4)}')"
@@ -99,25 +97,27 @@ config_mcproxy_interfaces() {
filter="$filter ($excp | *)"
;;
esac
done
for upstream in $str_up; do
echo "pinstance main upstream $upstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream $upstream out blacklist table{$filter };" >> $CONFFILE
done
for upstream in $str_up; do
echo "pinstance main upstream $upstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main upstream $upstream out blacklist table{$filter };" >> $CONFFILE
done
for downstream in $str_down; do
echo "pinstance main downstream $downstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main downstream $downstream out blacklist table{$filter };" >> $CONFFILE
done
for downstream in $str_down; do
echo "pinstance main downstream $downstream in blacklist table{$filter };" >> $CONFFILE
echo "pinstance main downstream $downstream out blacklist table{$filter };" >> $CONFFILE
done
}
config_sysfs_mcast_snooping() {
local downstreams="$1"
local snooping="$2"
for downstream in $downstreams; do
if device_is_bridge "$downstream"; then
echo 1 > /sys/class/net/$downstream/bridge/multicast_snooping
echo 0 > /sys/class/net/$downstream/bridge/multicast_snooping
echo $snooping > /sys/class/net/$downstream/bridge/multicast_snooping
fi
done
}
@@ -136,7 +136,53 @@ config_sysfs_mcast_fastleave() {
done
}
config_sysfs_mcast_mode() {
config_sysfs_mcast_version() {
local protocol="$1"
local interfaces="$2"
local version="$3"
for iface in $interfaces; do
echo $version > /sys/class/net/$iface/bridge/multicast_"$protocol"_version
done
}
config_sysfs_mcast_robustness() {
local interfaces="$1"
local robustness="$2"
for iface in $interfaces; do
echo $robustness > /sys/class/net/$iface/bridge/multicast_last_member_count
done
}
config_sysfs_mcast_query_interval() {
local interfaces="$1"
local query_interval="$2"
for iface in $interfaces; do
echo $query_interval > /sys/class/net/$iface/bridge/multicast_query_interval
done
}
config_sysfs_mcast_q_resp_interval() {
local interfaces="$1"
local q_resp_interval="$2"
for iface in $interfaces; do
echo $q_resp_interval > /sys/class/net/$iface/bridge/multicast_query_response_interval
done
}
config_sysfs_mcast_last_mem_q_int() {
local interfaces="$1"
local last_mem_q_int="$2"
for iface in $interfaces; do
echo $last_mem_q_int > /sys/class/net/$iface/bridge/multicast_last_member_interval
done
}
config_sysfs_mcast_flood() {
local downstreams=$1
local mcast_mode=$2
local prt
@@ -157,6 +203,25 @@ config_sysfs_mcast_mode() {
done
}
config_snooping_mode() {
local interfaces="$1"
local snooping="$2"
# snooping_mode:
# 0 - snooping is disabled
# 1 - multicast flood is enabled
# 2 - multicast flood is disabled
[ -z "$snooping_mode" ] && snooping_mode=2
if [ "$snooping_mode" == 0 ]; then
config_sysfs_mcast_snooping "$interfaces" 0
else
config_sysfs_mcast_snooping "$interfaces" 1
fi
config_sysfs_mcast_flood "$interfaces" "$snooping_mode"
}
config_mcproxy_instance() {
local protocol="$1"
local version="$2"
@@ -195,6 +260,7 @@ config_mcproxy_instance() {
upstreams=$igmp_p_up_interfaces
downstreams=$igmp_p_down_interfaces
mcast_mode=$igmp_p_mode
elif [ "$protocol" == "mld" ]; then
case "$version" in
[1-2])
@@ -228,21 +294,114 @@ config_mcproxy_instance() {
# for snooping to work we should enable it on the bridge, doing it from
# here instead of from inside network config
config_sysfs_mcast_snooping "$downstreams"
[ -n $fast_leave ] &&
config_sysfs_mcast_fastleave "$downstreams" "$fast_leave"
config_sysfs_mcast_mode "$downstreams" "$mcast_mode"
if [ "$downstreams" != "$snooping_bridges" ]; then
if [ "$mcast_mode" == "0" ]; then
config_sysfs_mcast_snooping "$downstreams" 0
else
config_sysfs_mcast_snooping "$downstreams" 1
fi
[ -n $fast_leave ] &&
config_sysfs_mcast_fastleave "$downstreams" "$fast_leave"
config_sysfs_mcast_flood "$downstreams" "$mcast_mode"
fi
PROG_PARAMS="${PROG_PARAMS} -f ${CONFFILE}${PROG_PARAMS_SEPARATOR}"
}
disable_snooping_iface() {
local iface="$(uci -q get network.$1.name)"
config_sysfs_mcast_snooping "$iface" 0
}
disable_snooping() {
config_load network
config_foreach disable_snooping_iface device
}
config_snooping() {
local protocol="$1"
local version=
local robustness=
local query_interval=
local q_resp_interval=
local last_mem_q_int=
local fast_leave=0
local snooping_mode=
local interfaces=
local HZ=100
local all_interfaces=
if [ "$protocol" == "igmp" ]; then
all_interfaces=$igmp_s_iface
elif [ "$protocol" == "mld" ]; then
all_interfaces=$mld_s_iface
fi
for iface in $all_interfaces; do
device_is_bridge "$iface" || continue
interfaces="$interfaces $iface"
done
[ -z "$interfaces" ] && return
snooping_bridges="$interfaces"
if [ "$protocol" == "igmp" ]; then
case "$igmp_s_version" in
[1-3])
version="$igmp_s_version"
;;
*)
version="2"
;;
esac
robustness=$igmp_s_robustness
query_interval=$(( igmp_s_query_interval * HZ ))
q_resp_interval=$(( igmp_s_q_resp_interval * HZ / 10 ))
last_mem_q_int=$(( igmp_s_last_mem_q_int * HZ / 10 ))
fast_leave=$igmp_s_fast_leave
snooping_mode=$igmp_s_mode
elif [ "$protocol" == "mld" ]; then
case "$mld_s_version" in
[1-2])
version="$mld_s_version"
;;
*)
version="2"
;;
esac
robustness=$mld_s_robustness
query_interval=$(( mld_s_query_interval * HZ ))
q_resp_interval=$(( mld_s_q_resp_interval * HZ / 10 ))
last_mem_q_int=$(( mld_s_last_mem_q_int * HZ / 10 ))
fast_leave=$mld_s_fast_leave
snooping_mode=$mld_s_mode
fi
config_snooping_mode "$interfaces" "$snooping_mode"
[ -n "$version" ] && config_sysfs_mcast_version "$protocol" "$interfaces" "$version"
[ -n "$robustness" ] && config_sysfs_mcast_robustness "$interfaces" "$robustness"
[ -n "$query_interval" ] && config_sysfs_mcast_query_interval "$interfaces" "$query_interval"
[ -n "$q_resp_interval" ] && config_sysfs_mcast_q_resp_interval "$interfaces" "$q_resp_interval"
[ -n "$last_mem_q_int" ] && config_sysfs_mcast_last_mem_q_int "$interfaces" "$last_mem_q_int"
[ -n "$fast_leave" ] && config_sysfs_mcast_fastleave "$interfaces" "$fast_leave"
}
config_mcproxy() {
disable_snooping
if [ "$igmp_p_enable" == "1" ]; then
config_mcproxy_instance igmp "$igmp_p_version"
elif [ "$igmp_s_enable" == "1" ]; then
config_snooping igmp "$igmp_s_version"
fi
if [ "$mld_p_enable" == "1" ]; then
config_mcproxy_instance mld "$mld_p_version"
elif [ "$mld_s_enable" == "1" ]; then
config_snooping mld "$mld_s_version"
fi
}
@@ -253,11 +412,6 @@ setup_mcast_mode() {
configure_mcast() {
config_global_params "set_max_groups_and_sources"
# mcproxy reserves two multicast subscriptions for igmp router service groups
local mg=$(cat /proc/sys/net/ipv4/igmp_max_memberships)
mg=$((mg+2))
echo $mg > /proc/sys/net/ipv4/igmp_max_memberships
read_mcast_snooping_params
read_mcast_proxy_params
config_mcproxy

View File

@@ -11,6 +11,7 @@
* Erik Karlsson - initial implementation
*/
#define _GNU_SOURCE
#include <string.h>
#include <shadow.h>
#include <crypt.h>

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmode
PKG_VERSION:=0.3.0
PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only

View File

@@ -1,10 +1,3 @@
config netmode global
option enabled 0
# option mode 'router'
#config testnet testnet
# option enabled 1
# option destination '8.8.8.8'
#config shiftrange shiftrange
# option enabled 1

View File

@@ -1,252 +0,0 @@
#!/bin/sh
# this scripts shifts the lan network prefixes
# if a wan interface has the same network prefix.
# do not shift range if the feature is explicitly disabled
[ "$(uci -q get netmode.shiftrange.enabled)" == "0" ] && exit 0
. /lib/functions.sh
. /lib/functions/network.sh
LOCKFILE="/tmp/70-shiftrange.lock"
RESTRICTED_NETS=""
ALL_NETS=""
#####
##### initial functions
#####
initial_check()
{
# run only on ifup
[ "$ACTION" == "ifup" ] || exit 0
# run only for uplink (not is_lan) interfaces
local islan="$(uci -q get network.$INTERFACE.is_lan)"
[ "$islan" != "1" ] || exit 0
# run only if the uplink interface has a configured protocol
local proto="$(uci -q get network.$INTERFACE.proto)"
[ "$proto" != "none" ] || exit 0
}
finish()
{
lock -u $LOCKFILE
rm -f $LOCKFILE
}
# just one instance of this script at a time
just_one_instance()
{
local counter=0
local limit=10
#wait for the lock to become free
while [ -e $LOCKFILE ] ; do
sleep 1
counter=$((counter + 1))
[ "$counter" -gt "$limit" ] && exit 1
done
lock $LOCKFILE
trap finish EXIT INT TERM
}
#####
##### helper functions
#####
#given a an ip and a mask in the form of "192.168.1.1/24"
#return the network address like "192.168.1.0/24"
get_network_address()
{
local ip="$1"
[ -z "$ip" ] && return
local prefix=${ip##*/}
local ip1=${ip%%.*} ; ip=${ip#*.*}
local ip2=${ip%%.*} ; ip=${ip#*.*}
local ip3=${ip%%.*} ; ip=${ip#*.*}
local ip4=${ip%%/*}
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
local mask=$((0xFFFFFFFF >> (32 - $prefix) << (32 - $prefix)))
local network=$(($ip & $mask))
local n1=$((($network & 0xFF000000) >> 24))
local n2=$((($network & 0x00FF0000) >> 16))
local n3=$((($network & 0x0000FF00) >> 8))
local n4=$(( $network & 0x000000FF))
echo "$n1.$n2.$n3.$n4/$prefix"
}
#given a network address (192.168.1.0/24)
#find the next network address (192.168.2.0/24)
next_network_address()
{
local ip=$1
local prefix=${ip##*/}
local ip1=${ip%%.*} ; ip=${ip#*.*}
local ip2=${ip%%.*} ; ip=${ip#*.*}
local ip3=${ip%%.*} ; ip=${ip#*.*}
local ip4=${ip%%/*}
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
local one="$((1 << (32-$prefix)))"
local new=$(($ip + $one))
local n1=$((($new & 0xFF000000) >> 24))
local n2=$((($new & 0x00FF0000) >> 16))
local n3=$((($new & 0x0000FF00) >> 8))
local n4=$(( $new & 0x000000FF))
echo "$n1.$n2.$n3.$n4/$prefix"
}
# given a network address and a prefix (192.168.2.0/24)
# return the first host ip available (192.168.2.1)
first_host_in_network ()
{
local ip=$1
local prefix=${ip##*/}
local ip1=${ip%%.*} ; ip=${ip#*.*}
local ip2=${ip%%.*} ; ip=${ip#*.*}
local ip3=${ip%%.*} ; ip=${ip#*.*}
local ip4=${ip%%/*}
local ip=$((($ip1 << 24) + ($ip2 << 16) + ($ip3 << 8) + $ip4))
local new=$(($ip + 1))
local n1=$((($new & 0xFF000000) >> 24))
local n2=$((($new & 0x00FF0000) >> 16))
local n3=$((($new & 0x0000FF00) >> 8))
local n4=$(( $new & 0x000000FF))
echo "$n1.$n2.$n3.$n4"
}
# given a network address,
# find the next available network address.
shift_range()
{
local net="$1"
while true ; do
if [ "$RESTRICTED_NETS" == "${RESTRICTED_NETS//$net/}" ] && [ "$ALL_NETS" == "${ALL_NETS//$net/}" ]; then
# found a net that is not in restricted nets nor in all nets
break
fi
net=$(next_network_address $net)
done
echo "$net"
}
#####
##### parse all interfaces section
#####
# RESTRICTED_NETS = all the IPs on wan interfaces
# ALL_NETS = all the IPs on any interface
parse_interface()
{
local interface=$1
local nets="" # "192.168.1.1/24"
local networks="" # "192.168.1.0/24"
config_get is_lan $interface is_lan
network_get_subnets nets $interface
for n in $nets ; do
networks="$networks $(get_network_address $n)"
done
[ "$is_lan" != "1" ] && RESTRICTED_NETS="$RESTRICTED_NETS $networks"
ALL_NETS="$ALL_NETS $networks"
}
# parse all the interfaces
# get all the IPs on wan interfaces and store them in restrict_nets
# get all the IPs on all interfaces and store them in ALL_NETS
parse_interfaces()
{
config_foreach parse_interface "interface"
}
#####
##### parse all lan interfaces section
#####
parse_lan()
{
local interface=$1
local nets=""
local ips=""
local newips=""
local ips_changed=0
[ "$interface" == "loopback" ] && return
config_get is_lan $interface is_lan
[ "$is_lan" == "1" ] || return
network_get_subnets ips $interface
for ip in $ips ; do
net="$(get_network_address $ip)"
if [ "$RESTRICTED_NETS" == "${RESTRICTED_NETS//$net/}" ] ; then
# net is not in restricted nets
# append ip to newips
[ -z "$newips" ] && newips="${ip%/*}" || newips="$newips ${ip%/*}"
continue
fi
#net is in RESTRICTED_NETS
local newnet=$(shift_range $net)
local newip="$(first_host_in_network $newnet)"
# append newip to newips
[ -z "$newips" ] && newips="$newip" || newips="$newips $newip"
ips_changed=1
logger "$0: Changing the ip on interface $interface from $ip to $newip/${newnet##*/}"
echo "$0: Changing the ip on interface $interface from $ip to $newip/${newnet##*/}" >/dev/console
done
#assign the new ips
if [ "$ips_changed" == "1" ] ; then
uci -q set network.$interface.ipaddr="$newips"
fi
}
# parse all the interface with is_lan=1
parse_lans()
{
config_foreach parse_lan "interface"
}
#####
##### main
#####
main()
{
initial_check
just_one_instance
config_load network
parse_interfaces
parse_lans
if [ -n "$(uci changes network)" ] ; then
ubus call uci commit '{"config":"network"}'
fi
}
main $@

View File

@@ -0,0 +1,114 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
source "/etc/device_info"
l2_mcast_config() {
# configure L2 mcast config for snooping
logger -s -p user.info -t "netmode" "Generating L2 mcast configuration"
# remove proxy sections
uci -q delete mcast.igmp_proxy_1
uci -q delete mcast.mc_proxy_MLD
# add igmp_snooping section
uci -q set mcast.igmp_snooping_1=snooping
uci -q set mcast.igmp_snooping_1.enable='1'
uci -q set mcast.igmp_snooping_1.proto='igmp'
uci -q set mcast.igmp_snooping_1.version='2'
uci -q set mcast.igmp_snooping_1.robustness='2'
uci -q set mcast.igmp_snooping_1.query_interval='125'
uci -q set mcast.igmp_snooping_1.query_response_interval='100'
uci -q set mcast.igmp_snooping_1.last_member_query_interval='10'
uci -q set mcast.igmp_snooping_1.fast_leave='1'
uci -q set mcast.igmp_snooping_1.snooping_mode='2'
uci -q set mcast.igmp_snooping_1.interface='br-lan'
uci -q add_list mcast.igmp_snooping_1.filter='239.0.0.0/8'
# add mld_snooping section
uci -q set mcast.mld_snooping_1=snooping
uci -q set mcast.mld_snooping_1.enable='1'
uci -q set mcast.mld_snooping_1.proto='mld'
uci -q set mcast.mld_snooping_1.version='2'
uci -q set mcast.mld_snooping_1.robustness='2'
uci -q set mcast.mld_snooping_1.query_interval='125'
uci -q set mcast.mld_snooping_1.query_response_interval='100'
uci -q set mcast.mld_snooping_1.last_member_query_interval='10'
uci -q set mcast.mld_snooping_1.fast_leave='1'
uci -q set mcast.mld_snooping_1.snooping_mode='2'
uci -q set mcast.mld_snooping_1.interface='br-lan'
uci -q commit mcast
}
l2_network_config() {
logger -s -p user.info -t "netmode" "Generating L2 network configuration"
# Configure L2 Network Mode
uci -q delete network.lan
uci -q delete network.wan
uci -q delete network.wan6
uci -q set network.lan=interface
uci -q set network.lan.proto='dhcp'
uci -q set network.lan.device='br-lan'
uci -q set network.lan.force_link='1'
uci -q set network.lan6=interface
uci -q set network.lan6.proto='dhcpv6'
uci -q set network.lan6.device='@lan'
uci -q set network.lan6.reqprefix='no'
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_select wan 2>/dev/null
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
json_cleanup
fi
uci -q commit network
# Disable DHCP Server
uci -q set dhcp.lan.ignore=1
uci -q commit dhcp
/etc/init.d/odhcpd disable
# Disable SSDPD
uci -q set ssdpd.ssdp.enabled="0"
uci -q commit ssdpd
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="lan"
uci -q commit cwmp
# disable firewall
uci -q set firewall.globals.enabled="0"
uci -q commit firewall
}
network_mode="$(fw_printenv -n netmode 2>/dev/null)"
case "$network_mode" in
layer2|extender)
l2_network_config
l2_mcast_config
;;
esac

View File

@@ -1,8 +1,4 @@
if PACKAGE_obuspa
config OBUSPA_DB_PATH
string "Configure path for usp.db file"
default "/tmp/"
config OBUSPA_MTP_ENABLE_MQTT
bool "Enable MQTT as mtp protocol"
default y
@@ -26,4 +22,17 @@ config OBUSPA_CONTROLLER_MTP_VERIFY
config OBUSPA_ENABLE_TEST_CONTROLLER
bool "Adds a test controller by default"
default n
select OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
config OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL
bool "Adds a test controller by default (local access only)"
default n
config OBUSPA_MAX_CONTROLLERS_NUM
int "The maximum number of controllers to be supported"
range 1 10
default 5
help
This value must be in range of 1 to 10. (default 5)
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=7.0.4.4
PKG_VERSION:=7.0.5.6.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=7ae856494f6cae9e81510818a7944b1259ca55b2
PKG_SOURCE_VERSION:=131e04ec5c6ddd8c2fb47f95fe7da2b9836ed925
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -19,12 +19,12 @@ endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_FIXUP:=autoreconf
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
include ../bbfdm/bbfdm.mk
define Package/obuspa
SECTION:=utils
@@ -32,7 +32,9 @@ define Package/obuspa
SUBMENU:=TRx69
TITLE:=USP agent
MENU:=1
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl +ca-certificates \
+OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-ssl +OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-client-ssl \
+OBUSPA_ENABLE_TEST_CONTROLLER:mosquitto-auth-shadow
endef
define Package/obuspa/description
@@ -45,54 +47,50 @@ endef
TARGET_CFLAGS += \
-D_GNU_SOURCE \
-DHAVE_STRERROR_R \
-Wall \
-D_DM_VENDOR_PREFIX=$(CONFIG_BBF_VENDOR_PREFIX) \
-Werror
CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=/tmp
CMAKE_OPTIONS += -DCMAKE_INSTALL_LOCALSTATEDIR=""
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)"
endif
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_STOMP),y)
CONFIGURE_ARGS += \
--enable-stomp
CMAKE_OPTIONS += -DENABLE_STOMP=ON
else
CONFIGURE_ARGS += \
--disable-stomp
CMAKE_OPTIONS += -DENABLE_STOMP=OFF
endif
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_MQTT),y)
CONFIGURE_ARGS += \
--enable-mqtt
CMAKE_OPTIONS += -DENABLE_MQTT=ON
else
CONFIGURE_ARGS += \
--disable-mqtt
CMAKE_OPTIONS += -DENABLE_MQTT=OFF
endif
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_COAP),y)
CONFIGURE_ARGS += \
--enable-coap
CMAKE_OPTIONS += -DENABLE_COAP=ON
else
CONFIGURE_ARGS += \
--disable-coap
CMAKE_OPTIONS += -DENABLE_COAP=OFF
endif
ifeq ($(CONFIG_OBUSPA_MTP_ENABLE_WEBSOCKETS),y)
CONFIGURE_ARGS += \
--enable-websockets
CMAKE_OPTIONS += -DENABLE_WEBSOCKETS=ON
else
CONFIGURE_ARGS += \
--disable-websockets
CMAKE_OPTIONS += -DENABLE_WEBSOCKETS=OFF
endif
ifdef $(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM)
TARGET_CFLAGS += -DOBUSPA_MAX_CONTROLLERS_NUM=$(CONFIG_OBUSPA_MAX_CONTROLLERS_NUM)
endif
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
$(Build/Patch)
$(CP) -rf ~/git/obuspa/* $(PKG_BUILD_DIR)/
$(Build/Patch)
endef
endif
@@ -101,7 +99,6 @@ define Package/obuspa/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/obuspa
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspa $(1)/usr/sbin/
@@ -109,13 +106,14 @@ define Package/obuspa/install
$(INSTALL_DATA) ./files/etc/config/obuspa $(1)/etc/config/
$(INSTALL_DATA) ./files/etc/obuspa/roles.json $(1)/etc/obuspa/roles.json
$(INSTALL_DATA) ./files/etc/obuspa/dmcaching_exclude.json $(1)/etc/obuspa/dmcaching_exclude.json
$(INSTALL_DATA) ./files/etc/bbfdm/json/USPAgent.json $(1)/etc/bbfdm/json/USPAgent.json
$(INSTALL_DATA) ./files/etc/bbfdm/json/TransferComplete.json $(1)/etc/bbfdm/json/TransferComplete.json
$(INSTALL_BIN) ./files/etc/uci-defaults/00-obuspa-extender-mode $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/02-obuspa-dhcp-option $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/USPAgent.json)
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)
$(INSTALL_BIN) ./files/etc/uci-defaults/54-test-usp-remote $(1)/etc/uci-defaults/
endif
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL),y)
$(INSTALL_BIN) ./files/etc/init.d/usptest $(1)/etc/init.d/
$(INSTALL_BIN) ./files/etc/uci-defaults/55-test-usp-controller $(1)/etc/uci-defaults/
endif

View File

@@ -1,132 +0,0 @@
{
"Device.LocalAgent.": {
"type": "object",
"version": "2.12",
"protocols": [
"usp"
],
"access": false,
"array": false,
"TransferComplete!": {
"type": "event",
"version": "2.12",
"protocols": [
"usp"
],
"Command": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string"
},
"CommandKey": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string"
},
"Requestor": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string"
},
"TransferType": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string",
"enumerations": [
"Download",
"Upload"
]
},
"Affected": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string"
},
"TransferURL": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "URL",
"range": [
{
"max": 2048
}
]
},
"StartTime": {
"type": "dateTime",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "dateTime"
},
"CompleteTime": {
"type": "dateTime",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "dateTime"
},
"FaultCode": {
"type": "unsignedInt",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "unsignedInt"
},
"FaultString": {
"type": "string",
"read": true,
"write": true,
"version": "2.12",
"protocols": [
"usp"
],
"datatype": "string",
"range": [
{
"max": 256
}
]
}
}
}
}

View File

@@ -2,12 +2,13 @@ config obuspa 'global'
option enabled '1'
option debug '1'
option dhcp_discovery '1'
option log_level '1'
option log_level '2'
option prototrace '0'
option db_file '/etc/obuspa/usp.db'
option role_file '/etc/obuspa/roles.json'
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
#option trust_cert '/etc/obuspa/rootCA.pem'
#option trust_cert '/etc/ssl/cert.pem'
#option client_cert '/etc/obuspa/client.pem'
#option log_dest '/tmp/obuspa.log'
option max_cache_time '120'

View File

@@ -92,10 +92,10 @@ get_base_path()
count=0
if [ -f "${DB_DUMP}" ]; then
path=$(grep "${refpath}\d.Alias \"${value}\"" ${DB_DUMP})
path=$(grep -E "${refpath}\d+.Alias \"${value}\"" ${DB_DUMP})
path=${path%.*}
if [ -z "${path}" ]; then
path=$(grep -o "${refpath}\d" ${DB_DUMP} |sort -r|head -n 1)
path=$(grep -oE "${refpath}\d+" ${DB_DUMP} |sort -r|head -n 1)
if [ -n "${path}" ]; then
count=${path##*.}
count=$(( count + 1 ))
@@ -122,9 +122,9 @@ get_refrence_path()
path=""
if [ -f "${DB_DUMP}" ]; then
path=$(grep "${dmref}\d.Alias " ${DB_DUMP}|grep -w "${value}")
path=$(grep -E "${dmref}\d+.Alias " ${DB_DUMP}|grep -w "${value}")
elif [ -f "${RESET_FILE}" ]; then
path=$(grep "${dmref}\d.Alias " ${RESET_FILE}|grep -w "${value}")
path=$(grep -E "${dmref}\d+.Alias " ${RESET_FILE}|grep -w "${value}")
fi
path=${path%.*}
echo "${path}"
@@ -217,12 +217,10 @@ validate_controller_section()
'Enable:bool:1' \
'EndpointID:string' \
'assigned_role_name:string' \
'AssignedRole:string' \
'Protocol:or("STOMP","CoAP","MQTT", "WebSocket")' \
'Destination:string' \
'Topic:string' \
'ParameterName:list(string)' \
'Reference:string' \
'mqtt:string' \
'stomp:string' \
'Host:string' \
@@ -230,7 +228,7 @@ validate_controller_section()
'Path:string' \
'EnableEncryption:bool' \
'PeriodicNotifInterval:uinteger' \
'SessionMode:string:Allow' \
'SessionMode:string' \
'ProvisioningCode:string'
}
@@ -255,7 +253,6 @@ validate_mtp_section()
'Path:string' \
'mqtt:string' \
'stomp:string' \
'Reference:string' \
'PublishQoS:uinteger' \
'EnableEncryption:bool'
}
@@ -324,7 +321,7 @@ configure_controller()
local EndpointID Enable
local Protocol Destination
local Topic mqtt stomp assigned_role_name AssignedRole ParameterName ProvisioningCode
local Host Port Path EnableEncryption Reference SessionMode PeriodicNotifInterval
local Host Port Path EnableEncryption PeriodicNotifInterval
local dm_ref sec
sec="${1}"
@@ -346,16 +343,12 @@ configure_controller()
fi
dm_ref=""
if [ -z "${Reference}" ]; then
if [ "${Protocol}" = "STOMP" ]; then
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
else
dm_ref="${Reference}"
if [ "${Protocol}" = "STOMP" ]; then
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
db_set "${BASEPATH}.Alias" "${sec}"
@@ -370,16 +363,15 @@ configure_controller()
db_set "${BASEPATH}.PeriodicNotifInterval" "${PeriodicNotifInterval}"
fi
if [ -n "${SessionMode}" ]; then
db_set "${BASEPATH}.E2ESession.SessionMode" "${SessionMode}"
fi
#if [ -n "${SessionMode}" ]; then
# db_set "${BASEPATH}.E2ESession.SessionMode" "${SessionMode}"
#fi
if [ -n "${assigned_role_name}" ]; then
AssignedRole=$(get_role_index "${assigned_role_name}")
fi
if [ -n "${AssignedRole}" ]; then
db_set "${BASEPATH}.AssignedRole" "${AssignedRole}"
if [ -n "${AssignedRole}" ]; then
db_set "${BASEPATH}.AssignedRole" "${AssignedRole}"
fi
fi
db_set "${BASEPATH}.MTP.1.Alias" "${sec}"
@@ -559,16 +551,12 @@ configure_mtp() {
fi
dm_ref=""
if [ -z "${Reference}" ]; then
if [ "${Protocol}" = "STOMP" ]; then
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
else
dm_ref="${Reference}"
if [ "${Protocol}" = "STOMP" ]; then
stomp="${stomp/stomp_/cpe-}"
dm_ref=$(get_refrence_path "Device.STOMP.Connection." "${stomp}")
elif [ "${Protocol}" = "MQTT" ]; then
mqtt="${mqtt/mqtt_/cpe-}"
dm_ref=$(get_refrence_path "Device.MQTT.Client." "${mqtt}")
fi
db_set "${BASEPATH}.Alias" "${sec}"
@@ -728,13 +716,13 @@ get_instances_from_db_dump()
{
local obj inst
obj="${1}\d"
obj="${1}\d+"
if [ ! -f "${DB_DUMP}" ]; then
echo ""
return 0;
fi
inst="$(grep -oe "${obj}" "${DB_DUMP}"|uniq)"
inst="$(grep -oE "${obj}" "${DB_DUMP}"|uniq)"
echo "$inst"
}
@@ -776,8 +764,8 @@ sync_db_controller()
{
local cntrs copts sec pvalue protocol
copts="Enable EndpointID AssignedRole PeriodicNotifInterval"
popts="Destination Topic Reference Host Port Path EnableEncryption"
copts="Enable EndpointID PeriodicNotifInterval"
popts="Destination Topic Host Port Path EnableEncryption"
cntrs="$(get_instances_from_db_dump Device.LocalAgent.Controller.)"
for cntr in $cntrs; do
@@ -809,8 +797,7 @@ sync_db_localagent_mtp()
local mtps opts popts sec pvalue protocol
opts="Enable"
popts="ResponseTopicConfigured Destination Port Path Reference EnableEncryption PublishQoS"
ropts="mqtt stomp"
popts="ResponseTopicConfigured Destination Port Path EnableEncryption PublishQoS"
mtps="$(get_instances_from_db_dump Device.LocalAgent.MTP.)"
for inst in $mtps; do
@@ -833,9 +820,6 @@ sync_db_localagent_mtp()
pvalue="$(get_param_value_from_dump "${inst}"."${protocol}"."${param}")"
uci_set obuspa "${sec}" "${param}" "${pvalue}"
done
for param in ${ropts}; do
uci_set obuspa "${sec}" "${param}" ""
done
done
}
@@ -942,7 +926,7 @@ check_n_delete_db()
r="${3}"
sec="${sec/${t}_/cpe-}"
path=$(grep "${r}\d.Alias \"${sec}\"" ${DB_DUMP})
path=$(grep -E "${r}\d+.Alias \"${sec}\"" ${DB_DUMP})
path=${path%.*}
delete_sql_db_entry_with_pattern "${path}"
@@ -1002,6 +986,9 @@ db_init()
reverse_update_db_with_uci
fi
# Remove ControllerTrust.Role., if present in db for backward compatibility
delete_sql_db_entry_with_pattern "^Device.LocalAgent.ControllerTrust.Role."
# Remove reset file if present
[ -f "${RESET_FILE}" ] && mv ${RESET_FILE} ${RESET_FILE}.old
@@ -1033,37 +1020,36 @@ db_init()
return 0;
}
register_service()
{
procd_open_instance ${CONFIGURATION}
procd_set_param command ${PROG}
configure_obuspa
procd_set_param respawn \
"${respawn_threshold:-10}" \
"${respawn_timeout:-10}" "${respawn_retry:-5}"
procd_set_param watch bbfdm
procd_close_instance
}
start_service() {
local enabled
config_load obuspa
config_get_bool enabled global enabled 0
if [ "${enabled}" -eq 0 ]; then
return 0;
fi
local enabled role_file
mkdir -p /tmp/obuspa/
db_init "${1}"
register_service
config_load obuspa
config_get_bool enabled global enabled 0
config_get role_file global role_file ""
# Use the default role file if not defined in uci, but present in path
if [ -z "${role_file}" ] && [ -f "/etc/obuspa/roles.json" ] ; then
uci -q set obuspa.global.role_file="/etc/obuspa/roles.json"
uci_commit obuspa
fi
procd_open_instance ${CONFIGURATION}
if [ "${enabled}" -eq 1 ]; then
db_init "${1}"
procd_set_param command ${PROG}
configure_obuspa
procd_set_param respawn \
"${respawn_threshold:-10}" \
"${respawn_timeout:-10}" "${respawn_retry:-5}"
#procd_set_param limits core="unlimited"
fi
procd_close_instance ${CONFIGURATION}
}
stop_service() {
${PROG} -c stop >/dev/null 2>&1
if command -v timeout >/dev/null 2>&1; then
timeout 5 ${PROG} -c stop
fi
}
reload_service() {

View File

@@ -1,7 +1,6 @@
{
"dmcaching_exclude": [
"Device.Hosts.Host.",
"Device.IEEE1905.",
"Device.WiFi.DataElements."
"Device.Services.VoiceService."
]
}

View File

@@ -61,18 +61,47 @@
{
"object": "Device.",
"perm": [
"PERMIT_ALL"
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
}
]
},
{
"name": "user",
"permission": [
},
{
"object": "Device.",
"object": "Device.Reboot()",
"perm": [
"PERMIT_NONE"
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.SelfTestDiagnostics()",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.FactoryReset()",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -81,7 +110,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -90,7 +125,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -99,7 +140,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -108,7 +155,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -117,7 +170,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -126,7 +185,30 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.DHCPv4.Server.Pool.{i}.StaticAddress.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -135,7 +217,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -144,7 +232,66 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.{BBF_VENDOR_PREFIX}URLFilter.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Schedules.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.{BBF_VENDOR_PREFIX}ParentalControl.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -153,7 +300,15 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -162,7 +317,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -171,7 +332,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -180,7 +347,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -189,7 +362,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -198,7 +377,15 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -207,7 +394,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -216,7 +409,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -225,7 +424,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -234,7 +439,15 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -243,7 +456,13 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -252,7 +471,15 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -261,7 +488,15 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -270,16 +505,27 @@
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.XMPP.",
"object": "Device.LocalAgent.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -289,9 +535,14 @@
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_ADD",
"PERMIT_SET",
"PERMIT_DEL"
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
@@ -301,6 +552,7 @@
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
@@ -315,6 +567,7 @@
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
@@ -329,12 +582,190 @@
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.SSH.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
}
]
},
{
"name": "user",
"permission": [
{
"object": "Device.",
"perm": [
"PERMIT_NONE"
]
},
{
"object":"Device.Schedules.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.{BBF_VENDOR_PREFIX}ParentalControl.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.DeviceInfo.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Hosts.",
"perm": [
"PERMIT_GET",
"PERMIT_SET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Hosts.AccessControl.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SET",
"PERMIT_ADD",
"PERMIT_DEL",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL"
]
},
{
"object":"Device.IEEE1905.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.IP.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO"
]
},
{
"object":"Device.DynamicDNS.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.PeriodicStatistics.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.LocalAgent.Subscription.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_ADD",
"PERMIT_SET",
"PERMIT_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.WiFi.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL"
]
},
{
"object": "Device.WiFi.AccessPoint.{i}.WPS.InitiateWPSPBC()",
"perm": [
"PERMIT_OPER",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.WiFi.DataElements.Network.SetSSID()",
"perm": [
"PERMIT_OPER",
"PERMIT_SUBS_EVT_OPER_COMP"
]
}
]
},

View File

@@ -1,13 +0,0 @@
#!/bin/sh
. /lib/functions.sh
config_load obuspa
config_get interface global interface ""
if command -v fw_printenv; then
mode="$(fw_printenv -n netmode)"
if [ "${mode}" == "extender" -a -z "$interface" ] ; then
uci_set obuspa global interface "lan"
fi
fi

View File

@@ -0,0 +1,20 @@
#!/bin/sh
. /lib/functions.sh
if [ ! -f "/etc/config/mosquitto" ]; then
echo "Local mosquitto broker not available"
return 0
fi
add_usp_test()
{
uci_add mosquitto listener usptest
uci_set mosquitto usptest enabled 1
uci_set mosquitto usptest port '9001'
uci_set mosquitto usptest protocol 'websockets'
uci_set mosquitto usptest auth_plugin '/usr/lib/mosquitto_auth_shadow.so'
}
# Install test MQTT over WS listener
add_usp_test

View File

@@ -40,16 +40,6 @@ add_obuspa_test_controller()
uci_set obuspa testcontroller assigned_role_name 'full_access'
}
add_usp_test()
{
uci_add mosquitto listener usptest
uci_set mosquitto usptest enabled 1
uci_set mosquitto usptest port '9001'
uci_set mosquitto usptest protocol 'websockets'
uci_set mosquitto usptest require_certificates '0'
uci_set mosquitto usptest auth_plugin '/usr/lib/mosquitto_auth_shadow.so'
}
add_obuspa_config()
{
uci_add mosquitto listener obuspa
@@ -60,11 +50,8 @@ add_obuspa_config()
}
# Install test usp controller config
uci_load mosquitto
add_usp_test
add_obuspa_config
uci_load obuspa
add_obuspa_test_mtp
add_obuspa_test_mqtt
add_obuspa_test_controller

View File

@@ -8,6 +8,11 @@ RETRY_MIN_INTERVAL="5"
RETRY_INTERVAL_MUL="2000"
ENDPOINT_ID=""
log()
{
echo "$*"|logger -t obuspa.dhcp -p debug
}
get_oui_from_db() {
db -q get device.deviceinfo.ManufacturerOUI
}
@@ -124,15 +129,15 @@ get_vivsoi() {
done
}
get_netmode()
get_access_role()
{
local mode
local mode lan_proto
if command -v fw_printenv; then
mode="$(fw_printenv -n netmode)"
fi
lan_proto="$(uci -q get network.lan.proto)"
if [ "$mode" != "extender" ]; then
if [ "${lan_proto}" == "dhcp" ]; then
mode="extender"
else
mode="full_access"
fi
@@ -141,13 +146,25 @@ get_netmode()
config_load obuspa
config_get_bool enable_obuspa global enabled 1
config_get wan_intf global interface "wan"
config_get wan_intf global interface
config_get_bool dhcp_discovery global dhcp_discovery 1
if [ "$enable_obuspa" = "0" ] || [ "$dhcp_discovery" = "0" ]; then
return 0
fi
if [ -z "${wan_intf}" ]; then
role="$(get_access_role)"
if [ "${role}" = "extender" ]; then
wan_intf="lan"
uci -q set obuspa.global.interface="lan"
uci commit obuspa
else
wan_intf="wan"
fi
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ -n "$opt125" ]; then
len=$(printf "$opt125"|wc -c)
@@ -226,7 +243,7 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
fi
fi
uci -q set obuspa.dhcpcontroller.assigned_role_name="$(get_netmode)"
uci -q set obuspa.dhcpcontroller.assigned_role_name="$(get_access_role)"
uci -q set obuspa.dhcpcontroller.Enable='1'
uci_change=1
fi
@@ -309,6 +326,7 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
fi
if [ ${uci_change} -eq 1 ]; then
log "# Reloading obuspa as dhcp config changed"
ubus call uci commit '{"config":"obuspa"}'
fi
fi

View File

@@ -1,29 +1,69 @@
--- a/src/core/cli_server.c
+++ b/src/core/cli_server.c
@@ -787,6 +787,7 @@ int ExecuteCli_Set(char *arg1, char *arg
@@ -780,6 +780,7 @@ int ExecuteCli_Set(char *arg1, char *arg
goto exit;
}
+ SetControllerRoleForInternal();
// Iterate over all objects to set
for (i=0; i < objects.num_entries; i++)
{
// Exit if unable to start a transaction
err = DM_TRANS_Start(&trans);
if (err != USP_ERR_OK)
@@ -865,6 +866,7 @@ int ExecuteCli_Add(char *arg1, char *arg
goto exit;
}
+ SetControllerRoleForInternal();
// Exit if unable to start a transaction
err = DM_TRANS_Start(&trans);
if (err != USP_ERR_OK)
@@ -976,6 +978,7 @@ int ExecuteCli_Del(char *arg1, char *arg
goto exit;
}
+ SetControllerRoleForInternal();
// Exit if unable to start a transaction
err = DM_TRANS_Start(&trans);
if (err != USP_ERR_OK)
--- a/src/core/data_model.h
+++ b/src/core/data_model.h
@@ -325,6 +325,7 @@ void DATA_MODEL_DumpSchema(void);
@@ -325,6 +325,8 @@ void DATA_MODEL_DumpSchema(void);
void DATA_MODEL_DumpInstances(void);
char DATA_MODEL_GetJSONParameterType(char *path);
int DATA_MODEL_SetParameterInDatabase(char *path, char *value);
+void SetControllerRoleForInternal();
+void SetControllerDummyID();
int DM_PRIV_InitSetRequest(dm_req_t *req, dm_node_t *node, char *path, dm_instances_t *inst, char *new_value);
void DM_PRIV_RequestInit(dm_req_t *req, dm_node_t *node, char *path, dm_instances_t *inst);
--- a/src/core/dm_exec.c
+++ b/src/core/dm_exec.c
@@ -1207,6 +1207,7 @@ void ProcessMessageQueueSocketActivity(s
return;
}
+ SetControllerDummyID(); // To make sure session handler does not break with internal services
switch(msg.type)
{
case kDmExecMsg_ProcessUspRecord:
--- a/src/core/msg_handler.c
+++ b/src/core/msg_handler.c
@@ -902,6 +902,20 @@ char *MtpSendItemToString(mtp_send_item_
@@ -902,6 +902,34 @@ char *MtpSendItemToString(mtp_send_item_
/*********************************************************************//**
**
+** SetControllerDummyID
+**
+** Sets the role for internal user
+**
+**
+**************************************************************************/
+void SetControllerDummyID()
+{
+ cur_msg_controller_info.endpoint_id = "CLI_Utility";
+}
+
+/*********************************************************************//**
+**
+** SetControllerRoleForInternal
+**
+** Sets the role for internal user
@@ -34,6 +74,7 @@
+{
+ cur_msg_combined_role.inherited = kCTrustRole_Untrusted;
+ cur_msg_combined_role.assigned = kCTrustRole_FullAccess;
+ SetControllerDummyID();
+}
+
+/*********************************************************************//**

View File

@@ -1,6 +1,6 @@
--- a/src/core/bdc_exec.c
+++ b/src/core/bdc_exec.c
@@ -547,11 +547,19 @@ int StartSendingReport(bdc_connection_t
@@ -547,11 +547,19 @@
// Set the list of headers
bc->headers = NULL;
@@ -25,7 +25,7 @@
{
--- a/src/core/bdc_exec.h
+++ b/src/core/bdc_exec.h
@@ -53,6 +53,9 @@ void BDC_EXEC_ScheduleExit(void);
@@ -53,6 +53,9 @@
#define BDC_FLAG_PUT 0x00000001 // If set, HTTP PUT should be used instead of HTTP POST when sending the report to the BDC server
#define BDC_FLAG_GZIP 0x00000002 // If set, the reports contants are Gzipped
#define BDC_FLAG_DATE_HEADER 0x00000004 // If set, the date header should be included in the HTTP post.
@@ -52,7 +52,7 @@
// Definitions for Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -153,6 +156,7 @@ static char *profile_push_event_args[] =
@@ -153,6 +156,7 @@
typedef struct
{
int num_retained_failed_reports;
@@ -60,7 +60,7 @@
char report_timestamp[33];
char url[1025];
char username[257];
@@ -161,6 +165,11 @@ typedef struct
@@ -161,6 +165,11 @@
char method[9];
bool use_date_header;
char report_format[20];
@@ -72,7 +72,7 @@
} profile_ctrl_params_t;
//------------------------------------------------------------------------------
@@ -208,6 +217,7 @@ int Validate_BulkDataEncodingType(dm_req
@@ -208,6 +217,7 @@
int Validate_BulkDataReportingInterval(dm_req_t *req, char *value);
int Validate_BulkDataReference(dm_req_t *req, char *value);
int Validate_BulkDataReportFormat(dm_req_t *req, char *value);
@@ -80,7 +80,7 @@
int Validate_BulkDataReportTimestamp(dm_req_t *req, char *value);
int Validate_BulkDataCompression(dm_req_t *req, char *value);
int Validate_BulkDataHTTPMethod(dm_req_t *req, char *value);
@@ -236,6 +246,8 @@ bulkdata_profile_t *bulkdata_find_profil
@@ -236,6 +246,8 @@
int bulkdata_calc_report_map(bulkdata_profile_t *bp, kv_vector_t *report_map);
int bulkdata_reduce_to_alt_name(char *spec, char *path, char *alt_name, char *out_buf, int buf_len);
char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timestamp, char *report_format);
@@ -89,15 +89,16 @@
unsigned char *bulkdata_compress_report(profile_ctrl_params_t *ctrl, char *input_buf, int input_len, int *p_output_len);
int bulkdata_schedule_sending_http_report(profile_ctrl_params_t *ctrl, bulkdata_profile_t *bp, unsigned char *json_report, int report_len);
int bulkdata_start_profile(bulkdata_profile_t *bp);
@@ -250,6 +262,7 @@ char *bulkdata_platform_calc_uri_query_s
@@ -250,6 +262,8 @@
int bulkdata_platform_get_param_refs(int profile_id, param_ref_vector_t *param_refs);
void bulkdata_expand_param_ref(param_ref_entry_t *pr, group_get_vector_t *ggv);
void bulkdata_append_to_result_map(param_ref_entry_t *pr, group_get_vector_t *ggv, kv_vector_t *report_map);
+void append_string_to_target(char *str, char **output);
+char *csv_encode(const char *str);
/*********************************************************************//**
**
@@ -282,7 +295,7 @@ int DEVICE_BULKDATA_Init(void)
@@ -282,7 +296,7 @@
err |= USP_REGISTER_VendorParam_ReadOnly("Device.BulkData.Status", Get_BulkDataGlobalStatus, DM_STRING);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MinReportingInterval", BULKDATA_MINIMUM_REPORTING_INTERVAL_STR, DM_UINT);
err |= USP_REGISTER_Param_SupportedList("Device.BulkData.Protocols", bdc_protocols, NUM_ELEM(bdc_protocols));
@@ -106,7 +107,7 @@
err |= USP_REGISTER_Param_Constant("Device.BulkData.ParameterWildCardSupported", "true", DM_BOOL);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfProfiles", BULKDATA_MAX_PROFILES_STR, DM_INT);
err |= USP_REGISTER_Param_Constant("Device.BulkData.MaxNumberOfParameterReferences", "-1", DM_INT);
@@ -297,7 +310,7 @@ int DEVICE_BULKDATA_Init(void)
@@ -297,7 +311,7 @@
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Name", "", NULL, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.NumberOfRetainedFailedReports", "0", Validate_NumberOfRetainedFailedReports, NULL, DM_INT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.Protocol", BULKDATA_PROTOCOL_HTTP, Validate_BulkDataProtocol, NULL, DM_STRING);
@@ -115,7 +116,7 @@
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.ReportingInterval", "86400", Validate_BulkDataReportingInterval, NotifyChange_BulkDataReportingInterval, DM_UINT);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.TimeReference", UNKNOWN_TIME_STR, NULL, NotifyChange_BulkDataTimeReference, DM_DATETIME);
@@ -312,6 +325,13 @@ int DEVICE_BULKDATA_Init(void)
@@ -312,6 +326,13 @@
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportFormat", BULKDATA_JSON_REPORT_FORMAT_NAME_VALUE, Validate_BulkDataReportFormat, NULL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp", BULKDATA_JSON_TIMESTAMP_FORMAT_EPOCH, Validate_BulkDataReportTimestamp, NULL, DM_STRING);
@@ -129,7 +130,7 @@
// Device.BulkData.Profile.{i}.HTTP
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.URL", "", NULL, NotifyChange_BulkDataURL, DM_STRING);
err |= USP_REGISTER_DBParam_ReadWrite("Device.BulkData.Profile.{i}.HTTP.Username", "", NULL, NULL, DM_STRING);
@@ -591,9 +611,10 @@ int Validate_BulkDataProtocol(dm_req_t *
@@ -591,9 +612,10 @@
int Validate_BulkDataEncodingType(dm_req_t *req, char *value)
{
// Exit if trying to set a value outside of the range we accept
@@ -142,7 +143,7 @@
return USP_ERR_INVALID_VALUE;
}
@@ -676,6 +697,32 @@ int Validate_BulkDataReportFormat(dm_req
@@ -676,6 +698,32 @@
/*********************************************************************//**
**
@@ -175,7 +176,7 @@
** Validate_BulkDataReportTimestamp
**
** Validates Device.BulkData.Profile.{i}.JSONEncoding.ReportTimestamp
@@ -1970,6 +2017,14 @@ int bulkdata_platform_get_profile_contro
@@ -1970,6 +2018,14 @@
return err;
}
@@ -190,7 +191,7 @@
// Exit if unable to get ReportTimestamp
USP_SNPRINTF(path, sizeof(path), "Device.BulkData.Profile.%d.JSONEncoding.ReportTimestamp", bp->profile_id);
err = DATA_MODEL_GetParameterValue(path, ctrl_params->report_timestamp, sizeof(ctrl_params->report_timestamp), 0);
@@ -1986,6 +2041,46 @@ int bulkdata_platform_get_profile_contro
@@ -1986,6 +2042,46 @@
return err;
}
@@ -237,7 +238,7 @@
return USP_ERR_OK;
}
@@ -2222,7 +2317,7 @@ void bulkdata_process_profile_http(bulkd
@@ -2222,7 +2318,7 @@
{
int err;
report_t *cur_report;
@@ -246,7 +247,7 @@
profile_ctrl_params_t ctrl;
unsigned char *compressed_report;
int compressed_len;
@@ -2261,10 +2356,23 @@ void bulkdata_process_profile_http(bulkd
@@ -2261,10 +2357,23 @@
}
// Exit if unable to generate the report
@@ -274,7 +275,7 @@
return;
}
@@ -2273,14 +2381,14 @@ void bulkdata_process_profile_http(bulkd
@@ -2273,14 +2382,14 @@
USP_LOG_Info("BULK DATA: using compression method=%s", ctrl.compression);
if (enable_protocol_trace)
{
@@ -293,7 +294,7 @@
}
// NOTE: From this point on, only the compressed_report exists
@@ -2310,9 +2418,15 @@ void bulkdata_process_profile_usp_event(
@@ -2310,9 +2419,15 @@
kv_vector_t event_args;
kv_pair_t kv;
report_t *cur_report;
@@ -310,7 +311,7 @@
// Exit if the MTP has not been connected to successfully after bootup
// This is to prevent BDC events being enqueued before the Boot! event is sent (the Boot! event is only sent after successfully connecting to the MTP).
@@ -2321,20 +2435,62 @@ void bulkdata_process_profile_usp_event(
@@ -2321,20 +2436,62 @@
goto exit;
}
@@ -384,7 +385,7 @@
}
// When sending via USP events, only one report is ever sent in each USP event
@@ -2354,10 +2510,16 @@ void bulkdata_process_profile_usp_event(
@@ -2354,10 +2511,16 @@
bp->num_retained_reports = 1;
// Exit if unable to generate the report
@@ -404,7 +405,7 @@
return;
}
@@ -2365,15 +2527,15 @@ void bulkdata_process_profile_usp_event(
@@ -2365,15 +2528,15 @@
// Construct event_args manually to avoid the overhead of a malloc and copy of the report in KV_VECTOR_Add()
kv.key = "Data";
@@ -423,10 +424,37 @@
// From the point of view of this code, the report(s) have been successfully sent, so don't retain them
// NOTE: Sending of the reports successfully is delegated to the USP notification retry mechanism
@@ -2835,6 +2997,219 @@ char *bulkdata_generate_json_report(bulk
@@ -2835,6 +2998,319 @@
/*********************************************************************//**
**
+** safe_asprintf
+**
+** Wrapper around asprintf that calls terminate in case of error
+**
+** \param strp -- pointer to the output string
+** \param fmt -- printing format
+**
+** \return None
+**
+**************************************************************************/
+static void safe_asprintf(char **strp, const char *fmt, ...)
+{
+ int ret;
+ va_list argp;
+
+ va_start(argp, fmt);
+ ret = vasprintf(strp, fmt, argp);
+ va_end(argp);
+
+ if (ret == -1) {
+ USP_ERR_Terminate("%s (%d): asprintf(%s) failed",
+ __FUNCTION__, __LINE__, fmt);
+ }
+}
+
+/*********************************************************************//**
+**
+** append_string_to_target
+**
+** concatenates the src string with target string in newly allocated memory
@@ -454,10 +482,70 @@
+ }
+
+ assert(tmp != NULL);
+ asprintf(output, "%s%s", tmp, str);
+ safe_asprintf(output, "%s%s", tmp, str);
+ free(tmp);
+}
+
+/*************************************************************************
+**
+** csv_encode
+**
+** encodes the src string to CSV specification RFC4180 compliance string
+** and assign back the new pointer.
+**
+** \param str - pointer to the src string
+** \return address of the pointer that points to the target string or NULL
+**
+**************************************************************************/
+char *csv_encode(const char *str)
+{
+ if (str == NULL)
+ return NULL;
+
+ int len = strlen(str);
+ if (len == 0)
+ return strdup(str);
+
+ char *temp = NULL;
+ // Get the number of '\"' present in the string
+ int quote_count = 0;
+
+ temp = strchr(str, '\"');
+ while (temp) {
+ quote_count++;
+ temp = strchr(temp+1, '\"');
+ }
+
+ int encode_size = len + quote_count + 3; // added 3 for initial quote, end quote & null at end
+ temp = (char *)malloc(sizeof(char) * encode_size);
+
+ if (!temp)
+ return NULL;
+
+ memset(temp, 0, sizeof(char) * encode_size);
+
+ int i = 0, j = 0;
+
+ temp[j++] = '\"';
+ for (i = 0; i < len; i++) {
+ if (str[i] == '\"') {
+ if (j > (encode_size - 3))
+ break;
+
+ temp[j++] = '\"';
+ }
+
+ if (j > (encode_size - 3))
+ break;
+
+ temp[j++] = str[i];
+ }
+
+ temp[j] = '\"';
+
+ return temp;
+}
+
+/*********************************************************************//**
+**
+** bulkdata_generate_csv_report
@@ -502,9 +590,9 @@
+
+ if (strcasecmp(csv_format, "ParameterPerRow") == 0) {
+ if (strcmp(row_timestamp, "None") == 0)
+ asprintf(&str, "ParameterName%cParameterValue%cParameterType%c", separator, separator, rowseparator);
+ safe_asprintf(&str, "ParameterName%cParameterValue%cParameterType%c", separator, separator, rowseparator);
+ else
+ asprintf(&str, "ReportTimestamp%cParameterName%cParameterValue%cParameterType%c", separator, separator, separator, rowseparator);
+ safe_asprintf(&str, "ReportTimestamp%cParameterName%cParameterValue%cParameterType%c", separator, separator, separator, rowseparator);
+
+ assert(str != NULL);
+ append_string_to_target(str, &output);
@@ -521,14 +609,18 @@
+ // Add Collection time to each csv report element (only if specified and not 'None')
+ if (strcmp(row_timestamp, "Unix-Epoch")==0)
+ {
+ asprintf(&timestamp, "%lld", (long long int)report->collection_time);
+ safe_asprintf(&timestamp, "%lld", (long long int)report->collection_time);
+ }
+ else if (strcmp(row_timestamp, "ISO-8601")==0)
+ {
+ char *result = iso8601_from_unix_time(report->collection_time, buf, sizeof(buf));
+ if (result != NULL)
+ {
+ asprintf(&timestamp, "%s", buf);
+ char *val = csv_encode(buf);
+ if (val) {
+ safe_asprintf(&timestamp, "%s", buf);
+ free(val);
+ }
+ }
+ }
+
@@ -579,11 +671,14 @@
+ }
+
+ if (type) {
+ char *p_path = csv_encode(param_path);
+ char *p_value = csv_encode(param_value);
+
+ if (strcasecmp(csv_format, "ParameterPerRow") == 0) {
+ if (timestamp == NULL)
+ asprintf(&str, "%s%c%s%c%s%c", param_path, separator, param_value, separator, type, rowseparator);
+ safe_asprintf(&str, "%s%c%s%c%s%c", p_path, separator, p_value, separator, type, rowseparator);
+ else
+ asprintf(&str, "%s%c%s%c%s%c%s%c", timestamp, separator, param_path, separator, param_value, separator, type, rowseparator);
+ safe_asprintf(&str, "%s%c%s%c%s%c%s%c", timestamp, separator, p_path, separator, p_value, separator, type, rowseparator);
+
+ assert(str != NULL);
+ append_string_to_target(str, &output);
@@ -591,9 +686,9 @@
+ str = NULL;
+ } else {
+ if (str1 == NULL || strlen(str1) == 0)
+ asprintf(&str, "%s", param_path);
+ safe_asprintf(&str, "%s", p_path);
+ else
+ asprintf(&str, "%c%s", separator, param_path);
+ safe_asprintf(&str, "%c%s", separator, p_path);
+
+ assert(str != NULL);
+ append_string_to_target(str, &str1);
@@ -601,15 +696,21 @@
+ str = NULL;
+
+ if (str2 == NULL || strlen(str2) == 0)
+ asprintf(&str, "%s", param_value);
+ safe_asprintf(&str, "%s", p_value);
+ else
+ asprintf(&str, "%c%s", separator, param_value);
+ safe_asprintf(&str, "%c%s", separator, p_value);
+
+ assert(str != NULL);
+ append_string_to_target(str, &str2);
+ free(str);
+ str = NULL;
+ }
+
+ if (p_path)
+ free(p_path);
+
+ if (p_value)
+ free(p_value);
+ }
+ }
+
@@ -620,7 +721,7 @@
+ }
+
+ if (strcasecmp(csv_format, "ParameterPerColumn") == 0) {
+ asprintf(&str, "%c", rowseparator);
+ safe_asprintf(&str, "%c", rowseparator);
+ assert(str != NULL);
+ append_string_to_target(str, &str1);
+ append_string_to_target(str, &str2);
@@ -643,7 +744,7 @@
** bulkdata_compress_report
**
** Compresses the report to send
@@ -2986,9 +3361,18 @@ int bulkdata_schedule_sending_http_repor
@@ -2986,9 +3462,18 @@
flags |= BDC_FLAG_DATE_HEADER;
}

View File

@@ -0,0 +1,12 @@
diff --git a/src/protobuf-c/protobuf-c.c b/src/protobuf-c/protobuf-c.c
index 3dc5473..0a6bde7 100644
--- a/src/protobuf-c/protobuf-c.c
+++ b/src/protobuf-c/protobuf-c.c
@@ -1926,6 +1926,7 @@ repeated_field_pack_to_buffer(const ProtobufCFieldDescriptor *field,
buffer->append(buffer, rv, scratch);
tmp = pack_buffer_packed_payload(field, count, array, buffer);
assert(tmp == payload_len);
+ (void)tmp; // Keep cmake production build happy
return rv + payload_len;
} else {
size_t siz;

View File

@@ -0,0 +1,15 @@
diff --git a/src/core/usp_err.c b/src/core/usp_err.c
index 1626e58..6db1d42 100755
--- a/src/core/usp_err.c
+++ b/src/core/usp_err.c
@@ -189,7 +189,9 @@ char *USP_ERR_ToString(int err, char *buf, int len)
{
#if HAVE_STRERROR_R && !STRERROR_R_CHAR_P
// XSI version of strerror_r
- strerror_r(err, buf, len);
+ if (strerror_r(err, buf, len) != 0) {
+ snprintf(buf, len, "Unknown error %d", err);
+ }
return buf;
#else
// GNU version of strerror_r

View File

@@ -0,0 +1,42 @@
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 04a1a9c..8cb2ad7 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -234,6 +234,8 @@ void HandleMqttDisconnect(mqtt_client_t *client);
#define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \
int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \
{\
+ if (index >= MAX_MQTT_CLIENTS) \
+ return 0; \
return DEVICE_SECURITY_TrustCertVerifyCallbackWithCertChain(preverify_ok, x509_ctx, &mqtt_clients[index].cert_chain);\
}
@@ -244,6 +246,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex(1);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(2);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(3);
DEFINE_MQTT_TrustCertVerifyCallbackIndex(4);
+DEFINE_MQTT_TrustCertVerifyCallbackIndex(5);
+DEFINE_MQTT_TrustCertVerifyCallbackIndex(6);
+DEFINE_MQTT_TrustCertVerifyCallbackIndex(7);
+DEFINE_MQTT_TrustCertVerifyCallbackIndex(8);
+DEFINE_MQTT_TrustCertVerifyCallbackIndex(9);
// Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS
//------------------------------------------------------------------------------------
@@ -254,10 +261,15 @@ ssl_verify_callback_t* mqtt_verify_callbacks[] = {
MQTT_TrustCertVerifyCallbackIndex(2),
MQTT_TrustCertVerifyCallbackIndex(3),
MQTT_TrustCertVerifyCallbackIndex(4),
+ MQTT_TrustCertVerifyCallbackIndex(5),
+ MQTT_TrustCertVerifyCallbackIndex(6),
+ MQTT_TrustCertVerifyCallbackIndex(7),
+ MQTT_TrustCertVerifyCallbackIndex(8),
+ MQTT_TrustCertVerifyCallbackIndex(9),
// Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS
};
-USP_COMPILEASSERT( ((sizeof(mqtt_verify_callbacks)/sizeof(ssl_verify_callback_t*)) == MAX_MQTT_CLIENTS),
+USP_COMPILEASSERT( ((sizeof(mqtt_verify_callbacks)/sizeof(ssl_verify_callback_t*)) >= MAX_MQTT_CLIENTS),
"There must be MAX_MQTT_CLIENTS callbacks defined");
/*********************************************************************//**

View File

@@ -0,0 +1,95 @@
diff --git a/src/core/mqtt.c b/src/core/mqtt.c
index 04a1a9c..00b95a4 100644
--- a/src/core/mqtt.c
+++ b/src/core/mqtt.c
@@ -2124,6 +2124,75 @@ exit:
}
}
+static int _check_host_rechability(CURL *handle, curl_infotype type, char *data, size_t size, void *userp)
+{
+ bool *palive = (bool *)userp;
+
+ USP_ASSERT(palive != NULL);
+ switch(type) {
+ case CURLINFO_HEADER_OUT:
+ case CURLINFO_HEADER_IN:
+ *palive = true;
+ break;
+ case CURLINFO_TEXT:
+ {
+ USP_LOG_Debug("CURL DATA:: [%s]", data);
+ if (strstr(data, "Connected to ") != NULL) {
+ *palive = true;
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+int check_mqtt_host_reachability(mqtt_client_t *client)
+{
+ CURL *curl;
+ mqtt_conn_params_t *cparam = &client->conn_params;
+ char buffer[128] = {0};
+ int ret = USP_ERR_INTERNAL_ERROR;
+ bool is_alive = false;
+
+ curl = curl_easy_init();
+ if(curl) {
+ USP_SNPRINTF(buffer, 128, "mqtt://%s:%d", cparam->host, cparam->port);
+ curl_easy_setopt(curl, CURLOPT_URL, buffer);
+
+ if (strlen(cparam->username) > 0) {
+ curl_easy_setopt(curl, CURLOPT_USERNAME, cparam->username);
+ }
+
+ if (strlen(cparam->password) > 0) {
+ curl_easy_setopt(curl, CURLOPT_PASSWORD, cparam->password);
+ }
+
+ curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &is_alive);
+ curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, _check_host_rechability);
+
+ /* complete within 2 seconds */
+ curl_easy_setopt(curl, CURLOPT_TIMEOUT, 2L);
+
+ ret = curl_easy_perform(curl);
+ /* Check for errors */
+ if(ret == CURLE_OK || ret == CURLE_URL_MALFORMAT || is_alive == true) {
+ USP_LOG_Debug("CURL MQTT host %s, ret %d, alive %d ...", buffer, ret, is_alive);
+ ret = USP_ERR_OK;
+ } else {
+ USP_LOG_Info("# CURL MQTT host %s unreachable: %d=>%s ...", buffer, ret, curl_easy_strerror(ret));
+ }
+
+ /* always cleanup */
+ curl_easy_cleanup(curl);
+ }
+
+ return ret;
+}
+
/*********************************************************************//**
**
** PerformMqttClientConnect
@@ -2193,6 +2262,14 @@ int PerformMqttClientConnect(mqtt_client_t *client)
keep_alive = 5;
}
+ // Below function is a workaround to check the host reachability with a timeout
+ // mosquitto_connect_* API block the thread for 2 mins if host is not reachable,
+ // which halts other clients connectivity
+ err = check_mqtt_host_reachability(client);
+ if (err != USP_ERR_OK) {
+ err = USP_ERR_INTERNAL_ERROR;
+ goto exit;
+ }
// Release the access mutex temporarily whilst performing the connect call
// We do this to prevent the data model thread from potentially being blocked, whilst the connect call is taking place
OS_UTILS_UnlockMutex(&mqtt_access_mutex);

View File

@@ -0,0 +1,76 @@
diff --git a/src/core/device_mqtt.c b/src/core/device_mqtt.c
index 7b3c3df7eb..7beb78ef86 100755
--- a/src/core/device_mqtt.c
+++ b/src/core/device_mqtt.c
@@ -1602,14 +1602,23 @@ int Validate_MQTTConnectRetryTime(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryTime(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
// Set the new value.
+ if ((mp->retry.connect_retrytime != val_uint) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
mp->retry.connect_retrytime = val_uint;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}
@@ -1645,14 +1654,23 @@ int Validate_MQTTConnectRetryIntervalMultiplier(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryIntervalMultiplier(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
+ if ((mp->retry.interval_multiplier != val_int) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
// Set the new value.
mp->retry.interval_multiplier = val_int;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}
@@ -1688,14 +1706,23 @@ int Validate_MQTTConnectRetryMaxInterval(dm_req_t *req, char *value)
int NotifyChange_MQTTConnectRetryMaxInterval(dm_req_t *req, char *value)
{
mqtt_conn_params_t *mp;
+ bool schedule_reconnect = false;
// Determine mqtt client to be updated
mp = FindMqttParamsByInstance(inst1);
USP_ASSERT(mp != NULL);
+ if ((mp->retry.max_interval != val_uint) && (mp->enable)) {
+ schedule_reconnect = true;
+ }
+
// Set the new value.
mp->retry.max_interval = val_uint;
+ if (schedule_reconnect) {
+ ScheduleMqttReconnect(mp);
+ }
+
return USP_ERR_OK;
}

View File

@@ -0,0 +1,90 @@
diff --git a/src/core/device_controller.c b/src/core/device_controller.c
index a6335f5..57b8486 100644
--- a/src/core/device_controller.c
+++ b/src/core/device_controller.c
@@ -2340,6 +2340,26 @@ int Notify_ControllerEnable(dm_req_t *req, char *value)
}
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if (cont->enable)
+ {
+ int i;
+ for (i=0; i<MAX_CONTROLLER_MTPS; i++)
+ {
+ controller_mtp_t *mtp;
+
+ mtp = &cont->mtps[i];
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->mqtt_connection_instance != INVALID) && (mtp->enable))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+ }
+ }
+}
#endif
return USP_ERR_OK;
@@ -2468,6 +2488,17 @@ int Notify_ControllerMtpEnable(dm_req_t *req, char *value)
}
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->enable) && (cont->enable) &&
+ (mtp->mqtt_connection_instance != INVALID))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+}
#endif
// NOTE: We do not have to do anything for STOMP, as these parameters are only searched when we send
@@ -2559,6 +2590,16 @@ int Notify_ControllerMtpProtocol(dm_req_t *req, char *value)
WSCLIENT_StartClient(cont->instance, mtp->instance, cont->endpoint_id, &mtp->websock);
}
}
+#endif
+
+#ifdef ENABLE_MQTT
+{
+ // Reconnect MQTT client since it may need to update MQTT reference and Topic
+ if ((mtp->protocol == kMtpProtocol_MQTT) && (mtp->mqtt_connection_instance != INVALID))
+ {
+ DEVICE_MQTT_ScheduleReconnect(mtp->mqtt_connection_instance);
+ }
+}
#endif
// NOTE: We don't need to do anything explicitly for STOMP
diff --git a/src/core/device_mtp.c b/src/core/device_mtp.c
index e78a305..d690978 100644
--- a/src/core/device_mtp.c
+++ b/src/core/device_mtp.c
@@ -964,6 +964,9 @@ int NotifyChange_AgentMtpProtocol(dm_req_t *req, char *value)
}
#endif
+ // Cache the changed value
+ mtp->protocol = new_protocol;
+
#ifdef ENABLE_MQTT
// Schedule the affected MQTT connection to reconnect (because it might have lost or gained a agent queue to subscribe to)
if ((mtp->enable) && (mtp->mqtt_connection_instance != INVALID))
@@ -972,9 +975,6 @@ int NotifyChange_AgentMtpProtocol(dm_req_t *req, char *value)
}
#endif
- // Cache the changed value
- mtp->protocol = new_protocol;
-
#ifndef DISABLE_STOMP
// Schedule the affected STOMP connection to reconnect (because it might have lost or gained a agent queue to subscribe to)
if ((mtp->enable) && (mtp->stomp_connection_instance != INVALID))

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspc
PKG_VERSION:=1.0.1.5
PKG_VERSION:=1.0.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
@@ -61,7 +61,6 @@ define Package/obuspc/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) $(PKG_BUILD_DIR)/obuspc $(1)/usr/sbin/uspc
$(INSTALL_BIN) ./files/etc/init.d/uspc $(1)/etc/init.d/

9
periodicstats/Config.in Normal file
View File

@@ -0,0 +1,9 @@
if PACKAGE_periodicstats
config PERIODICSTAT_INTERNAL_SAMPLING_RATE
int "Number of times statistics will be measured within a sample interval"
range 3 10
default 3
depends on PACKAGE_periodicstats
help
This value must be in range of 3 to 10. (default 3)
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.5.2
PKG_VERSION:=1.5.8.2
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/periodicstats.git
PKG_SOURCE_VERSION:=375c71ebaabffa2e47aa37a04e072232492eff25
PKG_SOURCE_VERSION:=6bee158e3a4d56d573fb8f26fe06fe59b75138ca
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,6 +32,12 @@ define Package/periodicstats/description
Manage periodic statistics
endef
define Package/periodicstats/config
source "$(SOURCE)/Config.in"
endef
TARGET_CFLAGS += -DINTERNAL_SAMPLING_RATE=$(CONFIG_PERIODICSTAT_INTERNAL_SAMPLING_RATE)
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
$(CP) -rf ~/git/periodicstats/* $(PKG_BUILD_DIR)/

View File

@@ -1,4 +1,4 @@
config globals 'globals'
option enable '0'
option enable '1'
option base_interval '5'

View File

@@ -17,16 +17,19 @@ start_service() {
bbfdm_add_service "bbfdm.periodicstats" "${PERIODICSTATS_JSON_INPUT}"
if [ "${enable}" -ne "1" ]; then
return 0;
fi
procd_open_instance periodicstatsd
procd_set_param command ${PROG}
procd_set_param respawn
if [ "${enable}" -eq "1" ]; then
procd_set_param command ${PROG}
procd_set_param respawn
fi
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger periodicstats
}

View File

@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ponmngr
PKG_VERSION:=1.0.1
PKG_VERSION:=1.0.2
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -14,6 +14,7 @@ PKG_LICENSE:=GPL-2.0-only
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include ../bbfdm/bbfdm.mk
define Package/ponmngr
CATEGORY:=Utilities
@@ -39,8 +40,7 @@ ifneq ($(CONFIG_TARGET_brcmbca),)
else ifneq ($(CONFIG_TARGET_airoha),)
$(CP) ./files/airoha/* $(1)/
endif
$(INSTALL_DIR) $(1)/etc/bbfdm/json
$(CP) ./files/etc/bbfdm/json/* $(1)/etc/bbfdm/json/
$(call BbfdmInstallPlugin,$(1),./files/etc/bbfdm/json/xpon.json)
endef
$(eval $(call BuildPackage,ponmngr))

View File

@@ -3,39 +3,34 @@
. /lib/functions.sh
set_serial_number() {
vendor_id=$1
vssn=$2
local vendor_id="$1"
local vssn="$2"
# Vendor id is not taken from serial automatically, propagate it as well
/userfs/bin/omcicfgCmd set vendorId ${vendor_id}
/userfs/bin/omcicfgCmd set sn ${vendor_id}${vssn}
/userfs/bin/omcicfgCmd set vendorId "${vendor_id}"
/userfs/bin/omcicfgCmd set sn "${vendor_id}${vssn}"
}
set_equipment_id() {
local eqid=$1
local eq_id_default="KE2.119.241R2B"
local eqid="$1"
if [ -z "$eqid" ]; then
if [ -z "${eqid}" ]; then
return
fi
if [ "$eqid" = "$eq_id_default" ]; then
return
fi
/userfs/bin/omcicfgCmd set equipmentId ${eqid}
/userfs/bin/omcicfgCmd set equipmentId "${eqid}"
}
set_loid_authentication() {
local loid=$1
local loid_pwd=$2
local loid="$1"
local loid_pwd="$2"
[ -z "$loid" ] && return
[ -z "${loid}" ] && return
/userfs/bin/omcicfgCmd set loid ${loid}
/userfs/bin/omcicfgCmd set loid "${loid}"
if [ -n "$loid_pwd" ]; then
/userfs/bin/omcicfgCmd set loid_password ${loid_pwd}
if [ -n "${loid_pwd}" ]; then
/userfs/bin/omcicfgCmd set loidPasswd "${loid_pwd}"
fi
}

View File

@@ -3,37 +3,39 @@
. /lib/functions.sh
set_serial_number() {
vendor_id=$1
vssn=$2
local vendor_id="$1"
local vssn="$2"
vendor_id="$(echo $vendor_id | hexdump -e '4/1 "%02X" "\n"')"
vendor_id=${vendor_id:0:8}
vendor_id="$(echo "${vendor_id}" | hexdump -e '4/1 "%02X" "\n"')"
vendor_id="${vendor_id:0:8}"
bs /b/c gpon onu_sn={vendor_id=$vendor_id,vendor_specific=$vssn}
}
set_equipment_id() {
equipment_id=$1
local equipment_id="$1"
[ -z "$equipment_id" ] && return
json_add_string "equipment_id" $equipment_id
json_add_string "equipment_id" "$equipment_id"
}
set_loid_authentication() {
loid=$1
loid_password=$2
local loid="$1"
local loid_password="$2"
[ -z "$loid" ] && return
json_add_string "loid" $loid
json_add_string "loid_password" $loid_password
json_add_string "loid" "$loid"
json_add_string "loid_password" "$loid_password"
}
apply_xpon_uci_config() {
local sn
json_init
json_add_object 'ani'
sn="$(uci -q get xpon.ani.serial_number)"
json_add_string "serial_number" $sn
json_add_string "serial_number" "$sn"
configure_loid_authentication
configure_equipment_id
json_close_object

View File

@@ -11,21 +11,21 @@ include /lib/xpon
configure_serial_number() {
# serial number generation is taken care in the uci defaults, so if
# serial number is not found here its a misconfig
serial_number="$(uci -q get xpon.ani.serial_number)"
local serial_number="$(uci -q get xpon.ani.serial_number)"
if [ ${#serial_number} -eq 12 ]; then
vendor_id="${serial_number:0:4}"
vssn="${serial_number:4:8}"
local vendor_id="${serial_number:0:4}"
local vssn="${serial_number:4:8}"
else
logger -s -t "xpon" "Serial number not found in uci, ont will probably not be registered at the olt"
logger -s -t "xpon" "Please configure a valid serial number"
logger -s -t "xpon" "Serial number not found in UCI, ONT will probably not be registered at the OLT."
logger -s -t "xpon" "Please configure a valid serial number."
return
fi
set_serial_number $vendor_id $vssn
set_serial_number "${vendor_id}" "${vssn}"
}
start_service() {
if [ "$(uci -q get xpon.ani.enable)" == "1" ]; then
if [ "$(uci -q get xpon.ani.enable)" = "1" ]; then
configure_serial_number
apply_xpon_uci_config
init_xpon

View File

@@ -3,14 +3,15 @@
configure_serial_number() {
# check if serial number is present in the production data
production_sn="$(fw_printenv -n gponsn)"
local production_sn="$(fw_printenv -n gponsn)"
if [ ${#production_sn} -eq 12 ]; then
uci set xpon.ani.serial_number=$production_sn
uci set xpon.ani.serial_number="${production_sn}"
else
macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
vendor_id="IOPS"
vssn="${macaddr:4:8}"
uci set xpon.ani.serial_number=$vendor_id$vssn
local macaddr="$(fw_printenv -n ethaddr | tr -d ':' | tr 'a-z' 'A-Z')"
local vendor_id="IOPS"
local vssn="${macaddr:4:8}"
uci set xpon.ani.serial_number="${vendor_id}${vssn}"
fi
}
@@ -18,37 +19,38 @@ configure_loid_authentication() {
local production_loid
local production_loidpwd
loid="$(uci -q get xpon.ani.loid)"
loidpwd="$(uci -q get xpon.ani.loid_password)"
if [ -z $loid ]; then
local loid="$(uci -q get xpon.ani.loid)"
local loidpwd="$(uci -q get xpon.ani.loid_password)"
if [ -z "${loid}" ]; then
production_loid="$(fw_printenv -n gponloid)"
fi
if [ -z $loidpwd ]; then
if [ -z "${loidpwd}" ]; then
production_loidpwd="$(fw_printenv -n gponloid_password)"
fi
if [ -n $production_loid ]; then
uci set xpon.ani.loid=$production_loid
if [ -n "${production_loid}" ]; then
uci set xpon.ani.loid="${production_loid}"
fi
if [ -n $production_loidpwd ]; then
uci set xpon.ani.loid_password=$production_loidpwd
if [ -n "${production_loidpwd}" ]; then
uci set xpon.ani.loid_password="${production_loidpwd}"
fi
}
if [ -s "/etc/config/xpon" ]; then
if uci -q get xpon.ani >/dev/null; then
# generate serial number in case its not present and return
serial_number="$(uci -q get xpon.ani.serial_number)"
if [ ${#serial_number} -ne 12 ]; then
if uci -q get xpon.ani >/dev/null; then
# generate serial number in case its not present and return
SERIAL_NUMBER="$(uci -q get xpon.ani.serial_number)"
if [ ${#SERIAL_NUMBER} -ne 12 ]; then
configure_serial_number
fi
configure_loid_authentication
exit
else
rm -f /etc/config/xpon
fi
fi
exit
else
rm -f /etc/config/xpon
fi
fi
touch /etc/config/xpon
uci set xpon.ani=ani

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