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

Misleading NetworkInterface configuration #464

Open
jlkiri opened this issue Nov 26, 2022 · 0 comments
Open

Misleading NetworkInterface configuration #464

jlkiri opened this issue Nov 26, 2022 · 0 comments

Comments

@jlkiri
Copy link

jlkiri commented Nov 26, 2022

Currently, NetworkInterface.StaticConfiguration.IPConfiguration.IPAddr is of type net.IPNet which, according to the net library, represents

// An IPNet represents an IP network.
type IPNet struct {
	IP   IP     // network number
	Mask IPMask // network mask
}

Note that there is no place to specify an actual IP address in there, only subnet and mask.
If the SDK user uses the convenient net.ParseCIDR() function, the resulting net.IPNet struct can be passed as-is to the firecracker config, but there is NO IP address that can be assigned to the VM's interface. This leads to the situation where the subnet ID (the network number) is assigned to the interface, which is very very wrong.

I believe a different type should be used for this setting.

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

No branches or pull requests

1 participant