Libnetwork: Experimental vlan drivers: null v4 IPAM slice can cause a panic

Created on 13 Mar 2016  路  1Comment  路  Source: moby/libnetwork

In the case of disabling IPAM --ipam-driver=null or a 3rd party IPAM driver sending an empty v4 slice will create a panic. docker network create -d (ipvlan||macvlan) --ipam-driver=null ipv currently triggers a panic.

Patching with:

    // reject a null v4 network
    if len(ipV4Data) == 0 || ipV4Data[0].Pool.String() == "0.0.0.0/0" {
        return fmt.Errorf("ipv4 pool is empty")
    }

Most helpful comment

>All comments

Was this page helpful?
0 / 5 - 0 ratings