Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix support for ncat --vsock -l <port> #2807

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Mar 21, 2024

  1. Fix support for ncat --vsock -l <port>

    Commit 04c4c70 ("Support decimal integer representation of target
    addresses. Fixes nmap#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 <luigi.leonardi@outlook.com>
    Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
    stefano-garzarella committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    6cd7b7d View commit details
    Browse the repository at this point in the history