Changeset 13748


Ignore:
Timestamp:
01/27/10 22:45:43 (3 years ago)
Author:
BrainSlayer
Message:

we changed handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/wiviz2/wiviz.c

    r13747 r13748  
    525525  memset(src,0,6); 
    526526  memset(dst,0,6); 
     527  int fc = (hWifi->frame_control & 0xC); 
    527528  type =typeUnknown; 
    528 if (!(hWifi->frame_control & 0xC)) // only accept management frames (type 0) 
     529if (!fc) // only accept management frames (type 0) 
    529530{ 
    530531  switch (hWifi->frame_control & 0xF0) { 
     
    546547      break; 
    547548    } 
    548 } 
    549549#ifdef DEBUG 
    550550        fprintf(stderr,"fc: %X",hWifi->frame_control); 
     
    557557        fprintf(stderr,"%s\n",ntoa(src)); 
    558558#endif 
     559} 
    559560  to_ds = hWifi->flags & IEEE80211_TO_DS; 
    560561  from_ds = hWifi->flags & IEEE80211_FROM_DS; 
     
    588589 
    589590  //Parse the 802.11 tags 
    590   if (wfType == mgt_probeResponse || wfType == mgt_beacon || wfType == mgt_probeRequest) { 
     591  if (fc == mgt_probeResponse || fc == mgt_beacon || fc == mgt_probeRequest) { 
    591592    m = (ieee_802_11_mgt_frame *) (hWifi + 1); 
    592593    if (swap16(m->caps) & MGT_CAPS_IBSS) { 
     
    660661        } 
    661662      } 
    662     if (wfType == mgt_probeRequest && host->staInfo->state == ssUnknown)  
     663    if (fc == mgt_probeRequest && host->staInfo->state == ssUnknown)  
    663664      host->staInfo->state = ssUnassociated; 
    664     if (wfType == mgt_probeRequest && ssidlen > 0 && ssidlen <= 32) { 
     665    if (fc == mgt_probeRequest && ssidlen > 0 && ssidlen <= 32) { 
    665666      memcpy(host->staInfo->lastssid, ssid, ssidlen); 
    666667      host->staInfo->lastssid[ssidlen] = 0; 
Note: See TracChangeset for help on using the changeset viewer.