Skip to content

Incorrect IP passed to name-resolved callback #54

@iofarm

Description

@iofarm

When using the ResolvingHostNames.ino example to attempt to resolve the host name of another machine over ethernet, the callback function is passed the IP address 234.147.0.32 (obviously incorrect) rather than INADDR_NONE (as would be expected for an error) or the correct address.

I am using an Arduino Portenta C33, and attempting to resolve the host name of a LI-COR LI-7825, connected through an unmanaged ethernet switch. I'm including the query and response packets captured by Wireshark for:

  • Using the C33 to resolve the hostname of the LI-7825, which failed as described (c33-tga.pcapng in the attached .zip)
  • Using the C33 to resolve the hostname of a PC running macOS 15.6.1, which was successful (c33-mac.pcapng)
  • Using the PC to resolve the hostname of the LI-7825, which was also successful (mac-tga.pcapng)

The mDNS response from the LI-7825 was the same byte-for-byte (not including the IP/UDP headers) whether it was requested by the C33 or the PC, but the host name resolution was successful only from the PC and not from the C33. Also, the C33 was successfully able to resolve the hostname of the PC using the same code. This suggests to me that there is an issue in ArduinoMDNS causing the IP passed to the callback to remain uninitialized, perhaps due to some irregularity in the LI-7825 mDNS response. I wasn't able to identify where this might be happening, so any insight would be greatly appreciated.

mdnspackets.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions