netcat hangs on sending udp packet

Bug #1751550 reported by Jeff Abrahamson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
netcat (Ubuntu)
New
Undecided
Unassigned

Bug Description

On a Linux (Ubuntu 16.04) box with no listener on port 8095, I type this

    echo 1 | nc -u -w 1 127.0.0.1 8095

and the command does not return. On my workstation (Ubuntu 17.10), where also nothing listens on 8095, NC returns immediately, which is what I'd expect.

Adding the -v flag causes nc to return immediately (with status 1 rather than 0).

I would expect sending a UDP packet always to succeed quickly if a network interface exists.

Note that this behaviour does not exist in netcat 1.178 (on ubuntu 17.10), so this is only a bug against the version still running in 16.04.4 LTS.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: netcat (not installed)
ProcVersionSignature: Ubuntu 4.4.0-116.140-generic 4.4.98
Uname: Linux 4.4.0-116-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.15
Architecture: amd64
Date: Sun Feb 25 08:39:54 2018
JournalErrors:
 Error: command ['journalctl', '-b', '--priority=warning', '--lines=1000'] failed with exit code 1: Hint: You are currently not seeing messages from other users and the system.
       Users in the 'systemd-journal' group can see all messages. Pass -q to
       turn off this notice.
 No journal files were opened due to insufficient permissions.
SourcePackage: netcat
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jeff Abrahamson (jeff-purple) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.