func GenerateIfaceName(nlh netlink.Handler, prefix string, len int) (string, error) {
	for i := 0; i < 3; i++ {
		name, err := netutils.GenerateRandomName(prefix, len)
		if err != nil {
			continue
		}
		_, err = nlh.LinkByName(name)
		if err != nil {
			if strings.Contains(err.Error(), "not found") {
				return name, nil
			}
			return "", err
		}
	}
	return "", types.InternalErrorf("could not generate interface name")
}
GenerateIfaceName returns an interface name using the passed in
prefix and the length of random bytes. The api ensures that the
there are is no interface which exists with that name.
From "github.com/docker/libnetwork/netutils"
package netutils
import (
	"strings"
	"github.com/Scalingo/sand/netlink"
	"github.com/docker/libnetwork/netutils"
	"github.com/docker/libnetwork/types"
	nl "github.com/vishvananda/netlink"
)