I've been working on a change to add a DS record RD subclass over in rmbolger@801edf75f48b8eb637ae738dfbff62ffa8c7cb74. It has a very similar structure to the DNSKEY record. The main difference is that the DNSKEY has the public key encoded as Base64 whereas the DS has the digest value encoded as Hex.
At a basic level, it seems to be working. But when I attempt to test it in a way that adds multiple answers to a DNSRecord something is happening where all of the instances of the record get overwritten with a copy of first one seen. The easiest demonstration is comparing an actual dig query to the dnslib.client output. For example:
The first result matches the first result in the dig output. But the next 5 results are just clones of the first instead of their individual rdata. I've tried adding some debug logging in the DS.parse method but it seems to be parsing the unique packets normally.
I feel like I must be doing something wrong here, but I can't figure out what it is.
Sigh, Apparently, I'm an idiot and accidentally put a @classmethod decorator on the __init__ method. Please ignore me. On the plus side, I should have a PR ready soon.
I've been working on a change to add a DS record RD subclass over in rmbolger@801edf75f48b8eb637ae738dfbff62ffa8c7cb74. It has a very similar structure to the DNSKEY record. The main difference is that the DNSKEY has the public key encoded as Base64 whereas the DS has the digest value encoded as Hex.
At a basic level, it seems to be working. But when I attempt to test it in a way that adds multiple answers to a
DNSRecord
something is happening where all of the instances of the record get overwritten with a copy of first one seen. The easiest demonstration is comparing an actual dig query to the dnslib.client output. For example:Six unique results where the digest values may have whitespace within the hex text (allowed but not mandated by the RFC).
The first result matches the first result in the dig output. But the next 5 results are just clones of the first instead of their individual rdata. I've tried adding some debug logging in the
DS.parse
method but it seems to be parsing the unique packets normally.I feel like I must be doing something wrong here, but I can't figure out what it is.