Subject: Persistent WEP keys
To: None <tech-net@netbsd.org>
From: Jason R Thorpe <thorpej@zembu.com>
List: tech-net
Date: 03/06/2001 23:39:01
The intent of this message is not to debate the plusses and minuses of WEP,
but merely to confirm that a chunk of the wi(4) driver is totally broken.
It's my understanding that WEP keys are supposed to persist in non-volatile
storage, so that e.g. the sysadmin can program the keys into the cards and
then hand them out to people.
However, our wi(4) driver blows away any keys that might be persisting
right in the middle of wi_init():
/* Configure WEP. */
if (sc->wi_has_wep) {
WI_SETVAL(WI_RID_ENCRYPTION, sc->wi_use_wep);
WI_SETVAL(WI_RID_TX_CRYPT_KEY, sc->wi_tx_key);
sc->wi_keys.wi_len = (sizeof(struct wi_ltv_keys) / 2) + 1;
sc->wi_keys.wi_type = WI_RID_DEFLT_CRYPT_KEYS;
wi_write_record(sc, (struct wi_ltv_gen *)&sc->wi_keys);
}
They get blown away because "sc->wi_keys" is going to be all zeros unless
you explicitly set the keys first.
This seems really dumb -- should we just yank out the code that sets
the keys in wi_init()?
--
-- Jason R. Thorpe <thorpej@zembu.com>