diff --git a/src/devices/wifi/mac-high-adhoc.cc b/src/devices/wifi/mac-high-adhoc.cc index 5a05c205f..5cd7da55f 100644 --- a/src/devices/wifi/mac-high-adhoc.cc +++ b/src/devices/wifi/mac-high-adhoc.cc @@ -103,7 +103,10 @@ void MacHighAdhoc::Receive (Ptr packet, WifiMacHeader const *hdr) { NS_LOG_DEBUG ("received size="<GetSize ()<<", from="<GetAddr2 ()); - m_callback (packet, hdr->GetAddr2 ()); + if (hdr->GetAddr1 ().IsBroadcast () || hdr->GetAddr1 () == m_device->GetSelfAddress ()) + { + m_callback (packet, hdr->GetAddr2 ()); + } } } // namespace ns3