|
@@ -737,33 +737,6 @@ class XfrinConnection(asyncore.dispatcher):
|
|
|
if msg.get_rr_count(Message.SECTION_QUESTION) > 1:
|
|
|
raise XfrinException('query section count greater than 1')
|
|
|
|
|
|
- def _handle_answer_section(self, answer_section):
|
|
|
- '''Return a generator for the reponse in one tcp package to a zone transfer.'''
|
|
|
-
|
|
|
- for rrset in answer_section:
|
|
|
- rrset_name = rrset.get_name().to_text()
|
|
|
- rrset_ttl = int(rrset.get_ttl().to_text())
|
|
|
- rrset_class = rrset.get_class().to_text()
|
|
|
- rrset_type = rrset.get_type().to_text()
|
|
|
-
|
|
|
- for rdata in rrset.get_rdata():
|
|
|
- # Count the soa record count
|
|
|
- if rrset.get_type() == RRType.SOA():
|
|
|
- self._soa_rr_count += 1
|
|
|
-
|
|
|
- # XXX: the current DNS message parser can't preserve the
|
|
|
- # RR order or separete the beginning and ending SOA RRs.
|
|
|
- # As a short term workaround, we simply ignore the second
|
|
|
- # SOA, and ignore the erroneous case where the transfer
|
|
|
- # session doesn't end with an SOA.
|
|
|
- if (self._soa_rr_count == 2):
|
|
|
- # Avoid inserting soa record twice
|
|
|
- break
|
|
|
-
|
|
|
- rdata_text = rdata.to_text()
|
|
|
- yield (rrset_name, rrset_ttl, rrset_class, rrset_type,
|
|
|
- rdata_text)
|
|
|
-
|
|
|
def _handle_xfrin_responses(self):
|
|
|
read_next_msg = True
|
|
|
while read_next_msg:
|
|
@@ -801,10 +774,6 @@ class XfrinConnection(asyncore.dispatcher):
|
|
|
|
|
|
return False
|
|
|
|
|
|
- def log_info(self, msg, type='info'):
|
|
|
- # Overwrite the log function, log nothing
|
|
|
- pass
|
|
|
-
|
|
|
def __process_xfrin(server, zone_name, rrclass, db_file,
|
|
|
shutdown_event, master_addrinfo, check_soa, tsig_key,
|
|
|
request_type, conn_class=XfrinConnection):
|