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

Spurious MDNS collision detection (IDFGH-4263) #6114

Closed
djphoenix opened this issue Nov 13, 2020 · 3 comments
Closed

Spurious MDNS collision detection (IDFGH-4263) #6114

djphoenix opened this issue Nov 13, 2020 · 3 comments

Comments

@djphoenix
Copy link

Environment

  • Development Kit: none
  • Module or chip used: ESP32-WROOM-32
  • IDF version: v4.0.2
  • Build System: Make
  • Compiler version: esp-2019r2
  • Operating System: macOS
  • Using an IDE?: No
  • Power Supply: USB

Problem Description

I have faced an issue with spurious MDNS TXT collision detection, that cause an infinite MDNS query/answer loop when router retransmits MDNS message to ESP module. E.g.

  • ESP sends multicast response with TXT record
  • ESP receives multicast response with TXT record (actually from itself)
  • ESP validates response against service description ** FAIL HERE **
  • ESP sends multicast request (probe) for its service name with ANY type
  • ESP receives multicast request with its service name
  • Looped to step 1

Steps to reproduce

Register MDNS service with multiple TXT entries

Point to code

https://github.com/espressif/esp-idf/blob/v4.0.2/components/mdns/mdns.c#L2108

It counts length of first record regardless to current linked-list foreach-loop record.
Also it counts data_len from 1 instead of 0.
Seems like master and ESP8266_RTOS_SDK have same issues.

@github-actions github-actions bot changed the title Spurious MDNS collision detection Spurious MDNS collision detection (IDFGH-4263) Nov 13, 2020
@Alvin1Zhang
Copy link
Collaborator

Thanks for reporting, we will look into.

@lhespress
Copy link
Collaborator

@djphoenix

It is much easier for us if you could provide small test code on top of esp-idf/examples/protocols/mdns.

@AndreyKarpov
Copy link

P.S. Continuation of the story: https://www.viva64.com/en/b/0790/ :)

david-cermak pushed a commit to david-cermak/esp-protocols that referenced this issue Mar 24, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue Mar 25, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue Apr 8, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 17, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
gabsuren pushed a commit to gabsuren/esp-protocols-1 that referenced this issue May 27, 2022
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-protocols that referenced this issue Jun 30, 2022
euripedesrocha pushed a commit to euripedesrocha/esp-protocols that referenced this issue Oct 17, 2022
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

No branches or pull requests

4 participants