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

clustermesh/types: don't panic on invalid IP in PrefixClusterFromCIDR #23137

Merged
merged 1 commit into from Jan 19, 2023

Conversation

tklauser
Copy link
Member

ip.MustAddrFromIP will panic in case of an invalid address. These types of conversion functions should usually only be used in test code. Return an empty PrefixCluster in this case instead, like in other error cases.

Fixes: b4e75da ("clustermesh: Add some helper functions to PrefixCluster")

ip.MustAddrFromIP will panic in case of an invalid address. These types
of conversion functions should usually only be used in test code. Return
an empty PrefixCluster in this case instead, like in other error cases.

Fixes: b4e75da ("clustermesh: Add some helper functions to PrefixCluster")

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser added area/clustermesh Relates to multi-cluster routing functionality in Cilium. release-note/misc This PR makes changes that have no direct user impact. needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch labels Jan 17, 2023
@tklauser tklauser requested a review from a team as a code owner January 17, 2023 14:10
@tklauser
Copy link
Member Author

/test

Copy link
Member

@YutaroHayakawa YutaroHayakawa left a comment

Choose a reason for hiding this comment

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

Oops, thanks!

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Jan 18, 2023
@ldelossa ldelossa merged commit 3c2e546 into master Jan 19, 2023
@ldelossa ldelossa deleted the pr/tklauser/clustermesh-dont-panic branch January 19, 2023 13:37
@aanm aanm mentioned this pull request Jan 23, 2023
19 tasks
@aanm aanm removed the needs-backport/1.13 This PR / issue needs backporting to the v1.13 branch label Jan 23, 2023
@aanm
Copy link
Member

aanm commented Jan 23, 2023

Dropped needs-backport/1.13 label since the PR that introduced the original changes is not part of the 1.13 branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/clustermesh Relates to multi-cluster routing functionality in Cilium. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants