Skip to content

Commit d751e94

Browse files
authored
mdns: Skip rest of mdns questions when parsing packet (#511)
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
1 parent d3fe1f7 commit d751e94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mdns/src/conn/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ async fn run(
351351
}
352352
}
353353

354+
// There might be more than MAX_MESSAGE_RECORDS questions, so skip the rest
355+
let _ = p.skip_all_questions();
356+
354357
for _ in 0..=MAX_MESSAGE_RECORDS {
355358
let a = match p.answer_header() {
356359
Ok(a) => a,

0 commit comments

Comments
 (0)