diff options
Diffstat (limited to 'usr.sbin/wpa')
-rw-r--r-- | usr.sbin/wpa/wpa_supplicant/driver_freebsd.c | 13 | ||||
-rw-r--r-- | usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 | 24 |
2 files changed, 34 insertions, 3 deletions
diff --git a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c index ec8ae98..65989c2 100644 --- a/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c +++ b/usr.sbin/wpa/wpa_supplicant/driver_freebsd.c @@ -396,7 +396,7 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) { struct wpa_driver_bsd_data *drv = priv; struct ieee80211req_mlme mlme; - int privacy; + int flags, privacy; wpa_printf(MSG_DEBUG, "%s: ssid '%.*s' wpa ie len %u pairwise %u group %u key mgmt %u" @@ -408,6 +408,17 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params) , params->key_mgmt_suite ); + /* NB: interface must be marked UP to associate */ + if (getifflags(drv, &flags) != 0) { + wpa_printf(MSG_DEBUG, "%s did not mark interface UP", __func__); + return -1; + } + if ((flags & IFF_UP) == 0 && setifflags(drv, flags | IFF_UP) != 0) { + wpa_printf(MSG_DEBUG, "%s unable to mark interface UP", + __func__); + return -1; + } + /* XXX error handling is wrong but unclear what to do... */ if (wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_len) < 0) return -1; diff --git a/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 b/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 index a7a1698..7e25391 100644 --- a/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 +++ b/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2007 +.Dd April 10, 2010 .Dt WPA_SUPPLICANT.CONF 5 .Os .Sh NAME @@ -153,7 +153,27 @@ Note that IBSS (adhoc) mode can only be used with .Va key_mgmt set to .Li NONE -(plaintext and static WEP). +(plaintext and static WEP), or +.Va key_mgmt +set to +.Li WPA-NONE +(fixed group key TKIP/CCMP). +In addition, +.Va ap_scan +has to be set to 2 for IBSS. +.Li WPA-NONE +requires +.Va proto +set to WPA, +.Va key_mgmt +set to WPA-NONE, +.Va pairwise +set to NONE, +.Va group +set to either +CCMP or TKIP (but not both), and +.Va psk +must also be set. .It Va proto List of acceptable protocols; one or more of: .Li WPA |