[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-members] [bug #2114] tcp pcb never set to LISTEN state.
From: |
nobody |
Subject: |
[lwip-members] [bug #2114] tcp pcb never set to LISTEN state. |
Date: |
Fri, 14 Nov 2003 04:50:19 -0500 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) |
=================== BUG #2114: LATEST MODIFICATIONS ==================
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=2114&group_id=3159
Changes by: Leon Woestenberg <address@hidden>
Date: Fri 11/14/2003 at 10:50 (Europe/Amsterdam)
What | Removed | Added
---------------------------------------------------------------------------
Resolution | None | Fixed
Assigned to | None | likewise
Status | Open | Closed
------------------ Additional Follow-up Comments ----------------------------
This seems to have been fixed in DEVEL at some point:
tcp_listen(struct tcp_pcb *pcb)
{
struct tcp_pcb_listen *lpcb;
/* already listening? */
if (pcb->state == LISTEN) {
return pcb;
}
lpcb = memp_malloc(MEMP_TCP_PCB_LISTEN);
if (lpcb == NULL) {
return NULL;
}
lpcb->callback_arg = pcb->callback_arg;
lpcb->local_port = pcb->local_port;
lpcb->state = LISTEN;
=================== BUG #2114: FULL BUG SNAPSHOT ===================
Submitted by: davidhaas Project: lwIP - A Lightweight TCP/IP stack
Submitted on: Thu 01/02/2003 at 20:23
Category: TCP Severity: 5 - Major
Bug Group: Faulty Behaviour Resolution: Fixed
Assigned to: likewise Status: Closed
Summary: tcp pcb never set to LISTEN state.
Original Submission: tcp_listen() never sets the new lpcb state to LISTEN.
This means that when tcp_close() is called on a listening pcb, it cannot clean
up properly
Follow-up Comments
*******************
-------------------------------------------------------
Date: Fri 11/14/2003 at 10:50 By: likewise
This seems to have been fixed in DEVEL at some point:
tcp_listen(struct tcp_pcb *pcb)
{
struct tcp_pcb_listen *lpcb;
/* already listening? */
if (pcb->state == LISTEN) {
return pcb;
}
lpcb = memp_malloc(MEMP_TCP_PCB_LISTEN);
if (lpcb == NULL) {
return NULL;
}
lpcb->callback_arg = pcb->callback_arg;
lpcb->local_port = pcb->local_port;
lpcb->state = LISTEN;
-------------------------------------------------------
Date: Fri 01/17/2003 at 15:29 By: jani
patch applied but bug stays since this issue needs more thought.Is the ~120
bytes/listen saved worth the extra trouble?Listening sockets shouldn't be that
many especially on
memorycally challenged targets.Not trying to pave the way for
hwIP but IMHO it's better to keep the code simpler in this case and have one
type of pcb only.Anyway it's not a really important matter.
-------------------------------------------------------
Date: Mon 01/06/2003 at 15:59 By: davidhaas
See patch 922 for a fix.
-------------------------------------------------------
Date: Mon 01/06/2003 at 14:46 By: jani
Looks like nobody ever sets pcb state to LISTEN so any check for pcb->state ==
LISTEN is useless.The problem is that for
listening connections there is a listeing pcb struct not a normal pcb
struct.And they are not compatible as lpcb does not even have a state
field....the only way of distinguishing is by finding whether the pcb is on the
active or the listening pcb's list.I'll look at this closer.
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.nongnu.org/bugs/?func=detailbug&bug_id=2114&group_id=3159
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-members] [bug #2114] tcp pcb never set to LISTEN state.,
nobody <=