BIND 10 trac1555, updated. 75df517663d7743adfa1295e87f8a77ca97a059d [1555] Differentiate between activation of IPv4 and IPv6 sockets.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jul 11 17:15:59 UTC 2013
The branch, trac1555 has been updated
via 75df517663d7743adfa1295e87f8a77ca97a059d (commit)
from 39fa196b6b7eda249caa0501feb6d049cdfd9123 (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 75df517663d7743adfa1295e87f8a77ca97a059d
Author: Marcin Siodelski <marcin at isc.org>
Date: Thu Jul 11 19:15:42 2013 +0200
[1555] Differentiate between activation of IPv4 and IPv6 sockets.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/ctrl_dhcp4_srv.cc | 4 ++--
src/bin/dhcp6/ctrl_dhcp6_srv.cc | 4 ++--
src/lib/dhcp/iface_mgr.cc | 6 +++---
src/lib/dhcp/iface_mgr.h | 10 +++++++---
4 files changed, 14 insertions(+), 10 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
index 7d7354e..f0b4547 100644
--- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc
+++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
@@ -268,7 +268,7 @@ ControlledDhcpv4Srv::openActiveSockets(const uint16_t port,
iface != ifaces.end(); ++iface) {
Iface* iface_ptr = IfaceMgr::instance().getIface(iface->getName());
if (CfgMgr::instance().isActiveIface(iface->getName())) {
- iface_ptr->inactive_ = false;
+ iface_ptr->inactive4_ = false;
LOG_INFO(dhcp4_logger, DHCP4_ACTIVATE_INTERFACE)
.arg(iface->getFullName());
@@ -278,7 +278,7 @@ ControlledDhcpv4Srv::openActiveSockets(const uint16_t port,
// interface is activated which is logged on the info level.
LOG_DEBUG(dhcp4_logger, DBG_DHCP4_BASIC,
DHCP4_DEACTIVATE_INTERFACE).arg(iface->getName());
- iface_ptr->inactive_ = true;
+ iface_ptr->inactive4_ = true;
}
}
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
index 60b8735..6d35c46 100644
--- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc
+++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
@@ -268,7 +268,7 @@ ControlledDhcpv6Srv::openActiveSockets(const uint16_t port) {
iface != ifaces.end(); ++iface) {
Iface* iface_ptr = IfaceMgr::instance().getIface(iface->getName());
if (CfgMgr::instance().isActiveIface(iface->getName())) {
- iface_ptr->inactive_ = false;
+ iface_ptr->inactive4_ = false;
LOG_INFO(dhcp6_logger, DHCP6_ACTIVATE_INTERFACE)
.arg(iface->getFullName());
@@ -278,7 +278,7 @@ ControlledDhcpv6Srv::openActiveSockets(const uint16_t port) {
// interface is activated which is logged on the info level.
LOG_DEBUG(dhcp6_logger, DBG_DHCP6_BASIC,
DHCP6_DEACTIVATE_INTERFACE).arg(iface->getName());
- iface_ptr->inactive_ = true;
+ iface_ptr->inactive6_ = true;
}
}
diff --git a/src/lib/dhcp/iface_mgr.cc b/src/lib/dhcp/iface_mgr.cc
index 0209326..e47e8f0 100644
--- a/src/lib/dhcp/iface_mgr.cc
+++ b/src/lib/dhcp/iface_mgr.cc
@@ -52,7 +52,7 @@ Iface::Iface(const std::string& name, int ifindex)
:name_(name), ifindex_(ifindex), mac_len_(0), hardware_type_(0),
flag_loopback_(false), flag_up_(false), flag_running_(false),
flag_multicast_(false), flag_broadcast_(false), flags_(0),
- inactive_(false)
+ inactive4_(false), inactive6_(false)
{
memset(mac_, 0, sizeof(mac_));
}
@@ -297,7 +297,7 @@ bool IfaceMgr::openSockets4(const uint16_t port, const bool use_bcast) {
if (iface->flag_loopback_ ||
!iface->flag_up_ ||
!iface->flag_running_,
- iface->inactive_) {
+ iface->inactive4_) {
continue;
}
@@ -364,7 +364,7 @@ bool IfaceMgr::openSockets6(const uint16_t port) {
if (iface->flag_loopback_ ||
!iface->flag_up_ ||
!iface->flag_running_,
- iface->inactive_) {
+ iface->inactive6_) {
continue;
}
diff --git a/src/lib/dhcp/iface_mgr.h b/src/lib/dhcp/iface_mgr.h
index 442107d..217524d 100644
--- a/src/lib/dhcp/iface_mgr.h
+++ b/src/lib/dhcp/iface_mgr.h
@@ -310,9 +310,13 @@ public:
/// it may mean different things on different OSes).
uint32_t flags_;
- /// Interface is inactive. This can be explicitly set to prevent Interface
- /// Manager from opening the socket on this interface.
- bool inactive_;
+ /// Indicates that IPv4 sockets should (true) or should not (false)
+ /// be opened on this interface.
+ bool inactive4_;
+
+ /// Indicates that IPv6 sockets should (true) or should not (false)
+ /// be opened on this interface.
+ bool inactive6_;
};
/// @brief Handles network interfaces, transmission and reception.
More information about the bind10-changes
mailing list