[Ns-bugs] [Bug 53] New: Bug in Packet::AddTrailer
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Jul 17 06:44:49 PDT 2007
http://www.nsnam.org/bugzilla/show_bug.cgi?id=53
Summary: Bug in Packet::AddTrailer
Product: ns-3
Version: pre-release
Platform: PC
OS/Version: Linux
Status: NEW
Severity: blocker
Priority: P1
Component: simulation core
AssignedTo: ns-bugs at isi.edu
ReportedBy: gjcarneiro at gmail.com
I think there's a bug here, from what I could learn from the Buffer unit tests.
This patch should fix it:
diff -r e12a99f2e698 src/common/packet.h
--- a/src/common/packet.h Tue Jul 17 14:34:27 2007 +0100
+++ b/src/common/packet.h Tue Jul 17 14:43:13 2007 +0100
@@ -343,6 +343,7 @@ Packet::AddTrailer (T const &trailer)
uint32_t size = trailer.GetSize ();
m_buffer.AddAtEnd (size);
Buffer::Iterator end = m_buffer.End ();
+ end.Prev (size);
trailer.Serialize (end);
m_metadata.AddTrailer (trailer, size);
}
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list