--- a/src/common/packet.cc Sun Jul 05 22:16:08 2009 +0800 +++ a/src/common/packet.cc Sun Jul 05 22:07:14 2009 +0800 @@ -629,10 +629,10 @@ m_packetTagList.Add (tag); } bool -Packet::RemovePacketTag (Tag &tag) +Packet::RemovePacketTag (Tag &tag) const { NS_LOG_FUNCTION (this << tag.GetInstanceTypeId ().GetName () << tag.GetSerializedSize ()); - bool found = m_packetTagList.Remove (tag); + bool found = const_cast(&m_packetTagList)->Remove (tag); return found; } bool --- a/src/common/packet.h Sun Jul 05 22:16:08 2009 +0800 +++ a/src/common/packet.h Sun Jul 05 22:07:14 2009 +0800 @@ -490,7 +490,7 @@ * Remove a tag from this packet. This method calls * Tag::Deserialize if the tag is found. */ - bool RemovePacketTag (Tag &tag); + bool RemovePacketTag (Tag &tag) const; /** * \param tag the tag to search in this packet * \returns true if the requested tag is found, false