mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
95 Commits
5c514051a2
...
dectlogcha
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a01d85693 | ||
|
|
4a53405944 | ||
|
|
f4175d1056 | ||
|
|
ca89942898 | ||
|
|
719ef4d172 | ||
|
|
be0c9d79b0 | ||
|
|
72ecd3d35e | ||
|
|
445cfef73e | ||
|
|
e398b994da | ||
|
|
2cddf06c61 | ||
|
|
f42b9b4a62 | ||
|
|
e3dcdd6c4d | ||
|
|
acac9f08d2 | ||
|
|
3f5708e292 | ||
|
|
c49e2ed7de | ||
|
|
70a000f674 | ||
|
|
4748533fa2 | ||
|
|
ad1966b1ba | ||
|
|
89b367fcf4 | ||
|
|
3bec20d547 | ||
|
|
dde30f9d4a | ||
|
|
f93ba6ec61 | ||
|
|
13b3bdde7e | ||
|
|
1ccd68992f | ||
|
|
3ddbb176aa | ||
|
|
bea0ee5aa5 | ||
|
|
d30a942adb | ||
|
|
f53496233d | ||
|
|
a8f3bea932 | ||
|
|
95dd997cc9 | ||
|
|
62eb925e8c | ||
|
|
3b6e2ad2d7 | ||
|
|
3199e091c4 | ||
|
|
723be11ebc | ||
|
|
6c6a81bacb | ||
|
|
8dc5820987 | ||
|
|
60e0730a6d | ||
|
|
aed486f1f9 | ||
|
|
f2c11f12c3 | ||
|
|
b71fecbb6a | ||
|
|
76310d7e6e | ||
|
|
eac345c3e3 | ||
|
|
9570193737 | ||
|
|
c1d8341be7 | ||
|
|
ae033eb05e | ||
|
|
e16b9c7a0e | ||
|
|
53fb4d46c1 | ||
|
|
0fd29ae954 | ||
|
|
0be6005691 | ||
|
|
0f1e642fe0 | ||
|
|
0ead07e668 | ||
|
|
5bcc5d05dc | ||
|
|
ab91bd9941 | ||
|
|
314f90a0f4 | ||
|
|
429112ba92 | ||
|
|
b3c54526c2 | ||
|
|
b624d52243 | ||
|
|
1b661a7407 | ||
|
|
ec55634131 | ||
|
|
12dfd9be28 | ||
|
|
466d442666 | ||
|
|
28b4fa040a | ||
|
|
2077f29acf | ||
|
|
7335034c2b | ||
|
|
9ae0800d77 | ||
|
|
5d74e693c7 | ||
|
|
d513b5b799 | ||
|
|
40503fc42d | ||
|
|
34acd302be | ||
|
|
705fb9e41b | ||
|
|
8fb0ffc766 | ||
|
|
8e8442e508 | ||
|
|
e7486f4538 | ||
|
|
957d176f26 | ||
|
|
454afbbc98 | ||
|
|
ebda97fe62 | ||
|
|
b261816fe4 | ||
|
|
0fe82491e3 | ||
|
|
a4e457a3ee | ||
|
|
1a4ab4713e | ||
|
|
4cce081fd3 | ||
|
|
a730c6a2e0 | ||
|
|
932385bec1 | ||
|
|
642ffec9cd | ||
|
|
d1cd14742e | ||
|
|
c9309739a6 | ||
|
|
979fe82336 | ||
|
|
e7c84ac6ba | ||
|
|
9a8f2cb393 | ||
|
|
7af3534bc9 | ||
|
|
f1795e0263 | ||
|
|
a2115711bb | ||
|
|
2b26e9083b | ||
|
|
1978d357c9 | ||
|
|
822f77590d |
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libbbfdm
|
||||
PKG_VERSION:=6.4.18
|
||||
PKG_VERSION:=6.4.27
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2758c0380e9dbec87b119df239aee29c7ed1ec48
|
||||
PKG_SOURCE_VERSION:=710485a57e311a5b4c5434efe3e79fc58cb6c429
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -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))
|
||||
@@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.4.7
|
||||
PKG_VERSION:=3.5.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=237bb7280029924e80373ea090e51434def89048
|
||||
PKG_SOURCE_VERSION:=ef9d4c6124d0ca66f048f3d678d9a25f13aa4207
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
config dect 'global'
|
||||
option log_dect_cmbs 'syslog'
|
||||
option log_dect_cmbs 'syslog'
|
||||
option log_level 'realtime,warning,error'
|
||||
|
||||
BIN
dectmngr/files/etc/dspg/04130010.bin
Normal file
BIN
dectmngr/files/etc/dspg/04130010.bin
Normal file
Binary file not shown.
Binary file not shown.
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=easy-soc-libs
|
||||
PKG_VERSION:=6.4.34
|
||||
PKG_VERSION:=6.4.40
|
||||
PKG_RELEASE:=1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
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_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -32,7 +32,6 @@ define Package/easy-soc-libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=IOPSYS Easy SoC libraries
|
||||
SUBMENU:=IOPSYS Easy SoC libraries
|
||||
DEPENDS:=+libopenssl
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
@@ -79,7 +78,6 @@ endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
|
||||
MAKE_FLAGS += \
|
||||
|
||||
@@ -13,7 +13,7 @@ LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/endptmngr.git
|
||||
PKG_SOURCE_VERSION:=548fa04d2714feeadb500192905fa6fb8172e6dd
|
||||
PKG_SOURCE_VERSION:=3a71d4124061287783e0d4c763b1b20e925d2133
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=8.2.25
|
||||
PKG_VERSION:=8.2.27
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=22a1606d972d2dd05b23abe94323f72232727b37
|
||||
PKG_SOURCE_VERSION:=da88c8c28656b2db54ab205d26faccda68546c05
|
||||
PKG_RELEASE=$(PKG_SOURCE_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
14
ieee1905/Config.map-plugin.in
Normal file
14
ieee1905/Config.map-plugin.in
Normal 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
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=4.6.0
|
||||
PKG_VERSION:=4.6.19
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=373602c3644ead5c61aece58e1f88f52838bb38b
|
||||
PKG_SOURCE_VERSION:=7267a76fafa264792415a1cdc697a9e47934a1e6
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -38,7 +38,7 @@ define Package/libieee1905
|
||||
$(call Package/ieee1905/Default,$(1))
|
||||
TITLE+= (library for CMDU and TLV handling)
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json
|
||||
+libjson-c +libblobmsg-json +libopenssl
|
||||
endef
|
||||
|
||||
define Package/ieee1905
|
||||
@@ -57,6 +57,10 @@ $(call Package/ieee1905/Default,$(1))
|
||||
+libjson-c +libblobmsg-json +ieee1905 +libieee1905
|
||||
endef
|
||||
|
||||
define Package/map-plugin/config
|
||||
source "$(SOURCE)/Config.map-plugin.in"
|
||||
endef
|
||||
|
||||
define Package/ieee1905/description
|
||||
This package provides IEEE Std 1905.1 stack.
|
||||
endef
|
||||
@@ -68,12 +72,18 @@ endef
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(CONFIG_IEEE1905_PLATFORM_HAS_WIFI),y)
|
||||
TARGET_CFLAGS += -DHAS_WIFI
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_MULTIAP_DYNAMIC_CNTLR_SYNC_CONFIG),y)
|
||||
TARGET_CFLAGS += -DDYNAMIC_CNTLR_SYNC_CONFIG
|
||||
endif
|
||||
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,82 @@ STOP=21
|
||||
|
||||
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() {
|
||||
config_load "ieee1905"
|
||||
validate_ieee1905_config || return 1;
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/ieee1905d"
|
||||
procd_set_param respawn
|
||||
|
||||
10
map-agent/Config.in
Normal file
10
map-agent/Config.in
Normal 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
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=6.6.0
|
||||
PKG_VERSION:=7.1.10
|
||||
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_LICENSE:=PROPRIETARY IOPSYS
|
||||
@@ -50,7 +50,7 @@ define Package/dynbhd/description
|
||||
endef
|
||||
|
||||
define Package/map-agent/config
|
||||
#source "$(SOURCE)/Config.in"
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -58,6 +58,10 @@ TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
ifeq ($(CONFIG_AGENT_SYNC_DYNAMIC_CNTLR_CONFIG),y)
|
||||
TARGET_CFLAGS += -DAGENT_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
endif
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/map-agent/install
|
||||
|
||||
@@ -5,32 +5,44 @@ STOP=20
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
IS_CFG_VALID=1
|
||||
|
||||
MAP_DEV="map_dev"
|
||||
MAP_IF="map"
|
||||
MAP_VETH="lei"
|
||||
|
||||
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}.name=br-map
|
||||
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}.device=br-map
|
||||
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 commit
|
||||
|
||||
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 ${MAP_VETH} 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 ${MAP_VETH}_lan up 2>/dev/null
|
||||
brctl addif br-map lei_map 2>/dev/null
|
||||
brctl addif br-lan lei_lan 2>/dev/null
|
||||
|
||||
ip link set lei up 2>/dev/null
|
||||
ip link set lei_map up 2>/dev/null
|
||||
ip link set lei_lan up 2>/dev/null
|
||||
}
|
||||
|
||||
remove_map() {
|
||||
@@ -56,10 +68,137 @@ start_dynbhd_service() {
|
||||
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() {
|
||||
[ -f /usr/sbin/dynbhd ] && start_dynbhd_service
|
||||
|
||||
config_load "mapagent"
|
||||
validate_agent_config || return 1;
|
||||
|
||||
ubus -t 5 wait_for wifi
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ get_type_by_section() {
|
||||
|
||||
brcm_sync_credentials() {
|
||||
bands=""
|
||||
json_init
|
||||
mapagent_process_fh() {
|
||||
local section=$1
|
||||
local dev=$2
|
||||
@@ -80,6 +81,17 @@ brcm_sync_credentials() {
|
||||
uci -q set ieee1905.${section}.ssid="$ssid"
|
||||
uci -q set ieee1905.${section}.encryption=$encryption
|
||||
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() {
|
||||
@@ -102,7 +114,38 @@ brcm_sync_credentials() {
|
||||
}
|
||||
|
||||
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 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}
|
||||
}
|
||||
@@ -114,9 +157,9 @@ brcm_sync_credentials() {
|
||||
config_foreach mapagent_process_radio radio
|
||||
|
||||
uci commit ieee1905
|
||||
json_cleanup
|
||||
}
|
||||
|
||||
|
||||
brcm_write_credentials() {
|
||||
config_load mapagent
|
||||
|
||||
|
||||
@@ -4,11 +4,15 @@
|
||||
|
||||
### Traffic Separation ###
|
||||
|
||||
dbg() {
|
||||
logger -t traffic_separation $@
|
||||
}
|
||||
|
||||
ts_sub() {
|
||||
|
||||
ts_usage() {
|
||||
cat <<EOF
|
||||
Usage: $0 [create|delete|populate]
|
||||
Usage: $0 [create|delete|populate|primary|reload]
|
||||
Traffic Separation related functions.
|
||||
create fh <iface> <vid> - create vlan device and rules for wifi fronthaul
|
||||
create bh <iface> <vid> <profile> - create vlan device and rules for wifi backhaul
|
||||
@@ -16,7 +20,7 @@ create eth <iface> <vid> <pbits> - create vlan device and rules for logical ethe
|
||||
delete <iface> - delete vlan device
|
||||
populate eth <iface> <vid> - add secondary network rules for logical ethernet interface
|
||||
primary get <iface> - read primary VID for interface from driver (from Association Response frame IE)
|
||||
|
||||
reload - reload network with new configuration
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
@@ -26,54 +30,102 @@ EOF
|
||||
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() {
|
||||
|
||||
_create_vlan_dev() {
|
||||
iface=$1 # real iface
|
||||
vid=$2 # Vlan ID
|
||||
bridge="$(_get_bridge $iface)" # bridge iface is connected to
|
||||
vlan_dev=${iface}_vlan${vid} # name of vlan device to create
|
||||
bridge=$3 # bridge iface should be connected
|
||||
vlan_dev=$4
|
||||
|
||||
old_bridge="$(_get_bridge $iface)" # bridge iface is connected to
|
||||
|
||||
# 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
|
||||
|
||||
# bring the vlan device up and add back to bridge if it was in one
|
||||
[ -n "$bridge" ] && brctl addif $bridge $vlan_dev &> /dev/null
|
||||
ip link set dev $vlan_dev up
|
||||
vlanctl --if $iface --tx --tags 0 --default-miss-drop
|
||||
vlanctl --if $iface --tx --tags 1 --default-miss-drop
|
||||
vlanctl --if $iface --tx --tags 2 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 0 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 1 --default-miss-drop
|
||||
vlanctl --if $iface --rx --tags 2 --default-miss-drop
|
||||
|
||||
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() {
|
||||
iface=$1 # fh iface
|
||||
vid=$2 # SSID specific (secondary) or primary vid
|
||||
bridge=$3
|
||||
|
||||
[ -n "$iface" ] && [ -n "$vid" ] || {
|
||||
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$bridge" ] || {
|
||||
cat <<EOF
|
||||
Adding FH device requires IFACE and VID.
|
||||
Adding FH device requires IFACE, VID and bridge
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
# EAPOL frames
|
||||
vlanctl --if $iface --rx --tags 0 --filter-ethertype 34958 --set-rxif $vlan_dev --rule-append
|
||||
vlanctl --if $iface --rx --tags 1 --filter-ethertype 34958 --pop-tag --set-rxif $vlan_dev --rule-append
|
||||
vlanctl --if $iface --tx --tags 0 --filter-txif $vlan_dev --filter-ethertype 34958 --rule-append
|
||||
|
||||
# 8021q vlan id TAG/UNTAG
|
||||
vlanctl --if $iface --rx --tags 0 --set-rxif $vlan_dev --push-tag --set-vid $vid 0 --rule-append
|
||||
vlanctl --if $iface --tx --tags 1 --filter-txif $vlan_dev --filter-vid $vid 0 --pop-tag --dscp2pbits 0 --rule-append
|
||||
|
||||
ip link set $iface up
|
||||
ip link set $vlan_dev up
|
||||
}
|
||||
|
||||
# Note: Currently not used (will be needed for Profile 1)
|
||||
ts_create_bh() {
|
||||
iface=$1 # bh iface
|
||||
vid=$2 # primary vid
|
||||
profile=$3 # agent profile (1 or 2)
|
||||
bridge=$4 # bridge interface should be connected to
|
||||
|
||||
[ -n "$iface" ] && [ -n "$vid" ] && [ -n "$profile" ] || {
|
||||
cat <<EOF
|
||||
@@ -82,40 +134,13 @@ EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# create vlan device
|
||||
vlan_dev=$(_create_vlan_dev $iface $vid)
|
||||
#[ -n "$bridge" ] && set_wireless_bridge $iface $bridge
|
||||
|
||||
# add rules
|
||||
case "$profile" in
|
||||
1 | profile_1 | profile1 | Profile_1 | Profile1)
|
||||
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
|
||||
}
|
||||
old_vid=$(wl -i $1 map_8021q_settings)
|
||||
old_vid=${old_vid##* }
|
||||
old_profile=$(wl -i $1 map_profile | cut -d ' ' -f 3)
|
||||
|
||||
ts_create_bh_drv() {
|
||||
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
|
||||
}
|
||||
[ "$old_vid" = "$vid" -a "$old_profile" = "$profile" ] && return
|
||||
|
||||
wl vlan_mode 0 &> /dev/null # make sure this is OFF, else driver won't handle vlan
|
||||
wl -i $iface down &> /dev/null
|
||||
@@ -124,53 +149,118 @@ EOF
|
||||
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() {
|
||||
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" ] || {
|
||||
[ -n "$vid" ] && [ -n "$pbits" ] && [ -n "$vlan_bridge" ] && [ -n "$lan_bridge" ] || {
|
||||
cat <<EOF
|
||||
Adding ETH device requires IFACE, VID, PBITS and name of vlan and lan bridges.
|
||||
EOF
|
||||
exit 1
|
||||
}
|
||||
|
||||
# create virtual eth device between bridges (if it doesn't exist))
|
||||
_ts_setup $vlan_bridge $lan_bridge $iface
|
||||
ip link show lei &> /dev/null || {
|
||||
ip link add link lei name lei_lan type vlan id 1 2>/dev/null
|
||||
}
|
||||
|
||||
# create vlan device
|
||||
vlan_dev=$(_create_vlan_dev $iface $vid)
|
||||
old_vid=$(ip -d link show lei_lan | sed -n 's/vlan.*id \([0-9][0-9]*\) .*/\1/p')
|
||||
|
||||
# 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 --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() {
|
||||
local diff=""
|
||||
|
||||
_net_setup() {
|
||||
local name=$1
|
||||
local devname=$2
|
||||
local vid=$3
|
||||
|
||||
[ -z "$(uci -q get network.${name})" ] && {
|
||||
uci -q set network.${name}="interface"
|
||||
uci -q set network.${name}.device="$devname"
|
||||
uci -q set network.${name}.is_lan="1"
|
||||
uci -q set network.${name}.proto="static"
|
||||
# TODO vid > 255
|
||||
local ip_addr="192.168.${vid}.1"
|
||||
[ "${vid}" = "1" ] && ip_addr="192.168.${vid}.2"
|
||||
uci -q set network.${name}.ipaddr="${ip_addr}"
|
||||
uci -q set network.${name}.netmask="255.255.255.0"
|
||||
|
||||
diff="1"
|
||||
}
|
||||
|
||||
[ "$diff" = "1" ] && uci -q commit network
|
||||
}
|
||||
|
||||
_br_setup() {
|
||||
local name=$1
|
||||
local sinkname=$2
|
||||
local vid=$3
|
||||
local diff=""
|
||||
|
||||
[ -z "$(uci -q get network.${name}_dev)" ] && {
|
||||
uci -q set network.${name}_dev="device"
|
||||
@@ -193,11 +283,7 @@ EOF
|
||||
diff="1"
|
||||
}
|
||||
|
||||
[ "$diff" = "1" ] && {
|
||||
uci -q commit network
|
||||
ubus call network reload
|
||||
ubus -t 5 wait_for network.device
|
||||
}
|
||||
[ "$diff" = "1" ] && uci -q commit network
|
||||
}
|
||||
|
||||
_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="other-config"
|
||||
|
||||
diff="1"
|
||||
uci -q commit dhcp
|
||||
ubus call uci commit '{"config":"dhcp"}'
|
||||
}
|
||||
|
||||
_wan_setup() {
|
||||
_firewall_setup() {
|
||||
local name=$1
|
||||
local network=$2
|
||||
local zone_exist=0
|
||||
|
||||
config_load firewall
|
||||
|
||||
_process_zone() {
|
||||
local section=$1
|
||||
local sink=$2
|
||||
local new_name=$2
|
||||
local name
|
||||
local exists=false
|
||||
|
||||
config_get name $section name
|
||||
|
||||
[ "$name" == "lan" ] || return
|
||||
|
||||
_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
|
||||
[ "$name" == "$new_name" ] && zone_exist=1
|
||||
}
|
||||
|
||||
config_foreach _process_zone zone $name
|
||||
|
||||
[ "$zone_exist" != "0" ] && return
|
||||
|
||||
uci -q add firewall zone
|
||||
uci -q set firewall.@zone[-1].name="$name"
|
||||
uci -q add_list firewall.@zone[-1].network="$network"
|
||||
uci -q set firewall.@zone[-1].input='ACCEPT'
|
||||
uci -q set firewall.@zone[-1].output='ACCEPT'
|
||||
uci -q set firewall.@zone[-1].forward='ACCEPT'
|
||||
|
||||
uci -q add firewall forwarding
|
||||
uci -q set firewall.@forwarding[-1].src="$name"
|
||||
uci -q set firewall.@forwarding[-1].dest="wan"
|
||||
|
||||
diff="1"
|
||||
uci -q commit firewall
|
||||
}
|
||||
|
||||
vid=$1 # primary vid
|
||||
@@ -265,20 +352,26 @@ EOF
|
||||
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}
|
||||
vlanctl --mcast --if-create-name sink2_vlan${vid} sink3_vlan${vid} --if sink2_vlan${vid} --set-if-mode-rg
|
||||
vlanctl --if sink2_vlan${vid} --rx --tags 1 --filter-vid ${vid} 0 --set-rxif sink3_vlan${vid} --pop-tag --rule-append
|
||||
vlanctl --if sink2_vlan${vid} --tx --tags 0 --filter-txif sink3_vlan${vid} --push-tag --set-vid ${vid} 0 --rule-append
|
||||
ip l s sink1_vlan${vid} up
|
||||
ip l s sink2_vlan${vid} up
|
||||
ip l s sink3_vlan${vid} up
|
||||
diff=""
|
||||
_net_setup sink${vid} sink${vid}_peer ${vid}
|
||||
_dhcp_setup sink${vid}
|
||||
_firewall_setup lan${vid} sink${vid}
|
||||
|
||||
_br_setup $br_dev sink3_vlan${vid} $vid
|
||||
_dhcp_setup $br_dev
|
||||
_wan_setup $br_dev
|
||||
[ "$diff" = "1" ] && {
|
||||
ubus call network reload
|
||||
ubus -t 5 wait_for network.interface.sink${vid}
|
||||
}
|
||||
|
||||
brctl addif br-map sink${vid}_vlan &> /dev/null
|
||||
}
|
||||
|
||||
local type=$1
|
||||
@@ -286,9 +379,9 @@ EOF
|
||||
|
||||
case "$type" in
|
||||
fh) ts_create_fh $@;;
|
||||
# bh) ts_create_bh $@;;
|
||||
bh) ts_create_bh_drv $@;;
|
||||
eth) ts_create_eth $@;;
|
||||
bh) ts_create_bh $@;;
|
||||
lei) ts_create_lei $@;;
|
||||
eths) ts_create_eths $@;;
|
||||
dhcp) ts_create_dhcp $@;;
|
||||
--help|help) ts_usage;;
|
||||
*) ts_usage; exit 1;;
|
||||
@@ -300,12 +393,15 @@ EOF
|
||||
|
||||
path=$(ls -d /sys/class/net/${iface}/upper_*)
|
||||
[ -z "$path" ] && exit 0
|
||||
|
||||
vlan_dev=${path##*upper_}
|
||||
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() {
|
||||
@@ -327,8 +423,8 @@ EOF
|
||||
vlan_dev=${path##*upper_}
|
||||
|
||||
# add rules
|
||||
vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids
|
||||
vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default
|
||||
#vlanctl --if $iface --rx --tags 1 --filter-vid $vid 0 --set-rxif $vlan_dev --rule-append # note: retain secondary vids
|
||||
#vlanctl --if $iface --tx --tags 1 --filter-vid $vid 0 --filter-txif $vlan_dev --rule-append # note: already default
|
||||
}
|
||||
|
||||
ts_primary() {
|
||||
@@ -365,16 +461,50 @@ EOF
|
||||
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
|
||||
shift
|
||||
|
||||
case "$func" in
|
||||
create) ts_create $@;;
|
||||
delete) ts_delete $@;;
|
||||
populate) ts_populate $@;;
|
||||
primary) ts_primary $@;;
|
||||
unicast) ts_unicast $@;;
|
||||
multicast) ts_multicast $@;;
|
||||
create) dbg "create $@"; ts_create $@;;
|
||||
delete) dbg "delete $@"; ts_delete $@;;
|
||||
populate) dbg "populate $@"; ts_populate $@;;
|
||||
primary) dbg "primary $@"; ts_primary $@;;
|
||||
unicast) dbg "unicast $@"; ts_unicast $@;;
|
||||
multicast) dbg "multicast $@"; ts_multicast $@;;
|
||||
reload) dbg "reload $@"; ts_reload $@;;
|
||||
--help|help) ts_usage;;
|
||||
*) ts_usage; exit 1;;
|
||||
esac
|
||||
|
||||
10
map-controller/Config.in
Normal file
10
map-controller/Config.in
Normal 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
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=5.4.4
|
||||
PKG_VERSION:=6.0.5
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=52e85d2dd2762148aaac808f0d867bce92c69a26
|
||||
PKG_SOURCE_VERSION:=3562b7f774e6dffda2e58ad2acb382fc439273fb
|
||||
|
||||
PKG_LICENSE:=PROPRIETARY IOPSYS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@@ -34,7 +34,7 @@ define Package/map-controller/description
|
||||
endef
|
||||
|
||||
define Package/map-controller/config
|
||||
#source "$(SOURCE)/Config.in"
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -44,6 +44,10 @@ TARGET_CFLAGS += \
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
ifeq ($(CONFIG_CONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG),y)
|
||||
TARGET_CFLAGS += -DCONTROLLER_SYNC_DYNAMIC_CNTLR_CONFIG
|
||||
endif
|
||||
|
||||
define Package/map-controller/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
|
||||
@@ -5,6 +5,8 @@ STOP=20
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
IS_CFG_VALID=1
|
||||
|
||||
handle_controller_select() {
|
||||
local section="$1"
|
||||
|
||||
@@ -12,10 +14,122 @@ handle_controller_select() {
|
||||
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() {
|
||||
local enabled
|
||||
|
||||
config_load "mapcontroller"
|
||||
validate_controller_config || return 1;
|
||||
|
||||
config_get_bool enabled controller enabled 1
|
||||
[ "$enabled" -eq 0 ] && return
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=map-topology
|
||||
PKG_VERSION:=3.2.0
|
||||
PKG_VERSION:=3.2.5
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_VERSION:=d1fae1ff7a8bc8daea08799b9ffbdeb424903e54
|
||||
PKG_SOURCE_VERSION:=ddf78cca217ebfa83733a532bdd2d17b6c3af54e
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/map-topology.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -5,7 +5,72 @@ STOP=21
|
||||
|
||||
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() {
|
||||
config_load "topology"
|
||||
validate_topology_config || return 1;
|
||||
|
||||
config_load "hosts"
|
||||
validate_hosts_config || return 1;
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "/usr/sbin/topologyd"
|
||||
procd_set_param respawn
|
||||
|
||||
@@ -8,35 +8,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netmode
|
||||
PKG_VERSION:=0.2.0
|
||||
|
||||
PKG_SOURCE_VERSION:=5c8abbdf86e4651c7c6f14f784cfb52e69979f96
|
||||
PKG_SOURCE_PROTO:=git
|
||||
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
|
||||
|
||||
PKG_VERSION:=0.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/netmode
|
||||
CATEGORY:=Base system
|
||||
DEPENDS:=+fping +ubus +libubox +libuci
|
||||
TITLE:=Predefined Network Modes
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Network Modes and Utils
|
||||
endef
|
||||
|
||||
define Package/netmode/description
|
||||
Predefined Network Modes
|
||||
Network Modes and Utils
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/netmode/install
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/netmoded $(1)/sbin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,netmode))
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
config netmoded 'netmoded'
|
||||
option enabled '0'
|
||||
|
||||
config setup 'setup'
|
||||
option enabled '0'
|
||||
option dir '/etc/netmodes'
|
||||
config netmode global
|
||||
option enabled 0
|
||||
# option mode 'router'
|
||||
|
||||
#config testnet testnet
|
||||
# option enabled 1
|
||||
# option destination '8.8.8.8'
|
||||
|
||||
#config shiftrange shiftrange
|
||||
# option enabled 1
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
#!/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
|
||||
|
||||
interface_check() {
|
||||
local islan="$(uci -q get network.$INTERFACE.is_lan)"
|
||||
[ "$islan" == "1" ] && exit 0
|
||||
[ "$(uci -q get network.$INTERFACE.is_lan)" = "1" ] && exit 0
|
||||
|
||||
local proto="$(uci -q get network.$INTERFACE.proto)"
|
||||
[ "$proto" == "none" ] && exit 0
|
||||
[ "$(uci -q get network.$INTERFACE.proto)" = "none" ] && exit 0
|
||||
|
||||
local defroute="$(uci -q get network.$INTERFACE.defaultroute)"
|
||||
[ "$defroute" == "0" ] && exit 0
|
||||
[ "$(uci -q get network.$INTERFACE.defaultroute)" = "0" ] && exit 0
|
||||
}
|
||||
|
||||
interface_check
|
||||
@@ -19,4 +19,3 @@ if [ -n "$(pgrep -f testnet)" ]; then
|
||||
else
|
||||
testnet &
|
||||
fi
|
||||
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# this scripts shifts the lan network prefixes
|
||||
# if a wan interface has the same network prefix.
|
||||
|
||||
# do not shift range if the feature is explicitly disabled
|
||||
[ "$(uci -q get netmode.shiftrange.enabled)" == "0" ] && exit 0
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
|
||||
|
||||
@@ -3,44 +3,71 @@
|
||||
START=10
|
||||
USE_PROCD=1
|
||||
|
||||
NETMODED="/sbin/netmoded"
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/netmode.sh
|
||||
|
||||
start_netmoded() {
|
||||
config_load netmode
|
||||
MODEDIR="/etc/netmodes"
|
||||
|
||||
config_get enabled netmoded enabled 0
|
||||
if [ "$enabled" != "1" ]; then
|
||||
return
|
||||
libnetmode_exec() {
|
||||
when="$1"
|
||||
# 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
|
||||
|
||||
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() {
|
||||
populate_netmodes
|
||||
[ -f /etc/config/netmode ] || return
|
||||
|
||||
start_netmoded
|
||||
}
|
||||
config_load netmode
|
||||
|
||||
reload_service() {
|
||||
switch_netmode
|
||||
config_get_bool enabled global enabled '0'
|
||||
[ $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()
|
||||
{
|
||||
procd_add_reload_trigger netmode
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Bridge Mode" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "NAT is disabled." }
|
||||
],
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -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"}'
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"description": [
|
||||
{ "en" : "Router Mode" }
|
||||
],
|
||||
"explanation": [
|
||||
{ "en" : "NAT is enabled." }
|
||||
],
|
||||
"reboot" : 0
|
||||
}
|
||||
@@ -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"}'
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
@@ -31,7 +31,10 @@ test_connection() {
|
||||
internet_test() {
|
||||
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
|
||||
|
||||
|
||||
@@ -842,7 +842,7 @@ configure_classify() {
|
||||
fcctl flush
|
||||
}
|
||||
|
||||
configure_queue() {
|
||||
pre_configure_queue() {
|
||||
# Delete queues
|
||||
rm -rf /tmp/qos/queue_stats
|
||||
|
||||
@@ -862,7 +862,9 @@ configure_queue() {
|
||||
touch /tmp/qos/$intf/q_order
|
||||
touch /tmp/qos/$intf/q_precedence
|
||||
done
|
||||
}
|
||||
|
||||
configure_queue() {
|
||||
# Load UCI file
|
||||
config_load qos
|
||||
config_foreach handle_q_order queue
|
||||
@@ -913,6 +915,7 @@ configure_qos() {
|
||||
#queue configuration is being done after shaper configuration,
|
||||
#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.
|
||||
pre_configure_queue
|
||||
configure_shaper
|
||||
configure_queue
|
||||
configure_policer
|
||||
@@ -932,6 +935,7 @@ reload_qos() {
|
||||
elif [ "$service_name" == "shaper" ]; then
|
||||
configure_shaper
|
||||
elif [ "$service_name" == "queue" ]; then
|
||||
pre_configure_queue
|
||||
configure_queue
|
||||
elif [ "$service_name" == "classify" ]; then
|
||||
configure_classify
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
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_URL:=https://dev.iopsys.eu/iopsys/stunc.git
|
||||
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sulu
|
||||
PKG_VERSION:=0.2.27
|
||||
PKG_VERSION:=0.2.29
|
||||
|
||||
PKG_SOURCE_PROTO:=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:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
@@ -37,7 +37,10 @@ endef
|
||||
|
||||
define Package/sulu/install
|
||||
$(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)/config/* $(1)/sulu/config
|
||||
$(CP) ./files/* $(1)/
|
||||
endef
|
||||
|
||||
|
||||
18
sulu/files/etc/nginx/conf.d/sulu.locations
Normal file
18
sulu/files/etc/nginx/conf.d/sulu.locations
Normal 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;
|
||||
}
|
||||
}
|
||||
@@ -7,3 +7,4 @@ 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.server_name='_sulu'
|
||||
uci -q add_list nginx._sulu.include='conf.d/sulu.locations'
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
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_URL:=https://dev.iopsys.eu/iopsys/udpechoserver.git
|
||||
|
||||
@@ -24,6 +24,8 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
@@ -41,10 +43,13 @@ TARGET_CFLAGS += \
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/udpechoserverd $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/bbfdm
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/*.so $(1)/usr/lib/bbfdm
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(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
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
if (PACKAGE_wfadatad)
|
||||
if PACKAGE_wfadatad || PACKAGE_wfadatad-collector
|
||||
menu "configurations"
|
||||
|
||||
config WFA_DELM_STANDALONE
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wfadatad
|
||||
PKG_VERSION:=6.10.2
|
||||
PKG_VERSION:=6.10.13
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=aaeed1df50a22bd391e5b1609e946991157308f4
|
||||
PKG_SOURCE_VERSION:=1c4ff6177f7eef969293d6847454ffcdc41deaed
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wfadatad.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -60,6 +60,13 @@ TARGET_CFLAGS += \
|
||||
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
|
||||
|
||||
ifeq ($(CONFIG_WFA_DELM_STANDALONE),y)
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=wifimngr
|
||||
PKG_VERSION:=14.0.5
|
||||
PKG_VERSION:=14.0.6
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=a34624069fe24e5988e7db379e24e379e4479741
|
||||
PKG_SOURCE_VERSION:=a248c1508bab5f30297d5b9c12719a90a86d81aa
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/wifimngr.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
MAPFILE="/tmp/multiap.backhaul"
|
||||
|
||||
wifi_onoff() {
|
||||
local devices="$(uci show wireless | grep '=wifi-device' | awk -F'[.,=]' '{print$2}')"
|
||||
@@ -30,6 +33,7 @@ start_ap_wps() {
|
||||
|
||||
supp_status() {
|
||||
wpasupp=$1
|
||||
ul_type=""
|
||||
|
||||
ifname="$(echo $wpasupp | cut -d . -f 2)"
|
||||
|
||||
@@ -57,7 +61,14 @@ supp_status() {
|
||||
return
|
||||
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"
|
||||
return
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user