Bug 171315

Summary: nc-1.82-fc4.1 doesn't use SO_REUSEADDR
Product: [Fedora] Fedora Reporter: Need Real Name <mitch>
Component: ncAssignee: Radek Vokál <rvokal>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.82-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-21 10:09:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Need Real Name 2005-10-20 18:01:26 UTC
Description of problem:

nc 1.82 in fc4 doesn't do a setsockopt(..., SO_REUSEADDR, ...)
so, for example, if you've get nc setup to listen
(nc -l localhost 8080) and you ^D out of it after a connection,
you have to wait for the socket to timewait 60 seconds before
you can start another nc listener.

The original 1.10 version did a SO_REUSEADDR and then had
an ifdef to use SO_REUSEPORT if that was available (with a
comment that SO_REUSEPORT wasn't available everywhere.)  The
1.82 source (an openbsd modified/rewritten version apparently?)
only does a SO_REUSEPORT.  So maybe an upstream portability issue
or RH needs to patch for SO_REUSEADDR instead?

Comment 1 Radek Vokál 2005-10-21 10:09:49 UTC
Correct, fixed in rawhide