]> git.proxmox.com Git - lxc.git/blame - debian/patches/0003-pve-run-lxcnetaddbr-when-instantiating-veths.patch
switch to git-patch workflow; add lxc-monitord.service
[lxc.git] / debian / patches / 0003-pve-run-lxcnetaddbr-when-instantiating-veths.patch
CommitLineData
ade16ee6
WB
1From 6b3de84e0654c3b0b13166d63af9961a3a757c6e Mon Sep 17 00:00:00 2001
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3Date: Fri, 10 Feb 2017 09:15:37 +0100
4Subject: [PATCH 3/8] pve: run lxcnetaddbr when instantiating veths
5
6FIXME: Why aren't we using regular up-scripts?
7
8Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
9---
10 src/lxc/conf.c | 7 ++++++-
11 1 file changed, 6 insertions(+), 1 deletion(-)
12
13diff --git a/src/lxc/conf.c b/src/lxc/conf.c
14index a93124b..c4079bb 100644
15--- a/src/lxc/conf.c
16+++ b/src/lxc/conf.c
17@@ -2683,8 +2683,13 @@ static int instantiate_veth(struct lxc_handler *handler, struct lxc_netdev *netd
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--
332.1.4
34