Don't allow csma devices to receive packets sent by themselves.

This commit is contained in:
Gustavo J. A. M. Carneiro
2008-07-04 17:58:31 +01:00
parent d00d6e123c
commit f3d8a5eb6d

View File

@@ -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;
}