Red Hat Bugzilla – Bug 171315
nc-1.82-fc4.1 doesn't use SO_REUSEADDR
Last modified: 2007-11-30 17:11:15 EST
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?
Correct, fixed in rawhide