netcat-openbsd does not allow setting source port
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netcat-openbsd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When connecting to a remote host, both the command-line help and man-page state that specifying `-p` will set the local port number. However, when I actually attempt to do it, only the usage text is printed:
$ nc.openbsd -p 12345 localhost 12345
usage: nc [-46CDdFhklNnrS
[-m minttl] [-O length] [-P proxy_username] [-p source_port]
[-q seconds] [-s source] [-T keyword] [-V rtable] [-W recvlimit] [-w timeout]
[-X proxy_protocol] [-x proxy_address[
This appears to be caused by an erroneous check on line 541 of netcat.c, introduced by `misc-failures-
Oh, and this is Ubuntu 18.04, and package version 1.187-1.