[Top][All Lists]

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

[lwip-devel] [bug #26236] TCP options (timestamp) don't work with no-cop

From: Simon Goldschmidt
Subject: [lwip-devel] [bug #26236] TCP options (timestamp) don't work with no-copy-tcpwrite
Date: Sun, 19 Apr 2009 12:30:38 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; de; rv: Gecko/2009032608 Firefox/3.0.8


                 Summary: TCP options (timestamp) don't work with
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: goldsimon
            Submitted on: So 19 Apr 2009 12:30:34 GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: In Progress
                 Privacy: Public
             Assigned to: goldsimon
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 1.3.1
            lwIP version: CVS Head



When calling tcp_write (on a pcb with the TF_TIMESTAMP flag turned on)
without the COPY flag, it allocates 2 pbufs (RAM for headers + options, ROM
for data).

If the last unsent segment has room, the header will be deallocated but the
space reserved for the data will not be deallocated. Also, the flags are lost
(not copied to the unsent segment).

The obvious solution is to change

    if(pbuf_header(queue->p, -TCP_HLEN)) {


    if(pbuf_header(queue->p, -(TCP_HLEN + optlen))) {

which would effectively deallocate the space reserved for options as well.

However, we would lose the options (from @param optflags): copying the flags
to the unsent segment does not work since we cannot be sure there is enough
space reserved in the header pbuf of that segment to allocate the options.

I'll check in the above code change since it's obvious, but the cleanest
solution for not copying the options would be to not concatenate the two
segments if the options are different.

Any comments?

(I've set this planned for 1.3.1 since it's a bug introduced after 1.3.0)


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

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