Commit 94b0beeb authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac526] Implement returning CNAME

No chaining is implemented. While RFC 1024 indicates we should do it at
last inside the same zone, we don't now and leave it out for later.

The CNAME is handled in the same way as as SUCCESS with slight
modification about additional data (which probably never happen in real
life anyway).
parent 424bb3df
......@@ -143,6 +143,16 @@ Query::process() const {
keep_doing = false;
Zone::FindResult db_result =>find(qname_, qtype_);
switch (db_result.code) {
case Zone::CNAME:
* We don't do chaining yet. Therefore handling a CNAME is
* mostly the same as handling SUCCESS, but we didn't get
* what we expected. It means no exceptions in ANY or NS
* on the origin (though CNAME in origin is probably
* forbidden anyway).
// No break; here, fall trough.
case Zone::SUCCESS:
......@@ -154,6 +164,7 @@ Query::process() const {
// and AAAA/A RRS of each of the NS RDATA into the additional
// section.
if (qname_ !=>getOrigin() ||
db_result.code != Zone::SUCCESS ||
(qtype_ != RRType::NS() && qtype_ != RRType::ANY()))
......@@ -176,7 +187,6 @@ Query::process() const {
case Zone::CNAME:
case Zone::DNAME:
// TODO : replace qname, continue lookup
Supports Markdown
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