Is a DNS packet with only a header (no questions or resources) valid?
Looking at RFC 1035 I am trying to determine what the proper response is for a packet that contains nothing but a DNS header, where all the "counts" are zero:
id short X
qdcount short 0
ancount short 0
nscount short 0
arcount short 0
<EOF>
Should this packet have any response? Should it be considered an error?
dns packet network-protocols
add a comment |
Looking at RFC 1035 I am trying to determine what the proper response is for a packet that contains nothing but a DNS header, where all the "counts" are zero:
id short X
qdcount short 0
ancount short 0
nscount short 0
arcount short 0
<EOF>
Should this packet have any response? Should it be considered an error?
dns packet network-protocols
add a comment |
Looking at RFC 1035 I am trying to determine what the proper response is for a packet that contains nothing but a DNS header, where all the "counts" are zero:
id short X
qdcount short 0
ancount short 0
nscount short 0
arcount short 0
<EOF>
Should this packet have any response? Should it be considered an error?
dns packet network-protocols
Looking at RFC 1035 I am trying to determine what the proper response is for a packet that contains nothing but a DNS header, where all the "counts" are zero:
id short X
qdcount short 0
ancount short 0
nscount short 0
arcount short 0
<EOF>
Should this packet have any response? Should it be considered an error?
dns packet network-protocols
dns packet network-protocols
asked Jan 30 at 16:32
Kristopher IvesKristopher Ives
66111
66111
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Any DNS query where qdcount
is not equal to 1
should be rejected by the DNS server.
The returned error will most likely be "Format Error" (FORMERR, rcode=1),
which is only logical, since a DNS query for nothing at all must be considered
as malformed.
Finding official sources for this is pretty hard.
I did find for the NSD server a
bug report
where it was tested and remarked : "QDCOUNT=0 makes it FORMERR".
For the BIND server, StackOverflow post
What does QD stand for in DNS RFC1035
says this about QDCOUNT:
note that this field is useless now, because BIND has always rejected QDCOUNT != 1.
add a comment |
Potentially depends on the opcode specified in the header (there are several – query, notify, update, etc.) For regular queries RFC 1034 says:
A standard query specifies a target domain name (QNAME), query type (QTYPE), and query class (QCLASS) and asks for RRs which match.
I would interpret the use of the singular "target" etc. as a query always having exactly one record in the question section; anything else should return FORMERR.
There are variations (e.g. the obsolete IQUERY uses queries with at least one record in answer section, but empty question section), but I couldn't find any opcodes which would allow all sections to be empty.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1400157%2fis-a-dns-packet-with-only-a-header-no-questions-or-resources-valid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Any DNS query where qdcount
is not equal to 1
should be rejected by the DNS server.
The returned error will most likely be "Format Error" (FORMERR, rcode=1),
which is only logical, since a DNS query for nothing at all must be considered
as malformed.
Finding official sources for this is pretty hard.
I did find for the NSD server a
bug report
where it was tested and remarked : "QDCOUNT=0 makes it FORMERR".
For the BIND server, StackOverflow post
What does QD stand for in DNS RFC1035
says this about QDCOUNT:
note that this field is useless now, because BIND has always rejected QDCOUNT != 1.
add a comment |
Any DNS query where qdcount
is not equal to 1
should be rejected by the DNS server.
The returned error will most likely be "Format Error" (FORMERR, rcode=1),
which is only logical, since a DNS query for nothing at all must be considered
as malformed.
Finding official sources for this is pretty hard.
I did find for the NSD server a
bug report
where it was tested and remarked : "QDCOUNT=0 makes it FORMERR".
For the BIND server, StackOverflow post
What does QD stand for in DNS RFC1035
says this about QDCOUNT:
note that this field is useless now, because BIND has always rejected QDCOUNT != 1.
add a comment |
Any DNS query where qdcount
is not equal to 1
should be rejected by the DNS server.
The returned error will most likely be "Format Error" (FORMERR, rcode=1),
which is only logical, since a DNS query for nothing at all must be considered
as malformed.
Finding official sources for this is pretty hard.
I did find for the NSD server a
bug report
where it was tested and remarked : "QDCOUNT=0 makes it FORMERR".
For the BIND server, StackOverflow post
What does QD stand for in DNS RFC1035
says this about QDCOUNT:
note that this field is useless now, because BIND has always rejected QDCOUNT != 1.
Any DNS query where qdcount
is not equal to 1
should be rejected by the DNS server.
The returned error will most likely be "Format Error" (FORMERR, rcode=1),
which is only logical, since a DNS query for nothing at all must be considered
as malformed.
Finding official sources for this is pretty hard.
I did find for the NSD server a
bug report
where it was tested and remarked : "QDCOUNT=0 makes it FORMERR".
For the BIND server, StackOverflow post
What does QD stand for in DNS RFC1035
says this about QDCOUNT:
note that this field is useless now, because BIND has always rejected QDCOUNT != 1.
edited Mar 8 at 8:12
answered Mar 4 at 21:38
harrymcharrymc
263k14271580
263k14271580
add a comment |
add a comment |
Potentially depends on the opcode specified in the header (there are several – query, notify, update, etc.) For regular queries RFC 1034 says:
A standard query specifies a target domain name (QNAME), query type (QTYPE), and query class (QCLASS) and asks for RRs which match.
I would interpret the use of the singular "target" etc. as a query always having exactly one record in the question section; anything else should return FORMERR.
There are variations (e.g. the obsolete IQUERY uses queries with at least one record in answer section, but empty question section), but I couldn't find any opcodes which would allow all sections to be empty.
add a comment |
Potentially depends on the opcode specified in the header (there are several – query, notify, update, etc.) For regular queries RFC 1034 says:
A standard query specifies a target domain name (QNAME), query type (QTYPE), and query class (QCLASS) and asks for RRs which match.
I would interpret the use of the singular "target" etc. as a query always having exactly one record in the question section; anything else should return FORMERR.
There are variations (e.g. the obsolete IQUERY uses queries with at least one record in answer section, but empty question section), but I couldn't find any opcodes which would allow all sections to be empty.
add a comment |
Potentially depends on the opcode specified in the header (there are several – query, notify, update, etc.) For regular queries RFC 1034 says:
A standard query specifies a target domain name (QNAME), query type (QTYPE), and query class (QCLASS) and asks for RRs which match.
I would interpret the use of the singular "target" etc. as a query always having exactly one record in the question section; anything else should return FORMERR.
There are variations (e.g. the obsolete IQUERY uses queries with at least one record in answer section, but empty question section), but I couldn't find any opcodes which would allow all sections to be empty.
Potentially depends on the opcode specified in the header (there are several – query, notify, update, etc.) For regular queries RFC 1034 says:
A standard query specifies a target domain name (QNAME), query type (QTYPE), and query class (QCLASS) and asks for RRs which match.
I would interpret the use of the singular "target" etc. as a query always having exactly one record in the question section; anything else should return FORMERR.
There are variations (e.g. the obsolete IQUERY uses queries with at least one record in answer section, but empty question section), but I couldn't find any opcodes which would allow all sections to be empty.
answered Mar 4 at 21:38
community wiki
grawity
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1400157%2fis-a-dns-packet-with-only-a-header-no-questions-or-resources-valid%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown