Comment 66 for bug 207446

Revision history for this message
Christof Kaser (c-kaser) wrote :

Hi! I have the same problem with wpasuplicant and ndiswrapper. Renice often works, but not every time and it is uncomfortable with Networkmanager. So I searched in the source.

My conclusion: After the last handshake packet from the access point has arrived, the computer sends its last packet and than sets the wpa key. But at this time sending of the last handshake packet is still in progress and setting the key disturbs this process. Inserting a pause between this two actions solves the problem.

wpa.c:

 void wpa_supplicant_process_3_of_4(..)
 {
  .
  .
  wpa_supplicant_send_4_of_4()
   -> wpa_eapol_key_send()
    -> wpa_sm_ether_send()
     -> wpa_ether_send()
      -> l2_packet_send()
       -> sendto()
  .
  .
  usleep(10);
  .
  .
  wpa_supplicant_install_ptk()
   -> wpa_sm_set_key()
    -> wpa_driver_wext_set_key()
     -> ioctl()
  .
  .
 }