[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #43739] Accept not reporting errors about aborted conn
From: |
Joel Cunningham |
Subject: |
[lwip-devel] [bug #43739] Accept not reporting errors about aborted connections |
Date: |
Tue, 02 Dec 2014 17:18:27 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0 |
URL:
<http://savannah.nongnu.org/bugs/?43739>
Summary: Accept not reporting errors about aborted
connections
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: jcunningham
Submitted on: Tue 02 Dec 2014 05:18:26 PM GMT
Category: sockets/netconn
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: 1.4.1
_______________________________________________________
Details:
I've discovered what appears to be a bug in accept's handling of aborted
connections due to exhaustion of netconns.
As per the Open group spec, I would expect an error to be returned when a new
connection fails the accept process:
http://pubs.opengroup.org/onlinepubs/009695399/functions/accept.html
I'm not sure if the correct return value should be ECONNABORTED or ENFILE (or
even ENOMEM)
In my particular case, the listener is establishing a new connection, but the
final step in tcp_process(), where the PCB is put into ESTABLISHED state,
TCP_EVENT_ACCEPT() is called and that returns ERR_ABRT because allocation of a
netconn failed (accept_function() returns ERR_MEM). After that, the new
connection is aborted, but no error is reported on the listening
netconn/socket.
It looks like errors from within TCP are reported via the tcp_err callback,
but this would be hard to do in tcp_process() because there is no linkage
between the new connected PCB and the listener PCB. This makes me think that
maybe the error should be reported in accept_function() where the allocation
failure happens. Thoughts?
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?43739>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #43739] Accept not reporting errors about aborted connections,
Joel Cunningham <=