Browse Source

Merge branch 'master' of ssh://git.kea.isc.org/git/kea

Francis Dupont 10 years ago
parent
commit
50e788cc7c
2 changed files with 9 additions and 3 deletions
  1. 6 0
      ChangeLog
  2. 3 3
      src/lib/dhcpsrv/cfg_iface.cc

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+902.	[bug]		marcin
+	Fixed the bug in the DHCPv4 server whereby the server
+	reconfiguration (using the SIGHUP signal) failed because
+	of sockets remaining open since the previous configuration.
+	(Trac #3730, git 3ceb0cd97cf5e44e8fc151d0a38db553530dd3ed)
+
 Kea 0.9.1beta released on February 18, 2015
 Kea 0.9.1beta released on February 18, 2015
 
 
 901.	[bug]		tomek
 901.	[bug]		tomek

+ 3 - 3
src/lib/dhcpsrv/cfg_iface.cc

@@ -58,6 +58,9 @@ CfgIface::multipleAddressesPerInterfaceActive() const {
 void
 void
 CfgIface::openSockets(const uint16_t family, const uint16_t port,
 CfgIface::openSockets(const uint16_t family, const uint16_t port,
                       const bool use_bcast) const {
                       const bool use_bcast) const {
+    // Close any open sockets because we're going to modify some properties
+    // of the IfaceMgr. Those modifications require that sockets are closed.
+    closeSockets();
     // If wildcard interface '*' was not specified, set all interfaces to
     // If wildcard interface '*' was not specified, set all interfaces to
     // inactive state. We will later enable them selectively using the
     // inactive state. We will later enable them selectively using the
     // interface names specified by the user. If wildcard interface was
     // interface names specified by the user. If wildcard interface was
@@ -127,9 +130,6 @@ CfgIface::openSockets(const uint16_t family, const uint16_t port,
         }
         }
     }
     }
 
 
-    // Before opening any sockets, close existing ones.
-    closeSockets();
-
     // Set the callback which is called when the socket fails to open
     // Set the callback which is called when the socket fails to open
     // for some specific interface. This callback will simply log a
     // for some specific interface. This callback will simply log a
     // warning message.
     // warning message.