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

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

Because at the moment you begin a connect() that
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.

David S. Miller

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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