BIND 10 trac1914, updated. 6e489c0c04f6682402b594b222095ef50477614e [1924] (minor) More comment tweaks
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Feb 6 15:49:39 UTC 2013
The branch, trac1914 has been updated
via 6e489c0c04f6682402b594b222095ef50477614e (commit)
from 73709cdf8042f63328f41c8f0498ecaf57f11dd4 (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 6e489c0c04f6682402b594b222095ef50477614e
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Wed Feb 6 16:49:28 2013 +0100
[1924] (minor) More comment tweaks
-----------------------------------------------------------------------
Summary of changes:
src/bin/msgq/msgq.py.in | 7 +++++++
src/bin/msgq/tests/msgq_test.py | 14 ++++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/msgq/msgq.py.in b/src/bin/msgq/msgq.py.in
index dd1272a..19bcec5 100755
--- a/src/bin/msgq/msgq.py.in
+++ b/src/bin/msgq/msgq.py.in
@@ -569,6 +569,13 @@ class MsgQ:
# (and the message isn't a reply itself). We need to send
# an error to satisfy the senders hunger for response, since
# nobody else will do that.
+ #
+ # We omit the replies on purpose. The recipient might generate
+ # the response by copying and mangling the header of incoming
+ # message (just like we do below) and would include the want_answer
+ # by accident. And we want to avoid loops of errors. Also, it
+ # is unclear if the knowledge of undeliverable reply would be
+ # of any use to the sender, and it should be much rarer situation.
# The real errors would be positive, 1 most probably. We use
# negative errors for delivery errors to distinguish them a
diff --git a/src/bin/msgq/tests/msgq_test.py b/src/bin/msgq/tests/msgq_test.py
index e33b986..4f5dae1 100644
--- a/src/bin/msgq/tests/msgq_test.py
+++ b/src/bin/msgq/tests/msgq_test.py
@@ -166,6 +166,13 @@ class MsgQTest(unittest.TestCase):
"""
Send several packets through the MsgQ and check it generates
undeliverable notifications under the correct circumstances.
+
+ The test is not exhaustive as it doesn't test all combination
+ of existence of the recipient, addressing schemes, want_answer
+ header and the reply header. It is not needed, these should
+ be mostly independant (eg. if the recipient is missing, it
+ shouldn't matter why to the handling of the reply header). If
+ we included everything, the test would have too many scenarios.
"""
sent_messages = []
def fake_send_prepared_msg(socket, msg):
@@ -214,12 +221,7 @@ class MsgQTest(unittest.TestCase):
self.parse_msg(sent_messages[0][1]))
# the reply header too.
sent_messages = []
- # If the message is a reply itself, we never generate the errors, even
- # if they can't be delivered. This is partly because the answer reuses
- # the old header (which would then inherit the want_answer flag) and
- # partly we want to avoid loops of errors that can't be delivered.
- # If a reply can't be delivered, the sender can't do much anyway even
- # if notified.
+ # If the message is a reply itself, we never generate the errors
routing["reply"] = 3
self.__msgq.process_command_send(sender, routing, data)
self.assertEqual([], sent_messages)
More information about the bind10-changes
mailing list