[Ns-bugs] [Bug 813] New: Nqos AP sends packet to non associated STA

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Fri Feb 12 01:00:55 PST 2010


http://www.nsnam.org/bugzilla/show_bug.cgi?id=813

           Summary: Nqos AP sends packet to non associated STA
           Product: ns-3
           Version: ns-3.7
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P5
         Component: devices
        AssignedTo: ns-bugs at isi.edu
        ReportedBy: charline.guguen at gmail.com
   Estimated Hours: 0.0


In a wireless network with several AP using the same ssid and connected through
a wired backbone, one AP sends packets to one of the STA associated with
another AP (other bssid). Results in that the considered STA receives the
packets twice.
Patch to apply to the example wifi-wired-bridging to reproduce the bug is
following below.
Patch to correct the bug is attached (generated with Mercurial tool).

regards,
Charline Taibi Guguen
Technicolor

--- examples/wireless/wifi-wired-bridging.cc    2009-12-02 
11:03:34.793217000 +0100 
+++ scratch/my_wifi-wired-bridging.cc   2010-02-01 15:28:19.705864000 
+0100 
@@ -92,12 +92,19 @@ 
   YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default (); 
   wifiPhy.SetPcapFormat 
(YansWifiPhyHelper::PCAP_FORMAT_80211_RADIOTAP); 


+  // calculate ssid for wifi subnetwork 
+  std::ostringstream oss; 
+  oss << "wifi-default-"; 
+  Ssid ssid = Ssid (oss.str ()); 
+ 
+  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default 
(); 
+  wifiPhy.SetChannel (wifiChannel.Create ()); 
+ 
+  Config::SetDefault 
("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue 
("300")); 
+ 
+ 
   for (uint32_t i = 0; i < nWifis; ++i) 
     { 
-      // calculate ssid for wifi subnetwork 
-      std::ostringstream oss; 
-      oss << "wifi-default-" << i; 
-      Ssid ssid = Ssid (oss.str ()); 


       NodeContainer sta; 
       NetDeviceContainer staDev; 
@@ -108,8 +115,6 @@ 
       BridgeHelper bridge; 
       WifiHelper wifi = WifiHelper::Default (); 
       NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default (); 
-      YansWifiChannelHelper wifiChannel = 
YansWifiChannelHelper::Default (); 
-      wifiPhy.SetChannel (wifiChannel.Create ()); 


       sta.Create (nStas); 
       mobility.SetPositionAllocator ("ns3::GridPositionAllocator", 
@@ -164,7 +169,7 @@ 
   std::string protocol; 
   if (sendIp) 
     { 
-      dest = InetSocketAddress (staInterfaces[1].GetAddress (1), 
1025); 
+      dest = InetSocketAddress (staInterfaces[0].GetAddress (1), 
1025); 
       protocol = "ns3::UdpSocketFactory"; 
     } 
   else 
@@ -183,9 +188,35 @@ 
   ApplicationContainer apps = onoff.Install (staNodes[0].Get (0)); 
   apps.Start (Seconds (0.5)); 
   apps.Stop (Seconds (3.0)); 
+ 
+  //Create sink 
+  PacketSinkHelper packetSinkHelper (protocol, dest); 
+  ApplicationContainer appSinks = packetSinkHelper.Install (staNodes 
[0].Get(1)); 
+  appSinks.Start (Seconds (0.5)); 
+  appSinks.Stop (Seconds (3.0)); 
+ 


   wifiPhy.EnablePcap ("wifi-wired-bridging", apDevices[0]); 
   wifiPhy.EnablePcap ("wifi-wired-bridging", apDevices[1]); 
+  wifiPhy.EnablePcap ("wifi-wired-bridging", staDevices[0]); 
+ 
+  std::ofstream ofsAsciiWifi; 
+  ofsAsciiWifi.open ("wifi-wired-bridging-wifi-x-x.tr"); 
+  YansWifiPhyHelper::EnableAscii (ofsAsciiWifi, apDevices[0]); 
+  YansWifiPhyHelper::EnableAscii (ofsAsciiWifi, apDevices[1]); 
+  YansWifiPhyHelper::EnableAscii (ofsAsciiWifi, staDevices[0]); 
+ 
+//   std::ofstream ofsAsciiWifi2; 
+//   ofsAsciiWifi2.open ("wifi-wired-bridging-wifi-sta0--x-x.tr"); 
+//   YansWifiPhyHelper::EnableAscii (ofsAsciiWifi2, staDevices[0]); 
+//   std::ofstream ofsAsciiWifi3; 
+//   ofsAsciiWifi3.open ("wifi-wired-bridging-wifi-sta1--x-x.tr"); 
+//   YansWifiPhyHelper::EnableAscii (ofsAsciiWifi3, staDevices[0]); 
+ 
+  std::ofstream ofsAsciiCsma; 
+  ofsAsciiCsma.open ("wifi-wired-bridging-csma--x-x.tr"); 
+  CsmaHelper::EnableAscii (ofsAsciiCsma, backboneDevices); 
+ 


   std::ofstream os; 
   os.open ("wifi-wired-bridging.mob");

-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Ns-bugs mailing list