Skip to content

Misleading NetworkInterface configuration #464

@jlkiri

Description

@jlkiri

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions