Fix address generation in tests

This commit is contained in:
Tim Schubert 2020-08-07 20:30:18 +02:00
parent 42f5bac245
commit 4f41cb04af
5 changed files with 143 additions and 189 deletions

View file

@ -62,6 +62,11 @@ IslMockChannel::TransmitStart (
NS_LOG_FUNCTION (this << p << srcId << destAddr << txTime);
NS_LOG_LOGIC ("UID is " << p->GetUid () << ")");
if (srcId >= GetNDevices ())
{
NS_LOG_ERROR ("Source device unknown");
return false;
}
Ptr<MockNetDevice> src = DynamicCast<MockNetDevice> (GetDevice (srcId));
Ptr<MockNetDevice> dst = DynamicCast<MockNetDevice> (GetDevice (destAddr));