dns-message-parser icon indicating copy to clipboard operation
dns-message-parser copied to clipboard

Unknown QClass, Class, QType and Type shouldn't return DecodeError

Open rushmorem opened this issue 4 years ago • 1 comments

I propose we instead store those unknown values in an Unknown(u16) variant or something like that to allow the user to handle the query however they see fit. One might want to return NotImp or FormErr to such queries rather than simply dropping the packet which would prompt a DNS resolver to try again. That causes unnecessary additional load on a server for DNS records that are not even supported by that server. This also makes servers more future proof. Even if we manage to implement all classes and types now, in future there will definitely be more.

rushmorem avatar Nov 27 '21 13:11 rushmorem

The problem is, if we do it, what should be done for an unknown RR? If we use a dedicated struct then we have the issue that if the RData has a compressed Domain Name the encoding would be wrong.

LinkTed avatar Dec 28 '21 15:12 LinkTed