The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8037

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Normal bridge (and docs) say if unset, the default is false, however the fan bridge was defaulting to true if unset.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
From a57eb849b32ecee6aa726493e5d9784576405367 Mon Sep 17 00:00:00 2001
From: Thomas Parrott <thomas.parr...@canonical.com>
Date: Thu, 15 Oct 2020 17:07:16 +0100
Subject: [PATCH] lxd/network/driver/bridge: Fixes inconsistency between normal
 bridge and fan bridge default ipv4.nat value

Normal bridge (and docs) say if unset, the default is false, however the fan 
bridge was defaulting to true if unset.

Signed-off-by: Thomas Parrott <thomas.parr...@canonical.com>
---
 lxd/network/driver_bridge.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/network/driver_bridge.go b/lxd/network/driver_bridge.go
index c1c1b6dea0..e0d8779072 100644
--- a/lxd/network/driver_bridge.go
+++ b/lxd/network/driver_bridge.go
@@ -1169,7 +1169,7 @@ func (n *bridge) setup(oldConfig map[string]string) error 
{
                }
 
                // Configure NAT.
-               if n.config["ipv4.nat"] == "" || 
shared.IsTrue(n.config["ipv4.nat"]) {
+               if shared.IsTrue(n.config["ipv4.nat"]) {
                        if n.config["ipv4.nat.order"] == "after" {
                                err = 
n.state.Firewall.NetworkSetupOutboundNAT(n.name, overlaySubnet, nil, true)
                                if err != nil {
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to