-
-
Notifications
You must be signed in to change notification settings - Fork 13
Unable to parse 'other' value #6
Comments
@bengentil hi and thank you for finding that bug! I'm hesistant to merge your implementation from #7, though, as I plan to use some external crate with DNS types definitions eventually (carrying my own version is just unreasonable), and since there is really no "Other" query type exist, that will just add some maintainance burden in future. I wrote fix in #8, but due to unrelated reasons CI is broken for today, so I'll merge it tomorrow when build will be green. If you are up to some testing, I would really appreciate it! |
Hi @svartalf, I checked the fix, it works (doesn't fail on "other" type) but the downside I understand your point that "other" is not a real type/class and that it can, as is, prevent from using a crate implementing the RFCs but does the exporter needs to support the types/classes? As far as I can tell the only place where the raw value is needed is when using the memory source and it's not currently using the Rtype/Class enums, the match here could be changed to something like: use std::convert::From;
use trust_dns_proto::rr::record_type::RecordType;
fn rr_type(value: usize) -> Option<&'static str> {
let type_ = RecordType::from(value as u16);
match type_ {
RecordType::Unknown(_) => Some("other"),
_ => Some(From::from(type_)),
}
} I used the trust_dns_proto crate here as an example, I don't know if it's a good fit or if there is a better crate for the job. |
Not gonna lie, this is a huge argument against making them separate fields, and a ridicuoulus mistake :) Fixed that in b90f2ea Great idea about making it a |
Unbound in certain conditions increment a "other" Rtype, this makes unbound-telemetry unresponsive with the following message:
The text was updated successfully, but these errors were encountered: