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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user