BIND 10 trac1555, updated. abad8addef410474f0bb6bf6e15831902017e579 [1555] Set inactivity flag using pointer to an interface.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jul 11 14:56:35 UTC 2013
The branch, trac1555 has been updated
via abad8addef410474f0bb6bf6e15831902017e579 (commit)
from 4337b26b8553e2815c61e979a3c6442b38687f8c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit abad8addef410474f0bb6bf6e15831902017e579
Author: Marcin Siodelski <marcin at isc.org>
Date: Thu Jul 11 16:56:16 2013 +0200
[1555] Set inactivity flag using pointer to an interface.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/ctrl_dhcp4_srv.cc | 9 +++++----
src/bin/dhcp6/ctrl_dhcp6_srv.cc | 3 ++-
2 files changed, 7 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
index 78cfb9b..4ff7f37 100644
--- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc
+++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
@@ -255,12 +255,13 @@ ControlledDhcpv4Srv::openActiveSockets(const uint16_t port, const bool use_bcast
// Get the reference to the collection of interfaces. This reference should be
// valid as long as the program is run because IfaceMgr is a singleton.
// Therefore we can safely iterate over instances of all interfaces and modify
- // their flags. Here we modify flags which indicate wheter socket should be
+ // their flags. Here we modify flags which indicate whether socket should be
// open for a particular interface or not.
- IfaceMgr::IfaceCollection ifaces = IfaceMgr::instance().getIfaces();
- for (IfaceMgr::IfaceCollection::iterator iface = ifaces.begin();
+ const IfaceMgr::IfaceCollection& ifaces = IfaceMgr::instance().getIfaces();
+ for (IfaceMgr::IfaceCollection::const_iterator iface = ifaces.begin();
iface != ifaces.end(); ++iface) {
- iface->inactive_ = !CfgMgr::instance().isActiveIface(iface->getName());
+ IfaceMgr::instance().getIface(iface->getName())->inactive_ =
+ !CfgMgr::instance().isActiveIface(iface->getName());
}
// Let's reopen active sockets. openSockets4 will check internally whether
// sockets are marked active or inactive.
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
index cbd29b9..af473d1 100644
--- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc
+++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
@@ -261,7 +261,8 @@ ControlledDhcpv6Srv::openActiveSockets(const uint16_t port) {
IfaceMgr::IfaceCollection ifaces = IfaceMgr::instance().getIfaces();
for (IfaceMgr::IfaceCollection::iterator iface = ifaces.begin();
iface != ifaces.end(); ++iface) {
- iface->inactive_ = !CfgMgr::instance().isActiveIface(iface->getName());
+ IfaceMgr::instance().getIface(iface->getName())->inactive_ =
+ !CfgMgr::instance().isActiveIface(iface->getName());
}
// Let's reopen active sockets. openSockets6 will check internally whether
// sockets are marked active or inactive.
More information about the bind10-changes
mailing list