[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Bug in TCP ooseq FIN processing
From: |
Karl Jeacle |
Subject: |
[lwip-devel] Bug in TCP ooseq FIN processing |
Date: |
Sat, 13 Dec 2003 00:45:51 +0000 |
Hi all,
There is a small bug in lwIP's TCP handling of out-of-sequence FIN segments.
For me, this problem exhibits itself with my receiving application blocking
forever on netconn_recv() despite the sender having closed the connection.
The problem is caused when tcp_receive() checks to see if out-of-sequence
segments are now in sequence. It checks if an ooseq segment was a FIN,
but it does this incorrectly. Instead of looking at the flags on the
ooseq segment itself, it uses the "flags" variable. But "flags" is set
for the value of the current segment being processed by TCP, not the
ooseq segment. The fix in tcp_in.c is simple:
1024c1024
< if (flags & TCP_FIN) {
---
> if (TCPH_FLAGS(cseg->tcphdr) & TCP_FIN) {
This appears to have solved the problem for me, so if this makes sense,
perhaps someone can go ahead and submit this change to the DEVEL branch.
Cheers,
Karl
- [lwip-devel] Bug in TCP ooseq FIN processing,
Karl Jeacle <=