Bug 207733 - 'nc -z hostname port' doesn't work any more
'nc -z hostname port' doesn't work any more
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: nc (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-22 15:29 EDT by Ugo Viti
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 1.84-9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-26 01:40:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ugo Viti 2006-09-22 15:29:06 EDT
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 Vokal 2006-09-26 01:40:19 EDT
Fixed in rawhide, there was a small typo in previous crlf patch.

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