-
Using NetBox DNS I noticed that CNAME values can be relative, i.e. Looking at octodns/octodns#987 I see that RFC 1035 doesn't seem to be clear about this. However, another comment points out that this seems to be a BIND specific feature. So what's the deal with these record RRs? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Hi @alehaa, that's an interesting issue. First of all, validation of names is surprisingly hard. Not only are the RFCs not very precise in some points, as a consequence the interpretation of the name server implementations varies even more widely. That's an area I'm still not completely satisfied with. Second, if we talk about DNS names in RR values we not only have to talk about Third, in the RFCs a difference is made in the RFCs between the master file format and the wire format. While relative names in the master file format are quite common, they are forbidden in the wire format. RFC1034, Section 3.1 is a guideline:
With NetBox DNS we clearly are on the "user interface/master file" end, not the "wire format" end. So using relative DNS names is fine here and covered by the RFCs. Another indicator are the examples in the RFCs themselves, see for instance RFC1912, Section 2.4:
Bottom line: According to the RFCs there is no issue whatsoever with relative names in record values. If Potentially it would make sense to add two options (default
and a management command that can be used to convert all existing relative values in record names to absolute ones. On the other hand that can also be done by exporters for the name servers that - without any RFC requirement to do so - require absolute names. Usually I prefer to add options to loosen validation requirements (because they are required for NetBox DNS to work with certain non-standard implementations), not to add requirements that are not covered by RFCs, so I'd rather not invest work in that direction. |
Beta Was this translation helpful? Give feedback.
-
I conducted a little experiment with some authoritative name servers and the following zone file:
Loading this zone file into a couple of open source authoritative DNS servers gave the following results:
Of course I checked the resolution via
The only server that has an issue with a So the 'This is a BIND specific feature' argument is definitely void. |
Beta Was this translation helpful? Give feedback.
-
I just merged #511 which should help addressing the issue in OctoDNS and other consumers that have problems with relative names in record values. The PR adds an |
Beta Was this translation helpful? Give feedback.
-
Just released 1.2.1 with the new feature. |
Beta Was this translation helpful? Give feedback.
-
Thanks! I'll check on integrating this feature into |
Beta Was this translation helpful? Give feedback.
I just merged #511 which should help addressing the issue in OctoDNS and other consumers that have problems with relative names in record values.
The PR adds an
absolute_value
property toRecord
objects. That property contains derelativized names for all record types that can contain names in their values. For all records with absolute names and all other record types the value of the property is identical tovalue
.