Skip to content

Conversation

PragatiGarg-eaton
Copy link

Overview

Fixes Kconfig conflict between POSIX networking and unique hostname updates that was introduced in v3.7.1.

Problem

Enabling CONFIG_POSIX_API=y auto-selects CONFIG_POSIX_NETWORKING=y, which force-selects CONFIG_NET_HOSTNAME_DYNAMIC=y. This conflicts with CONFIG_NET_HOSTNAME_UNIQUE_UPDATE=y, preventing the use of POSIX networking with unique hostname updates.

Solution

Decouple NET_HOSTNAME_MAX_LEN from NET_HOSTNAME_DYNAMIC dependency:

  • Remove forced selection of NET_HOSTNAME_DYNAMIC from POSIX networking
  • Make hostname length configuration available independently
  • Add build assertions - Ensure proper validation at compile time

Testing

  • Verified fix resolves Kconfig conflicts
  • Validated unique hostname update operations
  • Confirmed hostname length constants are properly defined
  • Build tests pass for various configuration combinations

Fixes #95811

Decouple NET_HOSTNAME_MAX_LEN from NET_HOSTNAME_DYNAMIC to resolve
Kconfig conflict when using POSIX networking with unique hostname
updates. This restores functionality that worked in Zephyr 3.6.

- Remove forced selection of NET_HOSTNAME_DYNAMIC from POSIX_NETWORKING
- Make NET_HOSTNAME_MAX_LEN available independently
- Add build assertions for hostname length validation
- Update test configurations for new dependency structure

Fixes zephyrproject-rtos#95811

Signed-off-by: Pragati Garg <[email protected]>
Signed-off-by: PragatiGarg-eaton <[email protected]>
@github-actions
Copy link

Hello @PragatiGarg-eaton, and thank you very much for your first pull request to the Zephyr project!
Our Continuous Integration pipeline will execute a series of checks on your Pull Request commit messages and code, and you are expected to address any failures by updating the PR. Please take a look at our commit message guidelines to find out how to format your commit messages, and at our contribution workflow to understand how to update your Pull Request. If you haven't already, please make sure to review the project's Contributor Expectations and update (by amending and force-pushing the commits) your pull request if necessary.
If you are stuck or need help please join us on Discord and ask your question there. Additionally, you can escalate the review when applicable. 😊

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ C)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@cfriedt
Copy link
Member

cfriedt commented Oct 19, 2025

@PragatiGarg-eaton - tests need to pass in order for the change to be merged. Can you revisit?

Please feel free to jump on discord to ask for pointers for running failing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Networking area: POSIX POSIX API Library area: Tests Issues related to a particular existing or missing test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Conflict Between POSIX Networking and NET_HOSTNAME_UNIQUE_UPDATE in Zephyr v3.7.1

3 participants