Static wep keys not set

Nicolas Dichtel nicolas.dichtel at 6wind.com
Tue Apr 3 12:10:48 EDT 2007


I've already sent a mail (and a proposal patch) about this issue
(http://lists.shmoo.com/pipermail/hostap/2006-November/014640.html).

As I said in my previous mail:

802.11 specifications say:
"APs set the Privacy subfield to 1 within transmitted Beacon, Probe 
Response, Association Response, and
Reassociation Response management frames if WEP encryption is required 
for all data type frames
exchanged within the BSS. If WEP encryption is not required, the Privacy 
subfield is set to 0."

Regards,
Nicolas

Dan Williams a écrit :
> On Tue, 2007-04-03 at 12:37 +0200, Rodolfo Giometti wrote:
>> 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:
>
> Jouni, could you explain privacy invoked a bit?  I've looked around for
> stuff about it quite a bit before but couldn't find much at all.
>
> In any case, this seems somewhat wrong; why exactly does the madwifi
> driver care what order these two things are set in?  It really
> shouldn't.
>
> Dan
>
>> --- 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
>>
>
> _______________________________________________
> HostAP mailing list
> HostAP at shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>
>
>



More information about the HostAP mailing list