Bugzilla – Bug 1078
PacketTagList::Add performs NS_ASSERT counting one byte too few
Last modified: 2011-03-24 10:16:08 EDT
The PacketTagList::Add (Tag) method checks that the tag being added is not greater than PACKET_TAG_MAX_SIZE. NS_ASSERT (tag.GetSerializedSize () < PACKET_TAG_MAX_SIZE); PACKET_TAG_MAX_SIZE is set to 20. The Tag in questions *can* contain an Inet6SocketAddress. If that is the case its size will be: 16 (IPv6 address) + 2 (port number) + 1+1 (as defined in Address::GetSerializedSize()) which sums up to 20, and systematically fails the assert. I think that replacing '<' with '<=' fixes the issue.
changeset afe2960e58b7