BIND 10 trac1462, updated. 9a304b1feebd2f06ddddbf5aa5e119cff672ae55 [1462] Add SOA check for the requested SOA serial is greater than that of the local one.
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Dec 16 03:40:10 UTC 2011
The branch, trac1462 has been updated
via 9a304b1feebd2f06ddddbf5aa5e119cff672ae55 (commit)
from ebb759a07c67f015305019aa34ff20f69218a094 (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 9a304b1feebd2f06ddddbf5aa5e119cff672ae55
Author: Xie Jiagui <xiejiagui at cnnic.cn>
Date: Fri Dec 16 11:37:48 2011 +0800
[1462] Add SOA check for the requested SOA serial is greater than
that of the local one.
-----------------------------------------------------------------------
Summary of changes:
src/bin/xfrout/tests/xfrout_test.py.in | 18 ++++--------------
src/bin/xfrout/xfrout.py.in | 4 +---
2 files changed, 5 insertions(+), 17 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/xfrout/tests/xfrout_test.py.in b/src/bin/xfrout/tests/xfrout_test.py.in
index ea4de27..b509ab3 100644
--- a/src/bin/xfrout/tests/xfrout_test.py.in
+++ b/src/bin/xfrout/tests/xfrout_test.py.in
@@ -710,12 +710,13 @@ class TestXfroutSession(TestXfroutSessionBase):
self.getmsg(), TEST_ZONE_NAME, TEST_RRCLASS), Rcode.NOERROR())
self.assertNotEqual(None, self.xfrsess._jnl_reader)
- # Successful case, but as a result of falling back to AXFR-style
- # IXFR. A zone iterator should be set up instead of a journal reader.
+ # Successful case, but the requested SOA serial is greater than that of
+ # the local SOA. Both iterator and jnl_reader should be None,
+ # indicating that the response will contain just one SOA.
self.mdata = self.create_request_data(ixfr=IXFR_NG_VERSION)
self.assertEqual(self.xfrsess._xfrout_setup(
self.getmsg(), TEST_ZONE_NAME, TEST_RRCLASS), Rcode.NOERROR())
- self.assertNotEqual(None, self.xfrsess._iterator)
+ self.assertEqual(None, self.xfrsess._iterator)
self.assertEqual(None, self.xfrsess._jnl_reader)
# Successful case, but the requested SOA serial is equal to that of
@@ -1069,17 +1070,6 @@ class TestXfroutSessionWithSQLite3(TestXfroutSessionBase):
self.assertEqual(Rcode.NOERROR(), response.get_rcode())
self.check_axfr_stream(response)
- def test_ixfr_to_axfr(self):
- self.xfrsess._request_data = \
- self.create_request_data(ixfr=IXFR_NG_VERSION)
- XfroutSession._handle(self.xfrsess)
- response = self.sock.read_msg(Message.PRESERVE_ORDER);
- self.assertEqual(Rcode.NOERROR(), response.get_rcode())
- # This is an AXFR-style IXFR. So the question section should indicate
- # that it's an IXFR resposne.
- self.assertEqual(RRType.IXFR(), response.get_question()[0].get_type())
- self.check_axfr_stream(response)
-
def test_ixfr_normal_session(self):
# See testdata/creatediff.py. There are 8 changes between two
# versions. So the answer section should contain all of these and
diff --git a/src/bin/xfrout/xfrout.py.in b/src/bin/xfrout/xfrout.py.in
index 310a0aa..9aa1887 100755
--- a/src/bin/xfrout/xfrout.py.in
+++ b/src/bin/xfrout/xfrout.py.in
@@ -412,11 +412,9 @@ class XfroutSession():
# a single SOA record of the server's current version, just as
# in AXFR". The claim about AXFR is incorrect, but other than that,
# we do as the RFC says.
- # Note: until we complete #1278 we can only check equality of the
- # two serials. The "newer version" case would fall back to AXFR-style.
begin_serial = get_soa_serial(remote_soa.get_rdata()[0])
end_serial = get_soa_serial(self._soa.get_rdata()[0])
- if begin_serial == end_serial:
+ if begin_serial >= end_serial:
# clear both iterator and jnl_reader to signal we won't do
# iteration in response generation
self._iterator = None
More information about the bind10-changes
mailing list