6f8c432
diff -up dhcp-4.3.2/includes/site.h.CVE-2016-2774 dhcp-4.3.2/includes/site.h
6f8c432
--- dhcp-4.3.2/includes/site.h.CVE-2016-2774	2016-05-02 15:46:39.603504261 +0200
6f8c432
+++ dhcp-4.3.2/includes/site.h	2016-05-02 15:47:02.296484178 +0200
6f8c432
@@ -289,6 +289,12 @@
6f8c432
    this option will be removed at some time. */
6f8c432
 /* #define INCLUDE_OLD_DHCP_ISC_ERROR_CODES */
6f8c432
 
6f8c432
+/* Limit the value of a file descriptor the serve will use
6f8c432
+   when accepting a connecting request.  This can be used to
6f8c432
+   limit the number of TCP connections that the server will
6f8c432
+   allow at one time.  A value of 0 means there is no limit.*/
6f8c432
+#define MAX_FD_VALUE 200
6f8c432
+
6f8c432
 /* Include definitions for various options.  In general these
6f8c432
    should be left as is, but if you have already defined one
6f8c432
    of these and prefer your definition you can comment the 
6f8c432
diff -up dhcp-4.3.2/omapip/listener.c.CVE-2016-2774 dhcp-4.3.2/omapip/listener.c
6f8c432
--- dhcp-4.3.2/omapip/listener.c.CVE-2016-2774	2015-02-26 20:35:43.000000000 +0100
6f8c432
+++ dhcp-4.3.2/omapip/listener.c	2016-05-02 15:46:39.603504261 +0200
6f8c432
@@ -233,7 +233,12 @@ isc_result_t omapi_accept (omapi_object_
6f8c432
 			return ISC_R_NORESOURCES;
6f8c432
 		return ISC_R_UNEXPECTED;
6f8c432
 	}
6f8c432
-	
6f8c432
+
6f8c432
+	if ((MAX_FD_VALUE != 0) && (socket > MAX_FD_VALUE)) {
6f8c432
+		close(socket);
6f8c432
+		return (ISC_R_NORESOURCES);
6f8c432
+	}
6f8c432
+
6f8c432
 #if defined (TRACING)
6f8c432
 	/* If we're recording a trace, remember the connection. */
6f8c432
 	if (trace_record ()) {