lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #45161] tcp.c / tcp_abandon / pcb->local_port set to z


From: Dipl. Ing. Bernhard Weber
Subject: [lwip-devel] [bug #45161] tcp.c / tcp_abandon / pcb->local_port set to zero but needed later for tcp_rst
Date: Thu, 21 May 2015 12:06:57 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0

URL:
  <http://savannah.nongnu.org/bugs/?45161>

                 Summary: tcp.c / tcp_abandon / pcb->local_port set to zero
but needed later for tcp_rst
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: weberbe1
            Submitted on: Thu 21 May 2015 12:06:56 GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: Change Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: git head

    _______________________________________________________

Details:

In routine tcp_abandon in tcp.c pcb block will be freed with
TCP_PCB_REMOVE_ACTIVE. In this routine local_port will be set to zero.
But when it is necessary to call tcp_rst later on, local port will be zero. 

Therfore local_port must be stored locally before calling
TCP_PCB_REMOVE_ACTIVE or TCP_RMV and for tcp_rst the local copy of local_port
must be used.

Now, without this bug correction, a RST will be sent to the other computer and
will be ignored. Later, an incomming ACK of a data segment cannot be commited
because of the missing pcb and now, a RST with the correct port info is sent
to the other computer.

RST message from 192.168.0.101 port(0) to 192.168.0.51 port 64123
0000  00 25 90 7f 98 b8 00 0a  35 00 40 00 08 00 45 00   
0010  00 28 39 4b 00 00 ff 06  00 9c c0 a8 00 65 c0 a8   
0020  00 33 00 00 fa 7b 06 e2  67 12 68 ac c5 ad 50 14   
0030  ff ff 97 1d 00 00 00 00  00 00 00 00               




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45161>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]