# HG changeset patch # User taibic # Date 1265893796 -3600 # Node ID cbed79442171f78d89b4869ba4053a4e571433db # Parent e92fb15deea0c5cbcefc16127e2528dadc3232e4 prevent AP to send packet to non-associated STA diff -r e92fb15deea0 -r cbed79442171 src/devices/wifi/nqap-wifi-mac.cc --- a/src/devices/wifi/nqap-wifi-mac.cc Mon Feb 01 10:13:14 2010 +0100 +++ b/src/devices/wifi/nqap-wifi-mac.cc Thu Feb 11 14:09:56 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(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(toStation->IsAssociated()) + { + ForwardDown (packet, m_low->GetAddress (), to); + } } bool NqapWifiMac::SupportsSendFrom (void) const