# HG changeset patch # User charline.taibi@technicolor.com # Date 1266228165 -3600 # Node ID 73a83b27be96a11a7ceda61885746c717fddc003 # Parent d86b50208d0db4bd56f62f6fd623f6b566cf2278 Prevent Nqap-wifi-mac to send packet to non associated sta diff -r d86b50208d0d -r 73a83b27be96 src/devices/wifi/nqap-wifi-mac.cc --- a/src/devices/wifi/nqap-wifi-mac.cc Wed Feb 10 11:03:32 2010 +0100 +++ b/src/devices/wifi/nqap-wifi-mac.cc Mon Feb 15 11:02:45 2010 +0100 @@ -311,13 +311,21 @@ NqapWifiMac::Enqueue (Ptr packet, Mac48Address to, Mac48Address from) { NS_LOG_FUNCTION (this << packet << to << from); - ForwardDown (packet, from, to); + WifiRemoteStation *toStation = m_stationManager->Lookup(to); + if(to.IsBroadcast() || toStation->IsAssociated()) + { + ForwardDown (packet, from, to); + } } void NqapWifiMac::Enqueue (Ptr packet, Mac48Address to) { NS_LOG_FUNCTION (this << packet << to); - ForwardDown (packet, m_low->GetAddress (), to); + WifiRemoteStation *toStation = m_stationManager->Lookup(to); + if(to.IsBroadcast() || toStation->IsAssociated()) + { + ForwardDown (packet, m_low->GetAddress (), to); + } } bool NqapWifiMac::SupportsSendFrom (void) const