summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch')
-rw-r--r--recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
new file mode 100644
index 00000000..81fde835
--- /dev/null
+++ b/recipes-containers/lxc/files/network.c-Add-missing-LXC_NET_NONE-option-refactor.patch
@@ -0,0 +1,38 @@
1From b343592b45c91db8c18e863fac5ab8eeb94445d6 Mon Sep 17 00:00:00 2001
2From: Bogdan Purcareata <bogdan.purcareata@freescale.com>
3Date: Wed, 26 Mar 2014 11:35:09 -0400
4Subject: [PATCH] network.c: Add missing LXC_NET_NONE option + refactor
5
6Add LXC_NET_NONE to known lxc_network_types, so parsing a config
7file with lxc.network.type = none does not result in failure
8(e.g. doc/examples/lxc-no-netns.conf). Options have also been
9reordered to match the enum in conf.h.
10
11Signed-off-by: Bogdan Purcareata <bogdan.purcareata@freescale.com>
12Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
13---
14 src/lxc/network.c | 5 +++--
15 1 file changed, 3 insertions(+), 2 deletions(-)
16
17diff --git a/src/lxc/network.c b/src/lxc/network.c
18index 090b9bd..a9900de 100644
19--- a/src/lxc/network.c
20+++ b/src/lxc/network.c
21@@ -1202,11 +1202,12 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
22 }
23
24 static const char* const lxc_network_types[LXC_NET_MAXCONFTYPE + 1] = {
25+ [LXC_NET_EMPTY] = "empty",
26 [LXC_NET_VETH] = "veth",
27 [LXC_NET_MACVLAN] = "macvlan",
28- [LXC_NET_VLAN] = "vlan",
29 [LXC_NET_PHYS] = "phys",
30- [LXC_NET_EMPTY] = "empty",
31+ [LXC_NET_VLAN] = "vlan",
32+ [LXC_NET_NONE] = "none",
33 };
34
35 const char *lxc_net_type_to_str(int type)
36--
371.9.rc1
38