found that the data source it is loading is an SQLite3 data source,
so no further validation is needed.
+% AUTH_START_DDNS_FORWARDER DDNS UPDATE handling started
+This is a debug message indicating that b10-auth has received a message
+that it should internally forward UPDATE message to b10-ddns. When b10-ddns
+is not running, b10-auth will respond to UPDATE requests with rcode NOTIMP.
+When b10-ddns is running, b10-ddns will handle and respond to the UPDATE
+message.
+
% AUTH_STATS_CHANNEL_CREATED STATS session channel created
This is a debug message indicating that the authoritative server has
created a channel to the statistics process. It is issued during server
enabled and that the authoritative server will produce statistics data
at the specified interval.
+% AUTH_STOP_DDNS_FORWARDER DDNS UPDATE handling stopped
+This is a debug message indicating that b10-auth has received a message
+that it should stop internally forwarding UPDATE message to b10-ddns.
+b10-auth will no longer forward UPDATE messages to b10-ddns, but will
+respond itself with error code NOTIMP.
+This message is also logged when the forwarding is restarted (for instance
+if b10-ddns is restarted and the internal connection needs to be created
+again), in which case it should be followed by AUTH_START_DDNS_FORWARDER.
+
% AUTH_UNSUPPORTED_OPCODE unsupported opcode: %1
This is a debug message, produced when a received DNS packet being
processed by the authoritative server has been found to contain an
if (hasDDNSForwarder()) {
destroyDDNSForwarder();
}
- ddns_forwarder_ = new SocketSessionForwarderHolder("update", ddns_base_forwarder_);
+ LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_START_DDNS_FORWARDER);
+ ddns_forwarder_ = new SocketSessionForwarderHolder("update",
+ ddns_base_forwarder_);
}
void
AuthSrvImpl::destroyDDNSForwarder() {
- delete ddns_forwarder_;
- ddns_forwarder_ = NULL;
+ if (ddns_forwarder_ != NULL) {
+ LOG_DEBUG(auth_logger, DBG_AUTH_OPS, AUTH_STOP_DDNS_FORWARDER);
+ delete ddns_forwarder_;
+ ddns_forwarder_ = NULL;
+ }
}
bool
void setTSIGKeyRing(const boost::shared_ptr<isc::dns::TSIGKeyRing>*
keyring);
- /// \brief Tells the server DDNS update packets can be forwarded internally
- ///
+ /// \brief Create the internal forwarder for DDNS update messages
+ ///
+ /// Until this method is called (it is called when the
+ /// start_ddns_forwarder command is sent to b10-auth), b10-auth will
+ /// respond to UPDATE packets with a NOTIMP rcode.
+ /// If the internal forwarder was already created, it is destroyed and
+ /// created again. This is useful for instance when b10-ddns is shut
+ /// down and restarted.
void createDDNSForwarder();
+
+ /// \brief Destroy the internal forwarder for DDNS update messages
+ ///
+ /// After this method has been called (it is called when the
+ /// stop_ddns_forwarder command is sent to b10-auth), DDNS Update
+ /// messages are no longer forwarded internally, but b10-auth will
+ /// immediately respond with a NOTIMP rcode.
+ /// If there was no forwarder yet, this method does nothing.
void destroyDDNSForwarder();
private:
}
const char* const AUTH_NAME = "b10-auth";
+const char* const AUTH_STARTED_NOTIFICATION = "auth_started";
/// This is currently b10-auth, but it can be changed easily in one place.
extern const char* const AUTH_NAME;
+/// \brief Notification string that is used to inform auth is starting
+///
+/// This is sent to interested modules (currently only b10-ddns)
+extern const char* const AUTH_STARTED_NOTIFICATION;
+
#endif // __COMMON_H
// Local Variables:
LOG_INFO(auth_logger, AUTH_SERVER_STARTED);
// Ping any interested module that (a new) auth is up
- cc_session->group_sendmsg(isc::config::createCommand("auth_started"), "DDNS");
+ // Currently, only the DDNS module is notified, but we could consider
+ // make an announcement channel for these (one-way) messages
+ cc_session->group_sendmsg(
+ isc::config::createCommand(AUTH_STARTED_NOTIFICATION), "DDNS");
io_service.run();
} catch (const std::exception& ex) {