Compare commits

...

95 Commits

Author SHA1 Message Date
Hemlata
9a01d85693 Dectmngr: add a uci option dect.global.log_level for log level configuration 2022-03-01 16:19:42 +01:00
Jakob Olsson
4a53405944 map-agent: 7.1.10 2022-03-01 13:14:44 +01:00
Jakob Olsson
f4175d1056 wfadatad: 6.10.13 2022-03-01 11:13:43 +01:00
sverma
ca89942898 wfadatad: 6.10.12 2022-02-28 15:03:18 +00:00
Filip Matusiak
719ef4d172 map-controller: update encryption options in script 2022-02-28 15:19:16 +01:00
Jakob Olsson
be0c9d79b0 map-controller: 6.0.5 2022-02-28 14:42:43 +01:00
Jakob Olsson
72ecd3d35e ieee1905: 4.6.19 2022-02-28 14:42:01 +01:00
Yalu Zhang
445cfef73e Update package endptmngr
Change the way to configure tx/rx gain
2022-02-28 11:42:59 +01:00
Anjan Chanda
e398b994da wfadatad: 6.10.11 2022-02-26 08:54:21 +01:00
Jakob Olsson
2cddf06c61 map-agent: 7.1.9 2022-02-25 17:29:33 +01:00
Anjan Chanda
f42b9b4a62 wfadatad: 6.10.10 2022-02-25 15:46:41 +01:00
Jakob Olsson
e3dcdd6c4d ieee1905: 4.6.18 2022-02-25 15:20:09 +01:00
Jakob Olsson
acac9f08d2 ieee1905: 4.6.17 2022-02-25 14:23:11 +01:00
Jakob Olsson
3f5708e292 map-topology: 3.2.5 2022-02-25 12:42:21 +01:00
Jakob Olsson
c49e2ed7de map-agent: 7.1.8 2022-02-24 15:48:30 +01:00
vdutta
70a000f674 sulu: Deploy config parameters in json 2022-02-23 18:50:06 +01:00
Anjan Chanda
4748533fa2 map-controller: 6.0.4: add Config.in 2022-02-23 18:35:08 +01:00
Jakob Olsson
ad1966b1ba map-controller: 6.0.4 2022-02-23 18:30:56 +01:00
Jakob Olsson
89b367fcf4 map-agent: 7.1.7 2022-02-23 18:27:15 +01:00
Stanislaw Gruszka
3bec20d547 multi-ap: ts rework for eth suport 2022-02-23 18:26:41 +01:00
Anjan Chanda
dde30f9d4a map-agent: 7.1.6 2022-02-23 17:54:53 +01:00
Anjan Chanda
f93ba6ec61 map-agent: 7.1.5 2022-02-23 16:52:47 +01:00
Jakob Olsson
13b3bdde7e easy-soc-libs: 6.4.40 2022-02-23 14:39:16 +01:00
Stanislaw Gruszka
1ccd68992f wfadatad: 6.10.6 2022-02-23 13:30:29 +01:00
Nevadita
3ddbb176aa map-topology: 3.2.4 2022-02-23 13:04:40 +01:00
Anjan Chanda
bea0ee5aa5 ieee1905: 4.6.16 2022-02-23 11:36:53 +01:00
Jakob Olsson
d30a942adb map-agent: 7.1.4 2022-02-22 16:01:50 +01:00
vdutta
f53496233d bbf: 6.4.27
- Ticket refs #7349: Failed to re-created lan interface
- bbf: Operate commands exposed from json file not working properly
2022-02-22 20:07:21 +05:30
Jakob Olsson
a8f3bea932 map-controller: 6.0.3 2022-02-22 11:28:05 +01:00
Jakob Olsson
95dd997cc9 map-agent: 7.1.3 2022-02-22 11:27:28 +01:00
Jakob Olsson
62eb925e8c map-agent: multiap: retain wps credentials in ieee1905 config 2022-02-22 11:24:20 +01:00
Jakob Olsson
3b6e2ad2d7 map-agent: 7.1.2 2022-02-21 17:17:50 +01:00
sverma
3199e091c4 wfadatad: 6.10.5 2022-02-21 15:01:31 +01:00
Jakob Olsson
723be11ebc map-controller: 6.0.2 2022-02-21 12:46:43 +01:00
Jakob Olsson
6c6a81bacb map-agent: 7.1.1 2022-02-18 15:44:16 +01:00
Jakob Olsson
8dc5820987 map-controller: 6.0.1 2022-02-18 15:22:55 +01:00
Jakob Olsson
60e0730a6d map-topology: 3.2.3 2022-02-18 15:12:30 +01:00
Jakob Olsson
aed486f1f9 ieee1905: 4.6.10 2022-02-18 12:47:50 +01:00
Filip Matusiak
f2c11f12c3 map-topology: validate config options 2022-02-18 12:00:00 +01:00
Filip Matusiak
b71fecbb6a ieee1905: validate config options 2022-02-18 12:00:00 +01:00
Filip Matusiak
76310d7e6e map-agent: validate config options 2022-02-18 12:00:00 +01:00
Filip Matusiak
eac345c3e3 map-controller: validate config options 2022-02-18 12:00:00 +01:00
Arun Muthusamy
9570193737 qosmngr: Rearrange queue and shaper function call execution order 2022-02-18 09:50:01 +00:00
vdutta
c1d8341be7 bbf: 6.4.26 2022-02-18 14:17:30 +05:30
Jakob Olsson
ae033eb05e map-agent: 7.1.0 2022-02-17 16:47:53 +01:00
Jakob Olsson
e16b9c7a0e map-controller: 6.0.0 2022-02-17 16:47:03 +01:00
Anjan Chanda
53fb4d46c1 ieee1905: 4.6.9 2022-02-17 15:25:56 +01:00
vdutta
0fd29ae954 bbf: 6.4.25 2022-02-17 19:26:51 +05:30
Grzegorz Sluja
0be6005691 endptmngr: Add support for RTCP-XR packets 2022-02-16 17:11:01 +01:00
Nevadita
0f1e642fe0 map-topology: 3.2.2 2022-02-16 14:29:20 +01:00
Stanislaw Gruszka
0ead07e668 wfadatad: 6.10.4 2022-02-16 12:09:19 +01:00
Yalu Zhang
5bcc5d05dc dectmngr-3.5.1: Fix a bug that handsets cannot receive incoming calls reliably 2022-02-16 10:42:40 +01:00
Anjan Chanda
ab91bd9941 ieee1905: add openssl dependency 2022-02-15 16:24:56 +01:00
Jakob Olsson
314f90a0f4 map-agent: 7.0.2 2022-02-15 10:19:14 +01:00
Anjan Chanda
429112ba92 easy-soc-libs: 6.4.39 2022-02-15 09:59:21 +01:00
Jakob Olsson
b3c54526c2 map-agent: 7.0.1 2022-02-14 17:55:11 +01:00
Hemlata Bhatt
b624d52243 dectmngr : don't allow failure in static code analysis 2022-02-11 17:52:18 +01:00
Hemlata Bhatt
1b661a7407 endptmngr :Enable compiling options -Wall and -Werror 2022-02-11 17:34:42 +01:00
vdutta
ec55634131 icwmp: 8.2.27 2022-02-11 21:46:03 +05:30
Stanislaw Gruszka
12dfd9be28 wfadatad: 6.10.3 2022-02-11 16:12:47 +01:00
nevadita.chatterjee
466d442666 map-topology:3.2.1 2022-02-11 13:01:57 +01:00
Stanislaw Gruszka
28b4fa040a map-agent: 7.0.0: traffic separation fixes 2022-02-11 11:24:16 +00:00
vdutta
2077f29acf bbf: 6.4.24 2022-02-10 19:31:29 +05:30
Anjan Chanda
7335034c2b ieee1905: 4.6.8 2022-02-10 14:31:50 +01:00
vdutta
9ae0800d77 bbf: 6.4.23 2022-02-10 18:23:53 +05:30
vdutta
5d74e693c7 bbf: 6.4.22 2022-02-09 21:15:09 +05:30
Jakob Olsson
d513b5b799 map-controller: 5.4.7 2022-02-09 16:39:33 +01:00
Sukru Senli
40503fc42d sulu: 0.2.28 2022-02-09 12:43:59 +01:00
vdutta
34acd302be bbf: 6.4.21 2022-02-09 09:58:09 +05:30
Sukru Senli
705fb9e41b netmode: do not run netmode if mode is same as last saved mode 2022-02-08 23:04:55 +01:00
Sukru Senli
8fb0ffc766 netmode: do not rely on mode folder 2022-02-08 15:08:48 +01:00
vdutta
8e8442e508 bbf: 6.4.20 2022-02-08 15:36:23 +05:30
vdutta
e7486f4538 stunc: 1.0.4
(cherry picked from commit 2bc7ff558e)
2022-02-08 08:36:27 +00:00
vdutta
957d176f26 udpechoserver: Added static code analysis pipeline
(cherry picked from commit df0b0ec7ea)
2022-02-08 08:30:08 +00:00
Amin Ben Ramdhane
454afbbc98 udpechoserver: 1.0.1
(cherry picked from commit 1fbbaa8c59)
2022-02-08 08:29:05 +00:00
Amin Ben Ramdhane
ebda97fe62 stunc: 1.0.3
(cherry picked from commit b214f5213b)
2022-02-08 08:27:52 +00:00
Sukru Senli
b261816fe4 netmode: do nothing if mode is not set 2022-02-07 21:17:25 +01:00
Jakob Olsson
0fe82491e3 map-agent: 6.6.4 2022-02-07 12:17:12 +01:00
Jakob Olsson
a4e457a3ee map-controller: 5.4.6 2022-02-07 12:15:10 +01:00
Sukru Senli
1a4ab4713e netmode: remove default netmodes 2022-02-07 10:27:23 +01:00
Sukru Senli
4cce081fd3 netmode: strip netmoded out of netmode package 2022-02-07 10:27:16 +01:00
Jakob Olsson
a730c6a2e0 map-agent: 6.6.3 2022-02-04 16:06:25 +01:00
Yalu Zhang
932385bec1 dectmngr-3.5.0: Upgrading to CMBS 4.13 Build 16 official release
This includes both the binary firmware on the target and dectmngr on the host.
2022-02-04 14:42:03 +01:00
Anjan Chanda
642ffec9cd wifimngr: 14.0.6 2022-02-04 14:15:14 +01:00
Anjan Chanda
d1cd14742e ieee1905: 4.6.4 2022-02-04 14:12:01 +01:00
Amit KUmar
c9309739a6 easy-soc-libs: libqos static warning corrected 2022-02-04 10:58:49 +01:00
Amit KUmar
979fe82336 easy-soc-libs: dsl ethernet static error resolved 2022-02-04 10:58:47 +01:00
vdutta
e7c84ac6ba bbf: 6.4.19 2022-02-04 15:23:42 +05:30
vdutta
9a8f2cb393 icwmp: 8.2.26 2022-02-04 15:03:52 +05:30
Hemlata Bhatt
7af3534bc9 dectmngr: Remove extra verbose syslog for firmware upgrading on the base station 2022-02-04 10:32:29 +01:00
Jakob Olsson
f1795e0263 map-agent: 6.6.2 2022-02-03 12:45:18 +01:00
Jakob Olsson
a2115711bb map-controller: 5.4.5 2022-02-02 17:07:02 +01:00
Jakob Olsson
2b26e9083b map-agent: 6.6.1 2022-02-02 17:06:20 +01:00
Sukru Senli
1978d357c9 crun: remove as it is now available under openwrt feed packages 2022-02-02 11:16:01 +01:00
Jakob Olsson
822f77590d wifimngr: 05-wifi: update to new map backhaul file 2022-01-31 14:59:04 +01:00
44 changed files with 923 additions and 680 deletions

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm PKG_NAME:=libbbfdm
PKG_VERSION:=6.4.18 PKG_VERSION:=6.4.27
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=2758c0380e9dbec87b119df239aee29c7ed1ec48 PKG_SOURCE_VERSION:=710485a57e311a5b4c5434efe3e79fc58cb6c429
PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip

View File

@@ -1,81 +0,0 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=crun
PKG_VERSION:=0.20
PKG_RELEASE:=$(AUTORELEASE)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/containers/crun.git
PKG_SOURCE_DATE:=2021-06-07
PKG_SOURCE_VERSION:=8d6a8b5ab80461cfed19f020a36584af13c32038
PKG_MIRROR_HASH:=9ca1f0e530b33ce8820bd03329eb6731c5050d6e7f35bd2463d9a81cc00382e0
PKG_BUILD_DEPENDS:=argp-standalone
PKG_BUILD_PARALLEL:=1
PKG_FIXUP:=autoreconf
PKG_INSTALL:=1
PKG_MAINTAINER:=Oskari Rauta <oskari.rauta@gmail.com>
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=COPYING
include $(INCLUDE_DIR)/package.mk
define Package/crun
SECTION:=utils
CATEGORY:=Utilities
TITLE:=crun
URL:=https://github.com/containers/crun
DEPENDS:=@!arc +libseccomp +libcap
endef
define Package/crun/description
A fast and low-memory footprint OCI Container Runtime fully written in C.
endef
CONFIGURE_ARGS+= \
--disable-systemd \
--enable-embedded-yajl \
--enable-caps \
--enable-dl \
--enable-seccomp \
--enable-bpf
define Build/Prepare
$(call Build/Prepare/Default)
$(SED) '/#include <git-version.h>/d' $(PKG_BUILD_DIR)/src/crun.c
endef
define Build/Configure
$(call Build/Configure/Default)
$(SED) '/#define PACKAGE \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define GIT_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_BUGREPORT \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_NAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_STRING \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_TARNAME \"/d' $(PKG_BUILD_DIR)/config.h
$(SED) '/#define PACKAGE_VERSION \"/d' $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_NAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_VERSION \"$(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_STRING \"$(PKG_NAME) $(PKG_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_TARNAME \"$(PKG_NAME)\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define PACKAGE_BUGREPORT \"bugs@openwrt.org\"" >> $(PKG_BUILD_DIR)/config.h
echo "#define GIT_VERSION \"$(PKG_SOURCE_VERSION)\"" >> $(PKG_BUILD_DIR)/config.h
endef
define Package/crun/install
$(INSTALL_DIR) $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/crun $(1)/usr/bin/
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libcrun.* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,crun))

View File

@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr PKG_NAME:=dectmngr
PKG_RELEASE:=3 PKG_RELEASE:=3
PKG_VERSION:=3.4.7 PKG_VERSION:=3.5.1
LOCAL_DEV=0 LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=237bb7280029924e80373ea090e51434def89048 PKG_SOURCE_VERSION:=ef9d4c6124d0ca66f048f3d678d9a25f13aa4207
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
endif endif

View File

@@ -1,2 +1,3 @@
config dect 'global' config dect 'global'
option log_dect_cmbs 'syslog' option log_dect_cmbs 'syslog'
option log_level 'realtime,warning,error'

Binary file not shown.

Binary file not shown.

View File

@@ -7,13 +7,13 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=easy-soc-libs PKG_NAME:=easy-soc-libs
PKG_VERSION:=6.4.34 PKG_VERSION:=6.4.40
PKG_RELEASE:=1 PKG_RELEASE:=1
LOCAL_DEV=0 LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=dd2ab2e5b83d585849aae3d539c1a8cd6dcb7146 PKG_SOURCE_VERSION:=699744d5ae9e043715c260f9b58bbc18747895f9
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/easy-soc-libs.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu> PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
@@ -32,7 +32,6 @@ define Package/easy-soc-libs
CATEGORY:=Libraries CATEGORY:=Libraries
TITLE:=IOPSYS Easy SoC libraries TITLE:=IOPSYS Easy SoC libraries
SUBMENU:=IOPSYS Easy SoC libraries SUBMENU:=IOPSYS Easy SoC libraries
DEPENDS:=+libopenssl
MENU:=1 MENU:=1
endef endef
@@ -79,7 +78,6 @@ endif
TARGET_CFLAGS += \ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \ -I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3 -I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \ MAKE_FLAGS += \

View File

@@ -13,7 +13,7 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
PKG_SOURCE_VERSION:=548fa04d2714feeadb500192905fa6fb8172e6dd PKG_SOURCE_VERSION:=3a71d4124061287783e0d4c763b1b20e925d2133
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
endif endif

View File

@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp PKG_NAME:=icwmp
PKG_VERSION:=8.2.25 PKG_VERSION:=8.2.27
PKG_FIXUP:=autoreconf PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=22a1606d972d2dd05b23abe94323f72232727b37 PKG_SOURCE_VERSION:=da88c8c28656b2db54ab205d26faccda68546c05
PKG_RELEASE=$(PKG_SOURCE_VERSION) PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip

View File

@@ -0,0 +1,14 @@
if (PACKAGE_map-plugin)
menu "Configurations"
config MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
bool "Sync configuration between dynamic controllers in the network"
default n
config MULTIAP_FUZZ_1905_CMDUS
bool "Include support to fuzz 1905 CMDUs for testing purpose"
default n
endmenu
endif

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905 PKG_NAME:=ieee1905
PKG_VERSION:=4.6.0 PKG_VERSION:=4.6.19
LOCAL_DEV=0 LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=373602c3644ead5c61aece58e1f88f52838bb38b PKG_SOURCE_VERSION:=7267a76fafa264792415a1cdc697a9e47934a1e6
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
@@ -38,7 +38,7 @@ define Package/libieee1905
$(call Package/ieee1905/Default,$(1)) $(call Package/ieee1905/Default,$(1))
TITLE+= (library for CMDU and TLV handling) TITLE+= (library for CMDU and TLV handling)
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \ DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
+libjson-c +libblobmsg-json +libjson-c +libblobmsg-json +libopenssl
endef endef
define Package/ieee1905 define Package/ieee1905
@@ -57,6 +57,10 @@ $(call Package/ieee1905/Default,$(1))
+libjson-c +libblobmsg-json +ieee1905 +libieee1905 +libjson-c +libblobmsg-json +ieee1905 +libieee1905
endef endef
define Package/map-plugin/config
source "$(SOURCE)/Config.map-plugin.in"
endef
define Package/ieee1905/description define Package/ieee1905/description
This package provides IEEE Std 1905.1 stack. This package provides IEEE Std 1905.1 stack.
endef endef
@@ -68,12 +72,18 @@ endef
TARGET_CFLAGS += \ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \ -I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/libnl3 \ -I$(STAGING_DIR)/usr/include/libnl3 \
-I$(STAGING_DIR)/usr/include/openssl \
-D_GNU_SOURCE -D_GNU_SOURCE
ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y) ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
TARGET_CFLAGS += -DHAS_WIFI TARGET_CFLAGS += -DHAS_WIFI
endif endif
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
endif
MAKE_PATH:=src MAKE_PATH:=src

View File

@@ -5,7 +5,82 @@ STOP=21
USE_PROCD=1 USE_PROCD=1
IS_CFG_VALID=1
validate_ieee1905_section() {
uci_validate_section ieee1905 ieee1905 "ieee1905" \
'enabled:bool:true' \
'macaddress:or("auto",macaddr)' \
'registrar:string' \
'extension:bool:false' \
'extmodule:list(string)' \
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of ieee1905 section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ali_section() {
local section="$1"
uci_validate_section ieee1905 $section "${1}" \
'ifname:string' \
'type:or("bridge",string)'
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of al-iface section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ap_section() {
local section="$1"
uci_validate_section ieee1905 $section "${1}" \
'band:or("2", "5", "60")' \
'ssid:string' \
'encryption:or("psk2", "sae-mixed", "sae", string)' \
'key:string' \
'uuid:string' \
'manufacturer:string' \
'model_name:string' \
'device_name:string' \
'model_number:string' \
'serial_number:string' \
'device_type:string' \
'os_version:uinteger'
[ "$?" -ne 0 ] && {
logger -s -t "ieee1905" "Validation of ap section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ieee1905_config() {
IS_CFG_VALID=1
validate_ieee1905_section &&
config_foreach validate_ali_section "al-iface" &&
config_foreach validate_ap_section ap
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "ieee1905" "Validation of ieee1905 UCI file failed"
return 1
}
return 0
}
start_service() { start_service() {
config_load "ieee1905"
validate_ieee1905_config || return 1;
procd_open_instance procd_open_instance
procd_set_param command "/usr/sbin/ieee1905d" procd_set_param command "/usr/sbin/ieee1905d"
procd_set_param respawn procd_set_param respawn

10
map-agent/Config.in Normal file
View File

@@ -0,0 +1,10 @@
if (PACKAGE_map-agent)
menu "Configurations"
config AGENT_SYNC_DYNAMIC_CNTLR_CONFIG
bool "Support Dynamic Controller configuration sync"
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent PKG_NAME:=map-agent
PKG_VERSION:=6.6.0 PKG_VERSION:=7.1.10
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=69219d6752dacd86040eb529af42d474f37a4f0b PKG_SOURCE_VERSION:=8d2fa1af3b0cbdb65f791b490e72c5925cccaa05
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu> PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_LICENSE:=PROPRIETARY IOPSYS PKG_LICENSE:=PROPRIETARY IOPSYS
@@ -50,7 +50,7 @@ define Package/dynbhd/description
endef endef
define Package/map-agent/config define Package/map-agent/config
#source "$(SOURCE)/Config.in" source "$(SOURCE)/Config.in"
endef endef
TARGET_CFLAGS += \ TARGET_CFLAGS += \
@@ -58,6 +58,10 @@ TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include/libnl3 \ -I$(STAGING_DIR)/usr/include/libnl3 \
-D_GNU_SOURCE -D_GNU_SOURCE
ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
endif
MAKE_PATH:=src MAKE_PATH:=src
define Package/map-agent/install define Package/map-agent/install

View File

@@ -5,32 +5,44 @@ STOP=20
USE_PROCD=1 USE_PROCD=1
IS_CFG_VALID=1
MAP_DEV="map_dev" MAP_DEV="map_dev"
MAP_IF="map" MAP_IF="map"
MAP_VETH="lei"
create_map() { create_map() {
ip link add lei type veth peer name lei_map 2>/dev/null
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
uci -q set network.${MAP_DEV}=device uci -q set network.${MAP_DEV}=device
uci -q set network.${MAP_DEV}.name=br-map uci -q set network.${MAP_DEV}.name=br-map
uci -q set network.${MAP_DEV}.type=bridge uci -q set network.${MAP_DEV}.type=bridge
uci -q set network.${MAP_DEV}.bridge_empty=1
uci -q show network.${MAP_DEV}.ports | grep -q lei_map || {
uci -q add_list network.${MAP_DEV}.ports='lei_map'
}
uci -q set network.${MAP_IF}=interface uci -q set network.${MAP_IF}=interface
uci -q set network.${MAP_IF}.device=br-map uci -q set network.${MAP_IF}.device=br-map
uci -q set network.${MAP_IF}.is_lan=1 uci -q set network.${MAP_IF}.is_lan=1
uci -q show network.br_lan.ports | grep -q lei_lan || {
uci -q add_list network.br_lan.ports="lei_lan"
}
uci -q set mapagent.agent.al_bridge=br-map uci -q set mapagent.agent.al_bridge=br-map
uci -q commit uci -q commit
ubus call network reload ubus call network reload
ubus -t 5 wait_for network.device ubus -t 5 wait_for network.interface.map
ip link add ${MAP_VETH} type veth peer name ${MAP_VETH}_lan 2>/dev/null brctl addif br-map lei_map 2>/dev/null
brctl addif br-map ${MAP_VETH} 2>/dev/null brctl addif br-lan lei_lan 2>/dev/null
brctl addif br-lan ${MAP_VETH}_lan 2>/dev/null
ip link set ${MAP_VETH} up 2>/dev/null ip link set lei up 2>/dev/null
ip link set ${MAP_VETH}_lan up 2>/dev/null ip link set lei_map up 2>/dev/null
ip link set lei_lan up 2>/dev/null
} }
remove_map() { remove_map() {
@@ -56,10 +68,137 @@ start_dynbhd_service() {
procd_close_instance procd_close_instance
} }
validate_agent_section() {
uci_validate_section mapagent agent "agent" \
'enabled:bool:true' \
'debug:range(0,16)' \
'profile:range(1,2):2' \
'brcm_setup:bool:false' \
'controller_macaddr:macaddr' \
'al_bridge:string' \
'netdev:string' \
'vlan_segregation:bool:false' \
'resend_num:uinteger:0' \
'dyn_cntlr_sync:bool:true'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of agent section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_cs_section() {
local section="$1"
uci_validate_section mapagent $section "${section}" \
'local:bool:false' \
'id:string' \
'probe_int:range(0,1000):20' \
'retry_int:range(0,255):3' \
'autostart:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of controller_select section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ap_section() {
local section="$1"
uci_validate_section mapagent $section "${1}" \
'ifname:string' \
'device:string' \
'band:or("2", "5")' \
'enabled:bool:true' \
'onboarded:bool:false' \
'ssid:string' \
'key:string' \
'encryption:string' \
'disallow_bsta_p1:bool:false' \
'disallow_bsta_p2:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of ap section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_radio_section() {
local section="$1"
uci_validate_section mapagent $section "${1}" \
'device:string' \
'band:or("2", "5")' \
'configured:bool:false' \
'onboarded:bool:false' \
'dedicated_backhaul:bool:false' \
'steer_policy:range(0,255)' \
'util_threshold:range(0,255)' \
'rcpi_threshold:range(0,255)' \
'report_rcpi_threshold:range(0,255)' \
'include_sta_stats:bool:false' \
'include_sta_metric:bool:false' \
'rcpi_hysteresis_margin:range(0,255)' \
'report_util_threshold:range(0,255)'
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of radio section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_policy_section() {
local section="$1"
uci_validate_section mapagent $section "${1}" \
'report_interval:range(0,255)' \
'pvid:uinteger' \
'report_interval:range(0,255)' \
'pcp_default:range(0,255)' \
'report_scan:bool' \
'report_sta_assocfails:bool' \
'report_sta_assocfails_rate:uinteger' \
'steer_exclude:list(macaddr)' \
'steer_exclude_btm:list(macaddr)' \
[ "$?" -ne 0 ] && {
logger -s -t "mapagent" "Validation of policy section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_agent_config() {
IS_CFG_VALID=1
validate_agent_section &&
config_foreach validate_cs_section controller_select &&
config_foreach validate_ap_section ap &&
config_foreach validate_radio_section radio &&
config_foreach validate_policy_section policy
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "mapagent" "Validation of mapagent UCI file failed"
return 1
}
return 0
}
start_service() { start_service() {
[ -f /usr/sbin/dynbhd ] && start_dynbhd_service [ -f /usr/sbin/dynbhd ] && start_dynbhd_service
config_load "mapagent" config_load "mapagent"
validate_agent_config || return 1;
ubus -t 5 wait_for wifi ubus -t 5 wait_for wifi

View File

@@ -57,6 +57,7 @@ get_type_by_section() {
brcm_sync_credentials() { brcm_sync_credentials() {
bands="" bands=""
json_init
mapagent_process_fh() { mapagent_process_fh() {
local section=$1 local section=$1
local dev=$2 local dev=$2
@@ -80,6 +81,17 @@ brcm_sync_credentials() {
uci -q set ieee1905.${section}.ssid="$ssid" uci -q set ieee1905.${section}.ssid="$ssid"
uci -q set ieee1905.${section}.encryption=$encryption uci -q set ieee1905.${section}.encryption=$encryption
uci -q set ieee1905.${section}.key="$key" uci -q set ieee1905.${section}.key="$key"
json_select "$band" > /dev/null
if [ "$?" = "0" ]; then
json_get_keys keys
for key in ${keys};
do
json_get_var val "$key"
uci -q set ieee1905.${section}.$key="$val"
done
json_select ..
fi
} }
mapagent_process_radio() { mapagent_process_radio() {
@@ -102,7 +114,38 @@ brcm_sync_credentials() {
} }
ieee1905_del_ap() { ieee1905_del_ap() {
append_value() {
local section=$1
local key=$2
shift
shift
while [ "$key" != "" ]; do
val=$(uci -q get ieee1905.$section.$key)
[ "$val" = "" ] && {
key=$1
shift
continue
}
json_add_string "$key" ${val}
key=$1
shift
done
}
local section=$1 local section=$1
local band
config_get band $section band
json_select "$band" > /dev/null
rc=$?
[ "$rc" != "0" ] && json_add_object "$band"
append_value $section "manufacturer" "model_name" "device_name" "model_number" "serial_number" "device_type" "os_version"
if [ "$rc" != "0" ]; then
json_close_object
else
json_select ..
fi
uci -q delete ieee1905.${section} uci -q delete ieee1905.${section}
} }
@@ -114,9 +157,9 @@ brcm_sync_credentials() {
config_foreach mapagent_process_radio radio config_foreach mapagent_process_radio radio
uci commit ieee1905 uci commit ieee1905
json_cleanup
} }
brcm_write_credentials() { brcm_write_credentials() {
config_load mapagent config_load mapagent

View File

@@ -4,11 +4,15 @@
### Traffic Separation ### ### Traffic Separation ###
dbg() {
logger -t traffic_separation $@
}
ts_sub() { ts_sub() {
ts_usage() { ts_usage() {
cat <<EOF cat <<EOF
Usage: $0 [create|delete|populate] Usage: $0 [create|delete|populate|primary|reload]
Traffic Separation related functions. Traffic Separation related functions.
create fh <iface> <vid> - create vlan device and rules for wifi fronthaul create fh <iface> <vid> - create vlan device and rules for wifi fronthaul
create bh <iface> <vid> <profile> - create vlan device and rules for wifi backhaul create bh <iface> <vid> <profile> - create vlan device and rules for wifi backhaul
@@ -16,7 +20,7 @@ create eth <iface> <vid> <pbits> - create vlan device and rules for logical ethe
delete <iface> - delete vlan device delete <iface> - delete vlan device
populate eth <iface> <vid> - add secondary network rules for logical ethernet interface populate eth <iface> <vid> - add secondary network rules for logical ethernet interface
primary get <iface> - read primary VID for interface from driver (from Association Response frame IE) primary get <iface> - read primary VID for interface from driver (from Association Response frame IE)
reload - reload network with new configuration
EOF EOF
exit 1 exit 1
} }
@@ -26,54 +30,102 @@ EOF
echo $bridge echo $bridge
} }
set_wireless_bridge() {
config_load wireless
_set_network() {
local sec=$1
local iface=$2
local bridge=$3
config_get ifname $sec ifname
[ "$iface" != "$ifname" ] && continue
config_get mode $sec mode
config_get multi_ap $sec multi_ap "0"
[ "$mode" = "sta" -a "$multi_ap" = "1" ] && continue
config_get network $sec network
local new_network=${bridge##br-}
if [ "$new_network" != "$network" ] ; then
uci -q set wireless.${sec}.network=${new_network}
uci commit wireless
fi
brctl addif $bridge $iface &> /dev/null
}
config_foreach _set_network wifi-iface ${1} ${2}
}
ts_create() { ts_create() {
_create_vlan_dev() { _create_vlan_dev() {
iface=$1 # real iface iface=$1 # real iface
vid=$2 # Vlan ID vid=$2 # Vlan ID
bridge="$(_get_bridge $iface)" # bridge iface is connected to bridge=$3 # bridge iface should be connected
vlan_dev=${iface}_vlan${vid} # name of vlan device to create vlan_dev=$4
old_bridge="$(_get_bridge $iface)" # bridge iface is connected to
# remove interface from bridge if it is in one # remove interface from bridge if it is in one
[ -n "$bridge" ] && brctl delif $bridge $iface &> /dev/null [ -n "$old_bridge" ] && brctl delif $old_bridge $iface &> /dev/null
# create vlan device # (re)create vlan device
ip link show $vlan_dev && vlanctl --if-delete $vlan_dev
vlanctl --mcast --if-create-name $iface $vlan_dev --if $iface --set-if-mode-rg vlanctl --mcast --if-create-name $iface $vlan_dev --if $iface --set-if-mode-rg
# bring the vlan device up and add back to bridge if it was in one vlanctl --if $iface --tx --tags 0 --default-miss-drop
[ -n "$bridge" ] && brctl addif $bridge $vlan_dev &> /dev/null vlanctl --if $iface --tx --tags 1 --default-miss-drop
ip link set dev $vlan_dev up vlanctl --if $iface --tx --tags 2 --default-miss-drop
vlanctl --if $iface --rx --tags 0 --default-miss-drop
vlanctl --if $iface --rx --tags 1 --default-miss-drop
vlanctl --if $iface --rx --tags 2 --default-miss-drop
echo $vlan_dev # bring the vlan device up and add back to bridge if it was in one
brctl addif $bridge $vlan_dev &> /dev/null
} }
ts_create_fh() { ts_create_fh() {
iface=$1 # fh iface iface=$1 # fh iface
vid=$2 # SSID specific (secondary) or primary vid vid=$2 # SSID specific (secondary) or primary vid
bridge=$3
[ -n "$iface" ] && [ -n "$vid" ] || { [ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
cat <<EOF cat <<EOF
Adding FH device requires IFACE and VID. Adding FH device requires IFACE, VID and bridge
EOF EOF
exit 1 exit 1
} }
# create vlan device # create vlan device
vlan_dev=$(_create_vlan_dev $iface $vid) #set_wireless_bridge $iface $bridge
vlan_dev=${iface}_vlan${vid}
ip link set $vlan_dev down
_create_vlan_dev $iface $vid $bridge $vlan_dev
# add rules # add rules
# Note: removing these for now since these packets are read directly from the iface anyway
# vlanctl --if $iface --rx --tags 0 --filter-ethertype 0x888e --set-rxif $vlan_dev --rule-append # incoming EAPOL
# vlanctl --if $iface --rx --tags 0 --filter-ethertype 0x886c --set-rxif $vlan_dev --rule-append # incoming brcm # vlanctl --if $iface --rx --tags 0 --filter-ethertype 0x886c --set-rxif $vlan_dev --rule-append # incoming brcm
# EAPOL frames
vlanctl --if $iface --rx --tags 0 --filter-ethertype 34958 --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --rx --tags 1 --filter-ethertype 34958 --pop-tag --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --tx --tags 0 --filter-txif $vlan_dev --filter-ethertype 34958 --rule-append
# 8021q vlan id TAG/UNTAG
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --filter-vid $vid 0 --pop-tag --dscp2pbits 0 --rule-append vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --filter-vid $vid 0 --pop-tag --dscp2pbits 0 --rule-append
ip link set $iface up
ip link set $vlan_dev up
} }
# Note: Currently not used (will be needed for Profile 1)
ts_create_bh() { ts_create_bh() {
iface=$1 # bh iface iface=$1 # bh iface
vid=$2 # primary vid vid=$2 # primary vid
profile=$3 # agent profile (1 or 2) profile=$3 # agent profile (1 or 2)
bridge=$4 # bridge interface should be connected to
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || { [ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || {
cat <<EOF cat <<EOF
@@ -82,40 +134,13 @@ EOF
exit 1 exit 1
} }
# create vlan device #[ -n "$bridge" ] && set_wireless_bridge $iface $bridge
vlan_dev=$(_create_vlan_dev $iface $vid)
# add rules old_vid=$(wl -i $1 map_8021q_settings)
case "$profile" in old_vid=${old_vid##* }
1 | profile_1 | profile1 | Profile_1 | Profile1) old_profile=$(wl -i $1 map_profile | cut -d ' ' -f 3)
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --pop-tag --rule-append
;;
2 | profile_2 | profile2 | Profile_2 | Profile2)
vlanctl --if $iface --rx --tags 1 --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --rule-append # note: already default
vlanctl --if $iface --tx --tags 0 --filter-ethertype 0x893a --filter-txif $vlan_dev --push-tag --set-vid $vid 0 --rule-append # note: outgoing IEEE1905.1
vlanctl --if $iface --tx --tags 0 --filter-ethertype 0x888e --filter-txif $vlan_dev --push-tag --set-vid $vid 0 --rule-append # note: outgoing EAPOL
;;
*)
ts_delete $iface
ts_usage
exit 1
;;
esac
}
ts_create_bh_drv() { [ "$old_vid" = "$vid" -a "$old_profile" = "$profile" ] && return
iface=$1 # bh iface
vid=$2 # primary vid
profile=$3 # agent profile (1 or 2)
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || {
cat <<EOF
Adding BH device requires IFACE, VID and PROFILE (1 or 2).
EOF
exit 1
}
wl vlan_mode 0 &> /dev/null # make sure this is OFF, else driver won't handle vlan wl vlan_mode 0 &> /dev/null # make sure this is OFF, else driver won't handle vlan
wl -i $iface down &> /dev/null wl -i $iface down &> /dev/null
@@ -124,53 +149,118 @@ EOF
wl -i $iface up &> /dev/null wl -i $iface up &> /dev/null
} }
ts_create_eth() { ts_create_lei() {
vid=$1 # primary vid
pbits=$2 # default pbits to apply
vlan_bridge=$3 # name of ts subsystem bridge
lan_bridge=$4 # name of node local bridge
_ts_setup() { [ -n "$vid" ] && [ -n "$pbits" ] && [ -n "$vlan_bridge" ] && [ -n "$lan_bridge" ] || {
vlan_bridge=$1
lan_bridge=$2
vlan_dev=$3
lan_dev=${vlan_dev}_lan
ip link show $vlan_dev &> /dev/null || ip link add $vlan_dev type veth peer name $lan_dev
brctl addif $vlan_bridge $vlan_dev &> /dev/null
brctl addif $lan_bridge $lan_dev &> /dev/null
ip link set $vlan_dev up
ip link set $lan_dev up
}
iface=$1 # Multi-AP Logical Ethernet Interface
vid=$2 # primary vid
pbits=$3 # default pbits to apply
vlan_bridge=$4 # name of ts subsystem bridge
lan_bridge=$5 # name of node local bridge
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$pbits" ] && [ -n "$vlan_bridge" ] && [ -n "$lan_bridge" ] || {
cat <<EOF cat <<EOF
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges. Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
EOF EOF
exit 1 exit 1
} }
# create virtual eth device between bridges (if it doesn't exist)) ip link show lei &> /dev/null || {
_ts_setup $vlan_bridge $lan_bridge $iface ip link add link lei name lei_lan type vlan id 1 2>/dev/null
}
# create vlan device old_vid=$(ip -d link show lei_lan | sed -n 's/vlan.*id \([0-9][0-9]*\) .*/\1/p')
vlan_dev=$(_create_vlan_dev $iface $vid)
# TODO: how to disable returning traffic back to incoming interface? [ "$old_vid" != "$vid" ] && {
ip link del lei_lan
ip link add link lei name lei_lan type vlan id ${vid}
}
brctl addif ${lan_bridge} lei_lan &>/dev/null
brctl addif ${vlan_bridge} lei_map &>/dev/null
ip link set lei up
ip link set lei_map up
ip link set lei_lan up
}
_create_eth() {
iface=$1 # Multi-AP Logical Ethernet Interface
vid=$2 # primary vid
bridge=$3 # name of ts subsystem bridge
pbits=0
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
cat <<EOF
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
EOF
exit 1
}
dbg create $@
ip link set $iface down
vlan_dev=${iface}_vlan${vid}
ip link set $vlan_dev down
_create_vlan_dev $iface $vid $bridge $vlan_dev
# add rules
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --set-pbits $pbits 0 --rule-append vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --set-pbits $pbits 0 --rule-append
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --pop-tag --rule-append vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --pop-tag --rule-append
[ $# -le 3 ] && exit 0
shift 3
while [ -n "$1" ] ; do
vid=$1
vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append
shift
done
ip link set $iface up
ip link set $vlan_dev up
}
ts_create_eths() {
pvid=$1 # primary vid
bridge=$2 # name of ts subsystem bridge
shift 2
# TODO use ieee1905 bridge
for iface in $(uci get network.br_lan.ports) ; do
[ "$iface" = "lei_lan" ] && continue
_create_eth $iface $pvid $bridge $@
ubus call ieee1905 del_interface "{\"ifname\":\"$iface\"}"
done
} }
ts_create_dhcp() { ts_create_dhcp() {
local diff=""
_net_setup() {
local name=$1
local devname=$2
local vid=$3
[ -z "$(uci -q get network.${name})" ] && {
uci -q set network.${name}="interface"
uci -q set network.${name}.device="$devname"
uci -q set network.${name}.is_lan="1"
uci -q set network.${name}.proto="static"
# TODO vid > 255
local ip_addr="192.168.${vid}.1"
[ "${vid}" = "1" ] && ip_addr="192.168.${vid}.2"
uci -q set network.${name}.ipaddr="${ip_addr}"
uci -q set network.${name}.netmask="255.255.255.0"
diff="1"
}
[ "$diff" = "1" ] && uci -q commit network
}
_br_setup() { _br_setup() {
local name=$1 local name=$1
local sinkname=$2 local sinkname=$2
local vid=$3 local vid=$3
local diff=""
[ -z "$(uci -q get network.${name}_dev)" ] && { [ -z "$(uci -q get network.${name}_dev)" ] && {
uci -q set network.${name}_dev="device" uci -q set network.${name}_dev="device"
@@ -193,11 +283,7 @@ EOF
diff="1" diff="1"
} }
[ "$diff" = "1" ] && { [ "$diff" = "1" ] && uci -q commit network
uci -q commit network
ubus call network reload
ubus -t 5 wait_for network.device
}
} }
_dhcp_setup() { _dhcp_setup() {
@@ -217,43 +303,44 @@ EOF
uci -q add_list dhcp.${name}.ra_flags="managed-config" uci -q add_list dhcp.${name}.ra_flags="managed-config"
uci -q add_list dhcp.${name}.ra_flags="other-config" uci -q add_list dhcp.${name}.ra_flags="other-config"
diff="1"
uci -q commit dhcp uci -q commit dhcp
ubus call uci commit '{"config":"dhcp"}'
} }
_wan_setup() { _firewall_setup() {
local name=$1 local name=$1
local network=$2
local zone_exist=0
config_load firewall config_load firewall
_process_zone() { _process_zone() {
local section=$1 local section=$1
local sink=$2 local new_name=$2
local name local name
local exists=false
config_get name $section name config_get name $section name
[ "$name" == "lan" ] || return [ "$name" == "$new_name" ] && zone_exist=1
_process_list() {
local value=$1
[ "$value" == "$sink" ] && exists=true && return 1
}
config_list_foreach "$section" network _process_list
[ $exists = false ] && {
uci -q add_list firewall.${section}.network="${sink}"
uci -q commit firewall
ubus call uci commit '{"config":"firewall"}'
}
return 1
} }
config_foreach _process_zone zone $name config_foreach _process_zone zone $name
[ "$zone_exist" != "0" ] && return
uci -q add firewall zone
uci -q set firewall.@zone[-1].name="$name"
uci -q add_list firewall.@zone[-1].network="$network"
uci -q set firewall.@zone[-1].input='ACCEPT'
uci -q set firewall.@zone[-1].output='ACCEPT'
uci -q set firewall.@zone[-1].forward='ACCEPT'
uci -q add firewall forwarding
uci -q set firewall.@forwarding[-1].src="$name"
uci -q set firewall.@forwarding[-1].dest="wan"
diff="1"
uci -q commit firewall
} }
vid=$1 # primary vid vid=$1 # primary vid
@@ -265,20 +352,26 @@ EOF
exit 1 exit 1
} }
br_dev=sink_vlan${vid} # name of vlan device to create ip link show sink${vid} || {
ip link add sink${vid} type veth peer name sink${vid}_vlan
ip link add link sink${vid} name sink${vid}_peer type vlan id ${vid}
}
ip link set sink${vid} up
ip link set sink${vid}_peer up
ip link set sink${vid}_vlan up
ip l a sink1_vlan${vid} type veth peer name sink2_vlan${vid} diff=""
vlanctl --mcast --if-create-name sink2_vlan${vid} sink3_vlan${vid} --if sink2_vlan${vid} --set-if-mode-rg _net_setup sink${vid} sink${vid}_peer ${vid}
vlanctl --if sink2_vlan${vid} --rx --tags 1 --filter-vid ${vid} 0 --set-rxif sink3_vlan${vid} --pop-tag --rule-append _dhcp_setup sink${vid}
vlanctl --if sink2_vlan${vid} --tx --tags 0 --filter-txif sink3_vlan${vid} --push-tag --set-vid ${vid} 0 --rule-append _firewall_setup lan${vid} sink${vid}
ip l s sink1_vlan${vid} up
ip l s sink2_vlan${vid} up
ip l s sink3_vlan${vid} up
_br_setup $br_dev sink3_vlan${vid} $vid [ "$diff" = "1" ] && {
_dhcp_setup $br_dev ubus call network reload
_wan_setup $br_dev ubus -t 5 wait_for network.interface.sink${vid}
}
brctl addif br-map sink${vid}_vlan &> /dev/null
} }
local type=$1 local type=$1
@@ -286,9 +379,9 @@ EOF
case "$type" in case "$type" in
fh) ts_create_fh $@;; fh) ts_create_fh $@;;
# bh) ts_create_bh $@;; bh) ts_create_bh $@;;
bh) ts_create_bh_drv $@;; lei) ts_create_lei $@;;
eth) ts_create_eth $@;; eths) ts_create_eths $@;;
dhcp) ts_create_dhcp $@;; dhcp) ts_create_dhcp $@;;
--help|help) ts_usage;; --help|help) ts_usage;;
*) ts_usage; exit 1;; *) ts_usage; exit 1;;
@@ -300,12 +393,15 @@ EOF
path=$(ls -d /sys/class/net/${iface}/upper_*) path=$(ls -d /sys/class/net/${iface}/upper_*)
[ -z "$path" ] && exit 0 [ -z "$path" ] && exit 0
vlan_dev=${path##*upper_} vlan_dev=${path##*upper_}
bridge="$(_get_bridge $vlan_dev)" bridge="$(_get_bridge $vlan_dev)"
vlanctl --if-delete $vlan_dev # note: also removes rules and removes from bridge [ -n "$bridge" ] && {
vlanctl --if-delete $vlan_dev # note: also removes rules and removes from bridge
brctl addif $bridge $iface &> /dev/null # needed to add again
}
brctl addif $bridge $iface &> /dev/null
} }
ts_populate() { ts_populate() {
@@ -327,8 +423,8 @@ EOF
vlan_dev=${path##*upper_} vlan_dev=${path##*upper_}
# add rules # add rules
vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids #vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default #vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default
} }
ts_primary() { ts_primary() {
@@ -365,16 +461,50 @@ EOF
ebtables -t broute -I BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP ebtables -t broute -I BROUTING -i "$iface" -d 01:80:C2:00:00:13 -p 0x893a -j DROP
} }
ts_reload() {
local dhcp_reload=$1
# workaround for missing backhaul wifi.ap.* ubus obj's:
# iterate in config and setup bh
config_load wireless
_setup_bh_iface() {
local sec=$1
local iface=$2
local bridge=$3
config_get ifname $sec ifname
config_get mode $sec mode
config_get multi_ap $sec multi_ap "0"
[ "$mode" = "ap" -a "$multi_ap" = "1" ] && {
ts_create bh $ifname 1 2 br-map
}
}
config_foreach _setup_bh_iface wifi-iface
[ -n "dhcp_reload" ] && /etc/init.d/dnsmasq reload
# another workaround for netif? removed
# sink devices for br-map bridge
for sink in $(ubus list network.interface.sink*) ; do
local sink_vlan=${sink/network.interface./}_vlan
brctl addif br-map $sink_vlan &> /dev/null
done
}
local func=$1 local func=$1
shift shift
case "$func" in case "$func" in
create) ts_create $@;; create) dbg "create $@"; ts_create $@;;
delete) ts_delete $@;; delete) dbg "delete $@"; ts_delete $@;;
populate) ts_populate $@;; populate) dbg "populate $@"; ts_populate $@;;
primary) ts_primary $@;; primary) dbg "primary $@"; ts_primary $@;;
unicast) ts_unicast $@;; unicast) dbg "unicast $@"; ts_unicast $@;;
multicast) ts_multicast $@;; multicast) dbg "multicast $@"; ts_multicast $@;;
reload) dbg "reload $@"; ts_reload $@;;
--help|help) ts_usage;; --help|help) ts_usage;;
*) ts_usage; exit 1;; *) ts_usage; exit 1;;
esac esac

10
map-controller/Config.in Normal file
View File

@@ -0,0 +1,10 @@
if (PACKAGE_map-controller)
menu "Configurations"
config CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
bool "Support Dynamic Controller configuration sync"
default y if MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG
endmenu
endif

View File

@@ -5,9 +5,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller PKG_NAME:=map-controller
PKG_VERSION:=5.4.4 PKG_VERSION:=6.0.5
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=52e85d2dd2762148aaac808f0d867bce92c69a26 PKG_SOURCE_VERSION:=3562b7f774e6dffda2e58ad2acb382fc439273fb
PKG_LICENSE:=PROPRIETARY IOPSYS PKG_LICENSE:=PROPRIETARY IOPSYS
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE
@@ -34,7 +34,7 @@ define Package/map-controller/description
endef endef
define Package/map-controller/config define Package/map-controller/config
#source "$(SOURCE)/Config.in" source "$(SOURCE)/Config.in"
endef endef
TARGET_CFLAGS += \ TARGET_CFLAGS += \
@@ -44,6 +44,10 @@ TARGET_CFLAGS += \
MAKE_PATH:=src MAKE_PATH:=src
ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
endif
define Package/map-controller/install define Package/map-controller/install
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/

View File

@@ -5,6 +5,8 @@ STOP=20
USE_PROCD=1 USE_PROCD=1
IS_CFG_VALID=1
handle_controller_select() { handle_controller_select() {
local section="$1" local section="$1"
@@ -12,10 +14,122 @@ handle_controller_select() {
return 1 return 1
} }
validate_controller_section() {
uci_validate_section mapcontroller controller "controller" \
'enabled:bool:true' \
'registrar:string' \
'debug:range(0,16)' \
'resend_num:uinteger:0' \
'enable_sta_steer:bool:false' \
'enable_bsta_steer:bool:false' \
'use_bcn_metrics:bool:false' \
'use_usta_metrics:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of controller section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_ap_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'band:or("2", "5")' \
'ssid:string' \
'encryption:or("sae", "sae+aes", "psk2",
"psk2+aes", "sae-mixed", "sae-mixed+aes")' \
'key:string' \
'vid:range(1,65535):1' \
'type:or("backhaul", "fronthaul", "combined")' \
'disallow_bsta:list(range(0,255)):0' \
'enabled:bool:true'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of ap section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_node_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'agent_id:macaddr' \
'backhaul_ul_macaddr:macaddr' \
'backhaul_dl_macaddr:macaddr' \
'backhaul_type:or("none")' \
'primary_vid:range(0,255):1' \
'primary_pcp:range(0,255):0' \
'report_sta_assocfails:bool:false' \
'report_sta_assocfails_rate:uinteger' \
'report_metric_periodic:range(0,255)' \
'report_scan:bool:false' \
'steer_exclude:list(macaddr)' \
'steer_exclude_btm:list(macaddr)' \
'steer_disallow:bool:false' \
'coordinated_cac:bool:false' \
'traffic_separation:bool:false' \
'sta_steer:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of node section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_radio_section() {
local section="$1"
uci_validate_section mapcontroller $section "${1}" \
'agent_id:macaddr' \
'macaddr:macaddr' \
'band:or("2", "5")' \
'steer_policy:range(0,2)' \
'util_threshold:range(0,255)' \
'rcpi_threshold:range(0,255)' \
'report_rcpi_threshold:range(0,255)' \
'report_util_threshold:range(0,255)' \
'report_rcpi_hysteresis_margin:range(0,255)' \
'include_sta_stats:bool:false' \
'include_sta_metric:bool:false'
[ "$?" -ne 0 ] && {
logger -s -t "mapcontroller" "Validation of radio section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_controller_config() {
IS_CFG_VALID=1
validate_controller_section &&
config_foreach validate_ap_section ap &&
config_foreach validate_node_section node &&
config_foreach validate_radio_section radio
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "mapcontroller" "Validation of mapcontroller UCI file failed"
return 1
}
return 0
}
start_service() { start_service() {
local enabled local enabled
config_load "mapcontroller" config_load "mapcontroller"
validate_controller_config || return 1;
config_get_bool enabled controller enabled 1 config_get_bool enabled controller enabled 1
[ "$enabled" -eq 0 ] && return [ "$enabled" -eq 0 ] && return

View File

@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=map-topology PKG_NAME:=map-topology
PKG_VERSION:=3.2.0 PKG_VERSION:=3.2.5
LOCAL_DEV:=0 LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_VERSION:=d1fae1ff7a8bc8daea08799b9ffbdeb424903e54 PKG_SOURCE_VERSION:=ddf78cca217ebfa83733a532bdd2d17b6c3af54e
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -5,7 +5,72 @@ STOP=21
USE_PROCD=1 USE_PROCD=1
IS_CFG_VALID=1
validate_topology_config() {
uci_validate_section topology topology "topology" \
'enabled:bool:true' \
'depth:range(0,16)' \
'interval:range(0,65535)' \
'maxlog:range(0,128)' \
[ "$?" -ne 0 ] && {
logger -s -t "topology" "Validation of topology UCI file failed"
return 1
}
return 0
}
validate_global_section() {
uci_validate_section hosts global "global" \
'ageing_timer:uinteger' \
'reboot_persistent:bool'
[ "$?" -ne 0 ] && {
logger -s -t "hosts" "Validation of global section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_host_section() {
local section="$1"
uci_validate_section hosts $section "${1}" \
'macaddr:macaddr' \
'interface_type:or("wifi","eth")' \
'active:bool' \
'active_last_change:string'
[ "$?" -ne 0 ] && {
logger -s -t "hosts" "Validation of host section $section failed"
IS_CFG_VALID=0
return 1
}
return 0
}
validate_hosts_config() {
IS_CFG_VALID=1
validate_global_section &&
config_foreach validate_host_section host
[ "$IS_CFG_VALID" -ne 1 ] && {
logger -s -t "topology" "Validation of hosts UCI file failed"
return 1
}
return 0
}
start_service() { start_service() {
config_load "topology"
validate_topology_config || return 1;
config_load "hosts"
validate_hosts_config || return 1;
procd_open_instance procd_open_instance
procd_set_param command "/usr/sbin/topologyd" procd_set_param command "/usr/sbin/topologyd"
procd_set_param respawn procd_set_param respawn

View File

@@ -8,35 +8,26 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=netmode PKG_NAME:=netmode
PKG_VERSION:=0.2.0 PKG_VERSION:=0.3.0
PKG_RELEASE:=1
PKG_SOURCE_VERSION:=5c8abbdf86e4651c7c6f14f784cfb52e69979f96 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_PROTO:=git PKG_LICENSE:=GPL-2.0-only
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/netmoded
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
define Package/netmode define Package/netmode
CATEGORY:=Base system CATEGORY:=Utilities
DEPENDS:=+fping +ubus +libubox +libuci TITLE:=Network Modes and Utils
TITLE:=Predefined Network Modes
endef endef
define Package/netmode/description define Package/netmode/description
Predefined Network Modes Network Modes and Utils
endef
define Build/Compile
endef endef
define Package/netmode/install define Package/netmode/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netmoded $(1)/sbin/
endef endef
$(eval $(call BuildPackage,netmode)) $(eval $(call BuildPackage,netmode))

View File

@@ -1,8 +1,10 @@
config netmoded 'netmoded' config netmode global
option enabled '0' option enabled 0
config setup 'setup'
option enabled '0'
option dir '/etc/netmodes'
# option mode 'router' # option mode 'router'
#config testnet testnet
# option enabled 1
# option destination '8.8.8.8'
#config shiftrange shiftrange
# option enabled 1

View File

@@ -1,16 +1,16 @@
#!/bin/sh #!/bin/sh
# do not start testnet if the feature is explicitly disabled
[ "$(uci -q get netmode.testnet.enabled)" = "0" ] && exit 0
[ "$ACTION" == "ifup" -o "$ACTION" == "ifdown" ] || exit 0 [ "$ACTION" == "ifup" -o "$ACTION" == "ifdown" ] || exit 0
interface_check() { interface_check() {
local islan="$(uci -q get network.$INTERFACE.is_lan)" [ "$(uci -q get network.$INTERFACE.is_lan)" = "1" ] && exit 0
[ "$islan" == "1" ] && exit 0
local proto="$(uci -q get network.$INTERFACE.proto)" [ "$(uci -q get network.$INTERFACE.proto)" = "none" ] && exit 0
[ "$proto" == "none" ] && exit 0
local defroute="$(uci -q get network.$INTERFACE.defaultroute)" [ "$(uci -q get network.$INTERFACE.defaultroute)" = "0" ] && exit 0
[ "$defroute" == "0" ] && exit 0
} }
interface_check interface_check
@@ -19,4 +19,3 @@ if [ -n "$(pgrep -f testnet)" ]; then
else else
testnet & testnet &
fi fi

View File

@@ -2,6 +2,9 @@
# this scripts shifts the lan network prefixes # this scripts shifts the lan network prefixes
# if a wan interface has the same network prefix. # 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.sh
. /lib/functions/network.sh . /lib/functions/network.sh

View File

@@ -3,44 +3,71 @@
START=10 START=10
USE_PROCD=1 USE_PROCD=1
NETMODED="/sbin/netmoded"
. /lib/functions.sh . /lib/functions.sh
. /lib/functions/netmode.sh
start_netmoded() { MODEDIR="/etc/netmodes"
config_load netmode
config_get enabled netmoded enabled 0 libnetmode_exec() {
if [ "$enabled" != "1" ]; then when="$1"
return # Execute /lib/netmode scripts
if [ -d /lib/netmode/$when ]; then
logger -s -p user.info -t "netmode" "Executing /lib/netmode/$when scripts"
for script in $(ls /lib/netmode/$when/); do
sh /lib/netmode/$when/$script
done
fi fi
procd_open_instance
procd_set_param command $NETMODED
procd_append_param command --verbose warning -i macaddr
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn
procd_close_instance
} }
start_service() { start_service() {
populate_netmodes [ -f /etc/config/netmode ] || return
start_netmoded config_load netmode
}
reload_service() { config_get_bool enabled global enabled '0'
switch_netmode [ $enabled -eq 0 ] && return
start_netmoded # Get the desired netmode from config
config_get mode global mode
# Check if netmode is set as boot environment parameter
[ -n "$mode" ] || mode="$(fw_printenv -n netmode 2>/dev/null)"
# Return if mode is not set
[ -n "$mode" ] || return
# Get the last saved mode
lastmode="$(cat /etc/netmodes/.last_mode 2>/dev/null)"
# Return if desired mode is same as last saved mode
[ "$mode" == "$lastmode" ] && return
# Save mode as last mode
echo "$mode" > /etc/netmodes/.last_mode
logger -s -p user.info -t "netmode" "Switching to $mode Mode" >/dev/console
# Execute netmode generic pre-mode-switch scripts
libnetmode_exec "pre"
# Copy netmode UCI config files
if [ -d $MODEDIR/$mode/uci ]; then
logger -s -p user.info -t "netmode" "Copying $MODEDIR/$mode/uci/* to /etc/config/"
cp $MODEDIR/$mode/uci/* /etc/config/ 2>/dev/null
fi
# Execute netmode generic scripts
libnetmode_exec
# Execute mode specific scripts
if [ -d $MODEDIR/$mode/scripts ]; then
logger -s -p user.info -t "netmode" "Executing $MODEDIR/$mode/scripts/* scripts"
for script in $(ls $MODEDIR/$mode/scripts/); do
sh $MODEDIR/$mode/scripts/$script
done
fi
# Execute netmode generic post-mode-switch scripts
libnetmode_exec "post"
} }
service_triggers() service_triggers()
{ {
procd_add_reload_trigger netmode procd_add_reload_trigger netmode
} }

View File

@@ -1,9 +0,0 @@
{
"description": [
{ "en" : "Bridge Mode" }
],
"explanation": [
{ "en" : "NAT is disabled." }
],
"reboot" : 0
}

View File

@@ -1,92 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
BRIDGEPORTS=""
get_vlan() {
local device="$1"
for section in $(uci show network | grep "=device" | cut -d '=' -f1); do
if [ "$(uci -q get $section.ifname)" == "$device" ]; then
uci -q get $section.name
break
fi
done
}
add_wifi_devs()
{
add_wdev()
{
local cfg=$1
# local disabled
# config_get_bool disabled $cfg disabled 0
# config_get_bool ifname $cfg ifname
# if [ $disabled -eq 0 -a -n "$ifname" ]; then
# BRIDGEPORTS="$ifname"
# fi
uci -q set wireless.$cfg.network="wan"
}
config_load wireless
config_foreach add_wdev "wifi-iface"
uci -q commit wireless
}
add_xtm_devs() {
local section device vlan
for section in $(uci show dsl | grep "=.*tm-device" | cut -d'=' -f1); do
if [ -n "$(uci -q get $section.device)" ]; then
vlan="$(get_vlan $device)"
[ -n "$vlan" ] && device="$vlan"
if [ -n "$device" ]; then
BRIDGEPORTS="$BRIDGEPORTS $device"
fi
fi
done
}
add_eth_ports() {
add_port()
{
local cfg=$1
local ifname vlan
config_get ifname $cfg ifname
vlan="$(get_vlan $ifname)"
[ -n "$vlan" ] && ifname="$vlan"
if [ -n "$ifname" ]; then
BRIDGEPORTS="$BRIDGEPORTS $ifname"
fi
}
config_load ports
config_foreach add_port "ethport"
}
add_xtm_devs
add_eth_ports
add_wifi_devs
BRIDGEPORTS="$(echo $BRIDGEPORTS | sed -e 's/[[:space:]]*$//')"
uci -q set network.wan.type="bridge"
uci -q set network.wan.ifname="$BRIDGEPORTS"
uci -q set network.wan6.ifname="@wan"
uci -q delete network.lan.ifname
ubus call uci commit '{"config":"network"}'

View File

@@ -1,9 +0,0 @@
{
"description": [
{ "en" : "Router Mode" }
],
"explanation": [
{ "en" : "NAT is enabled." }
],
"reboot" : 0
}

View File

@@ -1,94 +0,0 @@
#!/bin/sh
. /usr/share/libubox/jshn.sh
. /lib/functions.sh
WANPORTS=""
LANPORTS=""
get_vlan() {
local device="$1"
for section in $(uci show network | grep "=device" | cut -d '=' -f1); do
if [ "$(uci -q get $section.ifname)" == "$device" ]; then
uci -q get $section.name
break
fi
done
}
add_wifi_devs()
{
add_wdev()
{
local cfg=$1
config_get mode $cfg mode "ap"
if [ "$mode" == "ap" ]; then
uci -q set wireless.$cfg.network="lan"
fi
}
config_load wireless
config_foreach add_wdev "wifi-iface"
uci -q commit wireless
}
add_xtm_devs() {
local section device vlan
for section in $(uci show dsl | grep "=.*tm-device" | cut -d'=' -f1); do
device="$(uci -q get $section.device)"
if [ -n "$device" ]; then
vlan="$(get_vlan $device)"
[ -n "$vlan" ] && device="$vlan"
if [ -n "$device" ]; then
WANPORTS="$WANPORTS $device"
fi
fi
done
}
add_eth_ports() {
add_port()
{
local cfg=$1
local uplink ifname vlan
config_get ifname $cfg ifname
config_get_bool uplink $cfg uplink 0
vlan="$(get_vlan $ifname)"
[ -n "$vlan" ] && ifname="$vlan"
if [ $uplink -eq 1 ]; then
WANPORTS="$WANPORTS $ifname"
else
LANPORTS="$LANPORTS $ifname"
fi
}
config_load ports
config_foreach add_port "ethport"
}
add_xtm_devs
add_eth_ports
add_wifi_devs
WANPORTS="$(echo $WANPORTS | sed -e 's/[[:space:]]*$//')"
LANPORTS="$(echo $LANPORTS | sed -e 's/[[:space:]]*$//')"
uci -q set network.wan.type="anywan"
uci -q set network.wan.ifname="$WANPORTS"
uci -q set network.wan6.ifname="@wan"
uci -q set network.lan.type="bridge"
uci -q set network.lan.ifname="$LANPORTS"
ubus call uci commit '{"config":"network"}'

View File

@@ -1,13 +0,0 @@
#!/bin/sh
. /lib/functions.sh
add_owsd_ubusproxy_object_netmode() {
local netmd=$(uci -q get owsd.ubusproxy.object | grep netmode)
if [ -z "$netmd" ]; then
uci -q add_list owsd.ubusproxy.object="netmode"
uci commit owsd
fi
}
add_owsd_ubusproxy_object_netmode

View File

@@ -1,150 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
MODEDIR=$(uci -q get netmode.setup.dir)
[ -n "$MODEDIR" ] || MODEDIR="/etc/netmodes"
run_netmode_scripts() {
local mode=$1
local when=$2
local script
local path
path=$(readlink -f /etc/netmodes/$mode/)
[ "${path:0:14}" == "/etc/netmodes/" ] || exit
if [ -d /etc/netmodes/$mode/scripts/$when ]; then
logger -s -p user.info -t "netmode" "Executing $when netmode scripts" >/dev/console
for script in $(ls /etc/netmodes/$mode/scripts/$when/); do
sh /etc/netmodes/$mode/scripts/$when/$script
done
fi
}
switch_netmode() {
[ -f /etc/config/netmode -a -d $MODEDIR ] || return
config_load netmode
local enabled
config_get_bool enabled setup enabled '0'
[ $enabled -eq 0 ] && return
local mode
config_get mode setup mode
[ -d "/etc/netmodes/$mode" ] || return
logger -s -p user.info -t "netmode" "Switching to $mode Mode" >/dev/console
run_netmode_scripts $mode "pre"
local reboot=$(uci -q get netmode.$mode.reboot)
if [ "$reboot" == "1" ]; then
#run_netmode_scripts $mode "post"
reboot &
exit
fi
#run_netmode_scripts $mode "post"
}
populate_netmodes() {
[ -f /etc/config/netmode -a -d $MODEDIR ] || return
config_load netmode
local enabled
config_get_bool enabled setup enabled '0'
[ $enabled -eq 0 ] && return
delete_netmode() {
uci delete netmode.$1
}
config_foreach delete_netmode netmode
uci commit netmode
local hardware=$(db -q get hw.board.model_name)
local keys lang desc exp exclude support
for mode in $(ls $MODEDIR); do
lang=""
desc=""
exp=""
uci -q set netmode.$mode=netmode
json_load "$(cat $MODEDIR/$mode/DETAILS)"
if json_select excluded_boards; then
exclude=0
_i=1
while json_get_var board $_i; do
case "$hardware" in
$board)
uci -q delete netmode.$mode
exclude=1
break
;;
esac
_i=$((_i+1))
done
json_select ..
[ $exclude -eq 1 ] && continue
elif json_select supported_boards; then
support=0
_i=1
while json_get_var board $_i; do
case "$hardware" in
$board)
support=1
break
;;
esac
_i=$((_i+1))
done
json_select ..
[ $support -eq 1 ] || {
uci -q delete netmode.$mode
continue
}
fi
json_select description
json_get_keys keys
for k in $keys; do
json_get_keys lang $k
lang=$(echo $lang | sed 's/^[ \t]*//;s/[ \t]*$//')
json_select $k
json_get_var desc $lang
uci -q set netmode.$mode."desc_$lang"="$desc"
[ "$lang" == "en" ] && uci -q set netmode.$mode."desc"="$desc"
json_select ..
done
json_select ..
json_select explanation
json_get_keys keys
for k in $keys; do
json_get_keys lang $k
lang=$(echo $lang | sed 's/^[ \t]*//;s/[ \t]*$//')
json_select $k
json_get_var exp $lang
uci -q set netmode.$mode."exp_$lang"="$exp"
[ "$lang" == "en" ] && uci -q set netmode.$mode."exp"="$exp"
json_select ..
done
json_select ..
json_get_var cred credentials
uci -q set netmode.$mode.askcred="$cred"
json_get_var ulb uplink_band
uci -q set netmode.$mode.uplink_band="$ulb"
json_get_var reboot reboot
uci -q set netmode.$mode.reboot="$reboot"
done
uci commit netmode
}

View File

@@ -31,7 +31,10 @@ test_connection() {
internet_test() { internet_test() {
local link dest local link dest
dest="$(uci -q get diagnostics.@connectivity[0].destination)" # use the destination address given in config for connectivity check
dest="$(uci -q get netmode.testnet.destination)"
# for backwards compatibility
[ -n "$dest" ] || dest="$(uci -q get diagnostics.@connectivity[0].destination)"
test_connection $dest test_connection $dest

View File

@@ -842,7 +842,7 @@ configure_classify() {
fcctl flush fcctl flush
} }
configure_queue() { pre_configure_queue() {
# Delete queues # Delete queues
rm -rf /tmp/qos/queue_stats rm -rf /tmp/qos/queue_stats
@@ -862,7 +862,9 @@ configure_queue() {
touch /tmp/qos/$intf/q_order touch /tmp/qos/$intf/q_order
touch /tmp/qos/$intf/q_precedence touch /tmp/qos/$intf/q_precedence
done done
}
configure_queue() {
# Load UCI file # Load UCI file
config_load qos config_load qos
config_foreach handle_q_order queue config_foreach handle_q_order queue
@@ -913,6 +915,7 @@ configure_qos() {
#queue configuration is being done after shaper configuration, #queue configuration is being done after shaper configuration,
#If port shapingrate configuration on DISC device is called after queue configuration then #If port shapingrate configuration on DISC device is called after queue configuration then
#driver overwrites the queue shaping rate with default value of port shaping rate. #driver overwrites the queue shaping rate with default value of port shaping rate.
pre_configure_queue
configure_shaper configure_shaper
configure_queue configure_queue
configure_policer configure_policer
@@ -932,6 +935,7 @@ reload_qos() {
elif [ "$service_name" == "shaper" ]; then elif [ "$service_name" == "shaper" ]; then
configure_shaper configure_shaper
elif [ "$service_name" == "queue" ]; then elif [ "$service_name" == "queue" ]; then
pre_configure_queue
configure_queue configure_queue
elif [ "$service_name" == "classify" ]; then elif [ "$service_name" == "classify" ]; then
configure_classify configure_classify

View File

@@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=stunc PKG_NAME:=stunc
PKG_VERSION:=1.0.2 PKG_VERSION:=1.0.4
PKG_SOURCE_VERSION:=d578df0c8e4e7d1b642a5cf037ce468379270534 PKG_SOURCE_VERSION:=9c585888cae94180d715f46f6602090f328240d4
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/stunc.git

View File

@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=sulu PKG_NAME:=sulu
PKG_VERSION:=0.2.27 PKG_VERSION:=0.2.29
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/sulu.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/sulu.git
PKG_SOURCE_VERSION:=5dc2df8dbfe442504a99e46ddf07aefc9fad5faa PKG_SOURCE_VERSION:=5c722ca387ffdd28ac2a2e01f27dba12015fc2e7
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
@@ -37,7 +37,10 @@ endef
define Package/sulu/install define Package/sulu/install
$(INSTALL_DIR) $(1)/sulu $(INSTALL_DIR) $(1)/sulu
$(INSTALL_DIR) $(1)/sulu/config
$(INSTALL_DIR) $(1)/etc/nginx/
$(CP) $(PKG_BUILD_DIR)/dist/* $(1)/sulu $(CP) $(PKG_BUILD_DIR)/dist/* $(1)/sulu
$(CP) $(PKG_BUILD_DIR)/config/* $(1)/sulu/config
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
endef endef

View File

@@ -0,0 +1,18 @@
location /config/ {
autoindex on;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=utf-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'GET') {
add_header 'Access-Control-Allow-Origin' '*' always;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
}
}

View File

@@ -7,3 +7,4 @@ uci -q add_list nginx._sulu.listen='8080'
uci -q add_list nginx._sulu.listen='[::]:8080' uci -q add_list nginx._sulu.listen='[::]:8080'
uci -q set nginx._sulu.root='/sulu' uci -q set nginx._sulu.root='/sulu'
uci -q set nginx._sulu.server_name='_sulu' uci -q set nginx._sulu.server_name='_sulu'
uci -q add_list nginx._sulu.include='conf.d/sulu.locations'

View File

@@ -8,9 +8,9 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=udpechoserver PKG_NAME:=udpechoserver
PKG_VERSION:=1.0.0 PKG_VERSION:=1.0.2
PKG_SOURCE_VERSION:=a3f0860f4268482f9ec9dad0c67745f615293fca PKG_SOURCE_VERSION:=4e80bbec15b284080798b5ffbe8655febaa239aa
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/udpechoserver.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/udpechoserver.git
@@ -24,6 +24,8 @@ PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=src
define Package/$(PKG_NAME) define Package/$(PKG_NAME)
SECTION:=utils SECTION:=utils
CATEGORY:=Utilities CATEGORY:=Utilities
@@ -41,10 +43,13 @@ TARGET_CFLAGS += \
define Package/$(PKG_NAME)/install define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/udpechoserverd $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/lib/bbfdm $(INSTALL_DIR) $(1)/usr/lib/bbfdm
$(INSTALL_BIN) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/bbfdm $(INSTALL_DIR) $(1)/etc/config
$(CP) ./files/* $(1)/ $(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/udpechoserverd $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/libudpechoserver.so $(1)/usr/lib/bbfdm/
$(INSTALL_DATA) ./files/etc/config/udpechoserver $(1)/etc/config/udpechoserver
$(INSTALL_BIN) ./files/etc/init.d/udpechoserverd $(1)/etc/init.d/udpechoserverd
endef endef
$(eval $(call BuildPackage,$(PKG_NAME))) $(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -1,4 +1,4 @@
if (PACKAGE_wfadatad) if PACKAGE_wfadatad || PACKAGE_wfadatad-collector
menu "configurations" menu "configurations"
config WFA_DELM_STANDALONE config WFA_DELM_STANDALONE

View File

@@ -5,10 +5,10 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=wfadatad PKG_NAME:=wfadatad
PKG_VERSION:=6.10.2 PKG_VERSION:=6.10.13
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=aaeed1df50a22bd391e5b1609e946991157308f4 PKG_SOURCE_VERSION:=1c4ff6177f7eef969293d6847454ffcdc41deaed
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip PKG_MIRROR_HASH:=skip
@@ -60,6 +60,13 @@ TARGET_CFLAGS += \
MAKE_PATH:=src MAKE_PATH:=src
EXECS := \
$(if $(CONFIG_PACKAGE_wfadatad),agent/deagent) \
$(if $(CONFIG_PACKAGE_wfadatad-collector),collector/decollector)
MAKE_FLAGS += EXECS="$(EXECS)"
define Package/wfadatad/install define Package/wfadatad/install
ifeq ($(CONFIG_WFA_DELM_STANDALONE),y) ifeq ($(CONFIG_WFA_DELM_STANDALONE),y)

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=wifimngr PKG_NAME:=wifimngr
PKG_VERSION:=14.0.5 PKG_VERSION:=14.0.6
LOCAL_DEV=0 LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1) ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=a34624069fe24e5988e7db379e24e379e4479741 PKG_SOURCE_VERSION:=a248c1508bab5f30297d5b9c12719a90a86d81aa
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu> PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz

View File

@@ -1,6 +1,9 @@
#!/bin/sh #!/bin/sh
. /lib/functions.sh . /lib/functions.sh
. /usr/share/libubox/jshn.sh
MAPFILE="/tmp/multiap.backhaul"
wifi_onoff() { wifi_onoff() {
local devices="$(uci show wireless | grep '=wifi-device' | awk -F'[.,=]' '{print$2}')" local devices="$(uci show wireless | grep '=wifi-device' | awk -F'[.,=]' '{print$2}')"
@@ -30,6 +33,7 @@ start_ap_wps() {
supp_status() { supp_status() {
wpasupp=$1 wpasupp=$1
ul_type=""
ifname="$(echo $wpasupp | cut -d . -f 2)" ifname="$(echo $wpasupp | cut -d . -f 2)"
@@ -57,7 +61,14 @@ supp_status() {
return return
fi fi
if [ -f "/tmp/map.agent.bsta_global_disable" ]; then if [ -f $MAPFILE ]; then
# check if uplink is eth
json_load "$(cat $MAPFILE)"
json_get_var ul_type "type"
json_cleanup
fi
if [ "$ul_type" = "eth" ]; then
echo "CONFIGURED" echo "CONFIGURED"
return return
fi fi