Bug 398

Summary: NqstaWifiMac does not filter received frames by BSSID
Product: ns-3 Reporter: Gustavo J. A. M. Carneiro <gjcarneiro>
Component: wifiAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: major CC: craigdo, mathieu.lacage
Priority: P1    
Version: ns-3-dev   
Hardware: PC   
OS: Linux   
Attachments: patch

Description Gustavo J. A. M. Carneiro 2008-10-30 14:26:16 EDT
Created attachment 286 [details]
patch

The scenario is:
  1- Two close Access Points
      > Same channel
      > Same SSID
      > Different BSSIDs (MAC addresses)
  2- Place a STA in the middle of the APs, so that it can perfectly receive signal from both the APs
  3- Additionally make the APs send broadcast data frames

Expected:

 - The STA would associate with one of the APs and stick to it;

 - The STA would only receive data frames from the AP to which it is associated

To support the above, I can quote some text from the standard, such as:

"""
  7.2.3 Management frames

  A STA uses the contents of the Address 1 (DA) field to perform the address matching for receive decisions.  In the case where the Address 1 (DA) field contains a group address and the frame type is other than Beacon, the BSSID also is validated to ensure that the broadcast or multicast originated from a STA in the BSS of which the receiving STA is a member. 
"""

and:
"""
  7.2.2 Data frames

  A STA uses the contents of the Address 1 field to perform address matching for receive decisions. In cases where the Address 1 field contains a group address, the BSSID also is validated to ensure that the broadcast or multicast originated from a STA in the BSS of which the receiving STA is a member.
"""

What actually happens is:

 -The STA continually tries to associate with both the APs; for each beacon received it tries to associate with that AP, regardless of already being associated to the other AP;

 - The STA receives data frames from either AP, regardless of being associated with ir or not.


The attached patch fixes:

  - BSSID filtering in beacons and data frames
  - Don't receive data frames if not associated

Possibly TODO:
  - BSSID filtering in other management frames besides beacons;
Comment 1 Mathieu Lacage 2008-11-05 15:58:26 EST
this looks good.
Comment 2 Mathieu Lacage 2008-11-25 09:11:00 EST
gustavo, I think you can commit this patch yourself.