lkml.org 
[lkml]   [1999]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: connect() occasionally succeeds improperly to localhost port 1024-4999
   Date:   Mon, 30 Aug 1999 04:00:59 +0000
From: Steve Underwood <steveu@netpage.com.hk>

Eh? Sure you can listen on port X, call to port X, and succeed. Why
does it succeed when there is apparently nobody listening on port
X?

Because at the moment you begin a connect() that
"source_address/source_port/destination_address/destination_port"
unique entity exists and is in SYN_SENT state and thus can be
connected to. Check the RFC's and various BSD implementation, they
allow it too. Better yet see Steven's TCP Illustrated Volume 2, page
956 "Handle simultaneous open or self-connect".

I see about 1 or 2 people every few months who think this is illegal,
it's not.

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/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.059 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site