Fichiers .sh, conf de l'auth par mac.

This commit is contained in:
Gabriel Detraz 2014-11-11 16:03:47 +01:00
parent f60a604a43
commit 6d3061caaf

View file

@ -2,6 +2,7 @@ hostapd_set_bss_options() {
local var="$1" local var="$1"
local vif="$2" local vif="$2"
local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wps_possible local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wps_possible
local vlan_enable ifname vlan_interface vlan_file vlan_naming
config_get enc "$vif" encryption "none" config_get enc "$vif" encryption "none"
config_get wep_rekey "$vif" wep_rekey # 300 config_get wep_rekey "$vif" wep_rekey # 300
@ -71,6 +72,23 @@ hostapd_set_bss_options() {
*ng:TKIP|*na:TKIP) crypto="CCMP TKIP";; *ng:TKIP|*na:TKIP) crypto="CCMP TKIP";;
esac esac
config_get vlan_enable "$vif" vlan_enable 0
case "$vlan_enable" in
1|2)
append "$var" "dynamic_vlan=$vlan_enable" "$N"
config_get ifname "$vif" ifname
config_get vlan_file "$vif" vlan_file "/var/run/hostapd.${ifname}.vlan"
[ "$vlan_file" = "/var/run/hostapd.${ifname}.vlan" ] && {
echo "* ${ifname}.#" > "$vlan_file"
}
append "$var" "vlan_file=$vlan_file" "$N"
config_get vlan_interface "$vif" vlan_interface ""
[ -n "$vlan_interface" ] && append "$var" "vlan_tagged_interface=$vlan_interface" "$N"
config_get vlan_naming "$vif" vlan_naming 1
append "$var" "vlan_naming=$vlan_naming" "$N"
;;
esac
# use crypto/auth settings for building the hostapd config # use crypto/auth settings for building the hostapd config
case "$enc" in case "$enc" in
none) none)