Compare commits

...

57 Commits

Author SHA1 Message Date
Sukru Senli
671bdd8fc3 bbf-1.0-2019-12-28 2020-01-07 11:38:15 +01:00
vdutta
bcdb8eed33 ieee1905: Add get_topology command 2020-01-02 19:09:18 +05:30
vdutta
bb7429e8ad ieee1905: Pretty print multiAP cmdu events 2019-12-30 19:22:09 +05:30
Amin Ben Ramdhane
0ebc773b80 bbf: use src local if the src folder exists 2019-12-28 13:23:53 +01:00
Amin Ben Ramdhane
ec435e51d7 icwmp: remove unused library 2019-12-28 13:16:00 +01:00
vdutta
87ad324123 ieee1905: Generating topology/push button event
- Generating topology change event on ubus "client" event
 - Generating push button event on ubus "wifi.wps", "in-progress" event
2019-12-24 15:11:14 +05:30
vdutta
962ffd4969 ieee1905: Added configure Discovery timer uci option 2019-12-24 13:01:41 +05:30
vdutta
a142e4ebfc ieee1905: Added support for 1905 multiap extensions 2019-12-23 17:45:11 +05:30
Anjan Chanda
0cbc3072d1 wifimngr: 2.5.0 2019-12-18 15:25:48 +01:00
Anjan Chanda
d1ba7e337a easy-soc-libs: version-2.5.0 2019-12-18 15:22:56 +01:00
vdutta
6d9c4195be meshcomms: Removing meshcomms pkg
- Removing meshcomms pkg as functionality moved in ieee1905
2019-12-18 19:00:57 +05:30
vdutta
f304a43ecf ieee1905: MultiAP code segregation 2019-12-16 19:40:45 +05:30
Amin Ben Ramdhane
56d540050f tr098: 1.0-2019-12-11 2019-12-11 17:07:41 +01:00
Amin Ben Ramdhane
81f449d288 icwmp: 4.0-2019-12-11 2019-12-11 17:05:46 +01:00
Amin Ben Ramdhane
167cdf8053 icwmp: compile icwmp-tr098d binary only if CONFIG_PACKAGE_icwmp-tr098 is selected 2019-12-11 17:00:59 +01:00
Sukru Senli
da53a2ef34 bbf: correct license 2019-12-10 16:15:25 +01:00
Sukru Senli
d86322a1a7 icwmp: correct license 2019-12-10 16:15:12 +01:00
Strhuan Blomquist
be83b9b677 Delete cve-check.sh 2019-12-10 15:40:52 +01:00
Amin Ben Ramdhane
e247f50a38 bbf: 1.0-2019-12-10 2019-12-10 10:36:13 +01:00
Amin Ben Ramdhane
b71d08d543 libbfdm: add tr157 files to include repo 2019-12-10 10:09:28 +01:00
Amin Ben Ramdhane
550c0aa4b5 tr098: 1.0-2019-12-09 2019-12-09 18:11:49 +01:00
Amin Ben Ramdhane
5c7962b353 icwmp: 4.0-2019-12-07 2019-12-09 11:49:10 +01:00
Amin Ben Ramdhane
67a4246293 bbf: 1.0-2019-12-07 2019-12-09 11:46:45 +01:00
Amin Ben Ramdhane
3fbd6315a4 opkgd: add new package 2019-12-09 11:43:52 +01:00
vdutta
4143aeb032 ieee1905: 1905 meshcomms stack integration 2019-12-09 12:58:53 +05:30
Sukru Senli
f965eb801e icwmp:4.0-2019-12-02 2019-12-05 09:16:21 +01:00
Sukru Senli
5bfe6638e5 bbf: license is changed to LGPLv2.1 2019-12-04 09:55:07 +01:00
Jakob Olsson
21c21bf609 netmode: on revert write backup cfgs prior to commiting and restart network 2019-12-03 11:41:16 +01:00
Sukru Senli
abd2e29a85 icwmp-4.0-2019-12-02 2019-12-03 11:36:31 +01:00
Jakob Olsson
c0931baab2 owsd: include fix for memory leak on too many requests 2019-12-02 14:42:23 +01:00
Amin Ben Ramdhane
d515462ba9 icwmp: create a subpackage icwmp-tr098 for TR098 data model 2019-11-29 15:33:41 +01:00
Amin Ben Ramdhane
2573d76b4e icwmp: 4.0-2019-11-28 2019-11-28 23:10:53 +01:00
Amin Ben Ramdhane
e15f018362 bbf: 1.0-2019-11-11 2019-11-28 23:08:07 +01:00
Amin Ben Ramdhane
927bad6225 tr098: 1.0-2019-11-28 2019-11-28 23:06:19 +01:00
Anjan Chanda
bdcc74dca4 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 0accbd7 libwifi: intel: show chan utilization instead of load
-------------------------------------------------------------------------------
commit 0accbd7266b2742ad8921edd5dab974fc384a49a
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-27 10:19:28 +0100

    libwifi: intel: show chan utilization instead of load

Base directory -> /
 libwifi/modules/intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-11-27 10:21:45 +01:00
Anjan Chanda
d984398317 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 429988c libwifi: mtk: implement radio info api
* 8e66b90 libwifi: add radio diagnostic struct
-------------------------------------------------------------------------------
commit 429988cbd11edab826355f01b09f0588893b550a
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-24 19:47:59 +0100

    libwifi: mtk: implement radio info api

Base directory -> /
 libwifi/modules/mtk.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++
 libwifi/modules/mtk.h | 57 ++++++++++++++++++++++++++++++++++--
 libwifi/wifi.h        | 35 ++++++++--------------
 3 files changed, 148 insertions(+), 25 deletions(-)
-------------------------------------------------------------------------------
commit 8e66b90aeadf95dd69dfc7e067e06073039e87c0
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-22 16:45:41 +0100

    libwifi: add radio diagnostic struct

Base directory -> /
 libwifi/modules/mtk.c |  9 +++++++++
 libwifi/modules/mtk.h | 14 ++++++++++++++
 libwifi/wifi.h        | 18 +++++++++++-------
 3 files changed, 34 insertions(+), 7 deletions(-)
-------------------------------------------------------------------------------
2019-11-26 10:25:41 +01:00
Anjan Chanda
b78bb9d152 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 4b876cc show basic and supported rates in radio status
* aad1a26 add radio info details including diagnostics
-------------------------------------------------------------------------------
commit 4b876ccabc1df73202bfb165b35fd6464ed019aa
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-25 16:54:49 +0100

    show basic and supported rates in radio status

Base directory -> /
 wifimngr.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
commit aad1a26637b7a1429022d172af43847b2d28ae1c
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-24 19:54:31 +0100

    add radio info details including diagnostics

Base directory -> /
 wifimngr.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 74 insertions(+), 16 deletions(-)
-------------------------------------------------------------------------------
2019-11-26 10:25:19 +01:00
Yalu Zhang
a652b67d04 Change line/channel names from tapi/1 and tapi/2 to tapi/0 and tapi1
Unsupported lines/channes like TAPI/[2-6], BRCM/6 are also removed.

This change has the following benefits.
- To simplify the line/channel name handling in /etc/init.d/voice_client
- To have the consistent implementation both on Intel and on Broadcom platforms

(cherry picked from commit 40c426ca09)
2019-11-25 16:17:18 +01:00
vdutta
0f85c77d41 meshcomms: Optimize meshcomms library 2019-11-15 17:44:19 +05:30
vdutta
2a2d942329 meshcomms: Remove compile time Endianness dependency 2019-11-15 13:26:32 +05:30
Anjan Chanda
db2cbd0db2 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* edaace5 libwifi: intel: fix bss utilization and sta count
-------------------------------------------------------------------------------
commit edaace5a36b0dcac66a0371b40a2bc7ed99b4119
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-14 12:24:35 +0100

    libwifi: intel: fix bss utilization and sta count

Base directory -> /
 libwifi/modules/intel.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
-------------------------------------------------------------------------------
2019-11-14 12:32:13 +01:00
vdutta
210bbb570b meshcomms: Add dynamic meshcomms library 2019-11-12 13:47:12 +05:30
Anjan Chanda
b4f129d582 Update feed [ iopsys ] package [ wifixd ]
-------------------------------------------------------------------------------
* cd63143 supported hwmode does not depend on current hwmode
-------------------------------------------------------------------------------
commit cd63143c262e079d4a782ccfa60111f342e42e3e
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-11 12:56:13 +0100

    supported hwmode does not depend on current hwmode

Base directory -> /
 wifimngr.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
-------------------------------------------------------------------------------
2019-11-11 12:59:20 +01:00
Anjan Chanda
34548bd901 Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* d4e760c libwifi: intel: get maxassoc and hidden info in wifi_ap_info
* 703ce26 libwifi: bcm: get maxassoc and hidden info in wifi_ap_info
-------------------------------------------------------------------------------
commit d4e760c73a600749325b2cc6d5554696a6c956f8
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-11 12:25:32 +0100

    libwifi: intel: get maxassoc and hidden info in wifi_ap_info

Base directory -> /
 libwifi/modules/intel.c | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
commit 703ce26a3e884937ea520c624ee27b88d0991367
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-11 11:34:53 +0100

    libwifi: bcm: get maxassoc and hidden info in wifi_ap_info

Base directory -> /
 libwifi/modules/bcm.c | 30 ++++++++++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)
-------------------------------------------------------------------------------
2019-11-11 12:32:24 +01:00
Jakob Olsson
fe47b9a923 questd: print port speed when link is down #571 2019-11-08 14:24:42 +01:00
Ronny Nilsson
0edeb78d60 endptmngr: support parallell build. 2019-11-07 16:48:34 +01:00
Ronny Nilsson
05b8383f62 voice: modified dependencies again. Turns out we need both the old ones AND the new ones
Due to there are TWO dependency systems(!?). One for Kconfig and one for Make. And they
don't cooperate as good as one expects.
2019-11-07 16:48:00 +01:00
Strhuan Blomquist
3a6d301cfe added RTX to licenses info 2019-11-07 16:20:13 +01:00
Strhuan Blomquist
44bf5a6c33 added more info to PROPRIETARY tag 2019-11-07 16:18:10 +01:00
Kenneth Johansson
0f744a5cda genconfig: mirror var is CONFIG_LOCALMIRROR.
To get the use of the mirror to work.
2019-11-07 15:40:52 +01:00
Jakob Olsson
a8c7c8989f questd: relocate locks and move dump client invokes 2019-11-07 15:25:45 +01:00
Anjan Chanda
f14dc75e71 Update feed [ iopsys ] package [ wifimngr ]
-------------------------------------------------------------------------------
* 939b0ae rename 11xx_ caps to dot11xx_
* 381cd70 wifi_sta_disconnect() accepts macaddress in bytes
-------------------------------------------------------------------------------
commit 939b0ae989979a1ad1942373791fe230bc3e41ca
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-10-29 16:47:55 +0100

    rename 11xx_ caps to dot11xx_

Base directory -> /
 wifimngr.c | 144 ++++++++++++++++++-------------------------------------------
 1 file changed, 41 insertions(+), 103 deletions(-)
-------------------------------------------------------------------------------
commit 381cd70238230aa7fc56b85369f265272698165f
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-09-23 09:26:41 +0200

    wifi_sta_disconnect() accepts macaddress in bytes

Base directory -> /
 wifimngr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
-------------------------------------------------------------------------------
2019-11-07 13:35:04 +01:00
Anjan Chanda
a218fa0130 libwifix: mtk: fix encryption type 2019-11-07 13:23:59 +01:00
Anjan Chanda
d21057904b Update feed [ iopsys ] package [ easy-soc-libs ]
-------------------------------------------------------------------------------
* 3ddc5af libwifi: mtk: fix cipher type in get_security
-------------------------------------------------------------------------------
commit 3ddc5af4c29e98c14424fd5d7ef15f72d31b53dc
Author: Anjan Chanda <anjan.chanda@iopsys.eu>
Date: 2019-11-07 12:01:54 +0100

    libwifi: mtk: fix cipher type in get_security

Base directory -> /
 libwifi/modules/mtk.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
-------------------------------------------------------------------------------
2019-11-07 13:14:13 +01:00
Sukru Senli
69aaece76b bbf: bump version to 1.0-2019-11-05 2019-11-07 12:51:50 +01:00
vdutta
167bfd2e49 easy_qos: Mark packets with iptables and classcfg 2019-11-06 15:21:45 +05:30
Sukru Senli
5ac828fc16 easy-qos: use prerouting chain instead of output 2019-11-06 08:28:26 +01:00
31 changed files with 582 additions and 338 deletions

View File

@@ -1,22 +1,22 @@
#
# Copyright (C) 2019 Iopsys
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=1.0-2019-11-02
PKG_VERSION:=1.0-2019-12-28
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a33b47b9c34bdd174e39b54525b082259c60850c
PKG_SOURCE_VERSION:=87df7048821fb8a6dcd35f0959f97aa08688f53b
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE:=LGPL-2.1
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
@@ -36,6 +36,13 @@ define Package/libbbfdm/description
Test description will update later.
endef
USE_LOCAL=$(shell ls ./src/ 2>/dev/null >/dev/null && echo 1)
ifneq ($(USE_LOCAL),)
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
endif
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_LIBBBFDM_VENDOR_PREFIX)\\\"
TARGET_CFLAGS += \
@@ -81,6 +88,7 @@ define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/libbbfdm
$(CP) $(PKG_BUILD_DIR)/*.h $(1)/usr/include/libbbfdm/
$(CP) $(PKG_BUILD_DIR)/dmtree/tr181/*.h $(1)/usr/include/libbbfdm/
$(CP) $(PKG_BUILD_DIR)/dmtree/tr157/*.h $(1)/usr/include/libbbfdm/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/bin/.libs/libbbfdm.{a,so*} $(1)/usr/lib/
endef

View File

@@ -30,7 +30,7 @@ define Package/dectmngr2
CATEGORY:=Utilities
TITLE:=Dectmngr2
URL:=
DEPENDS:= +natalie-dect-h bcmkernel +libubox +ubus +libpicoevent endptmngr
DEPENDS:= +natalie-dect-h +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen @(PACKAGE_bcmkernel||PACKAGE_bcmopen) +libubox +ubus +libpicoevent endptmngr
endef
define Package/dectmngr2/description

View File

@@ -4,6 +4,7 @@ START=99
USE_PROCD=1
RULE_LIST="/tmp/easy_qos_rule.list"
CLIENT_LIST="/tmp/easy_qos_class_client.list"
BRIDGE_INTF=""
[ -f /etc/profile.d/intel.sh ] && {
@@ -16,6 +17,13 @@ log() {
}
exec_log() {
${@}
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
fi
}
exec_class_log() {
${@} |grep -i successful
if [ "${?}" -ne 0 ]; then
log "Failed to create ${@}";
@@ -46,6 +54,114 @@ get_priority() {
esac
}
get_mark() {
local prio=$(echo $1|tr [A-Z] [a-z]);
case "${prio}" in
"lowest")
echo "0x41/0x3df";;
"low")
echo "0x82/0x3df";;
"besteffort")
echo "0xc3/0x3df";;
"normal")
echo "0x104/0x3df";;
"video")
echo "0x145/0x3df";;
"medium")
echo "0x186/0x3df";;
"high")
echo "0x1c7/0x3df";;
"highest")
echo "0x208/0x3df";;
esac
}
clean_client_entries() {
[ -f ${CLIENT_LIST} ] && rm ${CLIENT_LIST}
}
map_client_entries() {
local clients ip mac host
json_load "$(ubus call router.network 'clients')"
json_get_keys keys
for key in ${keys};
do
json_select ${key}
json_get_vars ipaddr macaddr hostname
clients="${macaddr} ${ipaddr} ${hostname};${clients}"
json_select ..
done
json_init
IFS=";"
for client in ${clients};
do
macaddr=$(echo ${client} | cut -d" " -f1)
json_add_object "${macaddr//:/_}"
json_add_string "ip" "$(echo ${client} | cut -d" " -f2)"
json_add_string "macaddr" "$(echo ${client} | cut -d" " -f1)"
json_add_string "host" "$(echo ${client} | cut -d" " -f3)"
json_close_object
done
IFS=' '
echo `json_dump` > ${CLIENT_LIST}
json_cleanup
}
# Find the IP of a corresponding mac from arp table
get_ipaddress() {
local clients ip mac host
json_load "$(cat ${CLIENT_LIST})"
json_get_keys keys
# jshn seems a bit iffy on having : in key, replace by _
json_select "${1//:/_}" 2 > /dev/null
json_get_var ip ip
echo "$ip"
}
check_and_create() {
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi
}
create_ip_rule() {
local proto=$1; shift
local src_ip=$1; shift
local mark=$1; shift
local ports=$1;
local cmd="";
cmd="-j EXTMARK --set-mark ${mark}";
if [ "${proto}" != "icmp" ]; then
if [ -n "${ports}" ]; then
cmd="--match multiport --dports ${ports} ${cmd}";
fi
fi
if [ "${proto}" == "icmp" ]; then
cmd="-p icmp -m icmp --icmp-type 8 $cmd"
elif [ "${proto}" == "all" ]; then
cmd="-p all $cmd"
else
cmd="-p ${proto} -m ${proto} $cmd"
fi
cmd="-s ${src_ip} $cmd"
check_and_create ${cmd}
}
is_lan_bridge() {
local _section=$1
local _type
@@ -67,10 +183,10 @@ get_bridge_interface() {
validate_rule_section()
{
uci_validate_section easy_qos rule "${1}" \
'priority:string:none' \
'macaddr:string:none' \
'priority:string' \
'macaddr:string' \
'proto:string:none' \
'port:list(uinteger):none' \
'port:list(uinteger)' \
'comment:string:none'
}
@@ -82,8 +198,14 @@ clear_existing_rules() {
while read line
do
log "Deleting old classification rules"
exec_log classcfg -D ${line} -i ${BRIDGE_INTF}
exec_class_log classcfg -D ${line} -i ${BRIDGE_INTF}
done <${RULE_LIST}
local rule=$(iptables -t mangle -S PREROUTING|grep -m 1 EXTMARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S PREROUTING|grep -m 1 EXTMARK |sed 's/-A/-D/1')
done
sync
[ -f ${RULE_LIST} ] && rm ${RULE_LIST}
@@ -104,13 +226,16 @@ create_rule() {
if [ "${mac_addr}" != "none" ]; then
cmd="--smac ${mac_addr} ${cmd}";
fi
if [ "${ports}" != "none" ]; then
IFS=","
for port in ${ports};
do
cmd="--dport ${port}:${port} ${cmd}";
done
IFS=' '
if [ "${proto}" != "icmp" ]; then
if [ "${ports}" != "none" ]; then
IFS=","
for port in ${ports};
do
cmd="--dport ${port}:${port} ${cmd}";
done
IFS=' '
fi
fi
if [ "${proto}" != "none" ]; then
cmd="-p ${proto} $cmd"
@@ -119,14 +244,14 @@ create_rule() {
cmd="-A ${rule_name} $cmd"
# Store the rule_names for cleanup on reload
exec_log classcfg ${cmd}
exec_class_log classcfg ${cmd}
[ $? -eq 0 ] && \
echo ${rule_name} >> ${RULE_LIST}
}
manage_rule() {
local cfg="$1"
local priority macaddr proto port comment prio_num port_list
local priority macaddr proto port comment prio_num port_list ip ipmark
validate_rule_section "${1}" || {
log "Validation of section failed"
@@ -135,22 +260,33 @@ manage_rule() {
prio_num=$(get_priority ${priority})
port_list=$(echo ${port}|sed 's/ /,/g')
ipmark=$(get_mark ${priority})
ip=$(get_ipaddress ${macaddr})
if [ -n "${prio_num}" ]; then
if [ "${proto}" == "none" -o "${proto}" == "tcpudp" ]; then
create_rule tcp ${macaddr} ${prio_num} ${port_list}
create_rule udp ${macaddr} ${prio_num} ${port_list}
if [ -n "${ip}" ]; then
create_ip_rule tcp ${ip} ${ipmark} ${port_list}
create_ip_rule udp ${ip} ${ipmark} ${port_list}
fi
else
create_rule ${proto} ${macaddr} ${prio_num} ${port_list}
if [ -n "${ip}" ]; then
create_ip_rule ${proto} ${ip} ${ipmark} ${port_list}
fi
fi
fi
}
reload_service() {
get_bridge_interface
map_client_entries
clear_existing_rules
config_load easy_qos
config_foreach manage_rule rule
clean_client_entries
}
start_service() {

View File

@@ -103,18 +103,18 @@ validate_rule_section()
# Clear existing rules before applying new rules
clear_existing_rules() {
local rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
local rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
while [ -n "${rule}" ]; do
exec_log iptables -t mangle ${rule}
rule=$(iptables -t mangle -S OUTPUT|grep -m 1 MARK |sed 's/-A/-D/1')
rule=$(iptables -t mangle -S PREROUTING | grep -m 1 MARK |sed 's/-A/-D/1')
done
}
check_and_create() {
iptables -t mangle -C OUTPUT ${@} 2>/dev/null
iptables -t mangle -C PREROUTING ${@} 2>/dev/null
# Create rule if not exists
if [ ${?} -ne 0 ]; then
exec_log iptables -t mangle -A OUTPUT ${@}
exec_log iptables -t mangle -A PREROUTING ${@}
else
log "Rule exists for ${@}"
fi

View File

@@ -11,7 +11,7 @@ PKG_VERSION:=1.0.1
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=b88afddd2f4cb216bfcd190f9096c138299c28e2
PKG_SOURCE_VERSION:=cec7ae3a5c8348ea2d81a2abac0599a098752e3a
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -2,18 +2,18 @@
# Copyright (C) 2019 iopsys Software Solutions AB
#
# This is free software, licensed under the GNU General Public License v2.
#
#
include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs
PKG_VERSION:=2.4.1
PKG_VERSION:=2.5.0
PKG_RELEASE:=1
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=63f749faa67670229a5cbaf39ee0fef92d8276f3
PKG_SOURCE_VERSION:=6bf3911521b6c9072c20798c59390280afd0f16f
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -29,6 +29,7 @@ RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_PARALLEL:=1
@@ -42,7 +43,7 @@ define Package/endptmngr
CATEGORY:=Utilities
TITLE:=Brcmslic
URL:=
DEPENDS:= +libubox +ubus +libpicoevent @(PACKAGE_bcmkernel||PACKAGE_bcmopen) @TARGET_HAS_VOICE
DEPENDS:= +libubox +ubus +libpicoevent +PACKAGE_bcmkernel:bcmkernel +PACKAGE_bcmopen:bcmopen @(PACKAGE_bcmkernel||PACKAGE_bcmopen) @TARGET_HAS_VOICE
endef
define Package/endptmngr/description

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=4.0-2019-10-17
PKG_VERSION:=4.0-2019-12-11
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ee2e6c4e4063b822895a6e2612acd4b06caeffa6
PKG_SOURCE_VERSION:=3fdaca7e3463d46a52f31496b0f84deb6b21eaf8
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -33,45 +33,52 @@ CWMP_REVISION=$(shell svnversion ./src/ -n|cut -f2 -d:)
include $(INCLUDE_DIR)/package.mk
define Package/icwmp_stun
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 stun Client
DEPENDS:=+libubus +libuci +libubox +libjson-c +libopenssl +libblobmsg-json
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 stun Client
DEPENDS:=+libubus +libuci +libubox +libjson-c +libopenssl +libblobmsg-json
endef
define Package/icwmp_xmpp
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 xmpp feature
DEPENDS:=+libuci +libubox +libexpat +libstrophe
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 xmpp feature
DEPENDS:=+libuci +libstrophe
endef
define Package/icwmp_twamp
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 twamp feature
DEPENDS:=+libuci
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 twamp feature
DEPENDS:=+libuci
endef
define Package/icwmp_udpechoserver
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 udpechoserver feature
DEPENDS:=+libuci
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 udpechoserver feature
DEPENDS:=+libuci
endef
define Package/icwmp_bulkdata
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm
SECTION:=utils
CATEGORY:=Utilities
TITLE:=TR-069 BulkData Collection
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +curl +libblobmsg-json +libbbfdm
endef
define Package/icwmp-tr098
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client for TR-098 Data Model
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libcurl +libtr098
endef
define Package/icwmp/Default
SECTION:=utils
CATEGORY:=Utilities
TITLE:=CWMP client
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm +libtr098
DEPENDS:=+libuci +libmicroxml +libubox +jshn +libubus +libblobmsg-json +libpthread +ubusd +shflags +getopt +zlib +libjson-c +libopenssl +curl +libbbfdm
endef
define Package/icwmp/description
@@ -103,13 +110,14 @@ define Build/Prepare
endef
endif
ifeq ($(CONFIG_TARGET_iopsys_ramips),y)
TARGET_CFLAGS += -DEX400
endif
TARGET_CFLAGS += \
-D_GNU_SOURCE -D_AADJ
ifeq ($(CONFIG_PACKAGE_icwmp-tr098),y)
CONFIGURE_ARGS += \
--enable-icwmp_tr098
endif
ifneq ($(CWMP_REVISION)_,_)
ifneq ($(CWMP_REVISION),exported)
ifneq ($(CWMP_REVISION),Unversioned directory)
@@ -158,21 +166,10 @@ CONFIGURE_ARGS += \
--enable-devel
endif
ifeq ($(CONFIG_PACKAGE_libtr098),y)
CONFIGURE_ARGS += \
--enable-tr098
endif
CONFIGURE_ARGS += \
--enable-tr181
define Package/icwmp-$(BUILD_VARIANT)/install
$(INSTALL_DIR) $(1)/etc/icwmpd
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/icwmpd $(1)/usr/sbin
ifeq ($(CONFIG_PACKAGE_libtr098),y)
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
endif
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/cwmp $(1)/etc/config
$(INSTALL_CONF) $(PKG_BUILD_DIR)/config/firewall.cwmp $(1)/etc/firewall.cwmp
@@ -190,6 +187,11 @@ endif
$(CP) ./files/* $(1)/
endef
define Package/icwmp-tr098/install
$(INSTALL_DIR) $(1)/usr/sbin
$(CP) $(PKG_BUILD_DIR)/bin/icwmp_tr098d $(1)/usr/sbin
endef
define Package/icwmp_stun/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/icwmp_stund $(1)/usr/sbin/icwmp_stund
@@ -261,4 +263,5 @@ $(eval $(call BuildPackage,icwmp_xmpp))
$(eval $(call BuildPackage,icwmp_udpechoserver))
$(eval $(call BuildPackage,icwmp_twamp))
$(eval $(call BuildPackage,icwmp_bulkdata))
$(eval $(call BuildPackage,icwmp-tr098))
$(eval $(call BuildPackage,icwmp-zstream))

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=1.0.0
PKG_VERSION:=1.1.4
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a6a39128b1fe5132e51de4f580bf66f373515dcd
PKG_SOURCE_VERSION:=5f3cdad5c0ee41464b5699565e0175611dc9d070
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -20,16 +20,22 @@ define Package/ieee1905
SECTION:=utils
CATEGORY:=Utilities
TITLE:=IEEE1905 handler
DEPENDS:=+meshcomms +libubox +libubus +libblobmsg-json
DEPENDS:= +ubox +libpicoevent +libpcap +libopenssl +libuci +libjson-c
endef
define Package/ieee1905/description
Listens to ieee1905 messages, parse and expose them over ubus.
IEEE1905 stack with extended functionalities.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
-D_GNU_SOURCE \
-DSEND_EMPTY_TLVS \
-DFIX_BROKEN_TLVS \
-DSPEED_UP_DISCOVERY \
-DREGISTER_MULTIAP_FEATURE \
-DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
#-DREGISTER_EXTENSION_BBF
#define Build/Prepare
# $(CP) -rf ./ieee1905/* $(PKG_BUILD_DIR)/
@@ -37,9 +43,13 @@ TARGET_CFLAGS += \
define Package/ieee1905/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_BIN) ./files/etc/init.d/ieee1905 $(1)/etc/init.d/ieee1905
$(INSTALL_DATA) ./files/etc/config/ieee1905 $(1)/etc/config/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ieee1905 $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ieee1905d $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/libs/*.so $(1)/usr/lib/
endef
$(eval $(call BuildPackage,ieee1905))

View File

@@ -0,0 +1,43 @@
config ieee1905
option enabled '1'
option debug true
config meshcomms 'global'
option enabled '1'
option basemacint 'wan'
option mapall true
# option registrar 'wl0'
option debug_level 2
option port 8888
option cmdu_event false
option discovery_timer 300
#config al-iface
# option enabled '1'
# option ifname 'br-lan'
# option media '802_3U'
# option manufacturer_name 'Broadcom'
# option model_name 'Eth EG400'
# option model_number '00002'
# option device_name 'EG400R1'
# option serial_number '1234'
#config al-iface
# option enabled '1'
# option ifname 'wl0'
# option media '802_11N5'
# option manufacturer_name 'Broadcom'
# option model_name 'WIFI EG400'
# option model_number '00001'
# option device_name 'EG400R1'
# option serial_number '1235'
#config al-iface
# option enabled '1'
# option ifname 'wl1'
# option media '802_11N2'
# option manufacturer_name 'Broadcom'
# option model_name 'WIFI EG400'
# option model_number '00001'
# option device_name 'EG400R1'
# option serial_number '1236'

View File

@@ -4,11 +4,198 @@ START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/ieee1905
PROG=/usr/sbin/ieee1905d
MESH_CONF=/tmp/meshcomms.config
INTERFACE=""
validate_global_section()
{
uci_validate_section ieee1905 meshcomms "${1}" \
'enabled:bool:false' \
'basemacint:string:wan' \
'almac:string' \
'registrar:string' \
'mapall:bool:true' \
'debug_level:uinteger:5' \
'port:port:8888' \
'cmdu_event:bool:true' \
'discovery_timer:uinteger:60'
}
validate_ieee1905_section()
{
uci_validate_section ieee1905 ieee1905 "${1}" \
'debug:bool:true' \
'enabled:bool:true'
}
get_device_name() {
local device
# Get wan L3 interface
ubus list |grep -iq network.interface.${1}
if [ "$?" -eq 0 ]; then
json_load "$(ubus -t 2 call network.interface.${1} status)"
json_get_var device device
echo ${device}
fi
}
get_interface_mac() {
local l3 basemac
l3=$(get_device_name ${1})
if [ -n ${l3} ]; then
json_load "$(ubus -t 2 call network.device status "{\"name\":\"${l3}\"}")"
json_get_var basemac macaddr
fi
local first=0x$(echo $basemac |cut -d : -f 1)
local rest=$(echo $basemac |cut -d : -f 2-)
# Set local bit
first=$((first|2))
first=$(printf "%02x" $first)
basemac="${first}:${rest}"
echo ${basemac}
}
validate_al_section()
{
uci_validate_section ieee1905 al-iface "${1}" \
'enabled:bool:false' \
'ifname:string' \
'media:string:eth' \
'manufacturer_name:string:iopsys' \
'model_name:string' \
'model_number:string' \
'device_name:string' \
'serial_number:string'
}
configure_interface()
{
local ifname media enabled manufacturer_name model_name model_number device_name serial_number
validate_al_section ${1} || {
echo "Validation of global section failed"
return 1;
}
if [ ${enabled} -eq 0 ]; then
return;
fi
if [ -z ${INTERFACE} ]; then
INTERFACE=${ifname}
else
INTERFACE="${INTERFACE},${ifname}"
fi
local uuid=$(cat /proc/sys/kernel/random/uuid)
local ifindex=$(cat /sys/class/net/${ifname}/upper_*/ifindex 2>/dev/null)
if [ -z ${ifindex} ]; then
ifindex=$(cat /sys/class/net/${ifname}/ifindex)
fi
echo "Interface ${ifname} ifindex |${ifindex}|" >>/dev/console
json_add_object
json_add_string ifname ${ifname}
json_add_string media ${media}
json_add_string manufacturer_name ${manufacturer_name}
json_add_string model_name ${model_name}
json_add_string model_number ${model_number}
json_add_string device_name ${device_name}
json_add_string serial_number ${serial_number}
json_add_string uuid ${uuid}
json_add_int ifindex ${ifindex}
json_close_object
}
configure_meshcomms()
{
local enabled almac basemacint mapall debug_level port l3device basemac intf registrar cmdu_event discovery_timer
validate_global_section global || {
echo "Validation of global section failed"
return 1;
}
if [ -z ${almac} ]; then
basemac=$(get_interface_mac ${basemacint})
else
basemac=${almac}
fi
local fname cname model cUrl
fname=$(db get hw.board.boardId)
cname=$(db get hw.board.iopVerCustomer)
model=$(db get hw.board.routerModel)
cUrl="http://192.168.1.1"
json_init
# fill the al-iface info
json_add_array al-iface
config_foreach configure_interface al-iface
json_close_array
json_add_object deviceInfo
json_add_string friendly_name ${fname}
json_add_string manufacturer_name ${cname}
json_add_string model ${model}
json_add_string control_url ${cUrl}
json_close_object
json_add_object meshcomms
json_add_int enabled ${enabled}
json_add_string mac ${basemac}
json_add_string interfaces ${INTERFACE}
json_add_int map ${mapall}
json_add_string registrar ${registrar}
json_add_int debug_level ${debug_level}
json_add_int port ${port}
json_add_int cmdu_event ${cmdu_event}
json_add_int discovery_timer ${discovery_timer}
json_close_object
json_dump >${MESH_CONF}
}
configure_ieee1905()
{
local enabled debug
validate_ieee1905_section ${1} || {
echo "Validation of ieee1905 section failed"
exit 1;
}
if [ ${debug} -eq 1 ]; then
# Forward stdout of the command to logd
procd_set_param stdout 1
# Same for stderr
procd_set_param stderr 1
fi
if [ ${enabled} -ne 1 ]; then
exit 0;
fi
}
configure_network() {
[ -f ${MESH_CONF} ] && rm ${MESH_CONF}
ebtables -L FORWARD|grep -iqE "1:80:C2:(0)+:(0)+:13.*-j.*DROP"
if [ "$?" -ne 0 ]; then
echo "Applying drop rule to drop pkts forwared by kernel to 1905.1 multicast mac"
ebtables -A FORWARD -d 01:80:c2:00:00:13 -j DROP
fi
config_load ieee1905
config_foreach configure_ieee1905 ieee1905
config_foreach configure_meshcomms meshcomms
}
start_service() {
procd_open_instance
procd_open_instance ieee1905
procd_set_param command ${PROG}
configure_network
procd_set_param respawn
procd_close_instance
}
@@ -18,7 +205,7 @@ reload_service() {
start
}
service_triggers()
{
procd_add_config_trigger "config.change" "ieee1905" /etc/init.d/ieee1905 restart
service_triggers() {
procd_add_reload_trigger "network"
procd_add_reload_trigger "netmode"
}

View File

@@ -194,5 +194,5 @@ CONFIG_OPENVPN_openssl_ENABLE_IPROUTE2=y
CONFIG_KERNEL_DEVTMPFS=y
CONFIG_KERNEL_DEVTMPFS_MOUNT=y
# CONFIG_BUSYBOX_CONFIG_IP is not set
LOCAL_MIRROR="http://download.iopsys.eu/iopsys/mirror/"
CONFIG_LOCALMIRROR="http://download.iopsys.eu/iopsys/mirror/"

View File

@@ -1,36 +0,0 @@
#!/bin/sh
function cvecheck {
CVEDIR="/tmp/cve-indicator/"
CVEBIN="${CVEDIR}/bin"
REPORTS="reports"
mkdir -p $REPORTS
dpkg -s python3 python3-requests python3-yaml python3-mako python3-six &> /dev/null
if [ $? -ne 0 ]
then
echo "Missing dependencies"
sudo apt-get update
sudo apt-get install python3 python3-requests python3-yaml python3-mako python3-six
else
echo "Dependecy check passed"
fi
if [ -d "$CVEDIR" ]; then
### Take action if $DIR exists ###
echo "${CVEDIR} exists running cvecheck"
else
### Control will jump here if $DIR does NOT exists ###
echo "Error: cvecheck not found. getting from iopsys repo"
git clone git@dev.iopsys.eu:iopsys/cve-indicator.git /tmp/cve-indicator
fi
CVEGENLIST=`${CVEBIN}/cve-indicator gen-list openwrt bin`
CVEGETCVES=`${CVEBIN}/cve-indicator get-cves $CVEGENLIST --api_url http://cve.circl.lu/api/cvefor/`
CVEGETRPRT=`${CVEBIN}/cve-indicator gen-rprt $CVEGETCVES`
exit 0
}
register_command "cvecheck" "Generate a CVE report on latest build"

View File

@@ -1,64 +0,0 @@
#
# Copyright (C) 2019 IOPSYS
#
include $(TOPDIR)/rules.mk
PKG_NAME:=meshcomms
PKG_VERSION:=1.0.1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=8d5808d81d1fc96e4ce4ee682847b4de15b46224
PKG_SOURCE_URL:=https://dev.iopsys.eu/fork/meshcomms.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=BSD2+Patent
PKG_LICENSE_FILES:=LICENSE
PLATFORM := linux
FLAVOUR := iopsys
export PLATFORM
export FLAVOUR
include $(INCLUDE_DIR)/package.mk
define Package/meshcomms
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Mesh agent
DEPENDS:=+libpcap +libopenssl +libubox +libubus +libblobmsg-json
endef
define Package/meshcomms/description
meshComms is an open source implementation of IEEE 1905.1a that is an output
of the Broadband Forum Open Broadband - Multi Access Point (OB-MAP) project.
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE \
-DDO_NOT_ACCEPT_UNAUTHENTICATED_COMMANDS
ifneq ($(CONFIG_BIG_ENDIAN),)
TARGET_CFLAGS += -D_HOST_IS_BIG_ENDIAN_=1
else
TARGET_CFLAGS += -D_HOST_IS_LITTLE_ENDIAN_=1
endif
#define Build/Prepare
# $(CP) -rf ./meshcomms/* $(PKG_BUILD_DIR)/
#endef
define Package/meshcomms/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/meshcomms.conf $(1)/etc/config/meshcomms
$(INSTALL_BIN) ./files/meshcomms.init $(1)/etc/init.d/meshcomms
$(INSTALL_BIN) $(PKG_BUILD_DIR)/output/al_entity $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,meshcomms))

View File

@@ -1,8 +0,0 @@
config meshcomms 'global'
option basemacint 'wan'
list interfaces 'lan'
list interfaces 'wan'
option mapall true
option debug false
option port 8888

View File

@@ -1,105 +0,0 @@
#!/bin/sh /etc/rc.common
START=99
STOP=10
USE_PROCD=1
PROG=/usr/sbin/al_entity
validate_global_section()
{
uci_validate_section meshcomms meshcomms "${1}" \
'basemacint:string:wan' \
'interfaces:string:lan' \
'mapall:bool:true' \
'debug:bool:true' \
'port:port:8888'
}
get_device_name() {
local device
# Get wan L3 interface
ubus list |grep -iq network.interface.${1}
if [ "$?" -eq 0 ]; then
json_load "$(ubus -t 2 call network.interface.${1} status)"
json_get_var device device
echo ${device}
fi
}
get_interface_mac() {
local l3 basemac
l3=$(get_device_name ${1})
if [ -n ${l3} ]; then
json_load "$(ubus -t 2 call network.device status "{\"name\":\"${l3}\"}")"
json_get_var basemac macaddr
fi
echo ${basemac}
}
configure_meshcomms()
{
local basemacint interfaces mapall debug port l3device basemac intf
validate_global_section global || {
echo "Validation of global section failed"
return 1;
}
if [ ${debug} -eq 1 ]; then
# Forward stdout of the command to logd
procd_set_param stdout 1
# Same for stderr
procd_set_param stderr 1
fi
basemac=$(get_interface_mac ${basemacint})
for f in ${interfaces}
do
local l3=$(get_device_name $f)
intf="${intf} ${l3}"
done
intf=$(echo $intf|sed 's/ /,/g')
[ -z "${intf}" ] && \
echo "interface list is empty/invalid">/dev/console \
return 1
procd_append_param command -m ${basemac} -i ${intf}
[ "${debug}" -eq 1 ] && \
procd_append_param command -vv
[ "${mapall}" -eq 1 ] && \
procd_append_param command -w
[ ${port} -ne 8888 ] && \
procd_append_param command -p ${port}
}
configure_network() {
ebtables -L FORWARD|grep -iqE "1:80:C2:(0)+:(0)+:13.*-j.*DROP"
if [ "$?" -ne 0 ]; then
echo "Applying drop rule to drop pkts forwared by kernel to 1905.1 multicast mac"
ebtables -A FORWARD -d 01:80:c2:00:00:13 -j DROP
fi
config_load meshcomms
config_foreach configure_meshcomms meshcomms
}
start_service() {
procd_open_instance meshcomms
procd_set_param command ${PROG}
configure_network
procd_set_param respawn
procd_close_instance
}
reload_service() {
stop
start
}
service_triggers() {
procd_add_reload_trigger "network"
}

View File

@@ -16,7 +16,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=9e2236989ff58d0db897f938b6b07b535144e0e2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE:=PROPRIETARY RTX
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/image.mk

View File

@@ -244,17 +244,16 @@ revert_netmode() {
ubus call leds set '{"state" : "allflash"}'
logger -s -p user.info -t "netmode" "Could not switch to '$from' mode; going back to '$to' mode" > /dev/console
cp -af $CONF_BACKUP_DIR/* /etc/config/
sync
uci -q set netmode.setup.curmode="$to"
uci -q set netmode.setup.repeaterready="$rready"
uci commit netmode
cp -af $CONF_BACKUP_DIR/* /etc/config/
sync
rm -rf $CONF_BACKUP_DIR
rm -rf $OLD_MODE_FILE
logger -s -p user.info -t "netmode" "Restarting network services" > /dev/console
ubus call network reload
wifi reload
/etc/init.d/network restart
ubus call router.network reload
ubus call leds set '{"state" : "normal"}'
}

48
opkgd/Makefile Executable file
View File

@@ -0,0 +1,48 @@
#
# Copyright (C) 2019 IOPSYS
#
#
include $(TOPDIR)/rules.mk
PKG_NAME:=opkgd
PKG_VERSION:=1.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d3da32eca6e50b6be6e846a7f82c8e93c74c45a4
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/opkgd.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/opkgd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=OPKG ubus backend
DEPENDS:=+libuci +libubox +ubus +libuuid
endef
define Package/opkgd/description
Ubus based backend for OPKG which can be used by other applications running on top of it.
endef
define Build/Prepare
$(CP) ./src/* $(PKG_BUILD_DIR)/
endef
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-D_GNU_SOURCE
define Package/opkgd/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/opkgd.init $(1)/etc/init.d/opkgd
$(INSTALL_DIR) $(1)/etc/opkg
$(INSTALL_CONF) ./files/map_du $(1)/etc/opkg/map_du
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/opkgd $(1)/usr/sbin/opkgd
endef
$(eval $(call BuildPackage,opkgd))

0
opkgd/files/map_du Normal file
View File

20
opkgd/files/opkgd.init Normal file
View File

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

View File

@@ -10,7 +10,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/owsd.git
PKG_SOURCE_VERSION:=a83448ed65e1c76411b9c6553d64b5d623b8bcd7
PKG_SOURCE_VERSION:=1c6efa76a23b9a8236a8f6d3b43349cf1e23655a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1

View File

@@ -8,7 +8,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=questd
PKG_VERSION:=4.1.1
PKG_SOURCE_VERSION:=04eb78c28d96801951b204bc434f84d43d4a0d03
PKG_SOURCE_VERSION:=89619c1ae8243812a71cdc0ae31491e74866f4be
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/questd

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libtr098
PKG_VERSION:=1.0-2019-09-25
PKG_VERSION:=1.0-2019-12-11
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/tr-098
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c2de93e288907da239652bd137f2ddee389b5042
PKG_SOURCE_VERSION:=ce93aebda4c14cfc43a7a60d67d4716a576171fd
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -153,7 +153,6 @@ assemble_and_copy_config()
[ -f $TMPL_ASTERISK ] && cp $TMPL_ASTERISK $WORKDIR/asterisk.conf
[ -f $TMPL_CDR ] && cp $TMPL_CDR $WORKDIR/cdr.conf
[ -f $TMPL_CEL ] && cp $TMPL_CEL $WORKDIR/cel.conf
[ -f $TMPL_INDICATIONS ] && cp $TMPL_INDICATIONS $WORKDIR/indications.conf
[ -f $TMPL_MANAGER ] && cp $TMPL_MANAGER $WORKDIR/manager.conf
[ -f $TMPL_MODULES ] && cp $TMPL_MODULES $WORKDIR/modules.conf
[ -f $TMPL_EXTENSIONS_MACRO ] && cp $TMPL_EXTENSIONS_MACRO $WORKDIR/extensions_macro.conf
@@ -165,6 +164,14 @@ assemble_and_copy_config()
[ -f $TMPL_UDPTL ] && cp $TMPL_UDPTL $WORKDIR/udptl.conf
[ -f $SPECRATECFG ] && cp $SPECRATECFG $WORKDIR/special_rate_nr.cfg
[ -f $TMPL_INDICATIONS ] && {
cp $TMPL_INDICATIONS $WORKDIR/indications.conf
config_get country TEL country
country_code=$(supportedCountries |grep $country |cut -d':' -f3 |tr [A-Z] [a-z])
sed -i "s/^country=.*/country=${country_code}/g" $WORKDIR/indications.conf
}
test -e $TMPL_MEETME && cp $TMPL_MEETME $WORKDIR/meetme.conf
# Handle extensions_extra, carry over old file to new config if there is one
@@ -256,9 +263,7 @@ read_codecs_ptime()
#
read_lines()
{
local line call_lines lineid ldx lines llength clength
local loffset=$(ubus -t 1 call voice.asterisk platform | jsonfilter -e @.lineoffset)
loffset=${loffset:-0}
local line call_lines lines clength
config_get call_lines $1 call_lines
@@ -267,28 +272,17 @@ read_lines()
# convert line format to <LINENAME><LINEID>
case $line in
[0-9])
line="$LINENAME$line"
;;
"$CHANNELNAME"/[0-9])
# get the index from channel name
clength=$(echo $CHANNELNAME | wc -c)
line="$LINENAME${line:$clength}"
line="${line:$clength}"
;;
esac
# get the index from line name
# llength=$(echo $LINENAME | wc -c)
# lineid="${lineid:$llength}"
[ -n "$line" ] || continue
# get the index from uci config order
lineid="$(uci show voice_client | grep =tel_line | grep -wn $line | cut -d ':' -f1)"
[ -n "$lineid" ] || continue
# -1 to match the line's uci config index number
# +loffset to match the correct number in channel driver
ldx=$((lineid-1+loffset))
lines="$lines$CHANNELNAME/$ldx&"
lines="$lines$CHANNELNAME/$line&"
done
lines=$(escape_sed_substitution $lines)
@@ -1795,6 +1789,7 @@ configure_tel()
local fac
local echocancel
local hold_target_before_refer
local calleridtype
config_get jbenable TEL jbenable
config_get jbforce TEL jbforce
@@ -1805,6 +1800,7 @@ configure_tel()
config_get fac TEL fac
config_get echocancel TEL echo_cancel
config_get hold_target_before_refer TEL hold_target_before_refer
config_get calleridtype TEL calleridtype
CHANNEL_FAC="$CHANNEL_FAC $fac"
# Convert whitespace to commas
@@ -1823,6 +1819,12 @@ configure_tel()
sed -i "s/|CHANNELS|/$(db get hw.board.VoicePorts)/" $WORKDIR/$LINENAME.tmp
sed -i "s/|ECHOCANCEL|/$(getEchoCancellingValue $echocancel)/" $WORKDIR/$LINENAME.tmp
if [ -n "${calleridtype}" ] ; then
sed -i "s/^calleridtype *=.*/calleridtype = ${calleridtype}/g" $WORKDIR/$LINENAME.tmp
else
sed -i "/^calleridtype *=.*/d" $WORKDIR/$LINENAME.tmp
fi
if [ "$dtmfmode" == "compatibility" ] ; then
dtmfcompatibility="1"
else
@@ -2243,6 +2245,7 @@ reload_service() {
# FXS channel module must be reloaded before sip module. Otherwise some attributes like
# line's registration state which is updated by SIP module through callback might be
# reset.
asterisk -rx "config reload $ASTERISKDIR/indications.conf"
asterisk -rx "$(getChipVendor) reload"
asterisk -rx "config reload $ASTERISKDIR/sip.conf"
sleep 1

View File

@@ -22,7 +22,7 @@ getBaseMAC() {
}
getAllLines() {
echo "BRCM/0&BRCM/1&BRCM/2&BRCM/3&BRCM/4&BRCM/5&BRCM/6"
echo "BRCM/0&BRCM/1&BRCM/2&BRCM/3&BRCM/4&BRCM/5"
}
getLineIdx() {

View File

@@ -28,12 +28,11 @@ getBaseMAC() {
}
getAllLines() {
echo "TAPI/1&TAPI/2&TAPI/3&TAPI/4&TAPI/5&TAPI/6"
echo "TAPI/0&TAPI/1"
}
getLineIdx() {
i=$1
echo $((i+1))
echo $1
}
getEchoCancellingValue() {
@@ -52,5 +51,14 @@ getEchoCancellingValue() {
}
supportedCountries() {
echo "ETSI:ETS"
echo "Austria:AUT:AT"
echo "Denmark:DNK:DK"
echo "Estonia:EST:EE"
echo "Germany:DEU:DE"
echo "Netherlands:NLD:NL"
echo "Norway:NOR:NO"
echo "Spain:ESP:ES"
echo "Sweden:SWE:SE"
echo "Switzerland:CHE:CH"
echo "United Kingdom:GBR:UK"
}

View File

@@ -137,8 +137,8 @@ case "$1" in
json_add_int chanoffset 0
;;
"tapi")
json_add_int lineoffset 1
json_add_int chanoffset -1
json_add_int lineoffset 0
json_add_int chanoffset 0
;;
*)
# Error, unknown platform

View File

@@ -10,7 +10,7 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=878ad93c0f1ad49bd187f776808e0b86402b2238
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE
ifeq ($(CONFIG_WIFILIFE_OPEN),y)

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wifimngr
PKG_VERSION:=2.4.0
PKG_VERSION:=2.5.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=c4063e9c5581fed6e75037d0b13698b7cb2d6c2a
PKG_SOURCE_VERSION:=00e29842d8082a6240fbdb3bbceb36b09dc53861
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
@@ -38,15 +38,6 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE
#MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)"
#define Build/Compile
# +$(MAKE_VARS) $(MAKE) -C $(PKG_BUILD_DIR) $(MAKE_FLAGS)
#endef
define Package/wifimngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/wifimngr.init $(1)/etc/init.d/wifimngr

View File

@@ -8,7 +8,7 @@ PKG_NAME:=wifixd
PKG_VERSION:=1.0.2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=7aae246602af0df883ddefb83147010a457c2725
PKG_SOURCE_VERSION:=cd63143c262e079d4a782ccfa60111f342e42e3e
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>