Skip to content

Conversation

@nodece
Copy link
Member

@nodece nodece commented Apr 16, 2025

Motivation

The existing implementation always resolves the default hostname for the specified network interface, even when useHostNameAsBookieID is disabled. This is unnecessary and can introduce resolution failures or delays in environments where DNS is misconfigured or unavailable.

Restricting hostname resolution to only when useHostNameAsBookieID is enabled improves efficiency and avoids potential issues related to unnecessary hostname lookups.

Changes

  • Moved hostname resolution logic under the useHostNameAsBookieID condition.

  • When useHostNameAsBookieID is false, the code now directly uses DNS.getDefaultIP(iface) to obtain the IP address.

Copy link
Member

@lhotari lhotari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nodece
Copy link
Member Author

nodece commented Apr 16, 2025

Alternative: #4588

@nodece nodece closed this Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants