Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set MDNS AA bit while answering MDNS request. #1223

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ActoryOu
Copy link
Member

@ActoryOu ActoryOu commented Feb 4, 2025

Set MDNS AA bit while answering MDNS request.

Description

From forum question FreeRTOS+TCP mDNS behaviour on receiving request, the AA bit of MDNS reply is not set correctly.

Here is the description in RFC6762 18.4.

In response messages for Multicast domains, the Authoritative Answer
bit MUST be set to one (not setting this bit would imply there’s some
other place where “better” information may be found) and MUST be
ignored on reception.

So in this PR, we add the AA bit for MDNS query. And keep the behavior unchanged for LLMNR query.

Test Steps

  1. Add unit test to parse MDNS request.
  2. Check the flag in the DNS header to see if it's 0x8400. (with QR bit and AA bit set)

Checklist:

  • I have tested my changes. No regression in existing tests.
  • I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

https://forums.freertos.org/t/freertos-tcp-mdns-behaviour-on-receiving-request/22455

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ActoryOu ActoryOu requested a review from a team as a code owner February 4, 2025 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants