bug 813 - Nqos AP sends packet to non associated STA
authorCharline Taibi Guguen <charline.guguen@gmail.com>
Mon, 12 Apr 2010 13:24:25 +0200
changeset 6219 4073cd038e46
parent 6188 e1728a633e69
child 6220 393892be322a
bug 813 - Nqos AP sends packet to non associated STA
src/devices/wifi/nqap-wifi-mac.cc
--- a/src/devices/wifi/nqap-wifi-mac.cc	Sun Apr 11 16:32:13 2010 -0700
+++ b/src/devices/wifi/nqap-wifi-mac.cc	Mon Apr 12 13:24:25 2010 +0200
@@ -312,13 +312,19 @@
 NqapWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from)
 {
   NS_LOG_FUNCTION (this << packet << to << from);
-  ForwardDown (packet, from, to);
+  if (to.IsBroadcast () || m_stationManager->IsAssociated (to))
+    {
+      ForwardDown (packet, from, to);
+    }
 }
 void 
 NqapWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to)
 {
   NS_LOG_FUNCTION (this << packet << to);
-  ForwardDown (packet, m_low->GetAddress (), to);
+  if (to.IsBroadcast () || m_stationManager->IsAssociated (to))
+    {
+      ForwardDown (packet, m_low->GetAddress (), to);
+    }
 }
 bool 
 NqapWifiMac::SupportsSendFrom (void) const