Bug 207733

Summary: 'nc -z hostname port' doesn't work any more
Product: [Fedora] Fedora Reporter: Ugo Viti <ugo.viti>
Component: ncAssignee: Radek Vokál <rvokal>
Status: CLOSED RAWHIDE QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 1.84-9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-09-26 05:40:19 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 Ugo Viti 2006-09-22 19:29:06 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060921 BonEcho/2.0

Description of problem:
from the fedora release nc-1.84-8.fc6 the nc command desn't run correctly with -z option.

example:

from Fedora Rawhide machine:

[hid@hidlt ~]$ nc -z localhost 22 ; echo $?
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
          [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
          [-x proxy_address[:port]] [hostname] [port[s]]
1
[hid@hidlt ~]$

from FC5 machine:

[root@fc5 ~]# nc -z localhost 22 ; echo $?
Connection to localhost 22 port [tcp/*] succeeded!
0
[root@fc5 ~]#

i noted that this nc problem is given from first value after -z option, for example if i run nc with: 

[hid@hidlt ~]$ nc -z -fasdfsdfdsf localhost 32 ; echo $?
Connection to localhost 32 port [tcp/*] succeeded!
0
[hid@hidlt ~]$

the nc is working correctly, also if '-fasdfsdfdsf' is garbage...

I hope this will fixed before FC6 Release.

Best Regards

Version-Release number of selected component (if applicable):
nc-1.84-8.fc6

How reproducible:
Always


Steps to Reproduce:
1. install nc release 1.84-8.fc6 from rawhide
2. run: nc -z localhost 22
3.

Actual Results:
[hid@hidlt ~]$ nc -z localhost 22 ; echo $?
usage: nc [-46DdhklnrStUuvzC] [-i interval] [-p source_port]
          [-s source_ip_address] [-T ToS] [-w timeout] [-X proxy_version]
          [-x proxy_address[:port]] [hostname] [port[s]]
1
[hid@hidlt ~]$

Expected Results:
[root@fc5 ~]# nc -z localhost 22 ; echo $?
Connection to localhost 22 port [tcp/*] succeeded!
0
[root@fc5 ~]#

Additional info:

Comment 1 Radek Vokál 2006-09-26 05:40:19 UTC
Fixed in rawhide, there was a small typo in previous crlf patch.