From b30aba076a73a92412bc8117ee19787961e5ea66 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 2 Jun 2013 09:03:44 +0000 Subject: [PATCH] Set the default --max-conns to 60 on Windows. Suggested by Andrey Olkhin. http://seclists.org/nmap-dev/2013/q1/390 --- CHANGELOG | 4 ++++ ncat/docs/ncat.xml | 4 ++-- ncat/ncat.h | 6 ++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index aaf79c446..723c45d4f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ # Nmap Changelog ($Id$); -*-text-*- +o [Ncat] Reduced the default --max-conns limit from 100 to 60 on + Windows, to stay within platform limitations. Suggested by Andrey + Olkhin. + o Fixed IPv6 routing table alignment on NetBSD. o [NSE] Added http-phpmyadmin-dir-traversal by Alexey Meshcheryakov. diff --git a/ncat/docs/ncat.xml b/ncat/docs/ncat.xml index 599acfbfe..cd1cc5113 100644 --- a/ncat/docs/ncat.xml +++ b/ncat/docs/ncat.xml @@ -242,7 +242,7 @@ The maximum number of simultaneous connections accepted by an Ncat - instance. 100 is the default. + instance. 100 is the default (60 on Windows). @@ -461,7 +461,7 @@ specified port/application like inetd. Ncat will only accept a maximum, definable, number of simultaneous connections controlled by the option. By default this is set - to 100. + to 100 (60 on Windows). diff --git a/ncat/ncat.h b/ncat/ncat.h index e6e40f1b0..70f195f39 100644 --- a/ncat/ncat.h +++ b/ncat/ncat.h @@ -173,7 +173,13 @@ struct socks4_data { * a listening port. You may want to increase or decrease this value depending * on your specific needs. */ +#ifdef WIN32 +/* Windows is commonly limited to 64 sockets, so keep the default somewhat below + that. http://www.tangentsoft.net/wskfaq/advanced.html#64sockets */ +#define DEFAULT_MAX_CONNS 60 +#else #define DEFAULT_MAX_CONNS 100 +#endif /* SOCKS4 protocol responses */ #define SOCKS4_VERSION 4