BIND 10 #3099: Bogus error message in b10-xfrin if no tsig key used
BIND 10 Development
do-not-reply at isc.org
Tue Aug 27 10:48:34 UTC 2013
#3099: Bogus error message in b10-xfrin if no tsig key used
-------------------------------------+-------------------------------------
Reporter: shane | Owner: shane
Type: defect | Status:
Priority: medium | reviewing
Component: xfrin | Milestone:
Keywords: | Sprint-20130903
Sensitive: 0 | Resolution:
Sub-Project: DNS | CVSS Scoring:
Estimated Difficulty: 1 | Defect Severity:
Total Hours: 0 | Medium
| Feature Depending on Ticket:
| Add Hours to Ticket: 0
| Internal?: 0
-------------------------------------+-------------------------------------
Changes (by vorner):
* owner: vorner => shane
* status: accepted => reviewing
Comment:
Hello
I put the patch to a branch and reviewed it. However, I have two concerns
with it (besides no explicit tests, but I don't know if they are needed):
**Translations**
By hardcoding a text string inside the code, if we ever translated the
messages, the result would be bilingual. Maybe something like „TSIG: %s“
in the message and using „-“ in case none is available would be solution.
**Deeper problems**
The fact that there's no `tsig_key_name` indicates there's something
rotten deeper inside. Reading the code, and this function in general:
{{{#!python
def set_tsig_key_name(self, tsig_key_str):
"""Set the name of the tsig_key for this zone. If tsig_key_str
is None, no TSIG key will be used. This name is used to
find the TSIG key to use for transfers in the global TSIG
key ring.
Raises XfrinZoneInfoException if tsig_key_str is not a valid
(dns) name."""
if tsig_key_str is None:
self.tsig_key_name = None
else:
# can throw a number of exceptions but it is just one
# call, so Exception should be OK here
try:
self.tsig_key_name = Name(tsig_key_str)
except Exception as exc:
raise XfrinZoneInfoException("Bad TSIG key name: " +
str(exc))
}}}
The function is called from the `__init__`. And, it should set the
`tsig_key_name` to either `None` or the name (and `None` wouldn't give
that error message). The only case when it might not set it is when the
key is set and the `Name` constructor throws, but I don't think the object
is used after that.
May I suggest we investigate more into the issue instead of blindly
applying the fix? Do you have time for that, or should I try looking at
it?
--
Ticket URL: <http://bind10.isc.org/ticket/3099#comment:6>
BIND 10 Development <http://bind10.isc.org>
BIND 10 Development
More information about the bind10-tickets
mailing list