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

egressgw: Switch from net to netip #28503

Merged
merged 1 commit into from Oct 20, 2023

Conversation

joestringer
Copy link
Member

Modernize this section of the codebase by switching over to newer
addressing types provided by recent Go standard libraries.

Related: #24246

@joestringer joestringer added the release-note/misc This PR makes changes that have no direct user impact. label Oct 10, 2023
@joestringer joestringer force-pushed the pr/joe/netip-once-again-with-feeling branch 2 times, most recently from 7d5b0fc to 18a2405 Compare October 11, 2023 14:48
@joestringer
Copy link
Member Author

/test

@joestringer joestringer force-pushed the pr/joe/netip-once-again-with-feeling branch from 18a2405 to 516f401 Compare October 11, 2023 19:25
@joestringer
Copy link
Member Author

/ci-e2e

@joestringer joestringer force-pushed the pr/joe/netip-once-again-with-feeling branch from 516f401 to 9ecf3ab Compare October 11, 2023 23:28
Modernize this section of the codebase by switching over to newer
addressing types provided by recent Go standard libraries.

The most interesting aspect here is the use of netip.Addr{} as the
"invalid ip" value, which is distinct from netip.IPv4Unspecified, ie
"0.0.0.0". Both of these values are used at different times in egress
gateway code, and we must be careful not to conflate them.
addr.IsValid() will determine whether the IP is an actual IP, or if
false, the "invalid ip" uninitialized address.

Signed-off-by: Joe Stringer <joe@cilium.io>
@joestringer joestringer force-pushed the pr/joe/netip-once-again-with-feeling branch from 9ecf3ab to e3d4d43 Compare October 12, 2023 17:33
@joestringer
Copy link
Member Author

/ci-e2e

@joestringer
Copy link
Member Author

/test

@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 Oct 20, 2023
@joestringer joestringer merged commit 6ab32df into main Oct 20, 2023
225 of 229 checks passed
@joestringer joestringer deleted the pr/joe/netip-once-again-with-feeling branch October 20, 2023 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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