diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-04 18:13:04 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-04 18:13:04 +0000 |
commit | 6182ef0b15d368dc939090825877e0106203b734 (patch) | |
tree | 0502ab06431150d62dc8fdcc6530577b340db144 | |
parent | f51369d3296b0ce0768f43f6532876025e6de552 (diff) |
If we get a vendor private tlv when we are expecting a challenge,
just ignore the vendor private one and continue. Fixes a problem
with hostap and some 802.11g cards. Adapted from a diff by drahn@
-rw-r--r-- | sys/dev/ic/if_wi_hostap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/ic/if_wi_hostap.c b/sys/dev/ic/if_wi_hostap.c index e35ae4c0c5b..c30d04c7616 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.30 2004/11/23 21:12:23 fgsch Exp $ */ +/* $OpenBSD: if_wi_hostap.c,v 1.31 2005/01/04 18:13:03 millert Exp $ */ /* * Copyright (c) 2002 @@ -577,6 +577,10 @@ wihap_auth_req(struct wi_softc *sc, struct wi_frame *rxfrm, printf("wihap_auth_req: station %s algo=0x%x seq=0x%x\n", ether_sprintf(rxfrm->wi_addr2), algo, seq); + /* Ignore vendor private tlv (if any). */ + (void)take_tlv(&pkt, &len, IEEE80211_ELEMID_VENDOR, challenge, + sizeof(challenge)); + challenge_len = 0; if (len > 0 && (challenge_len = take_tlv(&pkt, &len, IEEE80211_ELEMID_CHALLENGE, challenge, sizeof(challenge))) < 0) { |