mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
map-agent: handle link loss of eth when active bh
This commit is contained in:
parent
0166ee6540
commit
96b7aad9f2
2 changed files with 18 additions and 11 deletions
|
|
@ -97,7 +97,9 @@ if [ "$LINK" = "up" ]; then
|
||||||
|
|
||||||
/lib/wifi/multiap set_uplink "eth" "$PORT"
|
/lib/wifi/multiap set_uplink "eth" "$PORT"
|
||||||
else
|
else
|
||||||
rm -f "$map_bh_file"
|
/lib/wifi/multiap unset_uplink "eth"
|
||||||
|
#rm -f "$map_bh_file"
|
||||||
config_load "mapagent"
|
config_load "mapagent"
|
||||||
config_foreach update_bstas bsta up
|
config_foreach update_bstas bsta up
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -797,21 +797,26 @@ set_uplink() {
|
||||||
|
|
||||||
config_load mapagent
|
config_load mapagent
|
||||||
|
|
||||||
mapagent_process_agent() {
|
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||||
local section=$1
|
|
||||||
|
|
||||||
config_get island_prevention $section island_prevention
|
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||||
|
ubus call map.agent toggle_fh '{"enable":true, "prevent_island":true, "ifname":"all"}'
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
|
||||||
ubus call map.agent toggle_fh '{"ifname":"all", "enable":true}'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
config_foreach mapagent_process_agent agent
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unset_uplink() {
|
unset_uplink() {
|
||||||
rm "$MAPFILE" > /dev/null 2>&1
|
local type=${1:-wifi}
|
||||||
|
|
||||||
|
config_load mapagent
|
||||||
|
|
||||||
|
island_prevention="$(uci -q get mapagent.agent.island_prevention)"
|
||||||
|
|
||||||
|
if [ "$island_prevention" = "1" -a "$type" = "eth" ]; then
|
||||||
|
ubus call map.agent toggle_fh '{"enable":false, "prevent_island":true, "ifname":"all"}'
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f "$MAPFILE" > /dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
func=$1
|
func=$1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue