Skip to content

Commit

Permalink
mdns: Skip rest of mdns questions when parsing packet
Browse files Browse the repository at this point in the history
This fixes the annoying warning when receiving a mdns packet with more than 3 questions

[2023-11-09T12:04:04Z WARN  webrtc_mdns::conn] Failed to parse mDNS packet parsing/packing of this type isn't available yet
[2023-11-09T12:04:08Z WARN  webrtc_mdns::conn] Failed to parse mDNS packet parsing/packing of this type isn't available yet
[2023-11-09T12:04:17Z WARN  webrtc_mdns::conn] Failed to parse mDNS packet parsing/packing of this type isn't available yet
  • Loading branch information
haaspors committed Nov 9, 2023
1 parent 13c490c commit 15f53a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mdns/src/conn/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,9 @@ async fn run(
}
}

// There might be more than MAX_MESSAGE_RECORDS questions, so skip the rest
let _ = p.skip_all_questions();

for _ in 0..=MAX_MESSAGE_RECORDS {
let a = match p.answer_header() {
Ok(a) => a,
Expand Down

0 comments on commit 15f53a6

Please sign in to comment.