Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix support for
ncat --vsock -l <port>
Commit 04c4c70 ("Support decimal integer representation of target addresses. Fixes #375") introduced a regression when the user specifies only the port using AF_VSOCK in listening (e.g. `ncat --vsock -l 1234`). Before that commit, we supported this invocation, but currently we interpret the parameter as CID. Alternatively, the version with -p is still working (e.g. `ncat --vsock -l -p 1234`). Having documented this usage in the manpage as well, it's better to fix it and support it again. Tested locally (without VMs involved), using CID = 1 (loopback) in this way: shell1$ ncat --vsock -l 1234 shell2$ ncat --vsock 1 1234 # Note: If CID 1 is not supported and the previous command fails, # it means that you have to manually load `vsock_loopback` kernel # module (usually it is autoamtically loaded when AF_VSOCK is used # if the `vsock` kernel module is not already loaded in the system) Reported-by: Luigi Leonardi <[email protected]> Signed-off-by: Stefano Garzarella <[email protected]>
- Loading branch information