Changeset 1759

Show
Ignore:
Timestamp:
10/23/06 11:09:05 (2 years ago)
Author:
kelmo
Message:

This patch fixes a bug which caused sending spurious frames like:

  • IPv6 Neighbor Discovery / Listener Report Message packets (broadcast to
    invalid BSSID 00:00:00:00:00:00)
  • Disassociate frames (addressed to itself) after bringing VAP's interface
    up/down, but before association when operating in multi-VAP mode.

When operating in Infrastructure mode (M_STA) such an operation can be
considered as transmitting without receiving prior enabling signal (i.e.
Beacon Frame) from master device (AP) what violates ETSI EN 301 893

The bug was caused by enforcing an ieee80211 machine state transition S_INIT
-> S_RUN on a VAP if there were other VAPs already running on the device.
Such a transition appears not to be invalid only for M_MONITOR, M_WDS and
M_HOSTAP modes. Implications of both the original and fixed transition
enforcement on multi-VAP operation in modes other than M_STA together with
M_MONITOR has not been tested yet.

Update:

There are a few other bugs connected to invalid state transitions. They occur
on VAP's state changes when there is already a monitor VAP running. A few of
them lead to kernel oopses due to uninitialised data structures.

This update to the patch is a quick workaround that skips monitor VAPs while
counting already running VAPs so that the critical state transitions are not
missed anymore.

Signed-off-by: Michal Wrobel <xmxwx@asn.pl>

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/net80211/ieee80211_proto.c

    r1721 r1759  
    15801580                        TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) { 
    15811581                                if (vap != tmpvap) { 
     1582                                        if (tmpvap->iv_opmode == IEEE80211_M_MONITOR) 
     1583                                                /* skip monitor vaps as their 
     1584                                                 * S_RUN shouldn't have any 
     1585                                                 * influence on modifying state 
     1586                                                 * transition */ 
     1587                                                continue; 
    15821588                                        if (tmpvap->iv_state == IEEE80211_S_RUN) 
    15831589                                                nrunning++; 
     
    15971603                                /* when no one is scanning but someone is running, bypass 
    15981604                                 * scan and go to run state immediately */ 
    1599                                 __ieee80211_newstate(vap, IEEE80211_S_RUN, arg); 
     1605                                if (vap->iv_opmode == IEEE80211_M_MONITOR || 
     1606                                    vap->iv_opmode == IEEE80211_M_WDS || 
     1607                                    vap->iv_opmode == IEEE80211_M_HOSTAP) { 
     1608                                        __ieee80211_newstate(vap, IEEE80211_S_RUN, arg); 
     1609                                } else { 
     1610                                        /* MW: avoid invalid S_INIT -> S_RUN transition */ 
     1611                                        __ieee80211_newstate(vap, nstate, arg); 
     1612                                } 
    16001613                        } else if (nscanning && !nrunning) { 
    16011614                                /* when someone is scanning and no one is running, set