Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
cce182ed
Commit
cce182ed
authored
Dec 06, 2011
by
JINMEI Tatuya
Browse files
[1299] updated some exception messages as suggested in review
parent
49f1f1bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/xfrin/xfrin.py.in
View file @
cce182ed
...
...
@@ -732,14 +732,16 @@ class XfrinConnection(asyncore.dispatcher):
# Validate the question section
n_question = msg.get_rr_count(Message.SECTION_QUESTION)
if n_question != 1:
raise XfrinProtocolError('Invalid number of questions to ' +
'SOA query (' + str(n_question) + ')')
raise XfrinProtocolError('Invalid response to SOA query: ' +
'(' + str(n_question) + ' questions, 1 ' +
'expected)')
resp_question = msg.get_question()[0]
if resp_question.get_name() != self._zone_name or \
resp_question.get_class() != self._rrclass or \
resp_question.get_type() != RRType.SOA():
raise XfrinProtocolError('Questions mismatch to ' +
'SOA query: ' + str(resp_question))
raise XfrinProtocolError('Invalid response to SOA query: '
'question mismatch: ' +
str(resp_question))
# Look into the answer section for SOA
soa = None
...
...
@@ -760,7 +762,8 @@ class XfrinConnection(asyncore.dispatcher):
raise XfrinProtocolError('SOA query resulted in referral')
if rr.get_type() == RRType.SOA():
raise XfrinProtocolError('SOA query resulted in NODATA')
raise XfrinProtocolError('SOA query resulted in no SOA at all')
raise XfrinProtocolError('No SOA record found in response to ' +
'SOA query')
# Check if the SOA is really what we asked for
if soa.get_name() != self._zone_name or \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment