I’d like to check the opinion of the community on a change that I’d like to contribute. The change is to always set the DF bit for outgoing TCP packets.
I’ve been working with FreeRTOS+TCP and lwip for many years now. I mostly deal with industrial automation and PLCs. Over the years I’ve had a few incidents of other industrial equipment ( Allen Bradley ) not even look at the packets from my devices when the TCP packets had the DF bit clear. I know this is weird, but it’s annoying as hell.
Moreover, if I remember correctly, FreeRTOS+TCP does not support fragments, so my logical conclusion is to use the TCP’s flags to inform the other network devices, not to fragment their packets.
Lastly, I seem to remember that checksum offloading ( if used ) cannot work properly with fragments, and checksum offloading is quite desirable in any device.
My personal patches look like so:
#if( ipconfigFORCE_IP_DONT_FRAGMENT == 1 )
/* Force the DON’T FRAGMENT bit. We don’t handle incoming fragments, and the CRC offloading doesn’t work with fragments either. */
pxIPHeader->usFragmentOffset = 0x40;
and of course I’ve added the define in FreeRTOSIPConfig.h
the above patch is needed just in 3-4 places, so what do you guys/gals think? I’m willing to do a pull request for these simple changes if the community agrees it’s a good idea.