summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/files/lib/netifd/proto/batadv_vlan.sh
blob: 4a8bce74398af02677f7c8c981a6a0e1fa0ad156 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

[ -n "$INCLUDE_ONLY" ] || {
	. /lib/functions.sh
	. ../netifd-proto.sh
	init_proto "$@"
}

proto_batadv_vlan_init_config() {
	proto_config_add_boolean 'ap_isolation:bool'
}

proto_batadv_vlan_setup() {
	local config="$1"
	local iface="$2"

	# batadv_vlan options
	local ap_isolation

	json_get_vars ap_isolation

	batctl vlan "$iface" ap_isolation "${ap_isolation:-0}"
	proto_init_update "$iface" 1
	proto_send_update "$config"
}

proto_batadv_vlan_teardown() {
	local cfg="$1"
}

add_protocol batadv_vlan