[lxc-devel] [PATCH] network.c: Add missing LXC_NET_NONE option + refactor

Serge Hallyn serge.hallyn at ubuntu.com
Wed Mar 26 14:24:57 UTC 2014


Quoting Bogdan Purcareata (bogdan.purcareata at freescale.com):
> Add LXC_NET_NONE to known lxc_network_types, so parsing a config
> file with lxc.network.type = none does not result in failure
> (e.g. doc/examples/lxc-no-netns.conf). Options have also been
> reordered to match the enum in conf.h.
> 
> Signed-off-by: Bogdan Purcareata <bogdan.purcareata at freescale.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/network.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/lxc/network.c b/src/lxc/network.c
> index 090b9bd..a9900de 100644
> --- a/src/lxc/network.c
> +++ b/src/lxc/network.c
> @@ -1202,11 +1202,12 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
>  }
>  
>  static const char* const lxc_network_types[LXC_NET_MAXCONFTYPE + 1] = {
> +	[LXC_NET_EMPTY]   = "empty",
>  	[LXC_NET_VETH]    = "veth",
>  	[LXC_NET_MACVLAN] = "macvlan",
> -	[LXC_NET_VLAN]    = "vlan",
>  	[LXC_NET_PHYS]    = "phys",
> -	[LXC_NET_EMPTY]   = "empty",
> +	[LXC_NET_VLAN]    = "vlan",
> +	[LXC_NET_NONE]    = "none",
>  };
>  
>  const char *lxc_net_type_to_str(int type)
> -- 
> 1.9.rc1
> 
> 
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel


More information about the lxc-devel mailing list