|
Bugzilla – Full Text Bug Listing |
| Summary: | Packet::RemoveTag is misleading | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Component: | network | Assignee: | ns-bugs <ns-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Gustavo J. A. M. Carneiro
2008-02-14 07:56:46 UTC
Re-titling the bug, after cooling down my frustration :P (In reply to comment #0) > Yes, I am frustrated because Packet::RemoveTag has deceived me and made me > waste a lot of time. > > I had some code that used to do pkt->PeekTag (tag). It turns out I discovered > a case where a packet was being re-routed and the same tag was being re-added. > So I logically decided to switch to pkt->RemoveTag (tag). > > After an hour wasted (it was not obvious) in debugging it turned out this was a > bad move. Packet::RemoveTag (tag) does not actually copy the tag! sounds like a bug since the documentation clearly says it should. > > 1. Why does Packet::RemoveHeader (header) remove and return the header, but > Packet::RemoveTag (tag) only removes the tag; this is very inconsistent... Patch to align RemoveTag with RemoveHeader would be welcome. Another option would be, of course, to update the RemoveTag documentation to align it with its current implementation. Either way would be fine with me. |