lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #10178] Inconsistent error codes when no ephemeral p


From: Patrik Lantto
Subject: [lwip-devel] [patch #10178] Inconsistent error codes when no ephemeral port is available
Date: Fri, 11 Feb 2022 10:12:10 -0500 (EST)

URL:
  <https://savannah.nongnu.org/patch/?10178>

                 Summary: Inconsistent error codes when no ephemeral port is
available
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: patriklantto
            Submitted on: Fri 11 Feb 2022 03:12:08 PM UTC
                Category: IPv4
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

For UDP, lwIP will use the error code ERR_USE if no ephemeral port is
available (in udp_bind, udp_connect or udp_send) but for TCP the error code
ERR_BUF is used instead (tcp_bind and tcp_connect). Apart from being
inconsistent, ERR_BUF also seems to be a strange error code in this case.

However, also the standard socket implementation is inconsistent
(https://man7.org/linux/man-pages/man7/ip.7.html):

“The error used to diagnose exhaustion of the ephemeral port range differs
across the various system calls (connect(2), bind(2), listen(2), sendto(2))
that can assign ephemeral ports.”

The patch attached mimics the behaviour of connect, bind, listen and sendto as
documented following the links on the above page.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 11 Feb 2022 03:12:08 PM UTC  Name: Ephemeral@port@error.patch  Size:
3KiB   By: patriklantto

<http://savannah.nongnu.org/patch/download.php?file_id=52843>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10178>

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




reply via email to

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