[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] loopif bug ?
From: |
Andreas Stenius |
Subject: |
[lwip-users] loopif bug ? |
Date: |
Thu, 27 Feb 2003 11:58:46 +0100 |
Hi all,
I've run across a misshap with the loopif ( TCP only, not UDP ).
When connecting to 'localhost' using the loopif interface, the tcp packet is
processed on the
receiver side before the send process is completed, resulting in a reference
to NULL in tcp_process:
case SYN_SENT:
DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %lu pcb->snd_nxt %lu unacked
%lu\n", ackno,
pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno)));
if(flags & (TCP_ACK | TCP_SYN) &&
ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) {
Here, pcb->unacked is still NULL. It is set in tcp_output:
tcp_output_segment(seg, pcb);
pcb->snd_nxt = ntohl(seg->tcphdr->seqno) + TCP_TCPLEN(seg);
if(TCP_SEQ_LT(pcb->snd_max, pcb->snd_nxt)) {
pcb->snd_max = pcb->snd_nxt;
}
/* put segment on unacknowledged list if length > 0 */
if(TCP_TCPLEN(seg) > 0) {
seg->next = NULL;
if(pcb->unacked == NULL) {
pcb->unacked = seg;
But, tcp_output_segment is called first.
Didn't find any information regarding this in the mailinglist, so I wasn't
sure if you had noticed this yet ??
Thanks,
Andreas
------------------------------------------------
Andreas Stenius
E-mail andreas.stenius AT device.se
Cell +46 (0) 70 618 06 26
Phone +46 (0) 8 470 06 90
Fax +46 (0) 8 470 06 99
Wireless Device AB
Gelbgjutarev. 5 | S-171 48 Solna | Sweden
- [lwip-users] loopif bug ?,
Andreas Stenius <=