Closed Wicpar closed 11 months ago
If you have a message already, getting the authority section and then calling limit_to::<Ns<_>>()
is probably what you are after. This will give you an iterator over all the NS records in the additional section (or, well, strictly speaking a result).
So, something like this:
for record in msg.additional()?.limit_to::<domain::rdata::Ns<_>>() {
let record = record?;
// Do something with the record ...
}
Is that roughly what you were looking for?
ah i see, i was missing the limit_to function :)
Hi, I am trying to get the authority servers as a fallback if a dns challenge is not present and replay the query on a more restricted config only with the authority servers, however do not know which type to use for
.into_record::<??>
to get the dname from the authority NS record.