[lxc-devel] [lxd/master] lxd/iptables: Fix ebtables handling regression

stgraber on Github lxc-bot at linuxcontainers.org
Thu Dec 12 03:19:24 UTC 2019


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/20191211/6ff87f10/attachment.bin>
-------------- next part --------------
From 8921dacdd7330be8b427909198f932d5fd8b0164 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 11 Dec 2019 22:17:31 -0500
Subject: [PATCH] lxd/iptables: Fix ebtables handling regression
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/iptables/xtables.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/iptables/xtables.go b/lxd/iptables/xtables.go
index a5f8a4f303..9c06a926bd 100644
--- a/lxd/iptables/xtables.go
+++ b/lxd/iptables/xtables.go
@@ -332,7 +332,7 @@ func matchEbtablesRule(activeRule []string, matchRule []string, deleteMode bool)
 
 		// Check the match rule field matches the active rule field.
 		// If they don't match, then this isn't one of our rules.
-		if activeRule[i] != matchRule[i] {
+		if strings.Replace(activeRule[i], "/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "", -1) != strings.Replace(matchRule[i], "/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff", "", -1) {
 			return false
 		}
 	}


More information about the lxc-devel mailing list