]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5333] Added a closeSockets before clearInterfaces
authorFrancis Dupont <fdupont@isc.org>
Fri, 14 Jul 2017 12:30:35 +0000 (14:30 +0200)
committerFrancis Dupont <fdupont@isc.org>
Fri, 14 Jul 2017 12:30:35 +0000 (14:30 +0200)
src/lib/dhcpsrv/parsers/ifaces_config_parser.cc

index f5f56d351231170ce0c02b64ad34af5497992710..87e2fa562d2c0cf8185bc97ec75d08edb0a51cc1 100644 (file)
@@ -45,6 +45,9 @@ IfacesConfigParser::parse(const CfgIfacePtr& cfg,
     bool re_detect = getBoolean(ifaces_config, "re-detect");
     cfg->setReDetect(re_detect);
     if (re_detect) {
+        // Interface clear will drop opened socket information
+        // so close them if the caller did not.
+        IfaceMgr::instance().closeSockets();
         IfaceMgr::instance().clearIfaces();
         IfaceMgr::instance().detectIfaces();
     }