Commit 2221a1de authored by Marcin Siodelski's avatar Marcin Siodelski
Browse files

[1555] Log warning if no interfaces are configured to listen DHCP traffic.

parent 36815d6a
// Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012-2013 Internet Systems Consortium, Inc. ("ISC")
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
......@@ -284,7 +284,9 @@ ControlledDhcpv4Srv::openActiveSockets(const uint16_t port,
}
// Let's reopen active sockets. openSockets4 will check internally whether
// sockets are marked active or inactive.
IfaceMgr::instance().openSockets4(port, use_bcast);
if (!IfaceMgr::instance().openSockets4(port, use_bcast)) {
LOG_WARN(dhcp4_logger, DHCP4_NO_SOCKETS_OPEN);
}
}
......
......@@ -92,6 +92,11 @@ specified client after receiving a REQUEST message from it. There are many
possible reasons for such a failure. Additional messages will indicate the
reason.
% DHCP4_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
This warning message is issued when current server configuration specifies
no interfaces that server should listen on, or specified interfaces are not
configured to receive the traffic.
% DHCP4_NOT_RUNNING IPv4 DHCP server is not running
A warning message is issued when an attempt is made to shut down the
IPv4 DHCP server but it is not running.
......
......@@ -284,7 +284,9 @@ ControlledDhcpv6Srv::openActiveSockets(const uint16_t port) {
}
// Let's reopen active sockets. openSockets6 will check internally whether
// sockets are marked active or inactive.
IfaceMgr::instance().openSockets6(port);
if (!IfaceMgr::instance().openSockets6(port)) {
LOG_WARN(dhcp6_logger, DHCP6_NO_SOCKETS_OPEN);
}
}
};
......
......@@ -111,6 +111,11 @@ IPv6 DHCP server but it is not running.
During startup the IPv6 DHCP server failed to detect any network
interfaces and is therefore shutting down.
% DHCP6_NO_SOCKETS_OPEN no interface configured to listen to DHCP traffic
This warning message is issued when current server configuration specifies
no interfaces that server should listen on, or specified interfaces are not
configured to receive the traffic.
% DHCP6_OPEN_SOCKET opening sockets on port %1
A debug message issued during startup, this indicates that the IPv6 DHCP
server is about to open sockets on the specified port.
......
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