]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] When opening a connection, if the socket can't be bound close it.
authorShawn Routhier <sar@isc.org>
Fri, 29 Jul 2016 04:15:36 +0000 (21:15 -0700)
committerShawn Routhier <sar@isc.org>
Fri, 29 Jul 2016 04:15:36 +0000 (21:15 -0700)
RELNOTES
omapip/connection.c

index 90b3706c6f9de04d8e7ffd7d4ecdec11b1ea7b07..22be8bb8c59b9cbba5e5aba9e91ea9dd97ddd768 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -98,6 +98,11 @@ by Eric Young (eay@cryptsoft.com).
   in line with the call it will make to malloc().
   [ISC-Bugs #40843]
 
+- If the failover socket can't be bound close it, otherwise if the
+  user configures an incorrect address in the failover stanza the
+  server will continue to open new sockets every 90 seconds until
+  it runs out.
+  [ISC-Bugs #42452]
 
                        Changes since 4.1-ESV-R13b1
 
index 990430db8e2335cf85d87684e1db396956889fde..9ab06bea5cc4848392891f3355a6f5507b8135ba 100644 (file)
@@ -151,6 +151,7 @@ isc_result_t omapi_connect_list (omapi_object_t *c,
                if (local_addr) {
                        /* Only do TCPv4 so far. */
                        if (local_addr -> addrtype != AF_INET) {
+                               close(obj->socket);
                                omapi_connection_dereference (&obj, MDL);
                                return ISC_R_INVALIDARG;
                        }
@@ -169,6 +170,7 @@ isc_result_t omapi_connect_list (omapi_object_t *c,
                                  sizeof local_sin) < 0) {
                                omapi_connection_object_t **objp = &obj;
                                omapi_object_t **o = (omapi_object_t **)objp;
+                               close(obj->socket);
                                omapi_object_dereference(o, MDL);
                                if (errno == EADDRINUSE)
                                        return ISC_R_ADDRINUSE;