nc -d -l does not return data (only empty strings)
Bug #1656785 reported by
Stefan Bader
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcat-openbsd (Debian) |
Won't Fix
|
Unknown
|
|||
netcat-openbsd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The Zesty (17.04) version of nc (1.130-1ubuntu1) no longer returns the received data when using the '-d' (do not listen on stdin) flag together with the '-l' (listen on socket) flag. This used to work in previous releases (1.105-7ubuntu1 Trusty-Yakkety). In fact, in the previous version, the '-d' flag seems to be required to make the data transfer more reliable in scripts.
Testcase: Attached script passes on older versions, fails with the current version of nc.
Changed in netcat-openbsd (Debian): | |
status: | Unknown → New |
tags: | added: patch |
Changed in netcat-openbsd (Debian): | |
status: | New → Fix Released |
Changed in netcat-openbsd (Debian): | |
status: | Fix Released → New |
Changed in netcat-openbsd (Debian): | |
status: | New → Won't Fix |
To post a comment you must log in.
Added to the Debian bug report. Basically the output problem is related to a Debian add-on patch to introduce the -q# option (delayed exit) which has been incorrectly adapted to the new code.
However while testing a possible solution I found that upstream changed the default behaviour of nc to not shutdown the net socket when the local input stream closes. Now this requires using -N to get this back.