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 usage of unix sockets on OSX #192

Closed
wants to merge 1 commit into from

Conversation

m6w6
Copy link

@m6w6 m6w6 commented Jul 28, 2015

The call to getnameinfo() fails on OSX if the sockaddr actually means a
unix socket. Linux, apparently, just fills with "localhost", so do we,
if we detect a unix socket.

Simple test:

$ ncat -lUc 'echo $NCAT_REMOTE_ADDR:$NCAT_LOCAL_ADDR' test &
$ ncat -U test

This currently fails with:
Ncat: getnameinfo failed: Undefined error: 0 QUITTING.

With this fix we'll get "localhost:localhost" just like on Linux.

The call to getnameinfo() fails on OSX if the sockaddr actually means a
unix socket. Linux, apparently, just fills with "localhost", so do we,
if we detect a unix socket.

Simple test:

$ ncat -lUc 'echo $NCAT_REMOTE_ADDR:$NCAT_LOCAL_ADDR' test &
$ ncat -U test

This currently fails with:
Ncat: getnameinfo failed: Undefined error: 0 QUITTING.

With this fix we'll get "localhost:localhost" just like on Linux.
@m6w6 m6w6 mentioned this pull request Jul 28, 2015
@nmap-bot nmap-bot closed this in 46947d1 Oct 28, 2015
qha pushed a commit to qha/nmap that referenced this pull request Dec 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant