summaryrefslogtreecommitdiffstats
path: root/usr.sbin/wpa
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2010-04-10 13:54:00 +0000
committerbschmidt <bschmidt@FreeBSD.org>2010-04-10 13:54:00 +0000
commita98b1eb99d6bf1fe47d49c33fcdcab7c8709ed7c (patch)
tree54851ae20002dab4a38a642861b996e212912609 /usr.sbin/wpa
parentd89608b359c0241db9538907fc2d58a4d53e7109 (diff)
downloadFreeBSD-src-a98b1eb99d6bf1fe47d49c33fcdcab7c8709ed7c.zip
FreeBSD-src-a98b1eb99d6bf1fe47d49c33fcdcab7c8709ed7c.tar.gz
Add WPA-None support:
* WPA-None requires ap_scan=2: The major difference between ap_scan=1 (default) and 2 is, that no IEEE80211_IOC_SCAN* ioctls/functions are called, though, there is a dependency on those. For example the call to wpa_driver_bsd_scan() sets the interface UP, this never happens, therefore the interface must be marked up in wpa_driver_bsd_associate(). IEEE80211_IOC_SSID also is not called, which means that the SSID has not been set prior to the IEEE80211_MLME_ASSOC call. * WPA-None has no support for sequence number updates, it doesn't make sense to check for replay violations.. * I had some crashes right after the switch to RUN state, issue is that sc->sc_lastrs was not yet defined. Approved by: rpaulo (mentor) MFC after: 3 weeks
Diffstat (limited to 'usr.sbin/wpa')
-rw-r--r--usr.sbin/wpa/wpa_supplicant/driver_freebsd.c13
-rw-r--r--usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.524
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
OpenPOWER on IntegriCloud