diff --git a/src/common/packet-metadata.cc b/src/common/packet-metadata.cc index daca275b3..698e01d87 100644 --- a/src/common/packet-metadata.cc +++ b/src/common/packet-metadata.cc @@ -726,6 +726,12 @@ PacketMetadata::AddAtEnd (PacketMetadata const&o) *this = o; return; } + if (o.m_head == 0xffff) + { + NS_ASSERT (o.m_tail == 0xffff); + // we have nothing to append. + return; + } NS_ASSERT (m_head != 0xffff && m_tail != 0xffff); // We read the current tail because we are going to append