Commit 180015ea authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac505] Simplify length check condition

parent f9a11dcb
...@@ -169,10 +169,8 @@ Query::process() const { ...@@ -169,10 +169,8 @@ Query::process() const {
db_result.rrset->getName().getLabelCount())); db_result.rrset->getName().getLabelCount()));
// If we put it together, will it be too long? // If we put it together, will it be too long?
// (The prefix contains trailing ., which will be removed // (The prefix contains trailing ., which will be removed
if (prefix.getLength() - Name(".").getLength() + if (prefix.getLength() - Name::ROOT_NAME().getLength() +
dname.getDname().getLength() > Name::MAX_WIRE || dname.getDname().getLength() > Name::MAX_WIRE) {
prefix.getLabelCount() - Name(".").getLabelCount() +
dname.getDname().getLabelCount() > Name::MAX_LABELS) {
/* /*
* In case the synthesized name is too long, section 4.1 * In case the synthesized name is too long, section 4.1
* of RFC 2672 mandates we return YXDOMAIN. * of RFC 2672 mandates we return YXDOMAIN.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment