summaryrefslogtreecommitdiffstats
path: root/src/bin/dhcp6/dhcp6_srv.cc
diff options
context:
space:
mode:
authorThomas Markwalder <tmark@isc.org>2020-02-28 22:04:28 +0100
committerThomas Markwalder <tmark@isc.org>2020-03-04 12:59:52 +0100
commit17580ffc984d264181e177b9d86edfa518f09066 (patch)
tree4314315f9c4fdfa6757b48cfcee17c99025b33a3 /src/bin/dhcp6/dhcp6_srv.cc
parent[#1088] updated ChangeLog (diff)
downloadkea-17580ffc984d264181e177b9d86edfa518f09066.tar.xz
kea-17580ffc984d264181e177b9d86edfa518f09066.zip
[#1115] shutdown command exit-value arg, exit w/failure on db loss
Added exit-value argument to shutdown command. kea-dhcpX servers now exit with EXIT_FAILURE status on db loss src/lib/process/daemon.* Daemon::exit_value_, new member with getter/setter src/lib/process/d_controller.* DControllerBase::launch() - now returns getExitValue() DControllerBase::shutdownHandler() - uses exit-value argument to set exit value src/lib/process/tests/daemon_unittest.cc TEST_F(DaemonTest, exitValue) - new test src/bin/agent/main.cc Use launch() return value for exit value. src/bin/agent/tests/ca_controller_unittests.cc TEST_F(CtrlAgentControllerTest, shutdownExitValue) - new test src/bin/d2/main.cc Use launch() return value for exit value. src/bin/d2/tests/d2_command_unittest.cc TEST_F(CtrlChannelD2Test, shutdownExitValue) - new test src/bin/dhcp4/ctrl_dhcp4_srv.* ControlledDhcpv4Srv:: commandShutdownHandler() - handle exit-value argument shutdown(int exit_value) - added exit_value parameter dbReconnect() - call shutdown(EXIT_FAILURE) dbLostCallback() - call shutdown(EXIT_FAILURE) src/bin/dhcp4/dhcp4_srv.* Dhcp4Srv::run() - returns int Daemon::exit_value instead of bool src/bin/dhcp4/main.cc Use run() return value for exit value. src/bin/dhcp4/tests/ctrl_dhcp4_srv_unittest.cc TEST_F(CtrlChannelDhcpv4SrvTest, commands) - revamped test src/bin/dhcp6/ctrl_dhcp6_srv.* ControlledDhcpv6Srv:: commandShutdownHandler() - use exit-value argument to set exit value shutdown(int exit_value) - added exit_value parameter dbReconnect() - call shutdown(EXIT_FAILURE) dbLostCallback() - call shutdown(EXIT_FAILURE) src/bin/dhcp6/dhcp6_srv.* Dhcp6Srv::run() - returns int Daemon::exit_value instead of bool src/bin/dhcp6/main.cc Use run() return value for exit value. src/bin/dhcp6/tests/ctrl_dhcp6_srv_unittest.cc TEST_F(CtrlDhcpv6SrvTest, commands) - revamped test
Diffstat (limited to 'src/bin/dhcp6/dhcp6_srv.cc')
-rw-r--r--src/bin/dhcp6/dhcp6_srv.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/dhcp6/dhcp6_srv.cc b/src/bin/dhcp6/dhcp6_srv.cc
index 1f28dd4a12..5aa4321e39 100644
--- a/src/bin/dhcp6/dhcp6_srv.cc
+++ b/src/bin/dhcp6/dhcp6_srv.cc
@@ -442,7 +442,7 @@ Dhcpv6Srv::initContext(const Pkt6Ptr& pkt,
evaluateClasses(pkt, true);
}
-bool Dhcpv6Srv::run() {
+int Dhcpv6Srv::run() {
#ifdef ENABLE_AFL
// Set up structures needed for fuzzing.
Fuzz fuzzer(6, server_port_);
@@ -475,7 +475,7 @@ bool Dhcpv6Srv::run() {
// destroying the thread pool
MultiThreadingMgr::instance().apply(false, 0);
- return (true);
+ return (getExitValue());
}
void Dhcpv6Srv::run_one() {