From da514b5edbae66ce9eee576652279d095f863355 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 20 Jun 2008 15:06:23 -0700 Subject: [PATCH] bug 217: Handle gracefully the case where a packet aggregated contains nothing. --- src/common/packet-metadata.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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