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

Relax hostonly net create #36

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

Conversation

bgandon
Copy link
Contributor

@bgandon bgandon commented Feb 16, 2024

Rewrite anti-patterns introduced in #31.

Fixes #34.

Copy link

linux-foundation-easycla bot commented Feb 16, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

As they say, they have a special requirement for limiting network masks to
2^16 allocatable IPs only:

	// For IPv6, the max size will be limited to 65536
	// This is due to the allocator keeping track of all the
	// allocated IP's in a bitmap. This will keep the size of
	// the bitmap to 64k.

Ref: https://github.com/tkestack/tke/blob/v1.9.2/pkg/util/ipallocator/allocator.go#L271-L274

But here there in the VirtualBox CPI is no reason for such a limitation. We
just need the correct calculation of mask length.
With VirtualBox v7 on macOS we can create networks of 'hostonlynets' with a
new CLI experience that allows any name for the created network.

We leverage this new possibility, while still retaining the former feature
with networks of 'hostonlyif' type, when the name of a non-existing and
to-be-created network could possibly be guessed in advance, and if correctly
guessed, then everything was fine.
@rkoster rkoster requested review from a team, cunnie and ramonskie and removed request for a team February 22, 2024 16:00
@bgandon
Copy link
Contributor Author

bgandon commented Feb 29, 2024

As told last week, I'll test this soon and document the test case, even if manual

@rkoster rkoster marked this pull request as draft May 16, 2024 14:42
@wayne
Copy link

wayne commented Sep 4, 2024

@bgandon How did the testing go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Changes | Open for Contribution
Development

Successfully merging this pull request may close these issues.

hardcoded vboxnet0 name for networks of type hostonly
2 participants