Bug 207733 - 'nc -z hostname port' doesn't work any more
Summary: 'nc -z hostname port' doesn't work any more
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: nc
Version: rawhide
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Radek Vokal
QA Contact: Ben Levenson
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-09-22 19:29 UTC by Ugo Viti
Modified: 2007-11-30 22:11 UTC (History)
0 users

(edit)
Clone Of:
(edit)
Last Closed: 2006-09-26 05:40:19 UTC


Attachments (Terms of Use)

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 Vokal 2006-09-26 05:40:19 UTC
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.