diff options
author | onoe <onoe@FreeBSD.org> | 2001-06-26 13:08:44 +0000 |
---|---|---|
committer | onoe <onoe@FreeBSD.org> | 2001-06-26 13:08:44 +0000 |
commit | 67840ab392c1c9a425abbd8149fb93e1986b4bcc (patch) | |
tree | 6b49f05e8679b668f40e177b52a6ab41d334685a /sys/dev/awi | |
parent | c1aa1040ff061c5891cf27928bef32cdae62fbf4 (diff) | |
download | FreeBSD-src-67840ab392c1c9a425abbd8149fb93e1986b4bcc.zip FreeBSD-src-67840ab392c1c9a425abbd8149fb93e1986b4bcc.tar.gz |
Fix keyid bit position of encrypted packet to make non-first key usable.
Obtained from: NetBSD current
Diffstat (limited to 'sys/dev/awi')
-rw-r--r-- | sys/dev/awi/awi_wep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/awi/awi_wep.c b/sys/dev/awi/awi_wep.c index a8f76ec..d826d32 100644 --- a/sys/dev/awi/awi_wep.c +++ b/sys/dev/awi/awi_wep.c @@ -352,12 +352,12 @@ awi_wep_encrypt(sc, m0, txflag) ivp[0] = (iv >> 16) & 0xff; ivp[1] = (iv >> 8) & 0xff; ivp[2] = iv & 0xff; - ivp[3] = kid & 0x03; /* clear pad and keyid */ + ivp[IEEE80211_WEP_IVLEN] = kid << 6; /* pad and keyid */ noff += IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN; } else { ivp = mtod(m, u_int8_t *) + moff; + kid = ivp[IEEE80211_WEP_IVLEN] >> 6; moff += IEEE80211_WEP_IVLEN + IEEE80211_WEP_KIDLEN; - kid = ivp[IEEE80211_WEP_IVLEN] & 0x03; } key = sc->sc_wep_key[kid]; keylen = sc->sc_wep_keylen[kid]; |