src/devices/wifi/qap-wifi-mac.cc
changeset 6220 393892be322a
parent 6080 41ee42654550
child 6309 8d46400b959e
--- a/src/devices/wifi/qap-wifi-mac.cc	Mon Apr 12 13:24:25 2010 +0200
+++ b/src/devices/wifi/qap-wifi-mac.cc	Mon Apr 12 14:12:25 2010 +0200
@@ -439,14 +439,20 @@
 QapWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from)
 {
   NS_LOG_FUNCTION (this << packet << from << to);
-  ForwardDown (packet, from, to);
+  if (to.IsBroadcast () || m_stationManager->IsAssociated (to))
+    {
+      ForwardDown (packet, from, to);
+    }
 }
 
 void 
 QapWifiMac::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