[lxc-devel] [lxd/master] lxd/containers: bind default value is host

stgraber on Github lxc-bot at linuxcontainers.org
Mon Dec 17 15:39:48 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181217/4701d1ed/attachment.bin>
-------------- next part --------------
From 47a0cbac9cd709fef2b02301090bfd64894468ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Mon, 17 Dec 2018 10:39:12 -0500
Subject: [PATCH] lxd/containers: bind default value is host
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/container.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/container.go b/lxd/container.go
index 23432e4718..533f5d7c93 100644
--- a/lxd/container.go
+++ b/lxd/container.go
@@ -516,7 +516,7 @@ func containerValidDevices(cluster *db.Cluster, devices types.Devices, profile b
 			}
 
 			if shared.IsTrue(m["nat"]) {
-				if m["bind"] != "host" {
+				if m["bind"] != "" && m["bind"] != "host" {
 					return fmt.Errorf("Only host-bound proxies can use NAT")
 				}
 


More information about the lxc-devel mailing list