Ticket #241: hostapd-devel.patch
| File hostapd-devel.patch, 1.3 kB (added by parthan@gmail.com, 6 years ago) |
|---|
-
driver_madwifi.c
old new 696 696 printf("Failed to get WPA/RSN information element.\n"); 697 697 return -1; /* XXX not right */ 698 698 } 699 ielen = ie.wpa_ie[1]; 700 if (ielen == 0) { 699 if ((ie.wpa_ie[1] == 0) && (ie.rsn.ie[1] == 0)){ 701 700 printf("No WPA/RSN information element for station!?\n"); 702 701 return -1; /* XXX not right */ 703 702 } 704 ielen += 2;705 703 if (sta->wpa_sm == NULL) 706 704 sta->wpa_sm = wpa_auth_sta_init(hapd->wpa_auth, sta->addr); 707 705 if (sta->wpa_sm == NULL) { 708 706 printf("Failed to initialize WPA state machine\n"); 709 707 return -1; 710 708 } 709 ielen = ie.rsn_ie[1]; 710 ielen += 2; 711 711 res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm, 712 ie. wpa_ie, ielen);712 ie.rsn_ie, ielen); 713 713 if (res != WPA_IE_OK) { 714 printf("WPA/RSN information element rejected? (res %u)\n", res); 715 return -1; 714 // did not find an RSN IE, look for a WPA IE 715 ielen = ie.wpa_ie[1]; 716 ielen += 2; 717 res = wpa_validate_wpa_ie(hapd->wpa_auth, sta->wpa_sm, 718 ie.wpa_ie, ielen); 719 if (res != WPA_IE_OK){ 720 printf("WPA/RSN information element rejected? (res %u)\n", res); 721 return -1; 722 } 716 723 } 717 724 return 0; 718 725 }
