forward only packets for ourselves.

This commit is contained in:
Mathieu Lacage
2007-12-19 13:24:52 +01:00
parent f1f400bcee
commit 2d6f46dfa8

View File

@@ -103,7 +103,10 @@ void
MacHighAdhoc::Receive (Ptr<Packet> packet, WifiMacHeader const *hdr)
{
NS_LOG_DEBUG ("received size="<<packet->GetSize ()<<", from="<<hdr->GetAddr2 ());
m_callback (packet, hdr->GetAddr2 ());
if (hdr->GetAddr1 ().IsBroadcast () || hdr->GetAddr1 () == m_device->GetSelfAddress ())
{
m_callback (packet, hdr->GetAddr2 ());
}
}
} // namespace ns3