Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Changeset 1453

Show
Ignore:
Timestamp:
02/19/06 18:19:27 (8 years ago)
Author:
mrenzmann
Message:

This patch fixes issues with RSN and WPA IEs in combination with
hostapd, as described in ticket #241. You will need a recent snapshot
of hostapd-devel, patched with hostapd-devel-new.patch from ticket
#241 (until the patch is committed to the hostapd repository, at
least).

Signed-off-by: Charles Bovy <charles@bovy.nl>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/net80211/ieee80211_ioctl.h

    r1441 r1453  
    281281        u_int8_t        wpa_macaddr[IEEE80211_ADDR_LEN]; 
    282282        u_int8_t        wpa_ie[IEEE80211_MAX_OPT_IE]; 
     283        u_int8_t        rsn_ie[IEEE80211_MAX_OPT_IE]; 
    283284}; 
    284285 
  • trunk/net80211/ieee80211_wireless.c

    r1452 r1453  
    32323232                memcpy(wpaie.wpa_ie, ni->ni_wpa_ie, ielen); 
    32333233        } 
     3234        if (ni->ni_rsn_ie != NULL) { 
     3235                int ielen = ni->ni_rsn_ie[1] + 2; 
     3236                if (ielen > sizeof(wpaie.rsn_ie)) 
     3237                        ielen = sizeof(wpaie.rsn_ie); 
     3238                memcpy(wpaie.rsn_ie, ni->ni_rsn_ie, ielen); 
     3239        } 
    32343240        ieee80211_free_node(ni); 
    32353241        return (copy_to_user(iwr->u.data.pointer, &wpaie, sizeof(wpaie)) ? 
     
    32723278{ 
    32733279        *ielen = 0; 
     3280        if (se->se_rsn_ie != NULL) 
     3281                *ielen += 2 + se->se_rsn_ie[1]; 
    32743282        if (se->se_wpa_ie != NULL) 
    32753283                *ielen += 2 + se->se_wpa_ie[1]; 
     
    33263334        memcpy(cp, se->se_ssid + 2, sr->isr_ssid_len); 
    33273335        cp += sr->isr_ssid_len; 
     3336        if (se->se_rsn_ie != NULL) { 
     3337                memcpy(cp, se->se_rsn_ie, 2 + se->se_rsn_ie[1]); 
     3338                cp += 2 + se->se_rsn_ie[1]; 
     3339        } 
    33283340        if (se->se_wpa_ie != NULL) { 
    33293341                memcpy(cp, se->se_wpa_ie, 2 + se->se_wpa_ie[1]); 
     
    33883400{ 
    33893401        *ielen = 0; 
     3402        if (ni->ni_rsn_ie != NULL) 
     3403                *ielen += 2+ni->ni_rsn_ie[1]; 
    33903404        if (ni->ni_wpa_ie != NULL) 
    33913405                *ielen += 2+ni->ni_wpa_ie[1]; 
     
    34783492 
    34793493        cp = (u_int8_t *)(si+1); 
     3494        if (ni->ni_rsn_ie != NULL) { 
     3495                memcpy(cp, ni->ni_rsn_ie, 2 + ni->ni_rsn_ie[1]); 
     3496                cp += 2 + ni->ni_rsn_ie[1]; 
     3497        } 
    34803498        if (ni->ni_wpa_ie != NULL) { 
    34813499                memcpy(cp, ni->ni_wpa_ie, 2 + ni->ni_wpa_ie[1]);