Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for invalid chars when returning IPv6 hostname #3592

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

gregular
Copy link
Contributor

Issue number:

Closes #3571

Description of changes:
Netdog will return an IPv6 address string in some corner cases. Replace colons with dashes to ensure the string will validate as ValidLinuxHostname.

Testing done:
Validated locally when no valid IPv4 is assigned by systemd-networkd but a valid IPv6 is assigned when systemd-networkd-wait-online.service times out that the string netdog returns can be validated as ValidLinuxHostname

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Netdog will return an IPv6 address string in some corner
cases.  Replace colons with dashes to ensure the string
will validate as ValidLinuxHostname.
Copy link
Contributor

@yeazelm yeazelm left a comment

Choose a reason for hiding this comment

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

Very nice! Thanks for the PR!

@yeazelm yeazelm requested a review from zmrow November 13, 2023 16:50
Copy link
Member

@webern webern left a comment

Choose a reason for hiding this comment

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

Makes sense to me.

Copy link
Contributor

@zmrow zmrow left a comment

Choose a reason for hiding this comment

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

Thanks for this! 🥳

@webern webern merged commit 0b9658f into bottlerocket-os:develop Nov 13, 2023
@gregular gregular deleted the invalid-ipv6-hostname branch November 14, 2023 19:52
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.

Fail to get ValidLinuxHostname with ipv6 link-local address
4 participants