blob: f7bf286dc262764f475a4aa2d303e66e23c6d44f (
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
|
type: txt
help: Outbound interface of NPTv6 traffic
enumeration: existing-interfaces; echo "any"
val_help: <interface> ; Interface name or "any"
commit:expression: exec "
if [ \"any\" == \"$VAR(@)\" ] ; then
exit 0
fi
intf_array=($(awk '$1 ~ /:/ { print $1 }' /proc/net/dev))
intf_array_len=${#intf_array[*]}
i=0
while [ $i -lt $intf_array_len ]; do
temp=${intf_array[$i]%:*}
if [ \"$temp\" == \"$VAR(@)\" ] ; then
exit 0
fi
let i++
done
intf_group_name_array=\"eth+ bond+ br+ peth+ vtun+ tun+ wlm+ wlan+ vxlan+ vti+ l2tpeth+\"
i=0
for i in $intf_group_name_array; do
if [ \"$i\" == \"$VAR(@)\" ]; then
exit 0
fi
done
echo NPTv6 configuration warning: interface $VAR(@) does not exist on this system "
|