// 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();
// 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();
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);