Static wep keys not set
Rodolfo Giometti
giometti
Tue Apr 3 03:37:44 PDT 2007
On Tue, April 3, 2007 10:17, Rodolfo Giometti said:
> I'm trying to set up static WEP keys with the following hostapd-0.5.7
> configuration file:
After digging hostapd code I found that the problem is that the WEP key is set
_before_ enabling privacy. Here my patch:
--- hostapd.c.orig 2006-12-10 04:13:35.000000000 +0100
+++ hostapd.c 2007-04-03 11:51:20.000000000 +0200
@@ -671,6 +671,12 @@
if (hapd->conf->ssid.wep.default_len)
return 0;
+ if (hostapd_set_privacy(hapd, 1)) {
+ wpa_printf(MSG_ERROR, "Could not set PrivacyInvoked "
+ "for interface %s", hapd->conf->iface);
+ return -1;
+ }
+
for (i = 0; i < 4; i++) {
if (hapd->conf->ssid.wep.key[i] &&
hostapd_set_encryption(iface, hapd, "WEP", NULL,
--- ieee802_1x.c.orig 2006-12-24 20:21:56.000000000 +0100
+++ ieee802_1x.c 2007-04-03 11:27:58.000000000 +0200
@@ -1668,8 +1668,7 @@
if (hapd->default_wep_key == NULL)
return -1;
- } else
- hostapd_set_privacy(hapd, 0);
+ }
return 0;
}
Also ieee802_1x_init() should not disable privacy if it is not used otherwise
it will disable static WEB.
Is that solution correct?
Regards,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the Hostap
mailing list