map-agent: 6.4.0.0: dynbh rework

This commit is contained in:
Jakob Olsson 2025-07-31 17:31:18 +02:00
parent b44afe067f
commit 369fc0d4bb
5 changed files with 34 additions and 7 deletions

View file

@ -59,8 +59,12 @@ config AGENT_CHECK_PARTIAL_WIFI_RELOAD
bool "Option that allow SSID/PSK simple reload" bool "Option that allow SSID/PSK simple reload"
default y default y
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER config DYNBH
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role" bool "Enable map-agent dynamic Ethernet backhaul management"
default n
config DYNBH_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let map-agent through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
config AGENT_UNASSOC_STA_CONT_MONITOR config AGENT_UNASSOC_STA_CONT_MONITOR
bool "Enable continuos monitoring of unassociated clients" bool "Enable continuos monitoring of unassociated clients"

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.3.7.3 PKG_VERSION:=6.4.0.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=ad777a7af4de07c4bdf26922a91502391dbd7377 PKG_SOURCE_VERSION:=b4bb1bf54e8a64ca304900f1c99442d0c80ee614
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu> PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
@ -98,7 +98,11 @@ ifeq ($(CONFIG_AGENT_CHECK_PARTIAL_WIFI_RELOAD),y)
TARGET_CFLAGS += -DCHECK_PARTIAL_WIFI_RELOAD TARGET_CFLAGS += -DCHECK_PARTIAL_WIFI_RELOAD
endif endif
ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y) ifeq ($(CONFIG_DYNBH),y)
TARGET_CFLAGS += -DDYNBH
endif
ifeq ($(CONFIG_DYNBH_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif endif
@ -111,6 +115,10 @@ MAKE_PATH:=src
define Package/map-agent/install define Package/map-agent/install
$(INSTALL_DIR) $(1)/etc $(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
ifeq ($(CONFIG_DYNBH),y)
$(RM) $(1)/etc/hotplug.d/ethernet/map-dynamic-backhaul
$(RM) $(1)/etc/hotplug.d/ethernet/map-topology-discovery
endif
$(INSTALL_DIR) $(1)/usr/lib $(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi $(INSTALL_DIR) $(1)/lib/wifi

View file

@ -17,7 +17,7 @@ config dynamic_backhaul
option missing_bh_reconfig_timer '1800' option missing_bh_reconfig_timer '1800'
config controller_select config controller_select
option id 'auto' option mode 'auto'
option probe_int '20' option probe_int '20'
option retry_int '9' option retry_int '9'
option autostart '1' option autostart '1'

View file

@ -37,7 +37,7 @@ validate_cs_section() {
uci_validate_section mapagent $section "${section}" \ uci_validate_section mapagent $section "${section}" \
'local:bool:false' \ 'local:bool:false' \
'id:string' \ 'mode:string' \
'probe_int:range(0,1000):20' \ 'probe_int:range(0,1000):20' \
'retry_int:range(0,255):3' \ 'retry_int:range(0,255):3' \
'autostart:bool:false' 'autostart:bool:false'

View file

@ -0,0 +1,15 @@
#!/bin/sh
. /lib/functions.sh
adapt_cntlr_sel() {
local section=$1
id=$(uci -q get mapagent.@controller_select[0].id)
uci -q del mapagent.@controller_select[0].id
# re-apply any custom value
[ -z "${id}" ] || uci -q set mapagent.@controller_select[0].mode="${id}"
}
adapt_cntlr_sel