diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index 60379c07a5..a453469e1c 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: October 24, 2017

+

Last Updated: October 25, 2017

@@ -800,7 +800,23 @@

-

  • Address Families: IPv4/IPv6 (AF_INET/AF_INET6), Raw socket (AF_PACKET), raw IEEE 802.15.4 (AF_IEEE802154), raw ICMP and ICMPv6 protocol ping sockets, local, Unix domain socket support (AF_LOCAL), and custom user sockets.
  • +
  • Address Families: IPv4/IPv6 (AF_INET/AF_INET6), Raw socket (AF_PACKET), raw IEEE 802.15.4 (AF_IEEE802154), and local, Unix domain socket support (AF_LOCAL).
  • +

    + + + +
    + +

    +

  • Special INET protocol sockets: Raw ICMP and ICMPv6 protocol ping sockets (IPPROTO_ICMP).
  • +

    + + + +
    + +

    +

  • Custom user sockets.
  • diff --git a/net/tcp/tcp_connect.c b/net/tcp/tcp_connect.c index 855c61e2cc..5442f6a638 100644 --- a/net/tcp/tcp_connect.c +++ b/net/tcp/tcp_connect.c @@ -364,6 +364,29 @@ int psock_tcp_connect(FAR struct socket *psock, /* Wait for either the connect to complete or for an error/timeout * to occur. NOTES: net_lockedwait will also terminate if a signal * is received. + * + * REVISIT: This failure has been reported: + * - psock_tcp_accept() waits on net_lockedwait() below + * - The accept operation completes, the socket is in the connected + * state and psock_accept() is awakened. It cannot run, + * however, because its priority is low and so it is blocked + * from execution. + * - In the mean time, the remote host sends a + * packet which is presumeably caught in the read-ahead buffer. + * - Then the remote host closes the socket. Nothing happens on + * the target side because net_start_monitor() has not yet been + * called. + * - Then accept() finally runs, but not with a connected but + * rather with a disconnected socket. This fails when it + * attempts to start the network monitor on the disconnected + * socket below. + * - It is also impossible to read the buffered TCP data from a + * disconnected socket. The TCP recvfrom() logic would also + * need to permit reading buffered data from a disconnected + * socket. + * + * A work-around is to raise the priority of the thread that calls + * accept(). */ ret = net_lockedwait(&state.tc_sem);