client: set random DNS query ID

This commit is contained in:
Peter Cai 2021-04-03 21:02:15 +08:00
parent 51cf316c7a
commit d753db62b3
1 changed files with 1 additions and 0 deletions

View File

@ -44,6 +44,7 @@ impl Client {
// it first, and we also want to be able to do caching and overriding
fn build_query(questions: Vec<Question<ParsedDname>>) -> Result<Message, String> {
let mut builder = MessageBuilder::new_udp();
builder.header_mut().set_random_id();
for q in questions {
builder
.push(q)