Bug 599

Summary: Icmpv4Echo::Deserialize Broken
Product: ns-3 Reporter: Craig Dowell <craigdo>
Component: internetAssignee: Craig Dowell <craigdo>
Status: RESOLVED FIXED    
Severity: normal CC: mathieu.lacage
Priority: P1    
Version: ns-3.4   
Hardware: All   
OS: All   

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