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
Sebastian Schrader
Kea
Commits
180015ea
Commit
180015ea
authored
Feb 11, 2011
by
Michal 'vorner' Vaner
Browse files
[trac505] Simplify length check condition
parent
f9a11dcb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/auth/query.cc
View file @
180015ea
...
...
@@ -169,10 +169,8 @@ Query::process() const {
db_result
.
rrset
->
getName
().
getLabelCount
()));
// If we put it together, will it be too long?
// (The prefix contains trailing ., which will be removed
if
(
prefix
.
getLength
()
-
Name
(
"."
).
getLength
()
+
dname
.
getDname
().
getLength
()
>
Name
::
MAX_WIRE
||
prefix
.
getLabelCount
()
-
Name
(
"."
).
getLabelCount
()
+
dname
.
getDname
().
getLabelCount
()
>
Name
::
MAX_LABELS
)
{
if
(
prefix
.
getLength
()
-
Name
::
ROOT_NAME
().
getLength
()
+
dname
.
getDname
().
getLength
()
>
Name
::
MAX_WIRE
)
{
/*
* In case the synthesized name is too long, section 4.1
* of RFC 2672 mandates we return YXDOMAIN.
...
...
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