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

parse-nm/wg: append the correct prefix to IPv6 addresses (LP: #2046158) #428

Merged
merged 1 commit into from Jan 4, 2024

Conversation

daniloegea
Copy link
Collaborator

@daniloegea daniloegea commented Dec 13, 2023

When the prefix is omitted for IPs in the allowed-ips list, we were appending a /32 to them without checking the address family.

IPv6 addresses will have a /128 appended to them if it's not present.

See LP#2046158

Description

Checklist

  • Runs make check successfully.
  • Retains 100% code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad.

When the prefix is omitted for IPs in the allowed-ips list, we were
appending a /32 to them without checking the address family.

IPv6 addresses will have a /128 appended to them if it's not present.

See LP: #2046158
@martinpitt
Copy link
Contributor

That looks exactly right, thanks @daniloegea !

@daniloegea daniloegea requested a review from slyon January 3, 2024 09:06
@slyon slyon changed the title parse-nm/wg: append the correct prefix to IPv6 addresses parse-nm/wg: append the correct prefix to IPv6 addresses (LP: #2046158) Jan 4, 2024
Copy link
Collaborator

@slyon slyon left a comment

Choose a reason for hiding this comment

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

Thank you, LGTM. The modified unit-test is covering the case.

@slyon slyon merged commit 1d61710 into canonical:main Jan 4, 2024
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants