Bug 40689

Summary: the -w option does not work, instead, the program waits for connect() to return.
Product: [Retired] Red Hat Linux Reporter: Joseph Pepin <jdp>
Component: ncAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: jdp, rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-05-15 14:28:34 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:
Attachments:
Description Flags
A patch to bug 40689 none

Description Joseph Pepin 2001-05-15 14:04:10 UTC
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 14:05:58 UTC
Created attachment 18410 [details]
A patch to bug 40689

Comment 2 Tim Powers 2001-05-15 14:27:24 UTC
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 16:05:21 UTC
Will be fixed in nc-1.10-11; thanks for the patch!