10000 SimpleResolver fails when UPDATE response has ZOCOUNT equals to 0. · Issue #322 · dnsjava/dnsjava · GitHub
[go: up one dir, main page]

Skip to content
SimpleResolver fails when UPDATE response has ZOCOUNT equals to 0. #322
Closed
@javier-godoy

Description

@javier-godoy

In dnsjava 3.5.3, sending DDNS update to a server that returns NOTIMP with ZOCOUNT=0 results in NPE at SimpleResolver:406 because response.getQuestion() is null. #277 "fixes" that by considering the case an "invalid message", but that interpretation is not consistent with Section 3.8 of RFC 2136:

A response message is generated by copying the ID and Opcode fields from the request, and either copying the ZOCOUNT, PRCOUNT, UPCOUNT, and ADCOUNT fields and associated sections, or placing zeros (0) in the these "count" fields and not including any part of the original update

if (!query.getQuestion().getName().equals(response.getQuestion().getName())) {

if (response.getQuestion() == null) {
f.completeExceptionally(
new WireParseException("invalid message: question section missing"));
return f;
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0