From f3d8a5eb6dfef72e6b1b158206ce1c641be83fdf Mon Sep 17 00:00:00 2001 From: "Gustavo J. A. M. Carneiro" Date: Fri, 4 Jul 2008 17:58:31 +0100 Subject: [PATCH] Don't allow csma devices to receive packets sent by themselves. --- src/devices/csma/csma-channel.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/devices/csma/csma-channel.cc b/src/devices/csma/csma-channel.cc index 9809daa4e..30100b3c8 100644 --- a/src/devices/csma/csma-channel.cc +++ b/src/devices/csma/csma-channel.cc @@ -232,12 +232,14 @@ CsmaChannel::PropagationCompleteEvent() NS_LOG_LOGIC ("Receive"); std::vector::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; }