BIND 10 trac1555, updated. 2221a1de37ddc5c35e52ad0b8b99d7dec430b00c [1555] Log warning if no interfaces are configured to listen DHCP traffic.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Jul 12 11:30:21 UTC 2013
The branch, trac1555 has been updated
via 2221a1de37ddc5c35e52ad0b8b99d7dec430b00c (commit)
from 36815d6a2501933007ae6e8f823be08a64064058 (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 2221a1de37ddc5c35e52ad0b8b99d7dec430b00c
Author: Marcin Siodelski <marcin at isc.org>
Date: Fri Jul 12 13:29:52 2013 +0200
[1555] Log warning if no interfaces are configured to listen DHCP traffic.
-----------------------------------------------------------------------
Summary of changes:
src/bin/dhcp4/ctrl_dhcp4_srv.cc | 6 ++++--
src/bin/dhcp4/dhcp4_messages.mes | 5 +++++
src/bin/dhcp6/ctrl_dhcp6_srv.cc | 4 +++-
src/bin/dhcp6/dhcp6_messages.mes | 5 +++++
4 files changed, 17 insertions(+), 3 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/dhcp4/ctrl_dhcp4_srv.cc b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
index f0b4547..bf22a47 100644
--- a/src/bin/dhcp4/ctrl_dhcp4_srv.cc
+++ b/src/bin/dhcp4/ctrl_dhcp4_srv.cc
@@ -1,4 +1,4 @@
-// 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);
+ }
}
diff --git a/src/bin/dhcp4/dhcp4_messages.mes b/src/bin/dhcp4/dhcp4_messages.mes
index 0f0fd26..bcf148b 100644
--- a/src/bin/dhcp4/dhcp4_messages.mes
+++ b/src/bin/dhcp4/dhcp4_messages.mes
@@ -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.
diff --git a/src/bin/dhcp6/ctrl_dhcp6_srv.cc b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
index 6d35c46..81ffb0f 100644
--- a/src/bin/dhcp6/ctrl_dhcp6_srv.cc
+++ b/src/bin/dhcp6/ctrl_dhcp6_srv.cc
@@ -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);
+ }
}
};
diff --git a/src/bin/dhcp6/dhcp6_messages.mes b/src/bin/dhcp6/dhcp6_messages.mes
index 5e0eff7..8630761 100644
--- a/src/bin/dhcp6/dhcp6_messages.mes
+++ b/src/bin/dhcp6/dhcp6_messages.mes
@@ -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.
More information about the bind10-changes
mailing list