summaryrefslogtreecommitdiff
path: root/templates/interfaces/pseudo-ethernet/node.tag/vif-s/node.def
blob: 0d338c1dd4bb86bcf864e79ca0a0faf145d70dad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
tag:
priority: 320
type: u32
help: QinQ TAG-S Virtual Local Area Network (VLAN) ID
syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094"
val_help: u32:0-4094; VLAN ID

delete: ETHERTYPE=`echo "$VAR(ethertype/@)"`
	if [ $ETHERTYPE == "0x88A8" ]; then ETHTYPE=802.1ad; fi
	if [ $ETHERTYPE == "0x8100" ]; then ETHTYPE=802.1Q; fi
	[ -d /sys/class/net/$VAR(../@).$VAR(@) ] || exit 0
	sudo ip link delete dev "$VAR(../@).$VAR(@)" type vlan proto $ETHTYPE id $VAR(@)