internet: prevent null packet enqueueing in ARP.
This commit is contained in:
@@ -421,6 +421,8 @@ ArpCache::Entry::MarkWaitReply (Ptr<Packet> waiting)
|
||||
NS_LOG_FUNCTION (this << waiting);
|
||||
NS_ASSERT (m_state == ALIVE || m_state == DEAD);
|
||||
NS_ASSERT (m_pending.empty ());
|
||||
NS_ASSERT_MSG (waiting, "Can not add a null packet to the ARP queue");
|
||||
|
||||
m_state = WAIT_REPLY;
|
||||
m_pending.push_back (waiting);
|
||||
UpdateSeen ();
|
||||
|
||||
@@ -399,8 +399,8 @@ EpcS1uUlTestCase::DoRun ()
|
||||
Ptr<ArpCache> ueArpCache = ueLteIpv4Iface->GetArpCache ();
|
||||
ueArpCache->SetAliveTimeout (Seconds (1000));
|
||||
ArpCache::Entry* arpCacheEntry = ueArpCache->Add (gwAddr);
|
||||
arpCacheEntry->MarkWaitReply(0);
|
||||
arpCacheEntry->MarkAlive (Mac48Address::GetBroadcast ());
|
||||
arpCacheEntry->SetMacAddresss (Mac48Address::GetBroadcast ());
|
||||
arpCacheEntry->MarkPermanent ();
|
||||
|
||||
|
||||
PacketSinkHelper packetSinkHelper ("ns3::UdpSocketFactory",
|
||||
|
||||
Reference in New Issue
Block a user