cancel
Showing results for 
Search instead for 
Did you mean: 

uIP Bug Introduced

paulsmitton9
Associate II
Posted on August 17, 2009 at 12:03

uIP Bug Introduced

1 REPLY 1
paulsmitton9
Associate II
Posted on May 17, 2011 at 09:59

There appears to have been a bug introduced to the uIP main loop in the application note/example um0238 from ST. This bug is not in the original uIP 0.9 source code.

The problem is the line:

if (size > 0) uip_len = size;

This should be:

uip_len = size;

Otherwise, if some non-IP and non-ARP packet is recieved (i.e. another type of ethernet data), then uip_len is set greater than zero, but not cleared until an IP or ARP packet is recieved.

http://en.wikipedia.org/wiki/Ethertype

An alternative fix would be to have:

else { uip_len = 0; }

if both 'if (BUF->type==...' checks fail.