diff options
author | 2002-06-25 01:59:52 +0000 | |
---|---|---|
committer | 2002-06-25 01:59:52 +0000 | |
commit | de2a3cb93a67527660c69596bc5e4d341b2e51f2 (patch) | |
tree | 1cd21dc3b33f74d0fa269cbe2bcf928ee859f0f9 | |
parent | Forgot variable. (diff) | |
download | wireguard-openbsd-de2a3cb93a67527660c69596bc5e4d341b2e51f2.tar.xz wireguard-openbsd-de2a3cb93a67527660c69596bc5e4d341b2e51f2.zip |
Handle REASREQ packets earlier when processing an association
request. We need to eat the MAC address of the packet before we
go looking at the SSID and such. Doing do is sufficient to make
Cisco cards associate with HostAP. From FreeBSD (jhay).
-rw-r--r-- | sys/dev/ic/if_wi_hostap.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index 606528bbf58..5776cd1e7a2 100644 --- a/sys/dev/ic/if_wi_hostap.c +++ b/sys/dev/ic/if_wi_hostap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_hostap.c,v 1.18 2002/06/23 18:50:08 millert Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.19 2002/06/25 01:59:52 millert Exp $ */ /* * Copyright (c) 2002 @@ -682,6 +682,17 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, /* Pull out request parameters. */ capinfo = take_hword(&pkt, &len); lstintvl = take_hword(&pkt, &len); + + if ((rxfrm->wi_frame_ctl & htole16(WI_FCTL_STYPE)) == + htole16(WI_STYPE_MGMT_REASREQ)) { + if (len < 6) + return; + /* Eat the MAC address of the current AP */ + take_hword(&pkt, &len); + take_hword(&pkt, &len); + take_hword(&pkt, &len); + } + if ((ssid_len = take_tlv(&pkt, &len, IEEE80211_ELEMID_SSID, ssid.i_nwid, sizeof(ssid)))<0) return; @@ -690,13 +701,6 @@ wihap_assoc_req(struct wi_softc *sc, struct wi_frame *rxfrm, rates, sizeof(rates)))<0) return; - if ((rxfrm->wi_frame_ctl & htole16(WI_FCTL_STYPE)) == - htole16(WI_STYPE_MGMT_REASREQ)) { - /* Reassociation Request--Current AP. (Ignore?) */ - if (len < 6) - return; - } - if (sc->sc_arpcom.ac_if.if_flags & IFF_DEBUG) printf("wihap_assoc_req: from station %s\n", ether_sprintf(rxfrm->wi_addr2)); |