Bug 40689 - the -w option does not work, instead, the program waits for connect() to return.
the -w option does not work, instead, the program waits for connect() to return.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: nc (Show other bugs)
7.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-05-15 10:04 EDT by Joseph Pepin
Modified: 2014-03-16 22:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-05-15 10:28:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
A patch to bug 40689 (4.34 KB, patch)
2001-05-15 10:05 EDT, Joseph Pepin
no flags Details | Diff

  None (edit)
Description Joseph Pepin 2001-05-15 10:04:10 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.1b1; Mac_PowerPC)

Description of problem:
There is a bug in the timeout mechanism of netcat under Linux (and 
IRIX) due to the change in the way setjmp/longjmp is implemented in 
the c library.  


How reproducible:
Always

Steps to Reproduce:
1.pick an IP address that you cannot reach (e.g. behind a firewall, 
non-routable, whatever) call it $host
2.nc -vvw2 $host 1-20
3.notice how only the FIRST attempt actualy times out in the 2 
seconds you specify, and the rest wait for a full tcp timeout?  This is 
broken.
	

Actual Results:  The first connect() attempt is correctly cut short after 
2 seconds, while the rest wait for a full timeout.

Expected Results:  Each attempt should have timed out after 2 
seconds.

Additional info:

This is due to a change in glibc, which decided to go one way, while 
all the other libcs went another- simply because POSIX doesn't care 
one way or the other.

It is broken under every version/distrobution of linux which uses glibc-
2.x.

I have submitted this to debian already, and now you.
Comment 1 Joseph Pepin 2001-05-15 10:05:58 EDT
Created attachment 18410 [details]
A patch to bug 40689
Comment 2 Tim Powers 2001-05-15 10:27:24 EDT
I'm reassigning this bug. Netcat is included in the nc package in the distro
(not in Powertools).

Tim
Comment 3 Bill Nottingham 2001-05-15 12:05:21 EDT
Will be fixed in nc-1.10-11; thanks for the patch!

Note You need to log in before you can comment on or make changes to this bug.