lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #52106] oversize mismatch when tcp_output_segment() fa


From: Jens Nielsen
Subject: [lwip-devel] [bug #52106] oversize mismatch when tcp_output_segment() fails
Date: Sun, 24 Sep 2017 09:27:27 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

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

                 Summary: oversize mismatch when tcp_output_segment() fails
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: deft
            Submitted on: Sun 24 Sep 2017 01:27:26 PM UTC
                Category: TCP
                Severity: 3 - Normal
              Item Group: Crash Error
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

When stress testing my application I once ran into the "unsent_oversize
mismatch (pcb vs. last_unsent)" assert in tcp_write()

I believe the root cause is that tcp_output() will set seg->oversize_left to 0
before sending, and return without updating pcb->unsent_oversize if sending
fails. Approx line 1225 in tcp_out.c on git head.

I had:

pcb->unsent_oversize = 732
pcb->unsent = last_unsent
last_unsent->len = 728
last_unsent->oversize = 0
pcb->flags with TF_NAGLEMEMERR set

So it fits the scenario, and I think it's a bug that should be fixed anyway.
Attached patch proposes a simple solution to just move seg->oversize_left = 0;
to after sending but I don't know if that has any other implications

Version was 2.0.3 (not available in drop-down) but git head looks similar



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 24 Sep 2017 01:27:26 PM UTC  Name:
0001-Clear-seg-oversize_left-after-sending-OK.patch  Size: 1KiB   By: deft

<http://savannah.nongnu.org/bugs/download.php?file_id=41886>

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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