Compare commits

...

3 Commits

Author SHA1 Message Date
Amin Ben Romdhane
4a7463b205 Merge branch 'wifidm-multi-ap-7.5' into 'release-7.5'
wifidmd: Update the handling of Multi-AP Mode vendor extension

See merge request feed/iopsys!1974
2025-12-19 14:08:05 +00:00
Anjan Chanda
073deb5828 map-controller: 6.4.4.24 2025-12-19 15:04:09 +01:00
Amin Ben Romdhane
8a4d122063 wifidmd: Update the handling of Multi-AP Mode vendor extension 2025-12-04 14:30:38 +00:00
2 changed files with 63 additions and 2 deletions

View File

@@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.4.4.13
PKG_VERSION:=6.4.4.24
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=bd0fb2b63830e19038d9495517c03fdc3900cdfa
PKG_SOURCE_VERSION:=e149d0c26dc7a382638e7778f8cf1c01f382b76e
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
LOCAL_DEV=0

View File

@@ -54,6 +54,67 @@ reload_mapcontroller() {
fi
}
###############################################################################
# mark_ap_instances_applied
#
# Description:
# Finalizes newly created WiFi AccessPoint instances in the dmmap_wireless
# configuration.
#
# An AccessPoint instance is considered a *new instance* when the option
# __is_new__ exists and its value is "1".
#
# New instance handling logic:
#
# • The AccessPoint's controller-side section name is obtained from
# the section_name option.
#
# • For new instances where section_name comes from "mapcontroller.":
# - Remove __is_new__
# - No additional actions required
#
# • For new instances where section_name comes from "wireless.":
# - Set mapcontroller=0 (indicates mapcontroller reload is not required)
# - Remove __is_new__
#
# • For all other prefixes:
# - Remove __is_new__ only
#
# After all new instances are processed, the dmmap_wireless configuration is committed.
###############################################################################
mark_ap_instances_applied() {
for sec in $(uci -q -c /etc/bbfdm/dmmap show dmmap_wireless | grep "=wifi-iface" | cut -d. -f2 | cut -d= -f1); do
is_new=$(uci -q -c /etc/bbfdm/dmmap get dmmap_wireless.${sec}.__is_new__)
if [ "${is_new}" = "1" ]; then
# Get the controller-side section name
config_sec_name=$(uci -q -c /etc/bbfdm/dmmap get dmmap_wireless.${sec}.section_name)
# Skip if section_name is empty
if [ -z "${config_sec_name}" ]; then
uci -q -c /etc/bbfdm/dmmap delete dmmap_wireless.${sec}.__is_new__
continue
fi
# Check type of the corresponding wireless section
config_sec_type=$(uci -q get wireless."${config_sec_name}")
if [ -n "${config_sec_type}" ] && [ "${config_sec_type}" = "wifi-iface" ]; then
# New wireless AP instance — skip mapcontroller reload
mapcontroller=0
fi
# Remove the new-instance flag
uci -q -c /etc/bbfdm/dmmap delete dmmap_wireless.${sec}.__is_new__
fi
done
# Commit all changes to dmmap_wireless
uci -q -c /etc/bbfdm/dmmap commit dmmap_wireless
}
# Finalize newly created AP AccessPoint instances
mark_ap_instances_applied
# Apply logic based on flags
if [ "$mapcontroller" -eq 1 ]; then
reload_mapcontroller