Skip to content

[BUG] DNS does not resolve long names #1246

@marcusb

Description

@marcusb

Describe the bug

When ipconfigUSE_DNS_CACHE == 1, the DNS module fails to resolve domain names longer than ipconfigDNS_CACHE_NAME_LENGTH (default 16). The lookup is rejected by this line.

To Reproduce

  • Configure project with ipconfigUSE_DNS_CACHE 1 and ipconfigDNS_CACHE_NAME_LENGTH 16
  • Call FreeRTOS_gethostbyname() with a name longer than 16 bytes.
  • The call returns 0

Expected behavior

The name resolution should succeed. The name limit should apply only to caching the response, but the DNS resolution should still happen.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions