Bug 750

Summary: Small Ethernet frames do not get padded
Product: ns-3 Reporter: Florian Schmidt <Florian.Schmidt>
Component: devicesAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: craigdo
Priority: P3    
Version: ns-3-dev   
Hardware: All   
OS: All   
Attachments: patch to pad ethernet frames

Description Florian Schmidt 2009-11-25 05:09:26 UTC
Created attachment 676 [details]
patch to pad ethernet frames

When packets that are less than 46 bytes long reach CsmaNetDevice, it will add header and trailer and send them out. However, these packets will be less than the required minimum frame size of 64 bytes. This also influences the time that the line is used by each packet.

Solution: add a check in CsmaNetDevice::AddHeader. Before adding the header and trailer, check for the length of the packet and pad it if necessary. Small and simple patch is attached.
Comment 1 Craig Dowell 2009-12-02 19:28:03 UTC
Changeset aa78abc9c10d