Ticket #5675 enhancement new
Create a new Message-like class that includes space for EDNS information
| Reported by: | exarkun | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | names | Keywords: | edns review |
| Cc: | Branch: |
branches/edns-message-5675-2
(diff, github, buildbot, log) |
|
| Author: | rwall | Launchpad Bug: |
Description
EDNS extends DNS with a couple new statically defined fields and an arbitrary extension mechanism. This information is logically part of the DNS Message itself, but is represented on the network as a new record type.
We should introduce a new message class which exposes the additional information present in an OPT record. It should be safe to deserialize any DNS message using this class, even regular DNS messages (non-EDNS messages). When deserializing EDNS messages, though, the fields of the OPT record should be made available directly on the Message itself and the OPT record should not be present in the list of additional records (where it might end up in a naive implementation, since that's where it appears in the wire format).
It may make sense for some portion of the implementation of this new class to be shared with the implementation of the existing message class. It may make sense for these parts to be factored into a new shared base class. Some parts of the existing message class are undesirable (the redundancy between encode/decode and fromStr/toStr, the failure to use class methods where appropriate, the obscurely named attributes), thus I do not recommend having the new class subclass the old class directly.

