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

index c11458f4ad559f38c53863fdcc2387d2106e04b9..5c53a21488fbd14af79d201a5731dc8555b802d7 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -121,6 +121,12 @@ 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.3.4b1
 
 - None
index 58b08c690b487abda01b6dae20f8b732d0b41c4c..abc1ac68d3f4e6901183e9c4845341af47a409b8 100644 (file)
@@ -150,6 +150,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 DHCP_R_INVALIDARG;
                        }
@@ -168,6 +169,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;