1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-21 15:09:02 +00:00

Allow connections to port 0. Fixes #1560

This commit is contained in:
dmiller
2019-04-18 16:18:16 +00:00
parent 85ec647932
commit 3de7a0177b
2 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,8 @@
#Nmap Changelog ($Id$); -*-text-*-
o [Ncat][GH#1560] Allow Ncat to connect to servers on port 0, provided that the
socket implementation allows this. [Daniel Miller]
o Update the included libpcap to 1.9.0. [Daniel Miller]
o [NSE][GH#1544] Fix a logic error that resulted in scripts not honoring the

View File

@@ -891,7 +891,7 @@ int main(int argc, char *argv[])
errno = 0;
long_port = strtol(argv[optind], NULL, 10);
if (errno != 0 || long_port <= 0 || long_port > 65535)
if (errno != 0 || long_port < 0 || long_port > 65535)
bye("Invalid port number \"%s\".", argv[optind]);
o.portno = (unsigned short) long_port;