summaryrefslogtreecommitdiffstats
path: root/sys/dev/wi
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-04-27 16:03:25 +0000
committerimp <imp@FreeBSD.org>2002-04-27 16:03:25 +0000
commit8b065032911d00f5d96b533557c0b39268f6375d (patch)
tree1b18599eae0e25b9de92f80a5e50f46577873d25 /sys/dev/wi
parent0020d3379d37e51e669bc6c09ee9b119f9c53e77 (diff)
downloadFreeBSD-src-8b065032911d00f5d96b533557c0b39268f6375d.zip
FreeBSD-src-8b065032911d00f5d96b533557c0b39268f6375d.tar.gz
This patch fixes my breakage of ssid matching. I introduced the
breakage when I tried to merge OpenBSD wi_hostap changes into the tree. Skibo found the problem and submitted these patches. Thanks! Submitted by: skibo@pacbell.net
Diffstat (limited to 'sys/dev/wi')
-rw-r--r--sys/dev/wi/wi_hostap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/wi/wi_hostap.c b/sys/dev/wi/wi_hostap.c
index 15dcafb..77efd0f 100644
--- a/sys/dev/wi/wi_hostap.c
+++ b/sys/dev/wi/wi_hostap.c
@@ -504,7 +504,7 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm,
u_int16_t seq;
u_int16_t status;
int i, challenge_len;
- u_int8_t challenge[128];
+ u_int8_t challenge[32];
struct wi_80211_hdr *resp_hdr;
@@ -675,7 +675,7 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm,
u_int16_t lstintvl;
u_int8_t rates[8];
int ssid_len, rates_len;
- struct ieee80211_nwid ssid;
+ char ssid[33];
u_int16_t status;
u_int16_t asid = 0;
@@ -686,9 +686,9 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm,
capinfo = take_hword(&pkt, &len);
lstintvl = take_hword(&pkt, &len);
if ((ssid_len = take_tlv(&pkt, &len, IEEE80211_ELEMID_SSID,
- ssid.i_nwid, sizeof(ssid)))<0)
+ ssid, sizeof(ssid) - 1))<0)
return;
- ssid.i_len = ssid_len;
+ ssid[ssid_len] = '\0';
if ((rates_len = take_tlv(&pkt, &len, IEEE80211_ELEMID_RATES,
rates, sizeof(rates)))<0)
return;
@@ -705,10 +705,10 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm,
rxfrm->wi_addr2, ":");
/* If SSID doesn't match, simply drop. */
- if (strcmp(sc->wi_net_name, ssid.i_nwid) != 0) {
+ if (strcmp(sc->wi_net_name, ssid) != 0) {
if (sc->arpcom.ac_if.if_flags & IFF_DEBUG)
printf("wihap_assoc_req: bad ssid: '%s' != '%s'\n",
- ssid.i_nwid, sc->wi_net_name);
+ ssid, sc->wi_net_name);
return;
}
OpenPOWER on IntegriCloud