Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No NXDOMAIN when the answer is empty #1217

Merged
merged 1 commit into from
Sep 4, 2015

Conversation

42wim
Copy link
Contributor

@42wim 42wim commented Sep 2, 2015

Subtle bug, we found in production. dig works, but some applications fail.

We only need to send the SOA record when the answer is empty, not NXDOMAIN (because the resource exists, it only doesn't have the required type), otherwise no other records will be asked.

@ryanbreen could you merge this ?

@ryanbreen
Copy link
Contributor

@42wim
Copy link
Contributor Author

42wim commented Sep 2, 2015

Seems like NODATA is the same as NOERROR (pseudo OPCODE)

From the document: 'From the output we can see that our status code is “noerror”, and there is no answer section, this is dig’s way of showing a NODATA response'

See https://www.ietf.org/rfc/rfc2308.txt on page 4 - 2.2 - No Data

NODATA is indicated by an answer with the RCODE set to NOERROR and no relevant answers in the answer section. The authority section will contain an SOA record, or there will be no NS records there. NODATA responses have to be algorithmically determined from the response's contents as there is no RCODE value to indicate NODATA. In some cases to determine with certainty that NODATA is the correct response it can be necessary to send another query.

@ryanbreen
Copy link
Contributor

Cool, makes sense to me. Thanks!

ryanbreen added a commit that referenced this pull request Sep 4, 2015
No NXDOMAIN when the answer is empty
@ryanbreen ryanbreen merged commit 446c640 into hashicorp:master Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants