|
From: Luis S. <lui...@gm...> - 2008-08-18 15:23:36
|
Hi all,
Sorry if this is not the correct mailing list for my email. I'm analysing
the Cache from the DNSJava and I found something that I don't understand if
it is correct. In the piece of code below isn't it possible to enter the
code in green having the rcode equals to NXDOMAIN. According with the RFC,
when dealing with delegation, the RCode must be "ok", which is not the case
(at least is my interpretation). Am I wrong?
For example consider the case of a NXDOMAIN Type 4 answer.
Kind Regards,
Luis
if
(!completed) {
/* This is a negative response or a referral. */
int cachetype = (rcode == Rcode.NXDOMAIN) ? 0 : qtype;
if (soa != null || ns == null) {
/* Negative response */
cred = getCred(Section.
AUTHORITY, isAuth);
SOARecord soarec =
null;
if (soa != null)
soarec = (SOARecord) soa.first();
addNegative(curname, cachetype, soarec, cred);
if (response == null) {
int responseType;
if (rcode == Rcode.NXDOMAIN)
responseType = SetResponse.
NXDOMAIN;
else
responseType = SetResponse.
NXRRSET;
response = SetResponse.ofType(responseType);
}
/* NXT records are not cached yet. */
}
else {
/* Referral response */
cred = getCred(Section.
AUTHORITY, isAuth);
addRRset(ns, cred);
markAdditional(ns, additionalNames);
if (response == null)
response =
new SetResponse(
SetResponse.
DELEGATION,
ns);
}
}
|