We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 779f255 commit f9e4f91Copy full SHA for f9e4f91
src/dns/parse.rs
@@ -30,13 +30,20 @@ fn parse_record(
30
Some(record_set)
31
}
32
33
+// todo: improve error handling and naming
34
pub(super) fn parse(
35
records: HashMap<String, Vec<Vec<String>>>,
36
) -> Option<HashMap<Name, HashMap<RecordType, Arc<RecordSet>>>> {
37
let mut result: HashMap<Name, HashMap<RecordType, Arc<RecordSet>>> = Default::default();
38
39
for (name, val) in records {
- let mut name = Name::from_str(&name).ok()?;
40
+ let mut name = match Name::from_str(&name) {
41
+ Ok(name) => name,
42
+ Err(_) => {
43
+ log::error!("Could not parse name {}, skipping", name);
44
+ continue
45
+ }
46
+ };
47
name.set_fqdn(true);
48
for val in val {
49
let mut iter = val.into_iter();
0 commit comments