lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #64127] Headers are not removed if sending fails


From: Deomid Ryabkov
Subject: [lwip-devel] [bug #64127] Headers are not removed if sending fails
Date: Sat, 29 Apr 2023 12:09:09 -0400 (EDT)

URL:
  <https://savannah.nongnu.org/bugs/?64127>

                 Summary: Headers are not removed if sending fails
                   Group: lwIP - A Lightweight TCP/IP stack
               Submitter: rojer
               Submitted: Sat 29 Apr 2023 04:09:07 PM UTC
                Category: pbufs
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sat 29 Apr 2023 04:09:07 PM UTC By: Deomid Ryabkov <rojer>
When lower-level send fails, transport and network headers are not removed.

For example, if we udp_send something to an IPv4 peer, my pbuf gets a UDP and
an IP headers, as it should. If then link-level send fails, the call returns
with an error but headers are not removed, so if we intend to retry sending we
must remove headers from the pbuf ourselves.

This is not a documented and, arguably, not an expected behavior for the
library. LWIP should be modified to remove headers it adds before returning an
error.

This means that one does not simply

return netif->output(netif, p, dest);

at the end of ip4_output_if_opt_src as by that time p has been modified by
adding the IP header. This applies to UDP layer as well.







    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?64127>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

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