BIND 10 trac2439, updated. f485d39ab6e394bc034b990f872572c3700d0312 [2439] Test for broken zone data in XfrIn
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Jan 22 11:05:02 UTC 2013
The branch, trac2439 has been updated
via f485d39ab6e394bc034b990f872572c3700d0312 (commit)
from a55716a04087917db71ff5b224b922d05ec6d6c6 (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 f485d39ab6e394bc034b990f872572c3700d0312
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Tue Jan 22 12:03:57 2013 +0100
[2439] Test for broken zone data in XfrIn
Check a zone without NS (we can't really make a zone without SOA by XFR)
is rejected.
-----------------------------------------------------------------------
Summary of changes:
src/bin/xfrin/tests/xfrin_test.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
-----------------------------------------------------------------------
diff --git a/src/bin/xfrin/tests/xfrin_test.py b/src/bin/xfrin/tests/xfrin_test.py
index 99c5e1e..c2b8962 100644
--- a/src/bin/xfrin/tests/xfrin_test.py
+++ b/src/bin/xfrin/tests/xfrin_test.py
@@ -1297,6 +1297,23 @@ class TestAXFR(TestXfrinConnection):
[[('add', ns_rr), ('add', a_rr), ('add', soa_rrset)]],
self.conn._datasrc_client.committed_diffs)
+ def test_axfr_response_missing_ns(self):
+ """
+ Test with transfering an invalid zone. We are missing a NS record
+ (missing a SOA is hard to do with XFR). It should be rejected.
+ """
+ a_rr = self._create_a('192.0.2.1')
+ self.conn._send_query(RRType.AXFR())
+ self.conn.reply_data = self.conn.create_response_data(
+ questions=[Question(TEST_ZONE_NAME, TEST_RRCLASS,
+ RRType.AXFR())],
+ # begin serial=1230, end serial=1234. end will be used.
+ answers=[begin_soa_rrset, a_rr, soa_rrset])
+ self.assertRaises(XfrinProtocolError,
+ self.conn._handle_xfrin_responses)
+ self.assertEqual(type(XfrinAXFREnd()), type(self.conn.get_xfrstate()))
+ self.assertEqual([], self.conn._datasrc_client.committed_diffs)
+
def test_axfr_response_extra(self):
'''Test with an extra RR after the end of AXFR session.
More information about the bind10-changes
mailing list