LLMNR has issues in dev/IPv6_integration

Open
#842 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
networking

Research direction

Start in DNS_ParseDNSReply(), where the LLMNR AAAA reply takes xEndPoint.ipv6_settings.xIPAddress from an IPv4 end-point, and compare it with DNS_TreatNBNS(), which the reporter says was fixed in commit afd6ffc. Check whether pxDuplicateNetworkBufferWithDescriptor should become pxResizeNetworkBufferWithDescriptor. Done would need a design decision on how the hook xApplicationDNSQueryHook_Multi() selects end-points per query type, which the thread has not settled.

Written by the indexing model from the issue text.

Description

bug help wanted

Description

  • When an LLMNR AAAA query comes in through a IPv4 end-point, the responding code in DNS_ParseDNSReply() will include xEndPoint.ipv6_settings.xIPAddress in the reply. This being an IPv4 end-point though, means that the IPv6 settings are inaccurate. This is a weird one.... xApplicationDNSQueryHook_Multi() simply said: "Yes, I have this hostname" but it had no information on the type of query ( A or AAAA ) and it cannot control which resulting end-point gets used for generating an answer. I don't know the best approach here, so I'm reporting the issue and hope that smarter heads will chime in :-)
  • A similar to the above issue exists with multiple IP addresses. Consider the very simple scenario from the attached Wireshark capture. My PC has a few IP addresses so does the device that I'm trying to ping. The FreeRTOS+TCP device responds to one of the LLMNR requests but the response only has one answer. My PC has no idea of the other IP addresses that the device has and therefor no communication can be established. I may be wrong here, but I believe a response to an "A" query should contain all IPv4 endpoints and a response to an "AAAA" query should contain all IPv6 endpoints.
  • The code in DNS_ParseDNSReply() uses pxDuplicateNetworkBufferWithDescriptor and I believe it should use pxResizeNetworkBufferWithDescriptor. I believe @htibosch fixed a similar issue just a few days ago in DNS_TreatNBNS() sha:afd6ffc4252f0fca7e0d3dc91e2ca92a5878a91c

LLMNR_SingleAnswer.zip

Dominant language
C
Stars
215
Forks
222
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from FreeRTOS/FreeRTOS-Plus-TCP

All issues in FreeRTOS/FreeRTOS-Plus-TCP

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.