Skip to content

Conflict Between POSIX Networking and NET_HOSTNAME_UNIQUE_UPDATE in Zephyr v3.7.1 #95811

@PragatiGarg-eaton

Description

@PragatiGarg-eaton

Describe the bug

@cfriedt, @dleach02, I am trying to use the NET_HOSTNAME_UNIQUE_UPDATE feature in Zephyr 3.7.1 to support runtime hostname updates. However, this configuration is no longer viable due to a conflict introduced by automatic dependency selection in Zephyr 3.7.1

Issue Summary:

In Zephyr 3.6, the following configuration worked as expected:

CONFIG_POSIX_API=y
CONFIG_NET_HOSTNAME_UNIQUE_UPDATE=y
  • Hostname updates were successfully triggered, and there were no dependency conflicts.

  • In Zephyr 3.7.1, enabling CONFIG_POSIX_API=y, auto-selects CONFIG_POSIX_NETWORKING=y. This in turn force-selects CONFIG_NET_HOSTNAME_DYNAMIC=y, which conflicts with CONFIG_NET_HOSTNAME_UNIQUE_UPDATE=y.

Conflict Chain:

CONFIG_POSIX_API=y

CONFIG_POSIX_NETWORKING=y

CONFIG_NET_HOSTNAME_DYNAMIC=y

// CONFLICTS with CONFIG_NET_HOSTNAME_UNIQUE_UPDATE=y

Queries:

I would like to continue using NET_HOSTNAME_UNIQUE_UPDATE for hostname customization and runtime updates. Please advise on:

  1. Whether there is a supported way to override or decouple NET_HOSTNAME_DYNAMIC from CONFIG_POSIX_NETWORKING.
  2. If not, can a patch or configuration workaround be provided to allow coexistence of POSIX_API and NET_HOSTNAME_UNIQUE_UPDATE?
  3. If this change is intentional, could documentation be updated to reflect the new limitations and suggest migration paths?

cc: @nashif

Regression

  • This is a regression.

Steps to reproduce

CONFIG_POSIX_API=y
CONFIG_NET_HOSTNAME_UNIQUE_UPDATE=y

Relevant log output

warning: NET_HOSTNAME_DYNAMIC (defined at subsys/net/Kconfig.hostname:20) has direct dependencies !NET_HOSTNAME_UNIQUE_UPDATE && NET_HOSTNAME_ENABLE && NETWORKING with value n, but is currently being y-selected by the following symbols:
 - POSIX_NETWORKING (defined at lib/posix/options/Kconfig.net:5), with value y, direct dependencies NETWORKING (value: y), and select condition NETWORKING (value: y)

error: Aborting due to Kconfig warnings

Impact

Major – Severely degrades functionality; workaround is difficult or unavailable.

Environment

  • Zephyr Version: 3.7.1
  • Board: nucleo_h743zi
  • Toolchain: Zephyr SDK 0.16.9
  • Build System: CMake + west
  • Host OS: Ubuntu 22.04 LTS / Windows
  • Networking Stack: POSIX Networking enabled via CONFIG_POSIX_API=y

Additional Context

3949e89#diff-446767a3dbdb750fbd45b8baac58fe4f0a2734cf1150da40420ea8e36bf7e76b

Metadata

Metadata

Assignees

Labels

area: Networkingarea: POSIXPOSIX API LibrarybugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions