summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordamien <damien@openbsd.org>2009-03-06 18:35:02 +0000
committerdamien <damien@openbsd.org>2009-03-06 18:35:02 +0000
commita098129136ac08ea805f25cb8dcc52fad9a49677 (patch)
treeeb64a76224e99d18812482b9422c1f4955591695
parentafter some discussion with millert, pull in the character class info (diff)
downloadwireguard-openbsd-a098129136ac08ea805f25cb8dcc52fad9a49677.tar.xz
wireguard-openbsd-a098129136ac08ea805f25cb8dcc52fad9a49677.zip
Fix setting of the Short Slot Time subfield of the Capability Information
field in (Re)Association Requests. This fixes association with APs refusing non-short-slot-time capable STAs. This should also prevent the AP we're associating with to disable the use of short slot time in the BSS as we join. Fix debug message in recv_assoc_resp() while I'm here (s/reason/status/). Scary. Thanks to Adam Emanuel for spotting this.
-rw-r--r--sys/net80211/ieee80211_input.c4
-rw-r--r--sys/net80211/ieee80211_output.c5
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index 415ed166b33..15bed1b74cf 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.109 2009/02/08 15:34:39 damien Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.110 2009/03/06 18:35:02 damien Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -2095,7 +2095,7 @@ ieee80211_recv_assoc_resp(struct ieee80211com *ic, struct mbuf *m,
status = LE_READ_2(frm); frm += 2;
if (status != IEEE80211_STATUS_SUCCESS) {
if (ifp->if_flags & IFF_DEBUG)
- printf("%s: %sassociation failed (reason %d)"
+ printf("%s: %sassociation failed (status %d)"
" for %s\n", ifp->if_xname,
reassoc ? "re" : "",
status, ether_sprintf((u_int8_t *)wh->i_addr3));
diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index cb33f7600da..32487bfa786 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_output.c,v 1.83 2009/01/28 18:55:18 damien Exp $ */
+/* $OpenBSD: ieee80211_output.c,v 1.84 2009/03/06 18:35:02 damien Exp $ */
/* $NetBSD: ieee80211_output.c,v 1.13 2004/05/31 11:02:55 dyoung Exp $ */
/*-
@@ -1313,8 +1313,7 @@ ieee80211_get_assoc_req(struct ieee80211com *ic, struct ieee80211_node *ni,
if ((ic->ic_flags & IEEE80211_F_SHPREAMBLE) &&
IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))
capinfo |= IEEE80211_CAPINFO_SHORT_PREAMBLE;
- if ((ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME) &&
- (ic->ic_flags & IEEE80211_F_SHSLOT))
+ if (ic->ic_caps & IEEE80211_C_SHSLOT)
capinfo |= IEEE80211_CAPINFO_SHORT_SLOTTIME;
LE_WRITE_2(frm, capinfo); frm += 2;
LE_WRITE_2(frm, ic->ic_lintval); frm += 2;