Skip to content

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