summaryrefslogtreecommitdiffstats
path: root/src/bin
diff options
context:
space:
mode:
authorRazvan Becheriu <razvan@isc.org>2020-11-27 13:59:27 +0100
committerRazvan Becheriu <razvan@isc.org>2021-01-22 18:15:19 +0100
commit091c492454797eb9809e066e0897d5d8113acf56 (patch)
treecc9c601ed17ead56c0a0865bccf6a7ef0ac20dc7 /src/bin
parent[#1375] add network state transition controller type (diff)
downloadkea-091c492454797eb9809e066e0897d5d8113acf56.tar.xz
kea-091c492454797eb9809e066e0897d5d8113acf56.zip
[#1375] add network state transition controller type
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/dhcp4/ctrl_dhcp4_srv.cc8
-rw-r--r--src/bin/dhcp6/ctrl_dhcp6_srv.cc8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
index d3724cf1fe..96ebb585ef 100644
--- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc
+++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
@@ -523,7 +523,7 @@ ControlledDhcpv4Srv::commandDhcpDisableHandler(const std::string&,
// No error occurred, so let's disable the service.
if (message.tellp() == 0) {
- network_state_->disableService();
+ network_state_->disableService(NetworkState::COMMAND);
message << "DHCPv4 service disabled";
if (max_period > 0) {
@@ -539,7 +539,7 @@ ControlledDhcpv4Srv::commandDhcpDisableHandler(const std::string&,
ConstElementPtr
ControlledDhcpv4Srv::commandDhcpEnableHandler(const std::string&, ConstElementPtr) {
- network_state_->enableService();
+ network_state_->enableService(NetworkState::COMMAND);
return (config::createAnswer(CONTROL_RESULT_SUCCESS, "DHCP service successfully enabled"));
}
@@ -1159,7 +1159,7 @@ ControlledDhcpv4Srv::deleteExpiredReclaimedLeases(const uint32_t secs) {
bool
ControlledDhcpv4Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Disable service until the connection is recovered.
- network_state_->disableService();
+ network_state_->disableService(NetworkState::CONNECTION);
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_LOST_CONNECTION);
@@ -1185,7 +1185,7 @@ ControlledDhcpv4Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
bool
ControlledDhcpv4Srv::dbRecoveredCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Enable service after the connection is recovered.
- network_state_->enableService();
+ network_state_->enableService(NetworkState::CONNECTION);
LOG_INFO(dhcp4_logger, DHCP4_DB_RECONNECT_SUCCEEDED);
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
index f328745a19..6e32c4a284 100644
--- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc
+++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
@@ -526,7 +526,7 @@ ControlledDhcpv6Srv::commandDhcpDisableHandler(const std::string&,
// No error occurred, so let's disable the service.
if (message.tellp() == 0) {
- network_state_->disableService();
+ network_state_->disableService(NetworkState::COMMAND);
message << "DHCPv6 service disabled";
if (max_period > 0) {
@@ -542,7 +542,7 @@ ControlledDhcpv6Srv::commandDhcpDisableHandler(const std::string&,
ConstElementPtr
ControlledDhcpv6Srv::commandDhcpEnableHandler(const std::string&, ConstElementPtr) {
- network_state_->enableService();
+ network_state_->enableService(NetworkState::COMMAND);
return (config::createAnswer(CONTROL_RESULT_SUCCESS, "DHCP service successfully enabled"));
}
@@ -1178,7 +1178,7 @@ ControlledDhcpv6Srv::deleteExpiredReclaimedLeases(const uint32_t secs) {
bool
ControlledDhcpv6Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Disable service until the connection is recovered.
- network_state_->disableService();
+ network_state_->disableService(NetworkState::CONNECTION);
LOG_INFO(dhcp6_logger, DHCP6_DB_RECONNECT_LOST_CONNECTION);
@@ -1204,7 +1204,7 @@ ControlledDhcpv6Srv::dbLostCallback(ReconnectCtlPtr db_reconnect_ctl) {
bool
ControlledDhcpv6Srv::dbRecoveredCallback(ReconnectCtlPtr db_reconnect_ctl) {
// Enable service after the connection is recovered.
- network_state_->enableService();
+ network_state_->enableService(NetworkState::CONNECTION);
LOG_INFO(dhcp6_logger, DHCP6_DB_RECONNECT_SUCCEEDED);