Don't allow csma devices to receive packets sent by themselves.
This commit is contained in:
@@ -232,12 +232,14 @@ CsmaChannel::PropagationCompleteEvent()
|
||||
NS_LOG_LOGIC ("Receive");
|
||||
|
||||
std::vector<CsmaDeviceRec>::iterator it;
|
||||
uint32_t devId = 0;
|
||||
for (it = m_deviceList.begin (); it < m_deviceList.end(); it++)
|
||||
{
|
||||
if (it->IsActive ())
|
||||
if (it->IsActive () && m_currentSrc != devId)
|
||||
{
|
||||
it->devicePtr->Receive (m_currentPkt->Copy ());
|
||||
}
|
||||
devId++;
|
||||
}
|
||||
m_state = IDLE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user