Possibly found a bug

6 views
Skip to first unread message

Jens

unread,
Jun 16, 2009, 2:50:26 PM6/16/09
to avr-uip
Hi,

i used the code of this project and found a bug - or something *G*

In the situation where the UIP-Stack recives a tcp paket with no arp
paket prior to it, then the outgoing tcp paket is overwritten und an
arp request is generated. But the connectionflags in the uip
connection structure are still set to UIP_SYN_RCVD.

My quick fix was just to add a line(marked with + below) to the
funktion uip_arp_out in uip_arp.c:

uip_appdata = &uip_buf[UIP_TCPIP_HLEN + UIP_LLH_LEN];
uip_len = sizeof(struct arp_hdr);
+ uip_conn->tcpstateflags &= ~(UIP_SYN_RCVD);
return;
}

I think this is not very nice code. Is there another fix for the
problem or is something wrong with my code?

Looking forward to your answer.

Greetz Jens

ps: Sorry for my poor english :(
Reply all
Reply to author
Forward
0 new messages