RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1206652 - ncat client: RHEL7 -w / -i behavior different (regression) from RHEL5/6's ncat -w
Summary: ncat client: RHEL7 -w / -i behavior different (regression) from RHEL5/6's nca...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: nmap
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Hlavinka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-27 16:05 UTC by giulioo
Modified: 2015-03-30 10:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-30 10:57:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description giulioo 2015-03-27 16:05:56 UTC
Description of problem:
Using "-i" option will wait in an unexpected way (even when data is transmitted)


Version-Release number of selected component (if applicable):
nmap-ncat-6.40-4.el7.x86_64


How reproducible:
always


Steps to Reproduce:
Objective: 
- using nc to connect to a remote system
- send a string to the remote system
- get a string back from the remote system and exit
- set a max timeout for the entire operation so that if the remote system answers back in say 0.1 sec, nc will exit after 0.1 sec, in any other case (remote system not online, remote system connects but doesn't answer back, whatever) the nc command will exit in a fixed amount of time.

With RHEL5/6 nc, we had 
	"-w" (for connect and idle timeout)

With RHEL7 (switch to nmap-ncat) we have 
	-w (for connect timeout)
	-i (for idle timeout)
but "-i" doesn't work as I would expect.


Actual results:
Connecting from RHEL7 (will wait 3 secs)
$ time echo quit | nc -w 3 -i 3  ip.local.lan 21
220 (vsFTPd 2.0.5)
221 Goodbye.
Ncat: Idle timeout expired (3000 ms).
 
real    0m3.054s
user    0m0.005s
sys     0m0.009s
$


Expected results:
Connecting from RHEL5/RHEL6 (exits as soon as possible)
$ time echo quit | nc -w 3 ip.local.lan 21
220 (vsFTPd 2.0.5)
221 Goodbye.
 
real    0m0.008s
user    0m0.000s
sys     0m0.001s
$


Additional info:
If you omit "-i" it will exit immediately, but then when the server has problems and doesn't answer back the connection will be stuck and won't terminate in a fixed amount of time.

Comment 2 Michal Hlavinka 2015-03-30 10:57:56 UTC
nc was replaced with nmap's ncat. This is known information, it was documented in rhel 7 release notes and as such it's not a bug.


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