]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: only try to delete veth when privileged 1458/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Mar 2017 12:12:52 +0000 (13:12 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 11 Mar 2017 12:12:52 +0000 (13:12 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index b94fbbb76f2b318a87c154be22eb0893b143c929..edad28f6f296337bc4a7e7ddc72e3ff3ecb319b4 100644 (file)
@@ -3019,7 +3019,7 @@ bool lxc_delete_network(struct lxc_handler *handler)
                /* Explicitly delete host veth device to prevent lingering
                 * devices. We had issues in LXD around this.
                 */
-               if (netdev->type == LXC_NET_VETH) {
+               if (netdev->type == LXC_NET_VETH && !am_unpriv()) {
                        char *hostveth;
                        if (netdev->priv.veth_attr.pair) {
                                hostveth = netdev->priv.veth_attr.pair;