aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/hostapd
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-08-17 06:17:13 +0000
committerJohn Crispin <blogic@openwrt.org>2015-08-17 06:17:13 +0000
commitb528ae7d6ca810ad8c34eec1bc75093eb806c3bd (patch)
tree7cdbc7fa9ea8490b6233d6846d356741d6f74f49 /package/network/services/hostapd
parent0e4278bdcf5c2c571a9cdb476e96ebd01b8bb782 (diff)
downloadmaster-187ad058-b528ae7d6ca810ad8c34eec1bc75093eb806c3bd.tar.gz
master-187ad058-b528ae7d6ca810ad8c34eec1bc75093eb806c3bd.tar.bz2
master-187ad058-b528ae7d6ca810ad8c34eec1bc75093eb806c3bd.zip
hostapd: Add vlan_file option to netifd.sh
Other VLAN related options are already being processed in netifd.sh but the vlan_file option is missing. This option allows the mapping of vlan IDs to network interfaces and will be used in dynamic VLAN feature for binding stations to interfaces based on VLAN assignments. The change is done similarly to the wpa_psk_file option. Signed-off-by: Gong Cheng <chengg11@yahoo.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46652 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network/services/hostapd')
-rw-r--r--package/network/services/hostapd/files/netifd.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/package/network/services/hostapd/files/netifd.sh b/package/network/services/hostapd/files/netifd.sh
index a3ffd93954..d90ff9ba87 100644
--- a/package/network/services/hostapd/files/netifd.sh
+++ b/package/network/services/hostapd/files/netifd.sh
@@ -140,6 +140,7 @@ hostapd_common_add_bss_config() {
config_add_int dynamic_vlan vlan_naming
config_add_string vlan_tagged_interface vlan_bridge
+ config_add_string vlan_file
config_add_string 'key1:wepkey' 'key2:wepkey' 'key3:wepkey' 'key4:wepkey' 'password:wpakey'
@@ -248,7 +249,7 @@ hostapd_set_bss_options() {
ownip \
eap_reauth_period dynamic_vlan \
vlan_naming vlan_tagged_interface \
- vlan_bridge
+ vlan_bridge vlan_file
# legacy compatibility
[ -n "$auth_server" ] || json_get_var auth_server server
@@ -291,6 +292,10 @@ hostapd_set_bss_options() {
append bss_conf "vlan_bridge=$vlan_bridge" "$N"
[ -n "$vlan_tagged_interface" ] && \
append bss_conf "vlan_tagged_interface=$vlan_tagged_interface" "$N"
+ [ -n "$vlan_file" ] && {
+ [ -e "$vlan_file" ] || touch "$vlan_file"
+ append bss_conf "vlan_file=$vlan_file" "$N"
+ }
}
;;
wep)