Bug 709156 - nc doesn't timeout on connect when -w is used
Summary: nc doesn't timeout on connect when -w is used
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nc
Version: 15
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Šabata
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-30 21:16 UTC by Michael Best
Modified: 2012-08-23 18:39 UTC (History)
3 users (show)

Fixed In Version: nc-1.103-1.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-08 12:32:01 UTC
Type: ---


Attachments (Terms of Use)

Description Michael Best 2011-05-30 21:16:26 UTC
Description of problem:
nc doesn't appear to time out properly with the -w option

Version-Release number of selected component (if applicable):
nc-1.100-2.fc15.x86_64

How reproducible:


Steps to Reproduce:
1. nc -w 1 <hostname> <port>
  
Actual results:
$ nc -w 1 www.google.com 1800
<times out after a few minutes>

Expected results:
$ nc -w 1 www.google.com 1800
<times out after 1 second>

Additional info:
May be related to #199503 #182736 #132973

Comment 1 Petr Šabata 2011-12-08 12:32:01 UTC
I dropped our custom patch for this feature with 1.100 update since it wasn't in line with upstream (see your nc(1) manpage for explanation).

However, upstream introduced support for connect timeout in 1.103.  This version is available in rawhide and will be part of Fedora 17.

I don't intend to change netcat's behaviour in stable releases.


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