10
0
Fork 0
mirror of https://github.com/ZeusWPI/ZNS.git synced 2024-11-21 21:41:10 +01:00

fix wildcard bug

This commit is contained in:
Xander Bil 2024-07-15 20:11:27 +02:00
parent 2184d016ea
commit 05daa4e8fe
No known key found for this signature in database
GPG key ID: EC9706B54A278598

View file

@ -60,12 +60,18 @@ fn try_wildcard(question: &Question, connection: &mut PgConnection) -> Result<Ve
} else {
let mut qname = question.qname.clone();
qname[0] = String::from("*");
get_from_database(
Ok(get_from_database(
&qname,
Some(question.qtype.clone()),
question.qclass.clone(),
connection,
)
)?
.into_iter()
.map(|mut rr| {
rr.name = question.qname.clone();
rr
})
.collect())
}
}