1
µTasker general / bug in fnHandleIP
« on: April 02, 2013, 12:02:35 AM »
Hi, Mark. I use uTasker TCP/IP stack in my project. in the function fnHandleIP of file ip.c, the last part of the codes list like this:
if (uMemcmp(received_ip_packet->source_IP_address, cucBroadcast, IPV4_LENGTH)) { // Add the address to ARP cache as long as not broadcast
fnAddARP(received_ip_packet->source_IP_address, frame->ptEth->ethernet_source_MAC, ARP_TEMP_IP);
}
if (received_ip_packet->fragment_offset[0] & (IP_MORE_FRAGMENTS>>
) return(0); // fragmented packets not supported
*usTotalLength = tLen;
return (IP_MIN_HLEN + olen); // return length of IP header
Do you think in the first line, it should be
received_ip_packet->destination_IP_address,
instead of
received_ip_packet->source_IP_address
Thanks,
Guibiao
if (uMemcmp(received_ip_packet->source_IP_address, cucBroadcast, IPV4_LENGTH)) { // Add the address to ARP cache as long as not broadcast
fnAddARP(received_ip_packet->source_IP_address, frame->ptEth->ethernet_source_MAC, ARP_TEMP_IP);
}
if (received_ip_packet->fragment_offset[0] & (IP_MORE_FRAGMENTS>>

*usTotalLength = tLen;
return (IP_MIN_HLEN + olen); // return length of IP header
Do you think in the first line, it should be
received_ip_packet->destination_IP_address,
instead of
received_ip_packet->source_IP_address
Thanks,
Guibiao