[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH v3 20/21] lxc: honor link state=up for veth interfaces



On Wed, 2014-02-05 at 15:10 +0100, Cédric Bosdonnat wrote:
> direct interfaces are already brought up when creating them.

Just ignore (and drop) this patch, veth interfaces are already up when
starting the container... even thought I couldn't ifdown it ;)

--
Cedric

> ---
>  src/lxc/lxc_process.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
> index ed729f6..6f7ff74 100644
> --- a/src/lxc/lxc_process.c
> +++ b/src/lxc/lxc_process.c
> @@ -245,6 +245,7 @@ char *virLXCProcessSetupInterfaceBridged(virConnectPtr conn,
>      char *parentVeth;
>      char *containerVeth = NULL;
>      virNetDevVPortProfilePtr vport = virDomainNetGetActualVirtPortProfile(net);
> +    bool vethUp = false;
>  
>      VIR_DEBUG("calling vethCreate()");
>      parentVeth = net->ifname;
> @@ -283,6 +284,10 @@ char *virLXCProcessSetupInterfaceBridged(virConnectPtr conn,
>          virDomainConfNWFilterInstantiate(conn, vm->uuid, net) < 0)
>          goto cleanup;
>  
> +    vethUp = net->linkstate == VIR_DOMAIN_NET_INTERFACE_LINK_STATE_UP;
> +    if (virNetDevSetOnline(containerVeth, vethUp) < 0)
> +        goto cleanup;
> +
>      ret = containerVeth;
>  
>  cleanup:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]