]>
Commit | Line | Data |
---|---|---|
7395ab25 | 1 | From 405bcb676e3eb07e2e2efab45b15cdc8b799b15c Mon Sep 17 00:00:00 2001 |
ade16ee6 WB |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> |
3 | Date: Fri, 10 Feb 2017 09:15:37 +0100 | |
7395ab25 | 4 | Subject: [PATCH 3/8] pve: run lxcnetaddbr when instantiating veths |
ade16ee6 WB |
5 | |
6 | FIXME: Why aren't we using regular up-scripts? | |
7 | ||
8 | Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
9 | --- | |
10 | src/lxc/conf.c | 7 ++++++- | |
11 | 1 file changed, 6 insertions(+), 1 deletion(-) | |
12 | ||
13 | diff --git a/src/lxc/conf.c b/src/lxc/conf.c | |
7395ab25 | 14 | index 923a4d90..3bedcf0f 100644 |
ade16ee6 WB |
15 | --- a/src/lxc/conf.c |
16 | +++ b/src/lxc/conf.c | |
7395ab25 | 17 | @@ -2742,8 +2742,13 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd |
ade16ee6 WB |
18 | "veth", veth1, (char*) NULL); |
19 | if (err) | |
20 | goto out_delete; | |
21 | + } else if (!netdev->link) { | |
22 | + err = run_script(handler->name, "net", "/usr/share/lxc/lxcnetaddbr", "up", | |
23 | + "veth", veth1, (char*) NULL); | |
24 | + if (err) | |
25 | + goto out_delete; | |
26 | } | |
27 | - | |
28 | + | |
29 | DEBUG("instantiated veth '%s/%s', index is '%d'", | |
30 | veth1, veth2, netdev->ifindex); | |
31 | ||
32 | -- | |
7395ab25 | 33 | 2.11.0 |
ade16ee6 | 34 |