decoding a packet and clean up some memory on error conditions.
[ISC-Bugs #41774]
+! Add an option in site.h to limit the number of failover and control
+ connections the server will accept. By default this is 200.
+ [ISC-Bugs #41845]
+
Changes since 4.1-ESV-R12b1
- None
messages, as we don't expect that is necessary it is on by
default. */
#define PRINT_SPECIFIC_CL_ERRORS
+
+/* Limit the value of a file descriptor the serve will use
+ when accepting a connecting request. This can be used to
+ limit the number of TCP connections that the server will
+ allow at one time. A value of 0 means there is no limit.*/
+#define MAX_FD_VALUE 200
Subroutines that support the generic listener object. */
/*
- * Copyright (c) 2012,2014 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2012,2014,2016 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1999-2003 by Internet Software Consortium
*
return ISC_R_NORESOURCES;
return ISC_R_UNEXPECTED;
}
-
+
+ if ((MAX_FD_VALUE != 0) && (socket > MAX_FD_VALUE)) {
+ close(socket);
+ return (ISC_R_NORESOURCES);
+ }
+
#if defined (TRACING)
/* If we're recording a trace, remember the connection. */
if (trace_record ()) {