Re: connect() occasionally succeeds improperly to localhost port 1024-4999

David S. Miller (davem@redhat.com)
Sun, 29 Aug 1999 20:43:27 -0700


Date: Sun, 29 Aug 1999 23:28:51 -0400 (EDT)
From: Fyodor <fyodor@dhp.com>

Sometimes a connect() to localhost will succeed even if there is no
process listening on the port. This happens when the ephemeral
local port selected by the kernel during the connect() happens to
be the same port you are trying to connect to.

Connecting to self is %100 legal behavior and has been a part of the
BSD sockets API for years.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/