Commit df79b8d3 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac772] Logging

parent 6d784213
......@@ -117,7 +117,7 @@ class XfroutSession():
self.dns_xfrout_start(self._sock_fd, self._request_data)
#TODO, avoid catching all exceptions
except Exception as e:
logger.error(XFROUT_HANDLE_QUERY_ERROR, str(e))
logger.error(XFROUT_HANDLE_QUERY_ERROR, e)
pass
os.close(self._sock_fd)
......@@ -148,12 +148,20 @@ class XfroutSession():
acl_result = self._acl.execute(
isc.acl.dns.RequestContext(self._remote))
if acl_result == isc.acl.acl.DROP:
logger.info(XFROUT_QUERY_DROPPED,
self._get_query_zone_name(msg),
self._get_query_zone_class(msg),
self._remote[0], self._remote[1])
return None, None
elif acl_result == isc.acl.acl.REJECT:
logger.info(XFROUT_QUERY_REJECTED,
self._get_query_zone_name(msg),
self._get_query_zone_class(msg),
self._remote[0], self._remote[1])
return Rcode.REFUSED(), msg
except Exception as err:
logger.error(XFROUT_PARSE_QUERY_ERROR, str(err))
logger.error(XFROUT_PARSE_QUERY_ERROR, err)
return Rcode.FORMERR(), None
return rcode, msg
......
......@@ -95,6 +95,14 @@ in the log message, but at this point no specific information other
than that could be given. This points to incomplete exception handling
in the code.
% XFROUT_QUERY_DROPPED request to transfer %1/%2 to %3:%4 dropped
The xfrout process silently dropped a request to transfer zone to given host.
This is required by the ACLs.
% XFROUT_QUERY_REJECTED request to transfer %1/%2 to %3:%4 rejected
The xfrout process rejected (by REFUSED rcode) a request to transfer zone to
given host. This is because of ACLs.
% XFROUT_RECEIVE_FILE_DESCRIPTOR_ERROR error receiving the file descriptor for an XFR connection
There was an error receiving the file descriptor for the transfer
request. Normally, the request is received by b10-auth, and passed on
......
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