Commit 8bff2ec3 authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Merged trac5333 (re-detect vs close)

parents 63e8df70 90a00595
// Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC")
// //
// This Source Code Form is subject to the terms of the Mozilla Public // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -487,7 +487,7 @@ void IfaceMgr::detectIfaces() { ...@@ -487,7 +487,7 @@ void IfaceMgr::detectIfaces() {
} }
nl.ipaddrs_get(*iface, addr_info); nl.ipaddrs_get(*iface, addr_info);
ifaces_.push_back(iface); addInterface(iface);
} }
nl.release_list(link_info); nl.release_list(link_info);
......
...@@ -45,6 +45,9 @@ IfacesConfigParser::parse(const CfgIfacePtr& cfg, ...@@ -45,6 +45,9 @@ IfacesConfigParser::parse(const CfgIfacePtr& cfg,
bool re_detect = getBoolean(ifaces_config, "re-detect"); bool re_detect = getBoolean(ifaces_config, "re-detect");
cfg->setReDetect(re_detect); cfg->setReDetect(re_detect);
if (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().clearIfaces();
IfaceMgr::instance().detectIfaces(); IfaceMgr::instance().detectIfaces();
} }
......
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