Bugzilla – Full Text Bug Listing |
Summary: | Tag offsets not updated in Packet::PeekData () | ||
---|---|---|---|
Product: | ns-3 | Reporter: | Pavel Boyko <boyko> |
Component: | core | Assignee: | ns-bugs <ns-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | mathieu.lacage, tommaso.pecorella |
Priority: | P5 | ||
Version: | ns-3-dev | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | fix for ns-3-dev |
Description
Pavel Boyko
2009-05-22 09:23:13 EDT
*** Bug 564 has been marked as a duplicate of this bug. *** Good one, however the problem still remains somewhere. I had my hard time to build a test case, and your suggested change completely fix it, however: 1) in my test case no PCAP was called (not a biggie, as something else calls the PeekData) and, most important 2) I have a larger simulation that still shows the wrong behaviour. Point is, the larger simulation is totally unsuitable as a test case. Anyway, I've seen that the tag (a time tag in my case) disappear between some header and trailer removals. Ofc it's not a consistent behaviour, 90% of the times all goes fine, 10% of the packets have corrupted tags. The kind of bugs I love. I'll go search for something similar to the problem you spotted in those functions, but I'd not consider this bug as fixed yet. > Anyway, I've seen that the tag (a time tag in my case) disappear between some > header and trailer removals. Ofc it's not a consistent behaviour, 90% of the > times all goes fine, 10% of the packets have corrupted tags. The kind of bugs I > love. This is a symptom of broken buffer offsets stored in the tags, this happens when buffer changes its origin offset. M.b. you have faced with the case, when new buffer start offset is _larger_ than an old one -- I'm afraid that in this case my patch with AddAtStart() doesn't help and you can try AddAtEnd(). > I'll go search for something similar to the problem you spotted in those > functions, but I'd not consider this bug as fixed yet. Good luck! here is a reduced testcase for bug 572. I can't figure out what is wrong with 564 though. { // bug 572 Ptr<Packet> tmp = Create<Packet> (1000); tmp->AddTag (ATestTag<20> ()); CHECK (tmp, 1, E (20, 0, 1000)); tmp->AddHeader (ATestHeader<2> ()); CHECK (tmp, 1, E (20, 2, 1002)); tmp->RemoveAtStart (1); CHECK (tmp, 1, E (20, 1, 1001)); tmp->PeekData (); CHECK (tmp, 1, E (20, 1, 1001)); } changeset e12cbd513b47 |