* remove batctl tool into separate package * support for vlan options added Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
29 lines
533 B
Bash
29 lines
533 B
Bash
#!/bin/sh
|
|
|
|
. /lib/functions.sh
|
|
. ../netifd-proto.sh
|
|
init_proto "$@"
|
|
|
|
proto_batadv_vlan_init_config() {
|
|
proto_config_add_string "ap_isolation"
|
|
}
|
|
|
|
proto_batadv_vlan_setup() {
|
|
local config="$1"
|
|
local iface="$2"
|
|
|
|
# VLAN specific variables
|
|
local device="${iface%.*}"
|
|
local vid="${iface#*.}"
|
|
|
|
# batadv_vlan options
|
|
local ap_isolation
|
|
|
|
json_get_vars ap_isolation
|
|
|
|
echo "$ap_isolation" > "/sys/class/net/${device}/mesh/vlan${vid}/ap_isolation"
|
|
proto_init_update "$iface" 1
|
|
proto_send_update "$config"
|
|
}
|
|
|
|
add_protocol batadv_vlan
|