[lxc-devel] [lxd/master] lxd/devices/nic: Handle recent ebtables

stgraber on Github lxc-bot at linuxcontainers.org
Sat Nov 2 18:51:25 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/20191102/e925edb7/attachment.bin>
-------------- next part --------------
From f7dc93dc26fe0072c22f37fb9485ca041f9c1392 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Sat, 2 Nov 2019 10:26:25 -0400
Subject: [PATCH] lxd/devices/nic: Handle recent ebtables
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/device/nic_bridged.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/device/nic_bridged.go b/lxd/device/nic_bridged.go
index c35afbd1d4..258d49a022 100644
--- a/lxd/device/nic_bridged.go
+++ b/lxd/device/nic_bridged.go
@@ -535,7 +535,7 @@ func (d *nicBridged) matchEbtablesRule(activeRule []string, matchRule []string,
 
 		// 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