Skip to content

[BUG] Build failure with DNS cache disabled #1199

@jackwilsdon

Description

@jackwilsdon

Describe the bug

#define ipconfigUSE_DNS_CACHE 0

Removes the pcName field from ParseSet_t:

#if ( ipconfigUSE_DNS_CACHE == 1 ) || ( ipconfigDNS_USE_CALLBACKS == 1 ) || ( ipconfigUSE_MDNS == 1 )
BaseType_t xDoStore; /**< Becomes true when a DNS reply was requested by this device,
* i.e. it has a matching request ID. */
char pcName[ ipconfigDNS_CACHE_NAME_LENGTH ]; /**< A copy of the name that is mentioned in the questions. */
#endif

But pcName is still used by DNS_ReadNameField:

pxSet->pcName[ uxNameLen ] = '.';

Target

  • Development board: Raspberry Pi Pico
  • Instruction Set Architecture: ARMv6-M
  • IDE and version: N/A
  • Toolchain and version: arm-none-eabi-gcc (15:13.2.rel1-2) 13.2.1 20231009

Host

  • Host OS: Linux
  • Version: Debian GNU/Linux trixie/sid

To Reproduce

  • Set ipconfigUSE_DNS_CACHE to 0
  • Note that FreeRTOS-Plus-TCP no longer compiles

Expected behavior
FreeRTOS-Plus-TCP should compile with the DNS cache disabled.

Additional context
I'm on version 4.2.2 but can reproduce on main too.

Metadata

Metadata

Assignees

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