Bug 599 - Icmpv4Echo::Deserialize Broken
Icmpv4Echo::Deserialize Broken
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
ns-3.4
All All
: P1 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-19 19:15 UTC by Craig Dowell
Modified: 2009-06-22 21:09 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Dowell 2009-06-19 19:15:56 UTC
Recently (changeset 981e2f0b696b Jun 8), Icmpv4Echo::Deserialize was changed to replace a variable length buffer with a small (16 byte) fixed length buffer to hold the ICMP echo packet data.  This breaks all examples (tab-bridge, emu) which use real external ping apps to talk to ns-3.  Real ping sends 56 bytes and this overruns the 16 byte buffer in Icmpv4Echo and corrupts then crashes the system.

We must return all of the variable data bytes in the echo response, and so a small fixed buffer cannot be right.

We need to put back a variable length data buffer.
Comment 1 Mathieu Lacage 2009-06-20 08:33:59 UTC
yes, using a variable sized buffer sounds right. Can you dynamically allocate a raw byte buffer and use Packet::CopyData instead of the previous Ptr<Packet> ?
Comment 2 Craig Dowell 2009-06-22 21:09:30 UTC
Fixed changeset ee3191a0b560