-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix in ATSAME5x network interface. Incorrect detection of ICMP #1194
Conversation
…kets when CRC offloading is enabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @cruxic ,
Thank you for this PR. Looks fine to me. I do not currently have an ATSAME5x with me - would you mind running this version of your code in your project and verifying that it works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please have a look at this slightly modified version:
if( pxIPPacket->xIPHeader.ucProtocol == ( uint8_t ) ipPROTOCOL_ICMP ) | ||
{ | ||
* It must therefore be implemented in software. */ | ||
if ( isICMP(pxBufferDescriptor) ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The if
statement expects a boolean value. The function isICMP()
returns an integer value. The only way to satisfy the compiler is as follows:
if( isICMP( pxBufferDescriptor ) == pdTRUE )
{
}
I'm not able to execute this code directly, because I'm using a heavily modified version of the code. The code included in FreeRTOS+TCP is based on ATMEL ASF libraries, which is deprecated since Microchip acquired ATMEL. |
A fix for issue #1193.
Note: although I have an ATSAME53 board, I have not compiled or executed the code in this pull-request. My own project uses a customized version of this code.
I also noticed that this same bug exists in the MSP432 driver. This pull-request does not fix that.