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

@ -44,6 +44,12 @@ LeoMockChannel::TransmitStart (Ptr<const Packet> p,
NS_LOG_FUNCTION (this << p << devId << dst << txTime);
// Find devices joined to channel
if (devId >= GetNDevices ())
{
NS_LOG_ERROR ("Source device unknown");
return false;
}
Ptr<MockNetDevice> srcDev = DynamicCast<MockNetDevice> (GetDevice (devId));
if (srcDev == 0)
{