Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix keyid bit position of encrypted packet to mak...
details: https://anonhg.NetBSD.org/src/rev/23d678b8dbcf
branches: trunk
changeset: 511713:23d678b8dbcf
user: onoe <onoe%NetBSD.org@localhost>
date: Mon Jun 25 12:11:59 2001 +0000
description:
Fix keyid bit position of encrypted packet to make non-first key usable.
diffstat:
sys/dev/ic/awi_wep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r dc04c1d1740c -r 23d678b8dbcf sys/dev/ic/awi_wep.c
--- a/sys/dev/ic/awi_wep.c Mon Jun 25 12:09:51 2001 +0000
+++ b/sys/dev/ic/awi_wep.c Mon Jun 25 12:11:59 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: awi_wep.c,v 1.6 2001/06/25 04:29:19 onoe Exp $ */
+/* $NetBSD: awi_wep.c,v 1.7 2001/06/25 12:11:59 onoe Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -348,12 +348,12 @@
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];
Home |
Main Index |
Thread Index |
Old Index