Commit 6fdd4d7e authored by Francis Dupont's avatar Francis Dupont Committed by Tomek Mrugalski

[#1330] Moved closeSockets

parent 40012365
......@@ -315,8 +315,9 @@ configureDhcp4Server(Dhcpv4Srv& server, isc::data::ConstElementPtr config_set,
// so newly recreated configuration starts with first subnet-id equal 1.
Subnet::resetSubnetID();
// Remove any existing timers.
// Close DHCP sockets and remove any existing timers.
if (!check_only) {
IfaceMgr::instance().closeSockets();
TimerMgr::instance()->unregisterTimers();
server.discardPackets();
server.getCBControl()->reset();
......
......@@ -417,8 +417,9 @@ configureDhcp6Server(Dhcpv6Srv& server, isc::data::ConstElementPtr config_set,
// so newly recreated configuration starts with first subnet-id equal 1.
Subnet::resetSubnetID();
// Remove any existing timers.
// Close DHCP sockets and remove any existing timers.
if (!check_only) {
IfaceMgr::instance().closeSockets();
TimerMgr::instance()->unregisterTimers();
server.discardPackets();
server.getCBControl()->reset();
......
......@@ -41,11 +41,6 @@ void
IfacesConfigParser::parse(const CfgIfacePtr& cfg,
const isc::data::ConstElementPtr& ifaces_config) {
// Close sockets if not in test mode.
if (!test_mode_) {
IfaceMgr::instance().closeSockets();
}
// Check for re-detect before calling parseInterfacesList()
bool re_detect = getBoolean(ifaces_config, "re-detect");
cfg->setReDetect(re_detect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment