luci-0.11: merge r9571 - r9622
[project/luci.git] / contrib / package / meshwizard / files / usr / bin / meshwizard / helpers / setup_firewall_interface.sh
index 51d20bec0aaf3199d388cbbb648bacf3804485aa..fc664430fe98c31a8e7b1357ff0dbc883e024d10 100755 (executable)
@@ -4,7 +4,7 @@
 # Arg $1 = $net
 
 net=$1
-. /etc/functions.sh
+. /lib/functions.sh
 . $dir/functions.sh
 config_load firewall
 
@@ -45,7 +45,11 @@ network=$(echo $network) # Removes leading and trailing whitespaces
 
 [ -n "$netrenamed" ] && [ -z "$(echo $network | grep $netrenamed)" ] && network="$network $netrenamed"
 
-if [ "$type" == "atheros" -a "$vap" == 1 ]; then
+# check if this hardware supports VAPs
+supports_vap="0"
+$dir/helpers/supports_vap.sh $net $type && supports_vap=1
+
+if [ "$supports_vap" == "1" -a "$vap" == 1 ]; then
         [ -n "$netrenamed" ] && [ "$network" == "${network/${netrenamed}dhcp/}" ] && network="$network ${netrenamed}dhcp"
 fi