Compare commits

...

127 Commits

Author SHA1 Message Date
Vivek Kumar Dutta
25de3cac4f bbfdm: delete config section with SetSSID remove 2024-04-18 10:29:46 +05:30
Vivek Kumar Dutta
5836dc1716 bbfdm: Fix IP and Bridge alias 2024-04-18 10:26:49 +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
79 changed files with 1182 additions and 980 deletions

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.4.23
PKG_VERSION:=1.4.23.15
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=c10303fc51a1034cb87040e0eaf23c95d2b1c658
PKG_SOURCE_VERSION:=3007f6fc86e84b6b460dbea0bf77c4cf522d06c1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

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
}

View File

@@ -7,7 +7,7 @@ log() {
}
exec_cmd() {
if ! eval "$*"; then
if ! "$@"; then
log "Failed to run [$*]"
echo "-1"
return 0
@@ -73,7 +73,7 @@ add_iptable_rule() {
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd "iptables ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
res=$(exec_cmd iptables -w ${cmd} -m comment --comment IPtables_service_rule -j "${action}")
else
#Add ipv4 sources if any
src_list=""
@@ -86,7 +86,7 @@ add_iptable_rule() {
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd "iptables -s $src_list ${cmd} -m comment --comment IPtables_service_rule -j ${action}")
res=$(exec_cmd iptables -w -s "$src_list" ${cmd} -m comment --comment IPtables_service_rule -j "${action}")
fi
fi
fi
@@ -97,7 +97,7 @@ add_iptable_rule() {
fi
if [ -z "${src_prefix}" ]; then
res=$(exec_cmd "ip6tables ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
res=$(exec_cmd ip6tables -w ${cmd} -m comment --comment IP6tables_service_rule -j "${action}")
else
#Add ipv6 sources if any
src_list=""
@@ -110,7 +110,7 @@ add_iptable_rule() {
if [ -n "$src_list" ]; then
src_list=$(echo "${src_list}" | sed "s/,$//")
res=$(exec_cmd "ip6tables -s $src_list ${cmd} -m comment --comment IP6tables_service_rule -j ${action}")
res=$(exec_cmd ip6tables -w -s "$src_list" ${cmd} -m comment --comment IP6tables_service_rule -j "${action}")
fi
fi
fi

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=4.2.1.1
PKG_VERSION:=4.2.1.1.1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ae836adb0779979686d0dad34b941f319ffed1b8
PKG_SOURCE_VERSION:=7e75bf1fc5fa328d91c071f1f243df6951bb397e
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

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.6.4
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:=d9cc11c81ce1ff625e4e789afa180b301c7fcf74
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.1
PKG_VERSION:=2.1.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b81d06867d895245ef47004c6949f9d6dedd10ef
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ethmngr.git
PKG_SOURCE_VERSION:=5b40a8167d3e0e5c8fc9229abccd5c6acecbe814
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.1.4
PKG_VERSION:=1.1.7
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=edb5bbe57c5bc83035e217c73071c9b3e878dc22
PKG_SOURCE_VERSION:=79a6649995752da3501808debeed9e3ddfdf4d59
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,7 +57,7 @@ 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/

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.5.29
PKG_VERSION:=9.5.29.10
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=f9a7bb027a754710353172fa1aec095c08c90832
PKG_SOURCE_VERSION:=27231b20dc75075786efa5a122bdefab93669bc9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -102,10 +102,9 @@ define Package/icwmp/default/install
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
$(INSTALL_BIN) ./files/etc/icwmpd/uci_stuck_workaround.sh $(1)/etc/icwmpd/uci_stuck_workaround.sh
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
$(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

View File

@@ -1,12 +0,0 @@
#!/bin/sh
log()
{
logger -t cwmp.hacks "$@"
}
timeout 2 uci -c /var/state show icwmp >/dev/null 2>&1
if [ "$?" -eq "143" ]; then
log "Seems uci got stuck, restarting cwmp ...."
/etc/init.d/icwmpd restart
fi

View File

@@ -537,17 +537,10 @@ start_service() {
procd_append_param command -b
fi
# Add crontab job to check uci stuck
if ! grep -q "uci_stuck_workaround.sh" /etc/crontabs/root; then
echo "*/1 * * * * /etc/icwmpd/uci_stuck_workaround.sh" >>/etc/crontabs/root
ubus call uci commit '{"config":"cron"}'
fi
procd_set_param respawn \
"${respawn_threshold:-5}" \
"${respawn_timeout:-10}" "${respawn_retry:-3}"
procd_set_param watch network.interface
procd_close_instance
}
@@ -575,6 +568,20 @@ reload_service() {
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 return
log "Skipping ubus reload due to ubus timeout"
return 0
fi
status="$(echo "${tr069_status}" | jsonfilter -qe '@.cwmp.status')"
if [ "$status" = "up" ]; then
ubus -t 1 call tr069 command '{"command":"reload"}'
fi
}

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

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.3.4
PKG_VERSION:=8.3.4.10
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=526690993c93720ee1707bba6b7a08e8c28f2dd9
PKG_SOURCE_VERSION:=4231e9496e63fb6d0ab74870c06f9345b001c5bf
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

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

@@ -64,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
@@ -80,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 #
@@ -143,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
@@ -179,6 +178,8 @@ 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_rdisc6=y
CONFIG_PACKAGE_resolveip=y
@@ -248,7 +249,6 @@ 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
@@ -330,3 +330,7 @@ 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

@@ -61,7 +61,7 @@ function feeds_update {
(
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

@@ -365,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)
@@ -415,6 +431,15 @@ 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

View File

@@ -339,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
@@ -389,6 +405,15 @@ 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

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libeasy
PKG_VERSION:=7.4.2
PKG_VERSION:=7.4.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=11eb263666556c419220e2a50c3a67422e79f884
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

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libethernet
PKG_VERSION:=7.2.107
PKG_VERSION:=7.2.109
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9c0e9ecd62b79d4e89b4f013f04124870d237395
PKG_SOURCE_VERSION:=cc72f5ab0171cd0fc29bb48dafff6751ab2f0d9c
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

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.0.10
PKG_VERSION:=1.0.12
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:=e6ba6fca814f6c83a3d6ff4a5b7560fbc36d3101
PKG_SOURCE_VERSION:=a9ea70b6c0adb246685f7632e38853e0d803a7c3
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.8
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:=e1de60c2c05935fb2f4adfc1f73feba0bb32ade6
PKG_SOURCE_VERSION:=99ed0ea5ef83cebb444d135909573ccb2b37fe45
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

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

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.4.16
PKG_VERSION:=7.4.16.5
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=dfafd5f7ea387d6119a9eb692e435f98b16f75a3
PKG_SOURCE_VERSION:=0965d52a20207dc2a3ed6b4c669fc3483c8a1194
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

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=4.5.0.10
PKG_VERSION:=4.5.0.18
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=a03ea6bee6856000496d858f3b4c8d161612472d
PKG_SOURCE_VERSION:=261632ff5dbcf5ad0827b49b4e2fd97483d3d616
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -1,14 +1,14 @@
config agent 'agent'
option enabled '0'
option enabled '1'
option debug '0'
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
@@ -181,16 +181,15 @@ 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

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=4.5.0.2
PKG_VERSION:=4.5.0.3
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=3c915f5f17ff339487a3b8533d384a23888b9c9a
PKG_SOURCE_VERSION:=c852c9c9a706becd30237484153286f39841ef23
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
LOCAL_DEV=0

View File

@@ -49,7 +49,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

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

@@ -15,7 +15,7 @@ snooping_bridges=
__device_is_bridge() {
local device="$2"
local devsec__="$(uci show network | grep name=.*$device | grep -v ifname | 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
@@ -46,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=
@@ -302,7 +299,12 @@ config_mcproxy_instance() {
# for snooping to work we should enable it on the bridge, doing it from
# here instead of from inside network config
if [ "$downstreams" != "$snooping_bridges" ]; then
config_sysfs_mcast_snooping "$downstreams" 1
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"

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

@@ -22,4 +22,12 @@ config OBUSPA_CONTROLLER_MTP_VERIFY
config OBUSPA_ENABLE_TEST_CONTROLLER
bool "Adds a test controller by default"
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.5.5
PKG_VERSION:=7.0.5.5.9
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=ad32d70ccbe3942b945bf6caf74988bd5660cf96
PKG_SOURCE_VERSION:=e4ca88a603ff84fdf54107b9b34c82b44a658fc1
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
@@ -32,7 +32,7 @@ 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
endef
define Package/obuspa/description
@@ -81,10 +81,14 @@ else
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

View File

@@ -7,7 +7,7 @@ config obuspa 'global'
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'

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}"
@@ -728,13 +728,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"
}
@@ -942,7 +942,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}"

View File

@@ -82,6 +82,17 @@
"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": [
@@ -544,6 +555,23 @@
"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"
]
}
]
},
@@ -553,8 +581,7 @@
{
"object": "Device.",
"perm": [
"PERMIT_NONE",
"PERMIT_SUBS_EVT_OPER_COMP"
"PERMIT_NONE"
]
},
{
@@ -567,66 +594,6 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Time.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.UPnP.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Bridging.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Ethernet.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.DHCPv4.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.DHCPv6.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Hosts.",
"perm": [
@@ -637,37 +604,6 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.NAT.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.PPP.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Routing.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.IEEE1905.",
"perm": [
@@ -678,16 +614,6 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.InterfaceStack.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.DynamicDNS.",
"perm": [
@@ -698,56 +624,6 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.LANConfigSecurity.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Security.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.RouterAdvertisement.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Services.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.UserInterface.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.PeriodicStatistics.",
"perm": [
@@ -758,27 +634,6 @@
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.SoftwareModules.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object":"Device.Users.",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.LocalAgent.Subscription.",
"perm": [
@@ -805,30 +660,16 @@
]
},
{
"object": "Device.DNS.",
"object": "Device.WiFi.AccessPoint.{i}.WPS.InitiateWPSPBC()",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
},
{
"object": "Device.IP.",
"object": "Device.WiFi.DataElements.Network.SetSSID()",
"perm": [
"PERMIT_GET",
"PERMIT_GET_INST",
"PERMIT_OBJ_INFO",
"PERMIT_CMD_INFO",
"PERMIT_OPER",
"PERMIT_SUBS_VAL_CHANGE",
"PERMIT_SUBS_OBJ_ADD",
"PERMIT_SUBS_OBJ_DEL",
"PERMIT_SUBS_EVT_OPER_COMP"
]
}

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

@@ -1,121 +0,0 @@
diff --git a/src/core/device_bulkdata.c b/src/core/device_bulkdata.c
index 8e44f59..a77bd71 100755
--- a/src/core/device_bulkdata.c
+++ b/src/core/device_bulkdata.c
@@ -2995,6 +2995,33 @@ char *bulkdata_generate_json_report(bulkdata_profile_t *bp, char *report_timesta
return result;
}
+/*********************************************************************//**
+**
+** 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
@@ -3024,7 +3051,7 @@ void append_string_to_target(char *str, char **output)
}
assert(tmp != NULL);
- asprintf(output, "%s%s", tmp, str);
+ safe_asprintf(output, "%s%s", tmp, str);
free(tmp);
}
@@ -3072,9 +3099,9 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
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);
@@ -3091,14 +3118,14 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
// 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);
+ safe_asprintf(&timestamp, "%s", buf);
}
}
@@ -3151,9 +3178,9 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
if (type) {
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", param_path, separator, param_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, param_path, separator, param_value, separator, type, rowseparator);
assert(str != NULL);
append_string_to_target(str, &output);
@@ -3161,9 +3188,9 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
str = NULL;
} else {
if (str1 == NULL || strlen(str1) == 0)
- asprintf(&str, "%s", param_path);
+ safe_asprintf(&str, "%s", param_path);
else
- asprintf(&str, "%c%s", separator, param_path);
+ safe_asprintf(&str, "%c%s", separator, param_path);
assert(str != NULL);
append_string_to_target(str, &str1);
@@ -3171,9 +3198,9 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
str = NULL;
if (str2 == NULL || strlen(str2) == 0)
- asprintf(&str, "%s", param_value);
+ safe_asprintf(&str, "%s", param_value);
else
- asprintf(&str, "%c%s", separator, param_value);
+ safe_asprintf(&str, "%c%s", separator, param_value);
assert(str != NULL);
append_string_to_target(str, &str2);
@@ -3190,7 +3217,7 @@ char *bulkdata_generate_csv_report(bulkdata_profile_t *bp, char *field_separator
}
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);

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

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=periodicstats
PKG_VERSION:=1.5.3
PKG_VERSION:=1.5.5
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

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

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

View File

@@ -1,13 +1,15 @@
#!/bin/sh
configure_equipment_id() {
eqid="$(uci -q get xpon.ani.equipment_id)"
set_equipment_id $eqid
}
configure_loid_authentication() {
loid="$(uci -q get xpon.ani.loid)"
loid_pwd="$(uci -q get xpon.ani.loid_password)"
set_loid_authentication $loid $loid_pwd
configure_equipment_id() {
local eqid="$(uci -q get xpon.ani.equipment_id)"
set_equipment_id "${eqid}"
}
configure_loid_authentication() {
local loid="$(uci -q get xpon.ani.loid)"
local loid_pwd="$(uci -q get xpon.ani.loid_password)"
set_loid_authentication "${loid}" "${loid_pwd}"
}

View File

@@ -15,10 +15,6 @@ include /lib/ethernet
. /lib/qos/shaper.sh
. /lib/qos/airoha.sh
get_rate_per_queue() {
echo "0"
}
get_burst_size_per_queue() {
echo "0"
}

View File

@@ -34,10 +34,6 @@ get_port_number() {
done
}
get_rate_per_queue() {
echo "0"
}
get_burst_size_per_queue() {
echo "0"
}

View File

@@ -31,7 +31,7 @@ generate_queue(){
uci set qos.@queue[-1].ifname="$ifname"
uci set qos.@queue[-1].precedence="$order"
uci set qos.@queue[-1].scheduling="SP"
uci set qos.@queue[-1].rate=$(get_rate_per_queue)
uci set qos.@queue[-1].rate="0"
uci set qos.@queue[-1].burst_size=$(get_burst_size_per_queue)
uci set qos.@queue[-1].weight="1"
done

View File

@@ -15,10 +15,6 @@ Q_COUNT=0
SP_Q_PRIO=7
SOQ_wgt=0
get_rate_per_queue() {
echo "1000000"
}
get_burst_size_per_queue() {
echo "1500"
}
@@ -405,18 +401,20 @@ pre_configure_queue() {
}
get_link_rate() {
intf="$1"
speed=1000
local ifname="$1"
local phycap="$(ethtool $ifname | grep -A 10 "Supported link modes" | grep 00 | tail -n 1 | awk '{print$NF}')"
local speed=1000
if [ -d "/sys/class/net/$intf/" ]; then
speed=$(cat /sys/class/net/$intf/speed 2>/dev/null)
[ -z "$speed" ] & speed=1000
fi
if [ $speed -le 0 ]; then
# assuming default 1000
speed=1000
fi
# Get the max capability of this port
case "$phycap" in
10000*) speed=10000 ;;
5000*) speed=5000 ;;
2500*) speed=2500 ;;
1000*) speed=1000 ;;
100*) speed=100 ;;
10*) speed=10 ;;
*) speed=1000 ;;
esac
echo "$speed"
}

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rulengd
PKG_VERSION:=1.2.9
PKG_VERSION:=1.2.10
PKG_RELEASE:=1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/rulengd.git
PKG_SOURCE_VERSION:=1a3bf130d99ed275152c7d29b309d12c4400613d
PKG_SOURCE_VERSION:=a32e325090d4303fe9aec786f81f0699006d21ab
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=stunc
PKG_RELEASE:=1
PKG_VERSION:=1.3.3
PKG_VERSION:=1.3.3.1
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/stunc.git
PKG_SOURCE_VERSION:=7984a54a1e5dd95db0f4657ae974671ba7f37f27
PKG_SOURCE_VERSION:=242326500576f644e7c730f556ce4a896c47be8c
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-base
PKG_VERSION:=3.1.42
PKG_VERSION:=3.1.53
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu.git
PKG_SOURCE_VERSION:=6a0cc2795607895bbe8c8e3598e3f5f435af3499
PKG_SOURCE_VERSION:=0108f9c192a168936ee223dbf4d85a7ceba7093d
PKG_MIRROR_HASH:=skip
SULU_MOD:=core

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-builder
PKG_VERSION:=3.1.42
PKG_VERSION:=3.1.53
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-builder.git
PKG_SOURCE_VERSION:=76cb288b1496756e8ed43368348127ecfef5751d
PKG_SOURCE_VERSION:=5d0336f678a116cdf4c73fec7c0d8ab06c0f65d6
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/sulu-$(PKG_VERSION)/sulu-builder-$(PKG_SOURCE_VERSION)
@@ -179,7 +179,13 @@ endef
define Package/sulu-builder/install
$(Package/sulu/install/Default)
$(INSTALL_DIR) $(1)/sulu/presets
$(INSTALL_DIR) $(1)/sulu/settings
$(INSTALL_DIR) $(1)/sulu/widget-presets
$(CP) $(PKG_BUILD_DIR)/build/dist/* $(1)/sulu
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/device/presets/*.json $(1)/sulu/presets/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/device/settings/*.json $(1)/sulu/settings/
$(INSTALL_DATA) $(PKG_BUILD_DIR)/build/device/widget-presets/*.json $(1)/sulu/widget-presets/
$(Package/sulu/install/Post)
endef

View File

@@ -4,11 +4,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-lcm
PKG_VERSION:=3.1.27
PKG_VERSION:=3.1.52
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-lcm.git
PKG_SOURCE_VERSION:=6b1d30d7918adeb19c5177dd7c5472cb0dac9896
PKG_SOURCE_VERSION:=af612edb4ea186d9c71fc2157883bf686b14e376
PKG_MIRROR_HASH:=skip
include ../sulu-builder/sulu.mk

View File

@@ -4,11 +4,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-multi-ap
PKG_VERSION:=3.1.42
PKG_VERSION:=3.1.52
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-multi-ap.git
PKG_SOURCE_VERSION:=e209cbc04a92494b96c74cee443e1b385c6687fe
PKG_SOURCE_VERSION:=ac4a73768844796be5678559b64269e6fe073192
PKG_MIRROR_HASH:=skip
include ../sulu-builder/sulu.mk

View File

@@ -4,11 +4,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-parental-control
PKG_VERSION:=3.1.38
PKG_VERSION:=3.1.52
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/sulu-parental-control.git
PKG_SOURCE_VERSION:=dd9dab9fb8aca87991cd2cc02c5fedd8baee3b97
PKG_SOURCE_VERSION:=e1c5b4473fba9d42ef7d1e95e634416585bf5887
PKG_MIRROR_HASH:=skip
include ../sulu-builder/sulu.mk

27
testnet/Makefile Normal file
View File

@@ -0,0 +1,27 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=testnet
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPL-2.0-only
include $(INCLUDE_DIR)/package.mk
define Package/testnet
CATEGORY:=Utilities
TITLE:=Check WAN IP Connection
DEPENDS:=+ndisc6
endef
define Package/testnet/description
Check WAN IP connection
endef
define Build/Compile
endef
define Package/testnet/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,testnet))

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# do not start testnet if the feature is explicitly disabled
[ "$(uci -q get netmode.testnet.enabled)" = "0" ] && exit 0
[ "$(uci -q get testnet.global.enabled)" = "0" ] && exit 0
[ "$ACTION" == "ifup" -o "$ACTION" == "ifdown" ] || exit 0
@@ -14,8 +14,4 @@ interface_check() {
}
interface_check
if [ -n "$(pgrep -f testnet)" ]; then
testnet once
else
testnet &
fi
/etc/init.d/testnet reload

View File

@@ -0,0 +1,23 @@
#!/bin/sh /etc/rc.common
START=21
STOP=10
USE_PROCD=1
TESTNET=$(which testnet)
start_service() {
# do not start testnet if the feature is explicitly disabled
[ "$(uci -q get testnet.global.enabled)" = "0" ] && return 0
[ -n "$TESTNET" ] && {
procd_open_instance
procd_set_param command "$TESTNET"
procd_set_param respawn
procd_close_instance
}
}
reload_service() {
procd_send_signal testnet
}

View File

@@ -1,7 +1,7 @@
#!/bin/sh
. /lib/functions.sh
. /lib/network/utils.sh
RELOAD=0
WAITING=0
NETCON=0
LASTSTATUS=""
@@ -14,29 +14,32 @@ test_connection() {
local defroute="$(ip r | grep default | awk '{print$3}' | head -1)"
local def6route="$(ip -f inet6 r | grep default | awk '{print$3}')"
local ping6dev="$(ip -f inet6 r | grep default | awk '{print$5}')"
local resolvfile="$(uci -q get 'dhcp.@dnsmasq[0].resolvfile')"
if [ -n "$addr" ]; then
ping -q -w 5 -c 1 $addr >/dev/null 2>&1 && return 0
ping -q -w 5 -c 1 "$addr" >/dev/null 2>&1 && return 0
elif [ -n "$defroute" ]; then
ping -q -w 5 -c 1 $defroute >/dev/null 2>&1 && return 0
for nmsrv in $(grep nameserver /var/resolv.conf.auto | awk '{print$2}'); do
ping -q -w 5 -c 1 $nmsrv >/dev/null 2>&1 && return 0
done
ping -q -w 5 -c 1 "$defroute" >/dev/null 2>&1 && return 0
if [ -e "$resolvfile" ]; then
for nmsrv in $(grep nameserver "$resolvfile" | awk '{print$2}'); do
ping -q -w 5 -c 1 "$nmsrv" >/dev/null 2>&1 && return 0
done
fi
elif [ -n "$def6route" -a -n "$ping6dev" ]; then
ndisc6 -w 5 -1 $def6route $ping6dev >/dev/null 2>&1 && return 0
ndisc6 -w 5 -1 "$def6route" "$ping6dev" >/dev/null 2>&1 && return 0
fi
return 1
}
internet_test() {
local link dest
local dest
# use the destination address given in config for connectivity check
dest="$(uci -q get netmode.testnet.destination)"
dest="$(uci -q get testnet.global.destination)"
# for backwards compatibility
[ -n "$dest" ] || dest="$(uci -q get diagnostics.@connectivity[0].destination)"
[ -n "$dest" ] || dest="$(uci -q get 'system.@system[0].netping_addr')"
test_connection $dest
test_connection "$dest"
if [ "$?" -eq 0 ]; then
NETCON=1
@@ -50,7 +53,7 @@ internet_test() {
connectivity_test() {
internet_test
if [ $NETCON -eq 1 ]; then
if [ "$NETCON" -eq 1 ]; then
CURSTATUS=1
[ "$CURSTATUS" == "$LASTSTATUS" ] || ubus send internet '{"status" : "online"}'
LASTSTATUS=1
@@ -61,12 +64,14 @@ connectivity_test() {
fi
}
if [ "$1" == "once" ]; then
connectivity_test
exit 0
fi
trap RELOAD=1 HUP
while true; do
if [ "$WAITING" -eq 0 ]; then
sleep "$SLEEP_TIME" &
WAITING=1
fi
RELOAD=0
connectivity_test
sleep $SLEEP_TIME
[ "$RELOAD" -eq 0 ] && wait && WAITING=0
done

View File

@@ -1,7 +1,7 @@
config TR104_RUNAS_BBFDM_MICROSERVICE
bool "Use bbfdmd datamodel microservice to run tr104, preferred if TR104 and BBFDMD are on different base"
depends on PACKAGE_tr104
default n
default y
config TR104_VENDOR_EXTENSIONS
bool "Use TR104 vendor extensions"

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=tr104
PKG_VERSION:=1.0.12
PKG_VERSION:=1.0.13.3
LOCAL_DEV:=0
ifeq ($(LOCAL_DEV),0)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/voice/tr104.git
PKG_SOURCE_VERSION:=393ad165e64413067de84b452126aebf4bcbcb2d
PKG_SOURCE_VERSION:=38ef8533501af818638339acce21fc1fdfc95ee2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
endif
@@ -32,7 +32,7 @@ define Package/$(PKG_NAME)
SUBMENU:=TRx69
TITLE:=TR104 Datamodel Daemon
MENU:=1
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +asterisk
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +asterisk +libcurl +PACKAGE_libbbfdm-api:libbbfdm-api
endef
define Package/$(PKG_NAME)/description
@@ -54,7 +54,7 @@ CMAKE_OPTIONS += \
-DTR104_EXTENSION_DIR:String="iowrt"
endif
ifeq ($(CONFIG_RUNAS_BBFDM_MICROSERVICE),y)
ifeq ($(CONFIG_TR104_RUNAS_BBFDM_MICROSERVICE),y)
MAKE_PATH:=libdm
EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/libbbfdm-api
CMAKE_OPTIONS += -DRUNAS_BBFDM_MICROSERVICE:BOOL=ON
@@ -76,7 +76,7 @@ define Package/$(PKG_NAME)/install
ifeq ($(CONFIG_TR104_VENDOR_EXTENSIONS),y)
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libdm/extensions/iowrt/libtr104ext.so $(1)/etc/tr104/plugins/
endif
ifeq ($(CONFIG_RUNAS_BBFDM_MICROSERVICE),y)
ifeq ($(CONFIG_TR104_RUNAS_BBFDM_MICROSERVICE),y)
$(INSTALL_BIN) ./files/etc/init.d/tr104d.bbfdm $(1)/etc/init.d/tr104d
else
$(INSTALL_DIR) $(1)/usr/sbin

View File

@@ -6,11 +6,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=usp-js
PKG_VERSION:=1.2.3
PKG_VERSION:=1.2.4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/websdk/usp-js.git
PKG_SOURCE_VERSION:=61cf7adb3258820f12f5dc02c69c5bdd612ed4cd
PKG_SOURCE_VERSION:=fa4586a0fc5fe13bc83165c8401e63d84db89e72
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip

View File

@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=voicemngr
PKG_RELEASE:=1
PKG_VERSION:=1.1.2
PKG_VERSION:=1.1.8
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
@@ -19,7 +19,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:=25571796f18c91a2070f98881bd1205f15575fea
PKG_SOURCE_VERSION:=3eff99d3bd62cbbc176c71f77a2df495f4e46e62
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:=wifimngr
PKG_VERSION:=16.2.1
PKG_VERSION:=16.2.1.2
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=48082bc03ef03e0c3a9e843523482b017e8676e1
PKG_SOURCE_VERSION:=a95b5a3d0c87ad486752c2a7423b017c8bb0d0e6
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz