Bugzilla – Bug 2801
MTU is not set correctly
Last modified: 2018-05-03 10:13:24 UTC
There is a "typo" that makes that the MTU is not set correctly. The "typo" is in line 189: "device->SetMtu (ifr.ifr_mtu);" of EmuFdNetDeviceHelper::SetFileDescriptor (Ptr<FdNetDevice> device). ifr2 struct is used to get the MTU size with ioctl, but ifr is used to set the MTU with device->SetMtu. So, it must be: "device->SetMtu (ifr2.ifr_mtu);" The problem can be reproduced with the example fd-emu-onoff.cc. The packetSize is equal to 10000 and the MTU size is set to around 4000. So, IP segments with size equal to 4000 are generated. As the real MTU size is equal to 1500, the firsts segments are not really sent by the physical interface.
Pasquale confirmed this patch, so I pushed in changeset 13501:39141ec72933