Compare commits

...

3 Commits

Author SHA1 Message Date
Janusz Dziedzic
878111e0a5 uci-defaults: add l2mode dedicated wanport 2025-07-18 06:51:20 +00:00
Janusz Dziedzic
84b5e3bb4d map-dynamic-backhaul: dedicated wan port update
Don't require wan port to be added as a bridge
port in UCI default config.
2025-07-18 06:51:20 +00:00
Janusz Dziedzic
63051a0f05 map-dynamic-backhaul: add/del bridge port 2025-07-18 06:51:11 +00:00
2 changed files with 16 additions and 7 deletions

View File

@@ -17,12 +17,6 @@ for port_bridge_sec in $port_bridge_sec_list; do
fi
done
# Exit if the PORT Bridge Name is empty
[ -z "$port_bridge_name" ] && exit 0
# Exit if the PORT is not member of the AL Bridge
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
# Exit if the device is not operating in extender/repeater mode
al_brnet="${al_bridge:3}"
[ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ] || exit 0
@@ -36,9 +30,16 @@ fi
################ Dedicated ETH WAN Port ################
wanport="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
if [ -n "$wanport" ]; then
# Don't require wanport to be part of port bridge
[ "$wanport" = "$PORT" ] || exit 0
########################################################
else
# Exit if the PORT Bridge Name is empty
[ -z "$port_bridge_name" ] && exit 0
# Exit if the PORT is not member of the AL Bridge
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
#################### DHCP Discovery ####################
if [ "$LINK" = "up" ]; then
brctl delif $al_bridge $PORT
@@ -95,8 +96,12 @@ if [ "$LINK" = "up" ]; then
config_foreach remove_from_bridge bsta
config_foreach update_bstas bsta down
brctl addif $al_bridge $PORT
logger -t "dynamic-backhaul" "brctl addif $al_bridge $PORT"
/lib/wifi/multiap set_uplink "eth" "$PORT"
else
brctl delif $al_bridge $PORT
logger -t "dynamic-backhaul" "brctl delif $al_bridge $PORT"
/lib/wifi/multiap unset_uplink "eth"
#rm -f "$map_bh_file"
config_load "mapagent"

View File

@@ -80,7 +80,11 @@ l2_network_config() {
json_select ..
json_select wan 2>/dev/null
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
[ -n "$device" ] && {
# dedicated wan port - create uplink device
uci -q set network.l2wan=interface
uci -q set network.l2wan.device="$device"
}
json_cleanup
fi