diff --git a/src/internet-stack/ipv4-l3-protocol.cc b/src/internet-stack/ipv4-l3-protocol.cc index 2e647e74e..eefcbb5b1 100644 --- a/src/internet-stack/ipv4-l3-protocol.cc +++ b/src/internet-stack/ipv4-l3-protocol.cc @@ -695,7 +695,10 @@ Ipv4L3Protocol::SendRealOut (Ptr route, Ptr outInterface = GetInterface (interface); NS_LOG_LOGIC ("Send via NetDevice ifIndex " << outDev->GetIfIndex () << " ipv4InterfaceIndex " << interface); - NS_ASSERT (packet->GetSize () <= outInterface->GetDevice ()->GetMtu ()); + NS_ASSERT_MSG (packet->GetSize () <= outInterface->GetDevice ()->GetMtu (), + "Packet size " << packet->GetSize () << " exceeds device MTU " + << outInterface->GetDevice ()->GetMtu () + << " for IPv4; fragmentation not supported"); if (!route->GetGateway ().IsEqual (Ipv4Address ("0.0.0.0"))) { if (outInterface->IsUp ())