vendor latest c/common

Includes my pasta changes.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2024-08-28 13:31:49 +02:00
parent 2be86b72af
commit 2f858675b3
23 changed files with 212 additions and 101 deletions

View File

@@ -112,7 +112,7 @@ func GetFreeIPv4NetworkSubnet(usedNetworks []*net.IPNet, subnetPools []config.Su
// GetFreeIPv6NetworkSubnet returns a unused ipv6 subnet
func GetFreeIPv6NetworkSubnet(usedNetworks []*net.IPNet) (*types.Subnet, error) {
// FIXME: Is 10000 fine as limit? We should prevent an endless loop.
for i := 0; i < 10000; i++ {
for range 10000 {
// RFC4193: Choose the ipv6 subnet random and NOT sequentially.
network, err := getRandomIPv6Subnet()
if err != nil {

View File

@@ -129,7 +129,6 @@ func ValidateSetupOptions(n NetUtil, namespacePath string, options types.SetupOp
return errors.New("must specify at least one network")
}
for name, netOpts := range options.Networks {
netOpts := netOpts
network, err := n.Network(name)
if err != nil {
return err