|
@@ -34,6 +34,7 @@ import signal
|
|
|
|
|
|
isc.log.init("b10-ddns")
|
|
|
logger = isc.log.Logger("ddns")
|
|
|
+DBG_ACTIVITY = logger.DBGLVL_TRACE_BASIC
|
|
|
|
|
|
DATA_PATH = bind10_config.DATA_PATH
|
|
|
if "B10_FROM_SOURCE" in os.environ:
|
|
@@ -135,6 +136,7 @@ class DDNSServer:
|
|
|
"""
|
|
|
socket = self._listen_socket.accept()
|
|
|
fileno = socket.fileno()
|
|
|
+ logger.debug(DBG_ACTIVITY, DDNS_NEW_CONN, fileno)
|
|
|
session = isc.util.io.socketsession.SocketSessionReceiver(socket)
|
|
|
self._socket_sessions[fileno] = (socket, session)
|
|
|
|
|
@@ -155,13 +157,15 @@ class DDNSServer:
|
|
|
"""
|
|
|
Handle incoming event on the socket with given fileno.
|
|
|
"""
|
|
|
+ logger.debug(DBG_ACTIVITY, DDNS_INCOMING, fileno)
|
|
|
(socket, session) = self._socket_sessions[fileno]
|
|
|
try:
|
|
|
request = session.pop()
|
|
|
self.handle_request(request)
|
|
|
- except isc.util.io.socketsession.SocketSessionError:
|
|
|
+ except isc.util.io.socketsession.SocketSessionError as se:
|
|
|
# No matter why this failed, the connection is in unknown, possibly
|
|
|
# broken state. So, we close the socket and remove the session.
|
|
|
+ logger.warn(DDNS_DROP_CONN, fileno, se)
|
|
|
del self._socket_sessions[fileno]
|
|
|
socket.close()
|
|
|
|