Network create now uses the ipam driver. This allows the user to
configure the ipam driver manually instead of choosing a fixed default.
If the ipam driver is `none` no ips will be assigned to this container.
This means that only the interfaces are created.
This will require a patch in netavark since it rejects the config when
no static ips are provided.
Ref containers/podman#13521
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
netavark + aardvark support this when we add a gateway ip to the config
so that aardvark can use this address to bind on it.
We only add the gateway when not internal or when dns is enabled. If
internal without dns we do not need the gw address.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
When we create a macvlan network we should not check if the subnet is
already in use on the host since this is expected for macvlan networks.
Only bridge networks should use this check.
Fixescontainers/podman#12971
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Copy the libpod/network packages from podman to here so we can use the
same code in buildah as well.
This is mostly a one to one copy only the import paths have been changed
and some errors were added.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>