Changeset 38335


Ignore:
Timestamp:
2013-10-08T13:09:36+02:00 (4 years ago)
Author:
nbd
Message:

hostapd: Add WPS unconfigured & WPS pin method support

Signed-off-by: Mathieu Olivari <mathieu@…>
Signed-off-by: Luis R. Rodriguez <mcgrof@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/network/services/hostapd/files/hostapd.sh

    r38334 r38335  
    44        local enc wep_rekey wpa_group_rekey wpa_pair_rekey wpa_master_rekey wps_possible 
    55 
    6         config_get enc "$vif" encryption 
     6        config_get enc "$vif" encryption "none" 
    77        config_get wep_rekey        "$vif" wep_rekey        # 300 
    88        config_get wpa_group_rekey  "$vif" wpa_group_rekey  # 300 
     
    7474        # use crypto/auth settings for building the hostapd config 
    7575        case "$enc" in 
     76                none) 
     77                        wps_possible=1 
     78                        wpa=0 
     79                        crypto= 
     80                        # Here we make the assumption that if we're in open mode 
     81                        # with WPS enabled, we got to be in unconfigured state. 
     82                        wps_not_configured=1 
     83                ;; 
    7684                *psk*) 
    7785                        config_get psk "$vif" key 
     
    183191                config_get device_name "$vif" wps_device_name "OpenWrt AP" 
    184192                config_get manufacturer "$vif" wps_manufacturer "openwrt.org" 
     193                config_get wps_pin "$vif" wps_pin "12345670" 
    185194 
    186195                append "$var" "eap_server=1" "$N" 
    187                 append "$var" "wps_state=2" "$N" 
    188                 append "$var" "ap_setup_locked=1" "$N" 
     196                append "$var" "ap_pin=$wps_pin" "$N" 
     197                append "$var" "wps_state=${wps_not_configured:-2}" "$N" 
     198                append "$var" "ap_setup_locked=0" "$N" 
    189199                append "$var" "device_type=$device_type" "$N" 
    190200                append "$var" "device_name=$device_name" "$N" 
Note: See TracChangeset for help on using the changeset viewer.